diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-27 16:58:53 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-27 16:58:53 -0700 |
commit | 7bef0df7e8db98ef5139ab6295a36940a2f806c8 (patch) | |
tree | 99699cb9c01878c9ee365be0d8bce51d20469341 /usb | |
parent | a615fe02db67e84a9b206f47a5e888f1d2638637 (diff) | |
download | patches-7bef0df7e8db98ef5139ab6295a36940a2f806c8.tar.gz |
patches added
Diffstat (limited to 'usb')
-rw-r--r-- | usb/usb-usbcore-always-turn-on-hub-port-power.patch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/usb/usb-usbcore-always-turn-on-hub-port-power.patch b/usb/usb-usbcore-always-turn-on-hub-port-power.patch new file mode 100644 index 0000000000000..92dfdc110db81 --- /dev/null +++ b/usb/usb-usbcore-always-turn-on-hub-port-power.patch @@ -0,0 +1,57 @@ +From stern@rowland.harvard.edu Thu Apr 27 12:54:26 2006 +Date: Thu, 27 Apr 2006 15:54:22 -0400 (EDT) +From: Alan Stern <stern@rowland.harvard.edu> +To: Greg KH <greg@kroah.com> +cc: David Brownell <david-b@pacbell.net> +Subject: USB: usbcore: always turn on hub port power +Message-ID: <Pine.LNX.4.44L0.0604271550580.6040-100000@iolanthe.rowland.org> + +Some hubs claim not to support port-power switching, and right now the +hub driver believes them and does not enable power to their ports. +However it turns out that even though they don't actually switch power, +they do ignore all events on a port until told to turn on the power! +This problem has been reported by several users. + +This revised patch (as672b) makes the hub driver always try to turn on +port power to all hubs, regardless of what the hub descriptor says. It +also adds a comment explaining the need for this. + +Signed-off-by: Alan Stern <stern@rowland.harvard.edu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/core/hub.c | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +--- gregkh-2.6.orig/drivers/usb/core/hub.c ++++ gregkh-2.6/drivers/usb/core/hub.c +@@ -432,15 +432,22 @@ static void hub_power_on(struct usb_hub + { + int port1; + unsigned pgood_delay = hub->descriptor->bPwrOn2PwrGood * 2; +- u16 wHubCharacteristics = le16_to_cpu(hub->descriptor->wHubCharacteristics); ++ u16 wHubCharacteristics = ++ le16_to_cpu(hub->descriptor->wHubCharacteristics); + +- /* if hub supports power switching, enable power on each port */ +- if ((wHubCharacteristics & HUB_CHAR_LPSM) < 2) { ++ /* Enable power on each port. Some hubs have reserved values ++ * of LPSM (> 2) in their descriptors, even though they are ++ * USB 2.0 hubs. Some hubs do not implement port-power switching ++ * but only emulate it. In all cases, the ports won't work ++ * unless we send these messages to the hub. ++ */ ++ if ((wHubCharacteristics & HUB_CHAR_LPSM) < 2) + dev_dbg(hub->intfdev, "enabling power on all ports\n"); +- for (port1 = 1; port1 <= hub->descriptor->bNbrPorts; port1++) +- set_port_feature(hub->hdev, port1, +- USB_PORT_FEAT_POWER); +- } ++ else ++ dev_dbg(hub->intfdev, "trying to enable port power on " ++ "non-switchable hub\n"); ++ for (port1 = 1; port1 <= hub->descriptor->bNbrPorts; port1++) ++ set_port_feature(hub->hdev, port1, USB_PORT_FEAT_POWER); + + /* Wait at least 100 msec for power to become stable */ + msleep(max(pgood_delay, (unsigned) 100)); |