Hello,

We have lot of "clear_halt for a busy endpoint" warnings reported.

[  546.758270] WARNING: at drivers/usb/host/ehci-hcd.c:1051 
ehci_endpoint_reset+0x113/0x120()
[  546.758272] clear_halt for a busy endpoint
...
[  546.758352]  [<ffffffff8105cdec>] warn_slowpath_fmt+0x4c/0x50
[  546.758355]  [<ffffffff81478cd3>] ehci_endpoint_reset+0x113/0x120
[  546.758359]  [<ffffffff8145f655>] usb_hcd_reset_endpoint+0x25/0x70
[  546.758362]  [<ffffffff81461568>] usb_reset_endpoint+0x28/0x40
[  546.758365]  [<ffffffff814615ee>] usb_clear_halt+0x6e/0x80
[  546.758369]  [<ffffffff8146c7ea>] usbdev_do_ioctl+0xb8a/0x1130
[  546.758372]  [<ffffffff8146cdbe>] usbdev_ioctl+0xe/0x20
[  546.758378]  [<ffffffff811aaef5>] do_vfs_ioctl+0x305/0x520
[  546.758380]  [<ffffffff811ab191>] sys_ioctl+0x81/0xa0
[  546.758384]  [<ffffffff8164dd19>] system_call_fastpath+0x16/0x1b

https://bugzilla.redhat.com/show_bug.cgi?id=928143

It is triggered when user space driver call CLEAR_HALT ioctl when
endpoint is not actually halted. Schould we request to fix that in
user space, or can we remove this warning like on below patch (call
CLEAR_HALT ioctl, does not seems to do any harm except printing a
warning) ?

Stanislaw

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 4711427..46156fd 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1020,21 +1020,17 @@ ehci_endpoint_reset(struct usb_hcd *hcd, struct 
usb_host_endpoint *ep)
         * When an endpoint is reset by usb_clear_halt() we must reset
         * the toggle bit in the QH.
         */
-       if (qh) {
-               if (!list_empty(&qh->qtd_list)) {
-                       WARN_ONCE(1, "clear_halt for a busy endpoint\n");
-               } else {
-                       /* The toggle value in the QH can't be updated
-                        * while the QH is active.  Unlink it now;
-                        * re-linking will call qh_refresh().
-                        */
-                       usb_settoggle(qh->ps.udev, epnum, is_out, 0);
-                       qh->exception = 1;
-                       if (eptype == USB_ENDPOINT_XFER_BULK)
-                               start_unlink_async(ehci, qh);
-                       else
-                               start_unlink_intr(ehci, qh);
-               }
+       if (qh && list_empty(&qh->qtd_list)) {
+               /* The toggle value in the QH can't be updated
+                * while the QH is active.  Unlink it now;
+                * re-linking will call qh_refresh().
+                */
+               usb_settoggle(qh->ps.udev, epnum, is_out, 0);
+               qh->exception = 1;
+               if (eptype == USB_ENDPOINT_XFER_BULK)
+                       start_unlink_async(ehci, qh);
+               else
+                       start_unlink_intr(ehci, qh);
        }
        spin_unlock_irqrestore(&ehci->lock, flags);
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to