2010-11-26 10:13:13

by Bala Shanmugam

[permalink] [raw]
Subject: [PATCH] Bluetooth: Add new PID for Atheros 3011

Atheros 3011 has small sflash firmware and needs to be
blacklisted in transport driver to load actual firmware
in DFU driver.
Signed-off-by: Bala Shanmugam <[email protected]>
---
drivers/bluetooth/ath3k.c | 2 ++
drivers/bluetooth/btusb.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 128cae4..c70fb0b 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -35,6 +35,8 @@
static struct usb_device_id ath3k_table[] = {
/* Atheros AR3011 */
{ USB_DEVICE(0x0CF3, 0x3000) },
+ /* Atheros AR3011 with sflash firmware*/
+ { USB_DEVICE(0x0CF3, 0x3002) },
{ } /* Terminating entry */
};

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index ab3894f..ca3fdc1 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -99,6 +99,9 @@ static struct usb_device_id blacklist_table[] = {
/* Broadcom BCM2033 without firmware */
{ USB_DEVICE(0x0a5c, 0x2033), .driver_info = BTUSB_IGNORE },

+ /* Atheros 3011 with sflash firmware */
+ { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
+
/* Broadcom BCM2035 */
{ USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU },
{ USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_WRONG_SCO_MTU },
--
1.6.3.3



2010-11-30 05:59:32

by Bala Shanmugam

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Add new PID for Atheros 3011

Alexander Holler wrote:
> Am 29.11.2010 07:09, schrieb Bala Shanmugam:
>
>
>> This patch is for Atheros 3011 with sflash firmware.
>> This device gets identified Generic bluetooth USB device when plugged in.
>> We are blacklisting 3002 in btusb to load actual firmware in ath3k.
>> Latest firmware comes up with PID 3005 and not 3002.
>>
>
> Thanks for the explanation. Is there a place in the web where the latest
> firmware could be found?
>
> The only place I've found to look at was the linux-firmware repository
> and that repo currently has no new firmware for the ath3k.
>
> Btw., did you have a look at the small patch for ath3k I posted lately:
>
> http://marc.info/?l=linux-bluetooth&m=129045856314243
>
> This avoids storing the firmware in RAM (I don't see a reason to do
> that, it is never used again) and simplifies the small driver a bit.
>
> Regards,
>
> Alexander
>
Alex,

I am waiting for official release for the firmware and will upload the
same today or tomorrow.
I had look at your patch its good. I did these changes few months
before and it didn't work for me.
I couldn't find time to debug it that time.
Will test it now and update you.

Regards,
Bala.

2010-11-29 11:28:11

by Alexander Holler

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Add new PID for Atheros 3011

Am 29.11.2010 07:09, schrieb Bala Shanmugam:

> This patch is for Atheros 3011 with sflash firmware.
> This device gets identified Generic bluetooth USB device when plugged in.
> We are blacklisting 3002 in btusb to load actual firmware in ath3k.
> Latest firmware comes up with PID 3005 and not 3002.

Thanks for the explanation. Is there a place in the web where the latest
firmware could be found?

The only place I've found to look at was the linux-firmware repository
and that repo currently has no new firmware for the ath3k.

Btw., did you have a look at the small patch for ath3k I posted lately:

http://marc.info/?l=linux-bluetooth&m=129045856314243

This avoids storing the firmware in RAM (I don't see a reason to do
that, it is never used again) and simplifies the small driver a bit.

Regards,

Alexander

2010-11-29 06:09:37

by Bala Shanmugam

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Add new PID for Atheros 3011

Alexander Holler wrote:
> Am 26.11.2010 16:40, schrieb Alexander Holler:
>
>> Hello,
>>
>> Am 26.11.2010 13:10, schrieb Bala Shanmugam:
>>
>>> Marcel Holtmann wrote:
>>>
>>>> Hi Bala,
>>>>
>>>>
>>>>> Atheros 3011 has small sflash firmware and needs to be
>>>>> blacklisted in transport driver to load actual firmware
>>>>> in DFU driver.
>>>>>
>>>> please add an empty line here. The signed-off line should always be
>>>> separated from the commit message. The git am takes it literal as it is
>>>> and does not modify it.
>>>>
>>>>
>>>>> Signed-off-by: Bala Shanmugam <[email protected]>
>>>>> ---
>>>>> drivers/bluetooth/ath3k.c | 2 ++
>>>>> drivers/bluetooth/btusb.c | 3 +++
>>>>> 2 files changed, 5 insertions(+), 0 deletions(-)
>>>>>
>>>>> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
>>>>> index 128cae4..c70fb0b 100644
>>>>> --- a/drivers/bluetooth/ath3k.c
>>>>> +++ b/drivers/bluetooth/ath3k.c
>>>>> @@ -35,6 +35,8 @@
>>>>> static struct usb_device_id ath3k_table[] = {
>>>>> /* Atheros AR3011 */
>>>>> { USB_DEVICE(0x0CF3, 0x3000) },
>>>>>
>>>> For the sake of readability add another empty line here as well.
>>>>
>>>>
>>>>> + /* Atheros AR3011 with sflash firmware*/
>>>>> + { USB_DEVICE(0x0CF3, 0x3002) },
>>>>>
>> I don't understand this patch and starting bluetooth will fail here,
>> when that patch is applied (to 2.6.36.1):
>>
>> -----------
>> [ 118.395793] usb 1-1.3: new full speed USB device using orion-ehci and
>> address 4
>> [ 118.506262] usb 1-1.3: New USB device found, idVendor=0cf3,
>> idProduct=3000
>> [ 118.506280] usb 1-1.3: New USB device strings: Mfr=0, Product=0,
>> SerialNumber=0
>> [ 118.654973] Bluetooth: Atheros AR30xx firmware driver ver 1.0
>> [ 119.072139] usbcore: registered new interface driver ath3k
>> [ 119.184499] usb 1-1.3: USB disconnect, address 4
>> [ 120.695642] usb 1-1.3: new full speed USB device using orion-ehci and
>> address 5
>> [ 120.806394] usb 1-1.3: New USB device found, idVendor=0cf3,
>> idProduct=3002
>> [ 120.806410] usb 1-1.3: New USB device strings: Mfr=0, Product=0,
>> SerialNumber=0
>> [ 125.815007] ath3k_load_firmware: Can't change to loading configuration
>> err
>> [ 125.815096] ath3k: probe of 1-1.3:1.0 failed with error -5
>> -----------
>>
>> As I've understood it, the pid 0x3002 will only come up, when the
>> firmwire was already uploaded. So adding 0x3002 to ath3k seems to be wrong.
>>
>
> I assume bluetooth will fail here, because of the second part of that
> patch which adds BTUSB_IGNORE to btusb.c:
>
> ------------
> + /* Atheros 3011 with sflash firmware */
> + { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
> ------------
>
> This means when the firmware was uploaded and the device identifies
> itself afterwards with the pid 0x3002, btusb will ignore it.
>
> Regards,
>
> Alexander
>
Alex,

This patch is for Atheros 3011 with sflash firmware.
This device gets identified Generic bluetooth USB device when plugged in.
We are blacklisting 3002 in btusb to load actual firmware in ath3k.
Latest firmware comes up with PID 3005 and not 3002.

Regards,
Bala.

2010-11-26 15:55:01

by Alexander Holler

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Add new PID for Atheros 3011

Am 26.11.2010 16:40, schrieb Alexander Holler:
> Hello,
>
> Am 26.11.2010 13:10, schrieb Bala Shanmugam:
>> Marcel Holtmann wrote:
>>> Hi Bala,
>>>
>>>> Atheros 3011 has small sflash firmware and needs to be
>>>> blacklisted in transport driver to load actual firmware
>>>> in DFU driver.
>>>
>>> please add an empty line here. The signed-off line should always be
>>> separated from the commit message. The git am takes it literal as it is
>>> and does not modify it.
>>>
>>>> Signed-off-by: Bala Shanmugam <[email protected]>
>>>> ---
>>>> drivers/bluetooth/ath3k.c | 2 ++
>>>> drivers/bluetooth/btusb.c | 3 +++
>>>> 2 files changed, 5 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
>>>> index 128cae4..c70fb0b 100644
>>>> --- a/drivers/bluetooth/ath3k.c
>>>> +++ b/drivers/bluetooth/ath3k.c
>>>> @@ -35,6 +35,8 @@
>>>> static struct usb_device_id ath3k_table[] = {
>>>> /* Atheros AR3011 */
>>>> { USB_DEVICE(0x0CF3, 0x3000) },
>>>
>>> For the sake of readability add another empty line here as well.
>>>
>>>> + /* Atheros AR3011 with sflash firmware*/
>>>> + { USB_DEVICE(0x0CF3, 0x3002) },
>
> I don't understand this patch and starting bluetooth will fail here,
> when that patch is applied (to 2.6.36.1):
>
> -----------
> [ 118.395793] usb 1-1.3: new full speed USB device using orion-ehci and
> address 4
> [ 118.506262] usb 1-1.3: New USB device found, idVendor=0cf3,
> idProduct=3000
> [ 118.506280] usb 1-1.3: New USB device strings: Mfr=0, Product=0,
> SerialNumber=0
> [ 118.654973] Bluetooth: Atheros AR30xx firmware driver ver 1.0
> [ 119.072139] usbcore: registered new interface driver ath3k
> [ 119.184499] usb 1-1.3: USB disconnect, address 4
> [ 120.695642] usb 1-1.3: new full speed USB device using orion-ehci and
> address 5
> [ 120.806394] usb 1-1.3: New USB device found, idVendor=0cf3,
> idProduct=3002
> [ 120.806410] usb 1-1.3: New USB device strings: Mfr=0, Product=0,
> SerialNumber=0
> [ 125.815007] ath3k_load_firmware: Can't change to loading configuration
> err
> [ 125.815096] ath3k: probe of 1-1.3:1.0 failed with error -5
> -----------
>
> As I've understood it, the pid 0x3002 will only come up, when the
> firmwire was already uploaded. So adding 0x3002 to ath3k seems to be wrong.

I assume bluetooth will fail here, because of the second part of that
patch which adds BTUSB_IGNORE to btusb.c:

------------
+ /* Atheros 3011 with sflash firmware */
+ { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
------------

This means when the firmware was uploaded and the device identifies
itself afterwards with the pid 0x3002, btusb will ignore it.

Regards,

Alexander

2010-11-26 15:40:01

by Alexander Holler

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Add new PID for Atheros 3011

Hello,

Am 26.11.2010 13:10, schrieb Bala Shanmugam:
> Marcel Holtmann wrote:
>> Hi Bala,
>>
>>> Atheros 3011 has small sflash firmware and needs to be
>>> blacklisted in transport driver to load actual firmware
>>> in DFU driver.
>>
>> please add an empty line here. The signed-off line should always be
>> separated from the commit message. The git am takes it literal as it is
>> and does not modify it.
>>
>>> Signed-off-by: Bala Shanmugam <[email protected]>
>>> ---
>>> drivers/bluetooth/ath3k.c | 2 ++
>>> drivers/bluetooth/btusb.c | 3 +++
>>> 2 files changed, 5 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
>>> index 128cae4..c70fb0b 100644
>>> --- a/drivers/bluetooth/ath3k.c
>>> +++ b/drivers/bluetooth/ath3k.c
>>> @@ -35,6 +35,8 @@
>>> static struct usb_device_id ath3k_table[] = {
>>> /* Atheros AR3011 */
>>> { USB_DEVICE(0x0CF3, 0x3000) },
>>
>> For the sake of readability add another empty line here as well.
>>
>>> + /* Atheros AR3011 with sflash firmware*/
>>> + { USB_DEVICE(0x0CF3, 0x3002) },

I don't understand this patch and starting bluetooth will fail here,
when that patch is applied (to 2.6.36.1):

-----------
[ 118.395793] usb 1-1.3: new full speed USB device using orion-ehci and
address 4
[ 118.506262] usb 1-1.3: New USB device found, idVendor=0cf3,
idProduct=3000
[ 118.506280] usb 1-1.3: New USB device strings: Mfr=0, Product=0,
SerialNumber=0
[ 118.654973] Bluetooth: Atheros AR30xx firmware driver ver 1.0
[ 119.072139] usbcore: registered new interface driver ath3k
[ 119.184499] usb 1-1.3: USB disconnect, address 4
[ 120.695642] usb 1-1.3: new full speed USB device using orion-ehci and
address 5
[ 120.806394] usb 1-1.3: New USB device found, idVendor=0cf3,
idProduct=3002
[ 120.806410] usb 1-1.3: New USB device strings: Mfr=0, Product=0,
SerialNumber=0
[ 125.815007] ath3k_load_firmware: Can't change to loading
configuration err
[ 125.815096] ath3k: probe of 1-1.3:1.0 failed with error -5
-----------

As I've understood it, the pid 0x3002 will only come up, when the
firmwire was already uploaded. So adding 0x3002 to ath3k seems to be wrong.

Regards,

Alexander

2010-11-26 12:10:12

by Bala Shanmugam

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Add new PID for Atheros 3011

Marcel Holtmann wrote:
> Hi Bala,
>
>
>> Atheros 3011 has small sflash firmware and needs to be
>> blacklisted in transport driver to load actual firmware
>> in DFU driver.
>>
>
> please add an empty line here. The signed-off line should always be
> separated from the commit message. The git am takes it literal as it is
> and does not modify it.
>
>
>> Signed-off-by: Bala Shanmugam <[email protected]>
>> ---
>> drivers/bluetooth/ath3k.c | 2 ++
>> drivers/bluetooth/btusb.c | 3 +++
>> 2 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
>> index 128cae4..c70fb0b 100644
>> --- a/drivers/bluetooth/ath3k.c
>> +++ b/drivers/bluetooth/ath3k.c
>> @@ -35,6 +35,8 @@
>> static struct usb_device_id ath3k_table[] = {
>> /* Atheros AR3011 */
>> { USB_DEVICE(0x0CF3, 0x3000) },
>>
>
> For the sake of readability add another empty line here as well.
>
>
>> + /* Atheros AR3011 with sflash firmware*/
>> + { USB_DEVICE(0x0CF3, 0x3002) },
>>
>
> And for consistency, add another empty line here as well.
>
>
>> { } /* Terminating entry */
>> };
>>
>> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
>> index ab3894f..ca3fdc1 100644
>> --- a/drivers/bluetooth/btusb.c
>> +++ b/drivers/bluetooth/btusb.c
>> @@ -99,6 +99,9 @@ static struct usb_device_id blacklist_table[] = {
>> /* Broadcom BCM2033 without firmware */
>> { USB_DEVICE(0x0a5c, 0x2033), .driver_info = BTUSB_IGNORE },
>>
>> + /* Atheros 3011 with sflash firmware */
>> + { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
>> +
>> /* Broadcom BCM2035 */
>> { USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU },
>> { USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_WRONG_SCO_MTU },
>>
>
> If this finally solves the mess with the firmware loading, then I am
> fine with it. It looks clean and simple now.
>
> Acked-by: Marcel Holtmann <[email protected]>
>
> Regards
>
> Marcel
>
>
>
Yes Marcel it solves our problem.
Probably, later if our customers wants to use different VID/PID,
we might have to blacklist those.
I have sent the updated patch.

Thanks for your comments.

Regards,
Bala.

2010-11-26 11:22:39

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Add new PID for Atheros 3011

Hi Bala,

> Atheros 3011 has small sflash firmware and needs to be
> blacklisted in transport driver to load actual firmware
> in DFU driver.

please add an empty line here. The signed-off line should always be
separated from the commit message. The git am takes it literal as it is
and does not modify it.

> Signed-off-by: Bala Shanmugam <[email protected]>
> ---
> drivers/bluetooth/ath3k.c | 2 ++
> drivers/bluetooth/btusb.c | 3 +++
> 2 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
> index 128cae4..c70fb0b 100644
> --- a/drivers/bluetooth/ath3k.c
> +++ b/drivers/bluetooth/ath3k.c
> @@ -35,6 +35,8 @@
> static struct usb_device_id ath3k_table[] = {
> /* Atheros AR3011 */
> { USB_DEVICE(0x0CF3, 0x3000) },

For the sake of readability add another empty line here as well.

> + /* Atheros AR3011 with sflash firmware*/
> + { USB_DEVICE(0x0CF3, 0x3002) },

And for consistency, add another empty line here as well.

> { } /* Terminating entry */
> };
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index ab3894f..ca3fdc1 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -99,6 +99,9 @@ static struct usb_device_id blacklist_table[] = {
> /* Broadcom BCM2033 without firmware */
> { USB_DEVICE(0x0a5c, 0x2033), .driver_info = BTUSB_IGNORE },
>
> + /* Atheros 3011 with sflash firmware */
> + { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
> +
> /* Broadcom BCM2035 */
> { USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU },
> { USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_WRONG_SCO_MTU },

If this finally solves the mess with the firmware loading, then I am
fine with it. It looks clean and simple now.

Acked-by: Marcel Holtmann <[email protected]>

Regards

Marcel