OSDN Git Service

usb: dwc3: gadget: allow remote-wakeup for SS-USB
authorBar Weiner <bweiner@codeaurora.org>
Thu, 3 Apr 2014 09:47:51 +0000 (12:47 +0300)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:06:27 +0000 (11:06 -0700)
Remove the restriction in the code that disables the possibility
of device remote wakeup in SS-USB.
Originally, this restriction was coded since suspend/resume in SS-USB
is expected to be performed at the function level, rather than the
device level. However, the suspend is currently done at the device
level, and therefore the corresponding remote wakeup should also
follow in suit.
The concept of function suspend/resume may be revisited in the future.

Change-Id: If071f38c03cf46290536cafad1a13a6818088eb7
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
drivers/usb/dwc3/gadget.c

index 7d40c92..43e1e87 100644 (file)
@@ -1387,7 +1387,6 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g)
        int                     ret = 0;
 
        u8                      link_state;
-       u8                      speed;
 
        spin_lock_irqsave(&dwc->lock, flags);
 
@@ -1399,13 +1398,6 @@ static int dwc3_gadget_wakeup(struct usb_gadget *g)
         */
        reg = dwc3_readl(dwc->regs, DWC3_DSTS);
 
-       speed = reg & DWC3_DSTS_CONNECTSPD;
-       if (speed == DWC3_DSTS_SUPERSPEED) {
-               dev_dbg(dwc->dev, "no wakeup on SuperSpeed\n");
-               ret = -EINVAL;
-               goto out;
-       }
-
        link_state = DWC3_DSTS_USBLNKST(reg);
 
        switch (link_state) {