Best regards, Peter Chen > -----Original Message----- > From: Matthieu CASTET [mailto:matthieu.castet@xxxxxxxxxx] > Sent: Tuesday, May 15, 2012 4:54 PM > To: Chen Peter-B29397 > Cc: linux-usb@xxxxxxxxxxxxxxx; alexander.shishkin@xxxxxxxxxxxxxxx; Chen > Peter-B29397; stern@xxxxxxxxxxxxxxxxxxx > Subject: Re: [RFC/PATCH 1/4] autodetect hostpc > > Peter Chen a écrit : > > On Mon, May 14, 2012 at 05:17:44PM +0200, Matthieu CASTET wrote: > >> Signed-off-by: Matthieu CASTET <matthieu.castet@xxxxxxxxxx> > >> --- > >> drivers/usb/host/ehci-hcd.c | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > >> index 4a3bc5b..8cc2cf3 100644 > >> --- a/drivers/usb/host/ehci-hcd.c > >> +++ b/drivers/usb/host/ehci-hcd.c > >> @@ -716,6 +716,8 @@ static int ehci_init(struct usb_hcd *hcd) > >> hird = 0; > >> } > >> temp |= hird << 24; > >> + if (ehci_is_TDI(ehci)) > >> + ehci->has_hostpc = 1; > > > > Now, most of controllers set hcd->has_tt = 1, but they may not have > > hostpc. Why you think these two things have relationship? > Setting has_tt and has_lpm can't work without has_hostpc, they have > incompatible > register layout for port register : > : > has_lpm > #define PORT_LPM (1<<9) /* LPM transaction */ > #define PORT_DEV_ADDR (0x7f<<25) /* device address */ > #define PORT_SSTS (0x3<<23) /* suspend status */ > > has_tt (without has_hostpc) > 9 HSP (high speed status) > 23 PHCD (phy clock disable) > 24 PFSC (force speed) > 26-27 (port speed) > I mean why set ehci->has_hostpc = 1 when hcd->has_tt =1 Is it possible read register to know if has_hostpc and has_lpm? > Matthieu > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html