diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-17 16:53:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-17 16:53:00 -0400 |
commit | dd26bf6d95f050c42cc8f15e750b09851e1fd30b (patch) | |
tree | 22d0a6f223297754bd1ca9f4de4e6daf1f0f6430 /drivers/usb/wusbcore/devconnect.c | |
parent | 7217fa9851c99ffe43cee9e3ba4b81a34ce7bac4 (diff) | |
parent | fca10c81d99ff9956179058460dfddc0418f3902 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (22 commits)
WUSB: correct format of wusb_chid sysfs file
WUSB: fix oops when completing URBs for disconnected devices
WUSB: disconnect all devices when stopping a WUSB HCD
USB: whci-hcd: check return value of usb_hcd_link_urb_to_ep()
USB: whci-hcd: provide a endpoint_reset method
USB: add reset endpoint operations
USB device codes for Motorola phone.
usb-storage: fix mistake in Makefile
USB: usb-serial ch341: support for DTR/RTS/CTS
Revert USB: usb-serial ch341: support for DTR/RTS/CTS
USB: musb: fix possible panic while resuming
USB: musb: fix isochronous TXDMA (take 2)
USB: musb: sanitize clearing TXCSR DMA bits (take 2)
USB: musb: bugfixes for multi-packet TXDMA support
USB: musb_host, fix ep0 fifo flushing
USB: usb-storage: augment unusual_devs entry for Simple Tech/Datafab
USB: musb_host, minor enqueue locking fix (v2)
USB: fix oops in cdc-wdm in case of malformed descriptors
USB: qcserial: Add extra device IDs
USB: option: Add ids for D-Link DWM-652 3.5G modem
...
Diffstat (limited to 'drivers/usb/wusbcore/devconnect.c')
-rw-r--r-- | drivers/usb/wusbcore/devconnect.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c index 386eaa22d215..4ac4300a3f9a 100644 --- a/drivers/usb/wusbcore/devconnect.c +++ b/drivers/usb/wusbcore/devconnect.c | |||
@@ -267,6 +267,8 @@ static void wusbhc_devconnect_acked_work(struct work_struct *work) | |||
267 | mutex_lock(&wusbhc->mutex); | 267 | mutex_lock(&wusbhc->mutex); |
268 | wusbhc_devconnect_acked(wusbhc, wusb_dev); | 268 | wusbhc_devconnect_acked(wusbhc, wusb_dev); |
269 | mutex_unlock(&wusbhc->mutex); | 269 | mutex_unlock(&wusbhc->mutex); |
270 | |||
271 | wusb_dev_put(wusb_dev); | ||
270 | } | 272 | } |
271 | 273 | ||
272 | /* | 274 | /* |
@@ -396,7 +398,8 @@ static void __wusbhc_dev_disconnect(struct wusbhc *wusbhc, | |||
396 | 398 | ||
397 | /* After a device disconnects, change the GTK (see [WUSB] | 399 | /* After a device disconnects, change the GTK (see [WUSB] |
398 | * section 6.2.11.2). */ | 400 | * section 6.2.11.2). */ |
399 | wusbhc_gtk_rekey(wusbhc); | 401 | if (wusbhc->active) |
402 | wusbhc_gtk_rekey(wusbhc); | ||
400 | 403 | ||
401 | /* The Wireless USB part has forgotten about the device already; now | 404 | /* The Wireless USB part has forgotten about the device already; now |
402 | * khubd's timer will pick up the disconnection and remove the USB | 405 | * khubd's timer will pick up the disconnection and remove the USB |
@@ -1084,15 +1087,21 @@ error_mmcie_set: | |||
1084 | * wusbhc_devconnect_stop - stop managing connected devices | 1087 | * wusbhc_devconnect_stop - stop managing connected devices |
1085 | * @wusbhc: the WUSB HC | 1088 | * @wusbhc: the WUSB HC |
1086 | * | 1089 | * |
1087 | * Removes the Host Info IE and stops the keep alives. | 1090 | * Disconnects any devices still connected, stops the keep alives and |
1088 | * | 1091 | * removes the Host Info IE. |
1089 | * FIXME: should this disconnect all devices? | ||
1090 | */ | 1092 | */ |
1091 | void wusbhc_devconnect_stop(struct wusbhc *wusbhc) | 1093 | void wusbhc_devconnect_stop(struct wusbhc *wusbhc) |
1092 | { | 1094 | { |
1093 | cancel_delayed_work_sync(&wusbhc->keep_alive_timer); | 1095 | int i; |
1094 | WARN_ON(!list_empty(&wusbhc->cack_list)); | ||
1095 | 1096 | ||
1097 | mutex_lock(&wusbhc->mutex); | ||
1098 | for (i = 0; i < wusbhc->ports_max; i++) { | ||
1099 | if (wusbhc->port[i].wusb_dev) | ||
1100 | __wusbhc_dev_disconnect(wusbhc, &wusbhc->port[i]); | ||
1101 | } | ||
1102 | mutex_unlock(&wusbhc->mutex); | ||
1103 | |||
1104 | cancel_delayed_work_sync(&wusbhc->keep_alive_timer); | ||
1096 | wusbhc_mmcie_rm(wusbhc, &wusbhc->wuie_host_info->hdr); | 1105 | wusbhc_mmcie_rm(wusbhc, &wusbhc->wuie_host_info->hdr); |
1097 | kfree(wusbhc->wuie_host_info); | 1106 | kfree(wusbhc->wuie_host_info); |
1098 | wusbhc->wuie_host_info = NULL; | 1107 | wusbhc->wuie_host_info = NULL; |