]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
carl9170: fix sending URBs with wrong type when using full-speed
authorRonald Wahl <ronald.wahl@raritan.com>
Thu, 7 Aug 2014 12:15:50 +0000 (14:15 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 18 Sep 2014 14:39:58 +0000 (16:39 +0200)
commitec78ef0061ee45643946974bc6fecff25e311230
tree7f1896a309ab3f23c7d132bd745cefc9d9e61f5a
parent9d735a8a6cd554ca13907b01c199650852036497
carl9170: fix sending URBs with wrong type when using full-speed

commit 671796dd96b6cd85b75fba9d3007bcf7e5f7c309 upstream.

The driver assumes that endpoint 4 is always an interrupt endpoint.
Unfortunately the type differs between high-speed and full-speed
configurations while in the former case it is indeed an interrupt
endpoint this is not true for the latter case - here it is a bulk
endpoint. When sending URBs with the wrong type the kernel will
generate a warning message including backtrace. In this specific
case there will be a huge amount of warnings which can bring the system
to freeze.

To fix this we are now sending URBs to endpoint 4 using the type
found in the endpoint descriptor.

A side note: The carl9170 firmware currently specifies endpoint 4 as
interrupt endpoint even in the full-speed configuration but this has
no relevance because before this firmware is loaded the endpoint type
is as described above and after the firmware is running the stick is not
reenumerated and so the old descriptor is used.

Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/wireless/ath/carl9170/carl9170.h
drivers/net/wireless/ath/carl9170/usb.c