RE: [PATCH v3] xhci: AMD Promontory USB disable port support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Mathias Nyman [mailto:mathias.nyman@xxxxxxxxxxxxxxx]
> Sent: Monday, June 05, 2017 5:40 PM
> To: Jiahau Chang; linux-usb@xxxxxxxxxxxxxxx; mathias.nyman@xxxxxxxxx;
> greg@xxxxxxxxx
> Cc: kent.lin@xxxxxxxxxxxxx; Justin_CY Chen(陳志勇); Yd Tseng(曾裕達);
> acelan.kao@xxxxxxxxxxxxx; Lars Chang(張家豪)
> Subject: Re: [PATCH v3] xhci: AMD Promontory USB disable port support
> 
> On 31.05.2017 10:41, Jiahau Chang wrote:
> > v3: Fix some checkpatch.pl warnings
> >
> > For AMD Promontory xHCI host, although you can disable USB 2.0 ports in
> BIOS
> > settings, those ports will be enabled anyway after you remove a device on
> > that port and re-plug it in again. It's a known limitation of the chip.
> > As a workaround we can clear the PORT_WAKE_BITS.
> >
> > Signed-off-by: Jiahau Chang <Lars_Chang@xxxxxxxxxxxxxx>
> > ---
> >   drivers/usb/host/xhci-hub.c | 19 ++++++++++++++-----
> >   drivers/usb/host/xhci-pci.c | 13 +++++++++++++
> >   drivers/usb/host/xhci.h     |  2 ++
> >   3 files changed, 29 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> > index 0dde49c..aad32c6 100644
> > --- a/drivers/usb/host/xhci-hub.c
> > +++ b/drivers/usb/host/xhci-hub.c
> > @@ -1218,12 +1218,19 @@ int xhci_hub_control(struct usb_hcd *hcd, u16
> typeReq, u16 wValue,
> >   			xhci_dbg(xhci, "set port reset, actual port %d status  =
> 0x%x\n", wIndex, temp);
> >   			break;
> >   		case USB_PORT_FEAT_REMOTE_WAKE_MASK:
> > -			xhci_set_remote_wake_mask(xhci, port_array,
> > +			if ((xhci->quirks & XHCI_U2_DISABLE_WAKE) && (hcd->speed <
> HCD_USB3)) {
> > +				temp = readl(port_array[wIndex]);
> > +				xhci_dbg(xhci, "skip set port remote wake mask, "
> > +						"actual port %d status  = 0x%x\n",
> > +						wIndex, temp);
> 
> Does this work?
> 
> If I remember correctly USB_PORT_FEAT_REMOTE_WAKE_MASK is a USB3
> only feature.
> The (hcd->speed < HCD_USB3) condition should never be true here.
Yes, you are right.  The USB_PORT_FEAT_REMOTE_WAKE_MASK is a USB3 only
feature.  The relative dummy code is removed in V4.

> 
> -Mathias

==================================================================================================================
This email and any attachments to it contain confidential information and are intended solely for the use of the individual to whom it 
is addressed.If you are not the intended recipient or receive it accidentally, please immediately notify the sender by e-mail and delete 
the message and any attachments from your computer system, and destroy all hard copies. If any, please be advised that any unauthorized 
disclosure, copying, distribution or any action taken or omitted in reliance on this, is illegal and prohibited. Furthermore, any views 
or opinions expressed are solely those of the author and do not represent those of ASMedia Technology Inc. Thank you for your cooperation.
==================================================================================================================
?頨{.n?????%??橆??w?{.n???{殺???緡w*jg炳????▏?拷G??98夸:+v??鋟喓???茶庫全??ㄑ搬?????



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux