aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host/whci/hcd.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-04-08 17:36:29 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-17 10:50:27 -0700
commit7f0406db5fe4dd3ad3cbd53830239a87d68156fd (patch)
treeffdcf8e047b837da06034b1806d88acbd1033264 /drivers/usb/host/whci/hcd.c
parent3444b26afa145148951112534f298bdc554ec789 (diff)
USB: whci-hcd: provide a endpoint_reset method
Provide a endpoint_reset method to reset sequence number and current window. This QHead information can only be changed while the qset is not in a schedule. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/whci/hcd.c')
-rw-r--r--drivers/usb/host/whci/hcd.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/usb/host/whci/hcd.c b/drivers/usb/host/whci/hcd.c
index 1569afd6245..e019a5058ab 100644
--- a/drivers/usb/host/whci/hcd.c
+++ b/drivers/usb/host/whci/hcd.c
@@ -186,6 +186,28 @@ static void whc_endpoint_disable(struct usb_hcd *usb_hcd,
}
}
+static void whc_endpoint_reset(struct usb_hcd *usb_hcd,
+ struct usb_host_endpoint *ep)
+{
+ struct wusbhc *wusbhc = usb_hcd_to_wusbhc(usb_hcd);
+ struct whc *whc = wusbhc_to_whc(wusbhc);
+ struct whc_qset *qset;
+
+ qset = ep->hcpriv;
+ if (qset) {
+ qset->remove = 1;
+
+ if (usb_endpoint_xfer_bulk(&ep->desc)
+ || usb_endpoint_xfer_control(&ep->desc))
+ queue_work(whc->workqueue, &whc->async_work);
+ else
+ queue_work(whc->workqueue, &whc->periodic_work);
+
+ qset_reset(whc, qset);
+ }
+}
+
+
static struct hc_driver whc_hc_driver = {
.description = "whci-hcd",
.product_desc = "Wireless host controller",
@@ -200,6 +222,7 @@ static struct hc_driver whc_hc_driver = {
.urb_enqueue = whc_urb_enqueue,
.urb_dequeue = whc_urb_dequeue,
.endpoint_disable = whc_endpoint_disable,
+ .endpoint_reset = whc_endpoint_reset,
.hub_status_data = wusbhc_rh_status_data,
.hub_control = wusbhc_rh_control,