diff options
Diffstat (limited to 'drivers/usb/mtu3/mtu3_gadget_ep0.c')
-rw-r--r-- | drivers/usb/mtu3/mtu3_gadget_ep0.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/mtu3/mtu3_gadget_ep0.c b/drivers/usb/mtu3/mtu3_gadget_ep0.c index 958d74dd2b78..020b25314a68 100644 --- a/drivers/usb/mtu3/mtu3_gadget_ep0.c +++ b/drivers/usb/mtu3/mtu3_gadget_ep0.c @@ -212,8 +212,8 @@ ep0_get_status(struct mtu3 *mtu, const struct usb_ctrlrequest *setup) case USB_RECIP_DEVICE: result[0] = mtu->is_self_powered << USB_DEVICE_SELF_POWERED; result[0] |= mtu->may_wakeup << USB_DEVICE_REMOTE_WAKEUP; - /* superspeed only */ - if (mtu->g.speed == USB_SPEED_SUPER) { + + if (mtu->g.speed >= USB_SPEED_SUPER) { result[0] |= mtu->u1_enable << USB_DEV_STAT_U1_ENABLED; result[0] |= mtu->u2_enable << USB_DEV_STAT_U2_ENABLED; } @@ -329,8 +329,8 @@ static int ep0_handle_feature_dev(struct mtu3 *mtu, handled = handle_test_mode(mtu, setup); break; case USB_DEVICE_U1_ENABLE: - if (mtu->g.speed != USB_SPEED_SUPER || - mtu->g.state != USB_STATE_CONFIGURED) + if (mtu->g.speed < USB_SPEED_SUPER || + mtu->g.state != USB_STATE_CONFIGURED) break; lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL); @@ -344,8 +344,8 @@ static int ep0_handle_feature_dev(struct mtu3 *mtu, handled = 1; break; case USB_DEVICE_U2_ENABLE: - if (mtu->g.speed != USB_SPEED_SUPER || - mtu->g.state != USB_STATE_CONFIGURED) + if (mtu->g.speed < USB_SPEED_SUPER || + mtu->g.state != USB_STATE_CONFIGURED) break; lpc = mtu3_readl(mbase, U3D_LINK_POWER_CONTROL); @@ -384,8 +384,8 @@ static int ep0_handle_feature(struct mtu3 *mtu, break; case USB_RECIP_INTERFACE: /* superspeed only */ - if ((value == USB_INTRF_FUNC_SUSPEND) - && (mtu->g.speed == USB_SPEED_SUPER)) { + if (value == USB_INTRF_FUNC_SUSPEND && + mtu->g.speed >= USB_SPEED_SUPER) { /* * forward the request because function drivers * should handle it |