aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2008-05-20 16:58:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-05-29 16:59:03 -0400
commit3a31155cfff0935e4b178f3dca733d2d60d2eb8d (patch)
treed862628b222cd28232fcc5452e4d88919a45b3fd /drivers/usb
parenta8e5177583e975fc1f7c621c93956f494df9b979 (diff)
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hcd.h2
-rw-r--r--drivers/usb/core/hub.c6
-rw-r--r--drivers/usb/host/ehci-au1xxx.c1
-rw-r--r--drivers/usb/host/ehci-fsl.c1
-rw-r--r--drivers/usb/host/ehci-hub.c10
-rw-r--r--drivers/usb/host/ehci-ixp4xx.c1
-rw-r--r--drivers/usb/host/ehci-orion.c1
-rw-r--r--drivers/usb/host/ehci-pci.c1
-rw-r--r--drivers/usb/host/ehci-ppc-of.c1
-rw-r--r--drivers/usb/host/ehci-ppc-soc.c1
-rw-r--r--drivers/usb/host/ehci-ps3.c1
11 files changed, 25 insertions, 1 deletions
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
index 1e4b81e9eb50..a0bf5df6cb6f 100644
--- a/drivers/usb/core/hcd.h
+++ b/drivers/usb/core/hcd.h
@@ -213,6 +213,8 @@ struct hc_driver {
213 213
214 /* force handover of high-speed port to full-speed companion */ 214 /* force handover of high-speed port to full-speed companion */
215 void (*relinquish_port)(struct usb_hcd *, int); 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
218extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); 220extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb);
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 1a3d2879bc1d..8eb4da332f56 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2753,7 +2753,11 @@ loop:
2753 if ((status == -ENOTCONN) || (status == -ENOTSUPP)) 2753 if ((status == -ENOTCONN) || (status == -ENOTSUPP))
2754 break; 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
2758done: 2762done:
2759 hub_port_disable(hub, port1, 1); 2763 hub_port_disable(hub, port1, 1);
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
index 8b5f991e949c..08a4335401a9 100644
--- a/drivers/usb/host/ehci-au1xxx.c
+++ b/drivers/usb/host/ehci-au1xxx.c
@@ -223,6 +223,7 @@ static const struct hc_driver ehci_au1xxx_hc_driver = {
223 .bus_suspend = ehci_bus_suspend, 223 .bus_suspend = ehci_bus_suspend,
224 .bus_resume = ehci_bus_resume, 224 .bus_resume = ehci_bus_resume,
225 .relinquish_port = ehci_relinquish_port, 225 .relinquish_port = ehci_relinquish_port,
226 .port_handed_over = ehci_port_handed_over,
226}; 227};
227 228
228/*-------------------------------------------------------------------------*/ 229/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 4843062e6e21..7370d6187c64 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -318,6 +318,7 @@ static const struct hc_driver ehci_fsl_hc_driver = {
318 .bus_suspend = ehci_bus_suspend, 318 .bus_suspend = ehci_bus_suspend,
319 .bus_resume = ehci_bus_resume, 319 .bus_resume = ehci_bus_resume,
320 .relinquish_port = ehci_relinquish_port, 320 .relinquish_port = ehci_relinquish_port,
321 .port_handed_over = ehci_port_handed_over,
321}; 322};
322 323
323static int ehci_fsl_drv_probe(struct platform_device *pdev) 324static int ehci_fsl_drv_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 382587c4457c..d613dc9e9c05 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -875,3 +875,13 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum)
875 set_owner(ehci, --portnum, PORT_OWNER); 875 set_owner(ehci, --portnum, PORT_OWNER);
876} 876}
877 877
878static 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}
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c
index 539257f15924..9d042f220097 100644
--- a/drivers/usb/host/ehci-ixp4xx.c
+++ b/drivers/usb/host/ehci-ixp4xx.c
@@ -59,6 +59,7 @@ static const struct hc_driver ixp4xx_ehci_hc_driver = {
59 .bus_resume = ehci_bus_resume, 59 .bus_resume = ehci_bus_resume,
60#endif 60#endif
61 .relinquish_port = ehci_relinquish_port, 61 .relinquish_port = ehci_relinquish_port,
62 .port_handed_over = ehci_port_handed_over,
62}; 63};
63 64
64static int ixp4xx_ehci_probe(struct platform_device *pdev) 65static int ixp4xx_ehci_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index 9c5266d02d6c..ab625f0ba1d9 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -162,6 +162,7 @@ static const struct hc_driver ehci_orion_hc_driver = {
162 .bus_suspend = ehci_bus_suspend, 162 .bus_suspend = ehci_bus_suspend,
163 .bus_resume = ehci_bus_resume, 163 .bus_resume = ehci_bus_resume,
164 .relinquish_port = ehci_relinquish_port, 164 .relinquish_port = ehci_relinquish_port,
165 .port_handed_over = ehci_port_handed_over,
165}; 166};
166 167
167static void __init 168static void __init
diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 6ff453f935e7..c46a58f9181d 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -379,6 +379,7 @@ static const struct hc_driver ehci_pci_hc_driver = {
379 .bus_suspend = ehci_bus_suspend, 379 .bus_suspend = ehci_bus_suspend,
380 .bus_resume = ehci_bus_resume, 380 .bus_resume = ehci_bus_resume,
381 .relinquish_port = ehci_relinquish_port, 381 .relinquish_port = ehci_relinquish_port,
382 .port_handed_over = ehci_port_handed_over,
382}; 383};
383 384
384/*-------------------------------------------------------------------------*/ 385/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index d94a2ef4944c..b018deed2e8f 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -77,6 +77,7 @@ static const struct hc_driver ehci_ppc_of_hc_driver = {
77 .bus_resume = ehci_bus_resume, 77 .bus_resume = ehci_bus_resume,
78#endif 78#endif
79 .relinquish_port = ehci_relinquish_port, 79 .relinquish_port = ehci_relinquish_port,
80 .port_handed_over = ehci_port_handed_over,
80}; 81};
81 82
82 83
diff --git a/drivers/usb/host/ehci-ppc-soc.c b/drivers/usb/host/ehci-ppc-soc.c
index 6c76036783a1..529590eb4037 100644
--- a/drivers/usb/host/ehci-ppc-soc.c
+++ b/drivers/usb/host/ehci-ppc-soc.c
@@ -163,6 +163,7 @@ static const struct hc_driver ehci_ppc_soc_hc_driver = {
163 .bus_suspend = ehci_bus_suspend, 163 .bus_suspend = ehci_bus_suspend,
164 .bus_resume = ehci_bus_resume, 164 .bus_resume = ehci_bus_resume,
165 .relinquish_port = ehci_relinquish_port, 165 .relinquish_port = ehci_relinquish_port,
166 .port_handed_over = ehci_port_handed_over,
166}; 167};
167 168
168static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev) 169static int ehci_hcd_ppc_soc_drv_probe(struct platform_device *pdev)
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c
index 69782221bcf3..37e6abeb794c 100644
--- a/drivers/usb/host/ehci-ps3.c
+++ b/drivers/usb/host/ehci-ps3.c
@@ -73,6 +73,7 @@ static const struct hc_driver ps3_ehci_hc_driver = {
73 .bus_resume = ehci_bus_resume, 73 .bus_resume = ehci_bus_resume,
74#endif 74#endif
75 .relinquish_port = ehci_relinquish_port, 75 .relinquish_port = ehci_relinquish_port,
76 .port_handed_over = ehci_port_handed_over,
76}; 77};
77 78
78static int ps3_ehci_probe(struct ps3_system_bus_device *dev) 79static int ps3_ehci_probe(struct ps3_system_bus_device *dev)