[source] usb: Remove annoying warning about bogus URB
LEDE Commits
lede-commits at lists.infradead.org
Tue Jul 5 23:56:44 PDT 2016
blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=aba6de38d273c68ba5c060c53e971f5fd592af76
commit aba6de38d273c68ba5c060c53e971f5fd592af76
Author: Alexey Brodkin <Alexey.Brodkin at synopsys.com>
AuthorDate: Tue Jul 5 15:42:21 2016 +0300
usb: Remove annoying warning about bogus URB
When USB Wi-Fi dongle based on Atheros AR9271 is connected to OHCI
(USB 1.1) controller following warnings flood debug console:
------------------------>8---------------------------
usb 1-1: new full-speed USB device number 2 using ohci-platform
usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
------------[ cut here ]------------
WARNING: CPU: 0 PID: 4 at drivers/usb/core/urb.c:450
usb_submit_urb+0x162/0x404
usb 1-1: BOGUS urb xfer, pipe 1 != type 3
Modules linked in:
CPU: 0 PID: 4 Comm: kworker/0:0 Not tainted 4.6.3 #10
Workqueue: events request_firmware_work_func
Stack Trace:
arc_unwind_core.constprop.1+0x94/0x10c
---[ end trace 2249b79eac9991d1 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 4 at drivers/usb/core/urb.c:450 usb_submit_urb+0x162/0x404
usb 1-1: BOGUS urb xfer, pipe 1 != type 3
Modules linked in:
CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W 4.6.3 #10
Workqueue: events request_firmware_work_func
Stack Trace:
arc_unwind_core.constprop.1+0x94/0x10c
---[ end trace 2249b79eac9991d2 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 4 at drivers/usb/core/urb.c:450 usb_submit_urb+0x162/0x404
usb 1-1: BOGUS urb xfer, pipe 1 != type 3
Modules linked in:
CPU: 0 PID: 4 Comm: kworker/0:0 Tainted: G W 4.6.3 #10
Workqueue: events request_firmware_work_func
Stack Trace:
arc_unwind_core.constprop.1+0x94/0x10c
---[ end trace 2249b79eac9991d3 ]---
...
------------------------>8---------------------------
With removed warning Wi-Fi dongle works properly.
Even though this is not the best solution it gets us a working Wireless
AP. Anyways new discussion was started in linux-usb mailing list to find
a proper solution instead of that hack.
Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
---
...b-Remove-annoying-warning-about-bogus-URB.patch | 73 ++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/target/linux/generic/patches-4.4/821-usb-Remove-annoying-warning-about-bogus-URB.patch b/target/linux/generic/patches-4.4/821-usb-Remove-annoying-warning-about-bogus-URB.patch
new file mode 100644
index 0000000..0aae481
--- /dev/null
+++ b/target/linux/generic/patches-4.4/821-usb-Remove-annoying-warning-about-bogus-URB.patch
@@ -0,0 +1,73 @@
+From f13ad28ba4280d2283ca2b49f0bd384bc51e6a68 Mon Sep 17 00:00:00 2001
+From: Alexey Brodkin <abrodkin at synopsys.com>
+Date: Tue, 5 Jul 2016 14:28:31 +0300
+Subject: [PATCH] usb: Remove annoying warning about bogus URB
+
+When ath9k-htc Wi-Fi dongle is used with generic OHCI controller
+infinite stream of warnings appears in debug console like this:
+-------------------------->8----------------------
+usb 1-1: new full-speed USB device number 2 using ohci-platform
+usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
+usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size:
+51008
+------------[ cut here ]------------
+WARNING: CPU: 0 PID: 19 at drivers/usb/core/urb.c:449
+usb_submit_urb+0x1b4/0x498()
+usb 1-1: BOGUS urb xfer, pipe 1 != type 3
+Modules linked in:
+CPU: 0 PID: 19 Comm: kworker/0:1 Not tainted
+4.4.0-rc4-00017-g00e2d79-dirty #3
+Workqueue: events request_firmware_work_func
+
+Stack Trace:
+ arc_unwind_core.constprop.1+0xa4/0x110
+---[ end trace 649ef8c342817fc2 ]---
+------------[ cut here ]------------
+WARNING: CPU: 0 PID: 19 at drivers/usb/core/urb.c:449
+usb_submit_urb+0x1b4/0x498()
+usb 1-1: BOGUS urb xfer, pipe 1 != type 3
+Modules linked in:
+CPU: 0 PID: 19 Comm: kworker/0:1 Tainted: G W
+4.4.0-rc4-00017-g00e2d79-dirty #3
+Workqueue: events request_firmware_work_func
+
+Stack Trace:
+ arc_unwind_core.constprop.1+0xa4/0x110
+---[ end trace 649ef8c342817fc3 ]---
+------------[ cut here ]------------
+-------------------------->8----------------------
+
+There're some discussions in mailing lists proposing to disable
+that particular check alltogether and magically all seem to work
+fine with muted warning.
+
+Anyways new thread on that regard could be found here:
+http://lists.infradead.org/pipermail/linux-snps-arc/2016-July/001310.html
+
+Let's see what comes out of that new discussion, hopefully patching
+of generic USB stuff won't be required then.
+
+Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
+---
+ drivers/usb/core/urb.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
+index 3d27477..a317e1e 100644
+--- a/drivers/usb/core/urb.c
++++ b/drivers/usb/core/urb.c
+@@ -443,11 +443,6 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
+ * cause problems in HCDs if they get it wrong.
+ */
+
+- /* Check that the pipe's type matches the endpoint's type */
+- if (usb_pipetype(urb->pipe) != pipetypes[xfertype])
+- dev_WARN(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
+- usb_pipetype(urb->pipe), pipetypes[xfertype]);
+-
+ /* Check against a simple/standard policy */
+ allowed = (URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT | URB_DIR_MASK |
+ URB_FREE_BUFFER);
+--
+2.5.5
+
More information about the lede-commits
mailing list