Silence the "xHCI xhci_drop_endpoint called with disabled ep ..." messages
appearing on a successful usb device reset.

Signed-off-by: Hans de Goede <hdego...@redhat.com>
---
 drivers/usb/host/xhci.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 64160ff..5d985e4 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1636,6 +1636,12 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct 
usb_device *udev,
 
        ep_index = xhci_get_endpoint_index(&ep->desc);
        ep_ctx = xhci_get_ep_ctx(xhci, out_ctx, ep_index);
+       /*
+        * If drop_endpoint gets called after a usb_device_reset, then
+        * xhci_discover_or_reset_device has already dropped the eps
+        */
+       if (xhci->devs[udev->slot_id]->eps[ep_index].ring == NULL)
+               return 0;
        /* If the HC already knows the endpoint is disabled,
         * or the HCD has noted it is disabled, ignore this request
         */
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to