Message ID | bafc49b6-ca94-5560-2056-bcb8c15108de@ti.com |
---|---|
State | Superseded |
Headers | show |
Hi, Roger Quadros <rogerq@ti.com> writes: > diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h > index f945380..6553903 100644 > --- a/drivers/usb/host/xhci.h > +++ b/drivers/usb/host/xhci.h > @@ -1656,6 +1656,9 @@ struct xhci_hcd { > #define XHCI_SSIC_PORT_UNUSED (1 << 22) > #define XHCI_NO_64BIT_SUPPORT (1 << 23) > #define XHCI_MISSING_CAS (1 << 24) > +/* For controller with a broken Port Disable implementation */ > +#define XHCI_BROKEN_PORT_PED (1 << 21) since back when I first wrote this, bit 21 has been taken. You should be using bit 25 here. -- balbi
On 21/11/16 13:56, Felipe Balbi wrote: > > Hi, > > Roger Quadros <rogerq@ti.com> writes: >> diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h >> index f945380..6553903 100644 >> --- a/drivers/usb/host/xhci.h >> +++ b/drivers/usb/host/xhci.h >> @@ -1656,6 +1656,9 @@ struct xhci_hcd { >> #define XHCI_SSIC_PORT_UNUSED (1 << 22) >> #define XHCI_NO_64BIT_SUPPORT (1 << 23) >> #define XHCI_MISSING_CAS (1 << 24) >> +/* For controller with a broken Port Disable implementation */ >> +#define XHCI_BROKEN_PORT_PED (1 << 21) > > since back when I first wrote this, bit 21 has been taken. You should be > using bit 25 here. > My bad. I'll fix this up. cheers, -roger
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 0ef1690..1d41637 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -458,6 +458,12 @@ static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, return; } + if (xhci->quirks & XHCI_BROKEN_PORT_PED) { + xhci_dbg(xhci, + "Broken Port Enabled/Disabled, ignoring port disable request.\n"); + return; + } + /* Write 1 to disable the port */ writel(port_status | PORT_PE, addr); port_status = readl(addr); diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index f945380..6553903 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1656,6 +1656,9 @@ struct xhci_hcd { #define XHCI_SSIC_PORT_UNUSED (1 << 22) #define XHCI_NO_64BIT_SUPPORT (1 << 23) #define XHCI_MISSING_CAS (1 << 24) +/* For controller with a broken Port Disable implementation */ +#define XHCI_BROKEN_PORT_PED (1 << 21) + unsigned int num_active_eps; unsigned int limit_active_eps; /* There are two roothubs to keep track of bus suspend info for */