Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143613
b: refs/heads/master
c: 8db324e
h: refs/heads/master
i:
  143611: 4f21aef
v: v3
  • Loading branch information
David Vrabel authored and Greg Kroah-Hartman committed Apr 17, 2009
1 parent 4b638f4 commit 9e43f7a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f720af91ec2c67e9a1abbd935570f4b4e1f0dd54
refs/heads/master: 8db324ec4322a15cf8819b8a7f0eff5aa98b2ff6
19 changes: 13 additions & 6 deletions trunk/drivers/usb/wusbcore/devconnect.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ static void __wusbhc_dev_disconnect(struct wusbhc *wusbhc,

/* After a device disconnects, change the GTK (see [WUSB]
* section 6.2.11.2). */
wusbhc_gtk_rekey(wusbhc);
if (wusbhc->active)
wusbhc_gtk_rekey(wusbhc);

/* The Wireless USB part has forgotten about the device already; now
* khubd's timer will pick up the disconnection and remove the USB
Expand Down Expand Up @@ -1084,15 +1085,21 @@ int wusbhc_devconnect_start(struct wusbhc *wusbhc)
* wusbhc_devconnect_stop - stop managing connected devices
* @wusbhc: the WUSB HC
*
* Removes the Host Info IE and stops the keep alives.
*
* FIXME: should this disconnect all devices?
* Disconnects any devices still connected, stops the keep alives and
* removes the Host Info IE.
*/
void wusbhc_devconnect_stop(struct wusbhc *wusbhc)
{
cancel_delayed_work_sync(&wusbhc->keep_alive_timer);
WARN_ON(!list_empty(&wusbhc->cack_list));
int i;

mutex_lock(&wusbhc->mutex);
for (i = 0; i < wusbhc->ports_max; i++) {
if (wusbhc->port[i].wusb_dev)
__wusbhc_dev_disconnect(wusbhc, &wusbhc->port[i]);
}
mutex_unlock(&wusbhc->mutex);

cancel_delayed_work_sync(&wusbhc->keep_alive_timer);
wusbhc_mmcie_rm(wusbhc, &wusbhc->wuie_host_info->hdr);
kfree(wusbhc->wuie_host_info);
wusbhc->wuie_host_info = NULL;
Expand Down

0 comments on commit 9e43f7a

Please sign in to comment.