> -----Original Message----- > From: Jelle Martijn Kok [mailto:jmkok@xxxxxxxxx] > Sent: 2017年2月16日 23:20 > To: linux-usb@xxxxxxxxxxxxxxx > Cc: Wenyou Yang - A41535 <Wenyou.Yang@xxxxxxxxxxxxx>; Alan Stern > <stern@xxxxxxxxxxxxxxxxxxx> > Subject: [PATCH] usb: ohci-at91: revert patch 2e2aa1bc7eff90ec on cpu without > SFR register > > External USB hubs seems to go into suspend, but never wakeup again. > Tested on an AT91SAM9G20 > > Signed-off-by: Jelle Martijn Kok <jmkok@xxxxxxxxx> Thank you for your discovery and fixed. Tested-by: Wenyou Yang <wenyou.yang@xxxxxxxxx> > --- > drivers/usb/host/ohci-at91.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index > b38a228..af0566d 100644 > --- a/drivers/usb/host/ohci-at91.c > +++ b/drivers/usb/host/ohci-at91.c > @@ -361,7 +361,7 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 > typeReq, u16 wValue, > case USB_PORT_FEAT_SUSPEND: > dev_dbg(hcd->self.controller, "SetPortFeat: SUSPEND\n"); > - if (valid_port(wIndex)) { > + if (valid_port(wIndex) && ohci_at91->sfr_regmap) { > ohci_at91_port_suspend(ohci_at91->sfr_regmap, > 1); > return 0; > @@ -404,7 +404,7 @@ static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 > typeReq, u16 wValue, > case USB_PORT_FEAT_SUSPEND: > dev_dbg(hcd->self.controller, "ClearPortFeature: > SUSPEND\n"); > - if (valid_port(wIndex)) { > + if (valid_port(wIndex) && ohci_at91->sfr_regmap) { > ohci_at91_port_suspend(ohci_at91->sfr_regmap, > 0); > return 0; > -- > 2.1.4 Best Regards, Wenyou Yang ?韬{.n?????%??檩??w?{.n???{炳???骅w*jg????????G??⒏⒎?:+v????????????"??????