aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/hwa-hc.c
diff options
context:
space:
mode:
authorThomas Pugliese <thomas.pugliese@gmail.com>2013-10-01 15:04:33 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-03 18:46:26 -0400
commit7e176dcb035eef8917e5fc2e653460b5410dbc34 (patch)
treec3883880d23e756d1892b6f76606e8005c3d13a4 /drivers/usb/host/hwa-hc.c
parent33186c441684de348636f94412d2fc256e641113 (diff)
usb: wusbcore: implement hwahc_op_get_frame_number
This patch adds an implementation for hwahc_op_get_frame_number. The request is fulfulled by forwarding it to the lower hcd. This was done because the GET_TIME request on the HWA requires sending an URB to the HWA and waiting for the results which cannot be done in atomic context. Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/hwa-hc.c')
-rw-r--r--drivers/usb/host/hwa-hc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c
index 5b86ffb88f1c..e58b92491eb1 100644
--- a/drivers/usb/host/hwa-hc.c
+++ b/drivers/usb/host/hwa-hc.c
@@ -199,10 +199,14 @@ static int hwahc_op_get_frame_number(struct usb_hcd *usb_hcd)
199{ 199{
200 struct wusbhc *wusbhc = usb_hcd_to_wusbhc(usb_hcd); 200 struct wusbhc *wusbhc = usb_hcd_to_wusbhc(usb_hcd);
201 struct hwahc *hwahc = container_of(wusbhc, struct hwahc, wusbhc); 201 struct hwahc *hwahc = container_of(wusbhc, struct hwahc, wusbhc);
202 struct wahc *wa = &hwahc->wa;
202 203
203 dev_err(wusbhc->dev, "%s (%p [%p]) UNIMPLEMENTED\n", __func__, 204 /*
204 usb_hcd, hwahc); 205 * We cannot query the HWA for the WUSB time since that requires sending
205 return -ENOSYS; 206 * a synchronous URB and this function can be called in_interrupt.
207 * Instead, query the USB frame number for our parent and use that.
208 */
209 return usb_get_current_frame_number(wa->usb_dev);
206} 210}
207 211
208static int hwahc_op_urb_enqueue(struct usb_hcd *usb_hcd, struct urb *urb, 212static int hwahc_op_urb_enqueue(struct usb_hcd *usb_hcd, struct urb *urb,