Re: [PATCH 2/2] Add HCS_PPC when getting root hub status
hi alan 2015-01-19 1:06 GMT+08:00 Alan Stern : > On Sun, 18 Jan 2015, Chechun Kuo wrote: > >> for some platform ehci controller, it is possible there is no port power >> control capability in the root hub. >> And we add port power control determination when getting root hub port >> status. > > Why do you need to do this? Doesn't the current code always give the > right result? My host controller doesn't support PPC, and the PORT_POWER bit will not be one even when device is powered up. After I checking the ehci spec, it should be HW's issue, since spec say PP should be one even when PPC is zero. Sorry to make you confuse ^^ -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] Add HCS_PPC when getting root hub status
On Sun, 18 Jan 2015, Chechun Kuo wrote: > for some platform ehci controller, it is possible there is no port power > control capability in the root hub. > And we add port power control determination when getting root hub port status. Why do you need to do this? Doesn't the current code always give the right result? Alan Stern > Signed-off-by: Chechun Kuo > --- > drivers/usb/host/ehci-hub.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c > index 5728829..1923984 100644 > --- a/drivers/usb/host/ehci-hub.c > +++ b/drivers/usb/host/ehci-hub.c > @@ -1118,7 +1118,7 @@ int ehci_hub_control( > status |= USB_PORT_STAT_OVERCURRENT; > if (temp & PORT_RESET) > status |= USB_PORT_STAT_RESET; > - if (temp & PORT_POWER) > + if (HCS_PPC(ehci->hcs_params) && (temp & PORT_POWER)) > status |= USB_PORT_STAT_POWER; > if (test_bit(wIndex, &ehci->port_c_suspend)) > status |= USB_PORT_STAT_C_SUSPEND << 16; > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] Add HCS_PPC when getting root hub status
for some platform ehci controller, it is possible there is no port power control capability in the root hub. And we add port power control determination when getting root hub port status. Signed-off-by: Chechun Kuo --- drivers/usb/host/ehci-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 5728829..1923984 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c @@ -1118,7 +1118,7 @@ int ehci_hub_control( status |= USB_PORT_STAT_OVERCURRENT; if (temp & PORT_RESET) status |= USB_PORT_STAT_RESET; - if (temp & PORT_POWER) + if (HCS_PPC(ehci->hcs_params) && (temp & PORT_POWER)) status |= USB_PORT_STAT_POWER; if (test_bit(wIndex, &ehci->port_c_suspend)) status |= USB_PORT_STAT_C_SUSPEND << 16; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html