On Friday 20 January 2006 9:58 am, Kumar Gala wrote: > David, > > I was hoping to get your feedback on how you would like to handle an > errata that Freescale has in their EHCI controllers. Their multiport host > controller has the following errata: > > "Port number in the Queue head is 0 to N-1. It should be 1 to N according > to EHCI spec. This bug only affects the host mode." > > Would something like the following patch be acceptable? If so, I'll > follow up with a proper patch that includes the detection and setting of > has_fsl_port_bug.
Looks OK to me, though please be sure to use the has_fsl_* syntax instead of the mixed case has_FSL_* syntax. ;) - Dave > - kumar > > diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c > index 9b13bf2..711597b 100644 > --- a/drivers/usb/host/ehci-q.c > +++ b/drivers/usb/host/ehci-q.c > @@ -721,7 +721,14 @@ qh_make ( > info1 |= maxp << 16; > > info2 |= (EHCI_TUNE_MULT_TT << 30); > - info2 |= urb->dev->ttport << 23; > + > + /* Some Freescale processors have an errata in which the > + * port number in the queue head was 0..N-1 instead of 1..N. > + */ > + if (ehci_has_FSL_portno_bug(ehci)) > + info2 |= (urb->dev->ttport-1) << 23; > + else > + info2 |= urb->dev->ttport << 23; > > /* set the address of the TT; for TDI's integrated > * root hub tt, leave it zeroed. > diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h > index 18e257c..d180488 100644 > --- a/drivers/usb/host/ehci.h > +++ b/drivers/usb/host/ehci.h > @@ -89,6 +89,8 @@ struct ehci_hcd { /* one per controlle > u32 command; > > unsigned is_tdi_rh_tt:1; /* TDI roothub with TT */ > + /* FSL controller with port number errata */ > + unsigned has_fsl_port_bug:1; > > /* irq statistics */ > #ifdef EHCI_STATS > @@ -638,6 +640,18 @@ ehci_port_speed(struct ehci_hcd *ehci, u > > /*-------------------------------------------------------------------------*/ > > +#ifdef CONFIG_PPC_83xx > +/* Some Freescale processors have an errata in which the > + * port number in the queue head was 0..N-1 instead of 1..N. > + */ > +#define ehci_has_FSL_portno_bug(e) ((e)->has_fsl_port_bug) > +#else > +#define ehci_has_FSL_portno_bug(e) (0) > +#endif > + > + > +/*-------------------------------------------------------------------------*/ > + > #ifndef DEBUG > #define STUB_DEBUG_FILES > #endif /* DEBUG */ > ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel