1
0

821-usb-Remove-annoying-warning-about-bogus-URB.patch 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. From: Alexey Brodkin <abrodkin@synopsys.com>
  2. Subject: usb: Remove annoying warning about bogus URB
  3. When ath9k-htc Wi-Fi dongle is used with generic OHCI controller
  4. infinite stream of warnings appears in debug console like this:
  5. -------------------------->8----------------------
  6. usb 1-1: new full-speed USB device number 2 using ohci-platform
  7. usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
  8. usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size:
  9. 51008
  10. ------------[ cut here ]------------
  11. WARNING: CPU: 0 PID: 19 at drivers/usb/core/urb.c:449
  12. usb_submit_urb+0x1b4/0x498()
  13. usb 1-1: BOGUS urb xfer, pipe 1 != type 3
  14. Modules linked in:
  15. CPU: 0 PID: 19 Comm: kworker/0:1 Not tainted
  16. 4.4.0-rc4-00017-g00e2d79-dirty #3
  17. Workqueue: events request_firmware_work_func
  18. Stack Trace:
  19. arc_unwind_core.constprop.1+0xa4/0x110
  20. ---[ end trace 649ef8c342817fc2 ]---
  21. ------------[ cut here ]------------
  22. WARNING: CPU: 0 PID: 19 at drivers/usb/core/urb.c:449
  23. usb_submit_urb+0x1b4/0x498()
  24. usb 1-1: BOGUS urb xfer, pipe 1 != type 3
  25. Modules linked in:
  26. CPU: 0 PID: 19 Comm: kworker/0:1 Tainted: G W
  27. 4.4.0-rc4-00017-g00e2d79-dirty #3
  28. Workqueue: events request_firmware_work_func
  29. Stack Trace:
  30. arc_unwind_core.constprop.1+0xa4/0x110
  31. ---[ end trace 649ef8c342817fc3 ]---
  32. ------------[ cut here ]------------
  33. -------------------------->8----------------------
  34. There're some discussions in mailing lists proposing to disable
  35. that particular check alltogether and magically all seem to work
  36. fine with muted warning.
  37. Anyways new thread on that regard could be found here:
  38. http://lists.infradead.org/pipermail/linux-snps-arc/2016-July/001310.html
  39. Let's see what comes out of that new discussion, hopefully patching
  40. of generic USB stuff won't be required then.
  41. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
  42. ---
  43. drivers/usb/core/urb.c | 5 -----
  44. 1 file changed, 5 deletions(-)
  45. --- a/drivers/usb/core/urb.c
  46. +++ b/drivers/usb/core/urb.c
  47. @@ -321,9 +321,6 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb);
  48. */
  49. int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
  50. {
  51. - static int pipetypes[4] = {
  52. - PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
  53. - };
  54. int xfertype, max;
  55. struct usb_device *dev;
  56. struct usb_host_endpoint *ep;
  57. @@ -441,11 +438,6 @@ int usb_submit_urb(struct urb *urb, gfp_
  58. * cause problems in HCDs if they get it wrong.
  59. */
  60. - /* Check that the pipe's type matches the endpoint's type */
  61. - if (usb_pipetype(urb->pipe) != pipetypes[xfertype])
  62. - dev_WARN(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
  63. - usb_pipetype(urb->pipe), pipetypes[xfertype]);
  64. -
  65. /* Check against a simple/standard policy */
  66. allowed = (URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT | URB_DIR_MASK |
  67. URB_FREE_BUFFER);