aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-11-17 02:34:58 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 17:23:37 -0500
commit93f1a47c4af34c4ee014b3d2aae70089b3b69f72 (patch)
tree10e9b58f9b93cbbc0ab375778396632d465ce28e /drivers/usb/host/ehci-hcd.c
parentf0d7f27351058284f62ab4848909373c2d1f5ce8 (diff)
USB: add ehci_hcd.ignore_oc parameter
Certain boards seem to like to issue false overcurrent notifications, for example on ports that don't have anything connected to them. This looks like a hardware error, at the level of noise to those ports' overcurrent input signals (or non-debounced VBUS comparators). This surfaces to users as truly massive amounts of syslog spam from khubd (which is appropriate for real hardware problems, except for the volume from multiple ports). Using this new "ignore_oc" flag helps such systems work more sanely, by preventing such indications from getting to khubd (and spam syslog). The downside is of course that true overcurrent errors will be masked; they'll appear as spontaneous disconnects, without the diagnostics that will let users troubleshoot issues like short circuited cables. Note that the bulk of these reports seem to be with VIA southbridges, but I think some were with Intel ones. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 9030994aba98..f2ceb5fdbeb7 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -126,6 +126,11 @@ static unsigned park = 0;
126module_param (park, uint, S_IRUGO); 126module_param (park, uint, S_IRUGO);
127MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets"); 127MODULE_PARM_DESC (park, "park setting; 1-3 back-to-back async packets");
128 128
129/* for flakey hardware, ignore overcurrent indicators */
130static int ignore_oc = 0;
131module_param (ignore_oc, bool, S_IRUGO);
132MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications");
133
129#define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT) 134#define INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)
130 135
131/*-------------------------------------------------------------------------*/ 136/*-------------------------------------------------------------------------*/
@@ -541,9 +546,10 @@ static int ehci_run (struct usb_hcd *hcd)
541 546
542 temp = HC_VERSION(readl (&ehci->caps->hc_capbase)); 547 temp = HC_VERSION(readl (&ehci->caps->hc_capbase));
543 ehci_info (ehci, 548 ehci_info (ehci,
544 "USB %x.%x started, EHCI %x.%02x, driver %s\n", 549 "USB %x.%x started, EHCI %x.%02x, driver %s%s\n",
545 ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f), 550 ((ehci->sbrn & 0xf0)>>4), (ehci->sbrn & 0x0f),
546 temp >> 8, temp & 0xff, DRIVER_VERSION); 551 temp >> 8, temp & 0xff, DRIVER_VERSION,
552 ignore_oc ? ", overcurrent ignored" : "");
547 553
548 writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */ 554 writel (INTR_MASK, &ehci->regs->intr_enable); /* Turn On Interrupts */
549 555