summaryrefslogtreecommitdiff
path: root/drivers/usb/wusbcore/devconnect.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-01-06 20:58:02 +0300
committerDavid Vrabel <david.vrabel@csr.com>2009-01-06 20:58:02 +0300
commit9a9b1d17ba59b78e4bae67f7a7cf546986a42e7d (patch)
tree319ec314e8b92788ab98bacd66f028b961210ece /drivers/usb/wusbcore/devconnect.c
parent2226b1c219a18804bc40e32a5d53c287a6c925d9 (diff)
downloadlinux-9a9b1d17ba59b78e4bae67f7a7cf546986a42e7d.tar.xz
wusb: return -ENOTCONN when resetting a port with no connected device
If reading the device descriptor fails during hub_port_init() fails, then the port is disabled, disconnecting the device. The port is then reset at the start of the next init attempt but there is no device to reset. Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/usb/wusbcore/devconnect.c')
-rw-r--r--drivers/usb/wusbcore/devconnect.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c
index e2e7e4bc8463..8e18141bb2e0 100644
--- a/drivers/usb/wusbcore/devconnect.c
+++ b/drivers/usb/wusbcore/devconnect.c
@@ -386,6 +386,7 @@ static void __wusbhc_dev_disconnect(struct wusbhc *wusbhc,
| USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED);
port->change |= USB_PORT_STAT_C_CONNECTION | USB_PORT_STAT_C_ENABLE;
if (wusb_dev) {
+ dev_dbg(wusbhc->dev, "disconnecting device from port %d\n", wusb_dev->port_idx);
if (!list_empty(&wusb_dev->cack_node))
list_del_init(&wusb_dev->cack_node);
/* For the one in cack_add() */