diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-11 08:44:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-11 08:44:31 -0400 |
commit | 41fb454ebe6024f5c1e3b3cbc0abc0da762e7b51 (patch) | |
tree | 51c50bcb67a5039448ddfa1869d7948cab1217e9 /drivers/usb/core/hcd.c | |
parent | 19c1a6f5764d787113fa323ffb18be7991208f82 (diff) | |
parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) |
Merge commit 'v2.6.30-rc5' into core/iommu
Merge reason: core/iommu was on an .30-rc1 base,
update it to .30-rc5 to refresh.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r-- | drivers/usb/core/hcd.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 81fa8506825d..42b93da1085d 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1539,6 +1539,32 @@ void usb_hcd_disable_endpoint(struct usb_device *udev, | |||
1539 | hcd->driver->endpoint_disable(hcd, ep); | 1539 | hcd->driver->endpoint_disable(hcd, ep); |
1540 | } | 1540 | } |
1541 | 1541 | ||
1542 | /** | ||
1543 | * usb_hcd_reset_endpoint - reset host endpoint state | ||
1544 | * @udev: USB device. | ||
1545 | * @ep: the endpoint to reset. | ||
1546 | * | ||
1547 | * Resets any host endpoint state such as the toggle bit, sequence | ||
1548 | * number and current window. | ||
1549 | */ | ||
1550 | void usb_hcd_reset_endpoint(struct usb_device *udev, | ||
1551 | struct usb_host_endpoint *ep) | ||
1552 | { | ||
1553 | struct usb_hcd *hcd = bus_to_hcd(udev->bus); | ||
1554 | |||
1555 | if (hcd->driver->endpoint_reset) | ||
1556 | hcd->driver->endpoint_reset(hcd, ep); | ||
1557 | else { | ||
1558 | int epnum = usb_endpoint_num(&ep->desc); | ||
1559 | int is_out = usb_endpoint_dir_out(&ep->desc); | ||
1560 | int is_control = usb_endpoint_xfer_control(&ep->desc); | ||
1561 | |||
1562 | usb_settoggle(udev, epnum, is_out, 0); | ||
1563 | if (is_control) | ||
1564 | usb_settoggle(udev, epnum, !is_out, 0); | ||
1565 | } | ||
1566 | } | ||
1567 | |||
1542 | /* Protect against drivers that try to unlink URBs after the device | 1568 | /* Protect against drivers that try to unlink URBs after the device |
1543 | * is gone, by waiting until all unlinks for @udev are finished. | 1569 | * is gone, by waiting until all unlinks for @udev are finished. |
1544 | * Since we don't currently track URBs by device, simply wait until | 1570 | * Since we don't currently track URBs by device, simply wait until |