All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Add Atheros AR3012 one PID/VID supported
@ 2011-06-29  7:14 Li, Steven
  2011-06-30 21:11 ` Gustavo F. Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Li, Steven @ 2011-06-29  7:14 UTC (permalink / raw)
  To: linux-bluetooth

DQpUaGUgbmV3IEF0aDNrIG5lZWRzIHRvIGRvd25sb2FkIHBhdGNoIGFuZCByYWRpbyB0YWJsZSwN
CmFuZCBpdCBrZWVwcyBzYW1lIFBJRC9WSUQgZXZlbiBhZnRlciBkb3dubG9hZGluZyB0aGUgcGF0
Y2ggYW5kIHJhZGlvDQp0YWJsZS4gVGhpcyBwYXRjaCBpcyB0byB1c2UgdGhlIGJjZERldmljZSAo
RGV2aWNlIFJlbGVhc2UgTnVtYmVyKSB0bw0KanVkZ2Ugd2hldGhlciB0aGUgY2hpcCBoYXMgYmVl
biBwYXRjaGVkIG9yIG5vdC4gVGhlIGluaXQgYmNkRGV2aWNlDQp2YWx1ZSBvZiB0aGUgY2hpcCBp
cyAweDAwMDEsIHRoaXMgdmFsdWUgaW5jcmVhc2VzIGFmdGVyIHBhdGNoIGFuZA0KcmFkaW8gdGFi
bGUgZG93bmxvYWRpbmcuDQoNClNpZ25lZC1vZmYtYnk6IFN0ZXZlbi5MaSA8eW9uZ2xpQHFjYS5x
dWFsY29tbS5jb20+DQotLS0NCiBkcml2ZXJzL2JsdWV0b290aC9hdGgzay5jIHwgICAgNSArKysr
Kw0KIGRyaXZlcnMvYmx1ZXRvb3RoL2J0dXNiLmMgfCAgIDEyICsrKysrKysrKysrLQ0KIDIgZmls
ZXMgY2hhbmdlZCwgMTYgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbnMoLSkNCg0KZGlmZiAtLWdp
dCBhL2RyaXZlcnMvYmx1ZXRvb3RoL2F0aDNrLmMgYi9kcml2ZXJzL2JsdWV0b290aC9hdGgzay5j
DQppbmRleCA2YmFjZWYzLi5hNTg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p
Y2UgKnVkZXYgPSBpbnRlcmZhY2VfdG9fdXNiZGV2KGludGYpOw0KKw0KKwkJLyogT2xkIGZpcm13
YXJlIHdvdWxkIG90aGVyd2lzZSBsZXQgYXRoM2sgZHJpdmVyIGxvYWQNCisJCSAqIHBhdGNoIGFu
ZCBzeXNjb25maWcgZmlsZXMgKi8NCisJCWlmIChsZTE2X3RvX2NwdSh1ZGV2LT5kZXNjcmlwdG9y
LmJjZERldmljZSkgPD0gMHgwMDAxKQ0KKwkJCXJldHVybiAtRU5PREVWOw0KKwl9DQorDQogCWRh
dGEgPSBremFsbG9jKHNpemVvZigqZGF0YSksIEdGUF9LRVJORUwpOw0KIAlpZiAoIWRhdGEpDQog
CQlyZXR1cm4gLUVOT01FTTsNCi0tIA0KMS43LjENCg==

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: Add Atheros AR3012 one PID/VID supported
  2011-06-29  7:14 [PATCH] Bluetooth: Add Atheros AR3012 one PID/VID supported Li, Steven
@ 2011-06-30 21:11 ` Gustavo F. Padovan
  2011-07-01  4:57   ` Gustavo F. Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo F. Padovan @ 2011-06-30 21:11 UTC (permalink / raw)
  To: Li, Steven; +Cc: linux-bluetooth

* Li, Steven <yongli@qca.qualcomm.com> [2011-06-29 07:14:47 +0000]:

> 
> The new Ath3k needs to download patch and radio table,
> and it keeps same PID/VID even after downloading the patch and radio
> table. This patch is to use the bcdDevice (Device Release Number) to
> judge whether the chip has been patched or not. The init bcdDevice
> value of the chip is 0x0001, this value increases after patch and
> radio table downloading.
> 
> Signed-off-by: Steven.Li <yongli@qca.qualcomm.com>
> ---
>  drivers/bluetooth/ath3k.c |    5 +++++
>  drivers/bluetooth/btusb.c |   12 +++++++++++-
>  2 files changed, 16 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> index 6bacef3..a585473 100644
> --- a/drivers/bluetooth/ath3k.c
> +++ b/drivers/bluetooth/ath3k.c
> @@ -375,6 +375,11 @@ static int ath3k_probe(struct usb_interface *intf,
>  
>  	/* load patch and sysconfig files for AR3012 */
>  	if (id->driver_info & BTUSB_ATH3012) {
> +
> +		/* New firmware with patch and sysconfig files already loaded */
> +		if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x0001)
> +			return -ENODEV;
> +
>  		ret = ath3k_load_patch(udev);
>  		if (ret < 0) {
>  			BT_ERR("Loading patch file failed");
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index c2de895..91d13a9 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -54,6 +54,7 @@ static struct usb_driver btusb_driver;
>  #define BTUSB_BCM92035		0x10
>  #define BTUSB_BROKEN_ISOC	0x20
>  #define BTUSB_WRONG_SCO_MTU	0x40
> +#define BTUSB_ATH3012		0x80
>  
>  static struct usb_device_id btusb_table[] = {
>  	/* Generic Bluetooth USB device */
> @@ -110,7 +111,7 @@ static struct usb_device_id blacklist_table[] = {
>  	{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
>  
>  	/* Atheros 3012 with sflash firmware */
> -	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_IGNORE },
> +	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
>  
>  	/* Atheros AR5BBU12 with sflash firmware */
>  	{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
> @@ -914,6 +915,15 @@ static int btusb_probe(struct usb_interface *intf,
>  	if (ignore_sniffer && id->driver_info & BTUSB_SNIFFER)
>  		return -ENODEV;
>  
> +	if (id->driver_info & BTUSB_ATH3012) {
> +		struct usb_device *udev = interface_to_usbdev(intf);
> +
> +		/* Old firmware would otherwise let ath3k driver load
> +		 * patch and sysconfig files */
> +		if (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x0001)
> +			return -ENODEV;
> +	}
> +

Patch does no apply

Applying: Bluetooth: Add Atheros AR3012 one PID/VID supported
/home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:14: trailing whitespace.

/home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:15: trailing whitespace.
                /* New firmware with patch and sysconfig files already loaded */
/home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:16: trailing whitespace.
                if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x0001)
/home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:17: trailing whitespace.
                        return -ENODEV;
/home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:18: trailing whitespace.

	Gustavo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: Add Atheros AR3012 one PID/VID supported
  2011-06-30 21:11 ` Gustavo F. Padovan
@ 2011-07-01  4:57   ` Gustavo F. Padovan
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo F. Padovan @ 2011-07-01  4:57 UTC (permalink / raw)
  To: Li, Steven, linux-bluetooth

* Gustavo F. Padovan <padovan@profusion.mobi> [2011-06-30 18:11:49 -0300]:

> * Li, Steven <yongli@qca.qualcomm.com> [2011-06-29 07:14:47 +0000]:
> 
> > 
> > The new Ath3k needs to download patch and radio table,
> > and it keeps same PID/VID even after downloading the patch and radio
> > table. This patch is to use the bcdDevice (Device Release Number) to
> > judge whether the chip has been patched or not. The init bcdDevice
> > value of the chip is 0x0001, this value increases after patch and
> > radio table downloading.
> > 
> > Signed-off-by: Steven.Li <yongli@qca.qualcomm.com>
> > ---
> >  drivers/bluetooth/ath3k.c |    5 +++++
> >  drivers/bluetooth/btusb.c |   12 +++++++++++-
> >  2 files changed, 16 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> > index 6bacef3..a585473 100644
> > --- a/drivers/bluetooth/ath3k.c
> > +++ b/drivers/bluetooth/ath3k.c
> > @@ -375,6 +375,11 @@ static int ath3k_probe(struct usb_interface *intf,
> >  
> >  	/* load patch and sysconfig files for AR3012 */
> >  	if (id->driver_info & BTUSB_ATH3012) {
> > +
> > +		/* New firmware with patch and sysconfig files already loaded */
> > +		if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x0001)
> > +			return -ENODEV;
> > +
> >  		ret = ath3k_load_patch(udev);
> >  		if (ret < 0) {
> >  			BT_ERR("Loading patch file failed");
> > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> > index c2de895..91d13a9 100644
> > --- a/drivers/bluetooth/btusb.c
> > +++ b/drivers/bluetooth/btusb.c
> > @@ -54,6 +54,7 @@ static struct usb_driver btusb_driver;
> >  #define BTUSB_BCM92035		0x10
> >  #define BTUSB_BROKEN_ISOC	0x20
> >  #define BTUSB_WRONG_SCO_MTU	0x40
> > +#define BTUSB_ATH3012		0x80
> >  
> >  static struct usb_device_id btusb_table[] = {
> >  	/* Generic Bluetooth USB device */
> > @@ -110,7 +111,7 @@ static struct usb_device_id blacklist_table[] = {
> >  	{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
> >  
> >  	/* Atheros 3012 with sflash firmware */
> > -	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_IGNORE },
> > +	{ USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
> >  
> >  	/* Atheros AR5BBU12 with sflash firmware */
> >  	{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
> > @@ -914,6 +915,15 @@ static int btusb_probe(struct usb_interface *intf,
> >  	if (ignore_sniffer && id->driver_info & BTUSB_SNIFFER)
> >  		return -ENODEV;
> >  
> > +	if (id->driver_info & BTUSB_ATH3012) {
> > +		struct usb_device *udev = interface_to_usbdev(intf);
> > +
> > +		/* Old firmware would otherwise let ath3k driver load
> > +		 * patch and sysconfig files */
> > +		if (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x0001)
> > +			return -ENODEV;
> > +	}
> > +
> 
> Patch does no apply
> 
> Applying: Bluetooth: Add Atheros AR3012 one PID/VID supported
> /home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:14: trailing whitespace.
> 
> /home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:15: trailing whitespace.
>                 /* New firmware with patch and sysconfig files already loaded */
> /home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:16: trailing whitespace.
>                 if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x0001)
> /home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:17: trailing whitespace.
>                         return -ENODEV;
> /home/padovan/p/linux-trees/bluetooth-next-2.6/.git/rebase-apply/patch:18: trailing whitespace.

Heh, your patch is in base64, hence why it does not apply. Resend it using
git-send-email, please.

	Gustavo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-01  4:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-29  7:14 [PATCH] Bluetooth: Add Atheros AR3012 one PID/VID supported Li, Steven
2011-06-30 21:11 ` Gustavo F. Padovan
2011-07-01  4:57   ` Gustavo F. Padovan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.