aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/mtu3/mtu3_gadget_ep0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/mtu3/mtu3_gadget_ep0.c')
-rw-r--r--drivers/usb/mtu3/mtu3_gadget_ep0.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c
index 0ca47212f1ec..e4fd1bb14a55 100644
--- a/drivers/usb/mtu3/mtu3_gadget_ep0.c
+++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c
@@ -66,7 +66,7 @@ __acquires(mtu->lock)
{
int ret;
- if (!mtu->gadget_driver)
+ if (!mtu->gadget_driver || !mtu->async_callbacks)
return -EOPNOTSUPP;
spin_unlock(&mtu->lock);
@@ -226,6 +226,8 @@ ep0_get_status(struct mtu3 *mtu, const struct usb_ctrlrequest *setup)
break;
case USB_RECIP_INTERFACE:
+ /* status of function remote wakeup, forward request */
+ handled = 0;
break;
case USB_RECIP_ENDPOINT:
epnum = (u8) le16_to_cpu(setup->wIndex);
@@ -397,10 +399,8 @@ static int ep0_handle_feature(struct mtu3 *mtu,
/* superspeed only */
if (value == USB_INTRF_FUNC_SUSPEND &&
mtu->g.speed >= USB_SPEED_SUPER) {
- /*
- * forward the request because function drivers
- * should handle it
- */
+ /* forward the request for function suspend */
+ mtu->may_wakeup = !!(index & USB_INTRF_FUNC_SUSPEND_RW);
handled = 0;
}
break;