Commit 3a31155cfff0935e4b178f3dca733d2d60d2eb8d
Committed by
Greg Kroah-Hartman
1 parent
a8e5177583
Exists in
master
and in
7 other branches
USB: EHCI: suppress unwanted error messages
This patch (as1096) fixes an annoying problem: When a full-speed or low-speed device is plugged into an EHCI controller, it fails to enumerate at high speed and then is handed over to the companion controller. But usbcore logs a misleading and unwanted error message when the high-speed enumeration fails. The patch adds a new HCD method, port_handed_over, which asks whether a port has been handed over to a companion controller. If it has, the error message is suppressed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 11 changed files with 25 additions and 1 deletions Side-by-side Diff
- drivers/usb/core/hcd.h
- drivers/usb/core/hub.c
- drivers/usb/host/ehci-au1xxx.c
- drivers/usb/host/ehci-fsl.c
- drivers/usb/host/ehci-hub.c
- drivers/usb/host/ehci-ixp4xx.c
- drivers/usb/host/ehci-orion.c
- drivers/usb/host/ehci-pci.c
- drivers/usb/host/ehci-ppc-of.c
- drivers/usb/host/ehci-ppc-soc.c
- drivers/usb/host/ehci-ps3.c
drivers/usb/core/hcd.h
... | ... | @@ -213,6 +213,8 @@ |
213 | 213 | |
214 | 214 | /* force handover of high-speed port to full-speed companion */ |
215 | 215 | void (*relinquish_port)(struct usb_hcd *, int); |
216 | + /* has a port been handed over to a companion? */ | |
217 | + int (*port_handed_over)(struct usb_hcd *, int); | |
216 | 218 | }; |
217 | 219 | |
218 | 220 | extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); |
drivers/usb/core/hub.c
... | ... | @@ -2753,7 +2753,11 @@ |
2753 | 2753 | if ((status == -ENOTCONN) || (status == -ENOTSUPP)) |
2754 | 2754 | break; |
2755 | 2755 | } |
2756 | - dev_err(hub_dev, "unable to enumerate USB device on port %d\n", port1); | |
2756 | + if (hub->hdev->parent || | |
2757 | + !hcd->driver->port_handed_over || | |
2758 | + !(hcd->driver->port_handed_over)(hcd, port1)) | |
2759 | + dev_err(hub_dev, "unable to enumerate USB device on port %d\n", | |
2760 | + port1); | |
2757 | 2761 | |
2758 | 2762 | done: |
2759 | 2763 | hub_port_disable(hub, port1, 1); |
drivers/usb/host/ehci-au1xxx.c
... | ... | @@ -223,6 +223,7 @@ |
223 | 223 | .bus_suspend = ehci_bus_suspend, |
224 | 224 | .bus_resume = ehci_bus_resume, |
225 | 225 | .relinquish_port = ehci_relinquish_port, |
226 | + .port_handed_over = ehci_port_handed_over, | |
226 | 227 | }; |
227 | 228 | |
228 | 229 | /*-------------------------------------------------------------------------*/ |
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-hub.c
... | ... | @@ -874,4 +874,15 @@ |
874 | 874 | return; |
875 | 875 | set_owner(ehci, --portnum, PORT_OWNER); |
876 | 876 | } |
877 | + | |
878 | +static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum) | |
879 | +{ | |
880 | + struct ehci_hcd *ehci = hcd_to_ehci(hcd); | |
881 | + u32 __iomem *reg; | |
882 | + | |
883 | + if (ehci_is_TDI(ehci)) | |
884 | + return 0; | |
885 | + reg = &ehci->regs->port_status[portnum - 1]; | |
886 | + return ehci_readl(ehci, reg) & PORT_OWNER; | |
887 | +} |
drivers/usb/host/ehci-ixp4xx.c
drivers/usb/host/ehci-orion.c
drivers/usb/host/ehci-pci.c
... | ... | @@ -379,6 +379,7 @@ |
379 | 379 | .bus_suspend = ehci_bus_suspend, |
380 | 380 | .bus_resume = ehci_bus_resume, |
381 | 381 | .relinquish_port = ehci_relinquish_port, |
382 | + .port_handed_over = ehci_port_handed_over, | |
382 | 383 | }; |
383 | 384 | |
384 | 385 | /*-------------------------------------------------------------------------*/ |
drivers/usb/host/ehci-ppc-of.c
drivers/usb/host/ehci-ppc-soc.c
... | ... | @@ -163,6 +163,7 @@ |
163 | 163 | .bus_suspend = ehci_bus_suspend, |
164 | 164 | .bus_resume = ehci_bus_resume, |
165 | 165 | .relinquish_port = ehci_relinquish_port, |
166 | + .port_handed_over = ehci_port_handed_over, | |
166 | 167 | }; |
167 | 168 | |
168 | 169 | static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) |
drivers/usb/host/ehci-ps3.c