From: Christian Engelmayer <[EMAIL PROTECTED]>
According to the USB Specification Revision 2.0 chapter 11.12.5
a hub experiencing an over-current condition must place all
affected ports in the powered-off state. It seems that some hubs
violate this requirement, but need port power to be cycled by
software in order to get back to normal functionality after an
over-current condition.
Signed-off-by: Christian Engelmayer <[EMAIL PROTECTED]>
Signed-off-by: David Brownell <[EMAIL PROTECTED]>
---
This fix was tested on an MPC8343E.
--- a/drivers/usb/host/ehci-hub.c.orig 2007-05-29 21:30:35.000000000 +0200
+++ b/drivers/usb/host/ehci-hub.c 2007-05-29 21:39:48.000000000 +0200
@@ -389,6 +389,20 @@ ehci_hub_status_data (struct usb_hcd *hc
buf [1] |= 1 << (i - 7);
status = STS_PCD;
}
+
+ /*
+ * The hub was supposed to disable port power autonomously
+ * on over-current. However, not all hubs can be trusted to
+ * do this although they need port power disabled in order
+ * to recover properly.
+ */
+ if (temp & PORT_OCC) {
+ if (HCS_PPC(ehci->hcs_params)){
+ temp &= ~(PORT_RWC_BITS | PORT_POWER);
+ writel (temp, &ehci->regs->port_status [i]);
+ }
+ }
+
}
/* FIXME autosuspend idle root hubs */
spin_unlock_irqrestore (&ehci->lock, flags);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel