2010-11-01 14:32:39

by Ming Lei

[permalink] [raw]
Subject: [PATCH] ath9k-htc: fix probe failure

From: Ming Lei <[email protected]>

Obviously, we should set the transfer type consitent with
endpoint descriptor type to urb, this patch fixes the probe
failure below:

[ 8.018768] PM: Removing info for No Bus:1-2.2
[ 8.019470] usb 1-2.2: BOGUS urb xfer, pipe 3 != type 1
[ 8.031707] usb 1-2.2: ath9k_htc: Unable to allocate URBs
[ 8.037506] ath9k_hif_usb: probe of 1-2.2:1.0 failed with error -22
[ 8.044250] usbcore: registered new interface driver ath9k_hif_usb

Signed-off-by: Ming Lei <[email protected]>
---
drivers/net/wireless/ath/ath9k/hif_usb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 728d904..04242bc 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -541,7 +541,7 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
}

usb_fill_int_urb(urb, hif_dev->udev,
- usb_rcvbulkpipe(hif_dev->udev,
+ usb_rcvintpipe(hif_dev->udev,
USB_REG_IN_PIPE),
nskb->data, MAX_REG_IN_BUF_SIZE,
ath9k_hif_usb_reg_in_cb, nskb, 1);
@@ -721,7 +721,7 @@ static int ath9k_hif_usb_alloc_reg_in_urb(struct hif_device_usb *hif_dev)
goto err;

usb_fill_int_urb(hif_dev->reg_in_urb, hif_dev->udev,
- usb_rcvbulkpipe(hif_dev->udev,
+ usb_rcvintpipe(hif_dev->udev,
USB_REG_IN_PIPE),
skb->data, MAX_REG_IN_BUF_SIZE,
ath9k_hif_usb_reg_in_cb, skb, 1);
--
1.7.3



2010-11-01 16:39:10

by Rajkumar Manoharan

[permalink] [raw]
Subject: RE: [PATCH] ath9k-htc: fix probe failure

From: Ming Lei <[email protected]>

Obviously, we should set the transfer type consitent with
endpoint descriptor type to urb, this patch fixes the probe
failure below:

[ 8.018768] PM: Removing info for No Bus:1-2.2
[ 8.019470] usb 1-2.2: BOGUS urb xfer, pipe 3 != type 1
[ 8.031707] usb 1-2.2: ath9k_htc: Unable to allocate URBs
[ 8.037506] ath9k_hif_usb: probe of 1-2.2:1.0 failed with error -22
[ 8.044250] usbcore: registered new interface driver ath9k_hif_usb

NACK. To optimize CPU consumption and scan duration, HTC device firmwares
were patched to change descriptor types of EP3 and EP4 from Interrupt to Bulk.
After firmware download in initialization, endpoint descriptors got changed.
Please use the latest firmwares from linux-firmware git tree.

http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary

- Rajkumar

2010-11-03 14:13:20

by Ming Lei

[permalink] [raw]
Subject: Re: [PATCH] ath9k-htc: fix probe failure

2010/11/2 Rajkumar Manoharan <[email protected]>:
> From: Ming Lei <[email protected]>
>
> Obviously, we should set the transfer type consitent with
> endpoint descriptor type to urb, this patch fixes the probe
> failure below:
>
> [ ? ?8.018768] PM: Removing info for No Bus:1-2.2
> [ ? ?8.019470] usb 1-2.2: BOGUS urb xfer, pipe 3 != type 1
> [ ? ?8.031707] usb 1-2.2: ath9k_htc: Unable to allocate URBs
> [ ? ?8.037506] ath9k_hif_usb: probe of 1-2.2:1.0 failed with error -22
> [ ? ?8.044250] usbcore: registered new interface driver ath9k_hif_usb
>
> NACK. To optimize CPU consumption and scan duration, ?HTC device firmwares
> were patched to change descriptor types of EP3 and EP4 from Interrupt to Bulk.
> After firmware download in initialization, endpoint descriptors got changed.
> Please use the latest firmwares from linux-firmware git tree.
>
> http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary

My card is UB91, so you means I should update to this one(ar9271.fw) blew:

http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob;f=ar9271.fw;h=0ec953b404c1912dc64fa3b0171cffae82b0f375;hb=8f919160792e4702c6b7a67a243cea4f757407e4

This one still can't prevent the probe failure...

Any suggestions?

thanks,
--
Lei Ming

2010-11-03 16:41:06

by Rajkumar Manoharan

[permalink] [raw]
Subject: RE: [PATCH] ath9k-htc: fix probe failure

>2010/11/2 Rajkumar Manoharan <[email protected]>:
>> From: Ming Lei <[email protected]>
>>
>> Obviously, we should set the transfer type consitent with
>> endpoint descriptor type to urb, this patch fixes the probe
>> failure below:
>>
>>[ 8.018768] PM: Removing info for No Bus:1-2.2
>> [ 8.019470] usb 1-2.2: BOGUS urb xfer, pipe 3 != type 1
>> [ 8.031707] usb 1-2.2: ath9k_htc: Unable to allocate URBs
>> [ 8.037506] ath9k_hif_usb: probe of 1-2.2:1.0 failed with error -22
>> [ 8.044250] usbcore: registered new interface driver ath9k_hif_usb
>>
>> NACK. To optimize CPU consumption and scan duration, HTC device firmwares
>> were patched to change descriptor types of EP3 and EP4 from Interrupt to Bulk.
>> After firmware download in initialization, endpoint descriptors got changed.
>> Please use the latest firmwares from linux-firmware git tree.
>>
>> http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary
>
>My card is UB91, so you means I should update to this one(ar9271.fw) blew:
>
>http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux->firmware.git;a=blob;f=ar9271.fw;h=0ec953b404c1912dc64fa3b0171cffae82b0f375;hb=8f919160792e4702c6b7a67a243cea4f757407e4
>
>This one still can't prevent the probe failure...

>Any suggestions?

Could you please try it without CONFIG_USB_DEBUG option.

Thanks,
Rajkumar

2010-11-04 02:51:15

by Rajkumar Manoharan

[permalink] [raw]
Subject: RE: [PATCH] ath9k-htc: fix probe failure

>2010/11/4 Rajkumar Manoharan <[email protected]>:
>>>2010/11/2 Rajkumar Manoharan <[email protected]>:
>>>> From: Ming Lei <[email protected]>
>>>>
>>>> Obviously, we should set the transfer type consitent with
>>>> endpoint descriptor type to urb, this patch fixes the probe
>>>> failure below:
>>>>
>>>>[ 8.018768] PM: Removing info for No Bus:1-2.2
>>>> [ 8.019470] usb 1-2.2: BOGUS urb xfer, pipe 3 != type 1
>>>> [ 8.031707] usb 1-2.2: ath9k_htc: Unable to allocate URBs
>>>> [ 8.037506] ath9k_hif_usb: probe of 1-2.2:1.0 failed with error -22
>>>> [ 8.044250] usbcore: registered new interface driver ath9k_hif_usb
>>>>
>>>> NACK. To optimize CPU consumption and scan duration, HTC device firmwares
>>>> were patched to change descriptor types of EP3 and EP4 from Interrupt to Bulk.
>>>> After firmware download in initialization, endpoint descriptors got changed.
>>>> Please use the latest firmwares from linux-firmware git tree.
>>>>
>>>> http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary
>>>
>>>My card is UB91, so you means I should update to this one(ar9271.fw) blew:
>>>
>>>http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux->>firmware.git;a=blob;f=ar9271.fw;h=0ec953b404c1912dc64fa3b0171cffae82b0f375;hb=8f919160792e4702c6b7a67a243cea4f757407e4
>>>
>>>This one still can't prevent the probe failure...
>>
>>>Any suggestions?
>>
>> Could you please try it without CONFIG_USB_DEBUG option.
>
>I don't think disabling CONFIG_USB_DEBUG can prevent the .probe failure,
>which only don't print some messages.
>
>So this patch does make sense, doesn't it?

The recent commit "check the endpoint type against the pipe type" in usb under DEBUG is causing probe failure,
It's conditional on CONFIG_USB_DEBUG, so it won't affect normal users. But this probe failure under DEBUG
needs to be addressed without causing any IOT issue.

Thanks,
Rajkumar

2010-11-04 02:02:37

by Ming Lei

[permalink] [raw]
Subject: Re: [PATCH] ath9k-htc: fix probe failure

2010/11/4 Rajkumar Manoharan <[email protected]>:
>>2010/11/2 Rajkumar Manoharan <[email protected]>:
>>> From: Ming Lei <[email protected]>
>>>
>>> Obviously, we should set the transfer type consitent with
>>> endpoint descriptor type to urb, this patch fixes the probe
>>> failure below:
>>>
>>>[ ? ?8.018768] PM: Removing info for No Bus:1-2.2
>>> [ ? ?8.019470] usb 1-2.2: BOGUS urb xfer, pipe 3 != type 1
>>> [ ? ?8.031707] usb 1-2.2: ath9k_htc: Unable to allocate URBs
>>> [ ? ?8.037506] ath9k_hif_usb: probe of 1-2.2:1.0 failed with error -22
>>> [ ? ?8.044250] usbcore: registered new interface driver ath9k_hif_usb
>>>
>>> NACK. To optimize CPU consumption and scan duration, ?HTC device firmwares
>>> were patched to change descriptor types of EP3 and EP4 from Interrupt to Bulk.
>>> After firmware download in initialization, endpoint descriptors got changed.
>>> Please use the latest firmwares from linux-firmware git tree.
>>>
>>> http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=summary
>>
>>My card is UB91, so you means I should update to this one(ar9271.fw) blew:
>>
>>http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux->firmware.git;a=blob;f=ar9271.fw;h=0ec953b404c1912dc64fa3b0171cffae82b0f375;hb=8f919160792e4702c6b7a67a243cea4f757407e4
>>
>>This one still can't prevent the probe failure...
>
>>Any suggestions?
>
> Could you please try it without CONFIG_USB_DEBUG option.

I don't think disabling CONFIG_USB_DEBUG can prevent the .probe failure,
which only don't print some messages.

So this patch does make sense, doesn't it?

thanks,
--
Lei Ming