> -----Original Message-----
> From: Jelle Martijn Kok [mailto:[email protected]]
> Sent: 2017年2月16日 23:20
> To: [email protected]
> Cc: Wenyou Yang - A41535 <[email protected]>; Alan Stern
> <[email protected]>
> 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 <[email protected]>

Thank you for your discovery and fixed.

Tested-by: Wenyou Yang <[email protected]>


> ---
>   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

Reply via email to