On Sunday, May 20, 2007, David Brownell

> On Sunday 20 May 2007, Pete Zaitcev wrote:
> > On Fri, 18 May 2007 14:23:43 -0700, "Mark Miesfeld" <[EMAIL PROTECTED]>
wrote:
> > 
> > And this is the part which implements poking:
> > 
> > > +++ b/drivers/usb/host/ohci-ppc-soc.c
> > > @@ -20,6 +20,37 @@ #include <linux/signal.h>
> > >  /* always called with process context; sleeping is OK */
> > > 
> > > +#ifdef CONFIG_USB_PPC440EPX_USBH_23_ERRATA
> > > +struct ohci_hcd  *cached_ohci = NULL;
> > > +#define HCFS_SUSPEND      0
> > > +#define HCFS_OPERATIONAL  1
> > 
> > > +void ohci_ppc_set_hcfs(int state) {
> > > + u32 hc_control;
> > > +
> > > + hc_control = (ohci_readl(cached_ohci, > &cached_ohci->regs->control)
> > > +               & ~OHCI_CTRL_HCFS);
> > > +
> > > + switch ( state )  {
> > > + case HCFS_SUSPEND:
> > > +         hc_control |= OHCI_USB_SUSPEND;
> > > +         break;
> > > + case HCFS_OPERATIONAL :
> > > +         hc_control |= OHCI_USB_OPER;
> 
> So, basically you'll turn on OHCI hardware without having the
> driver know that it's on ... ?

I realize this is not ideal, but because of the errata, the situation
is not ideal.

At the point that the hardware is turned on, the driver thinks that
the hardware is on.

After the ohci driver is completely set up, the HCFS field in the contrller
core is set to suspend.  As near as I can tell, the ohci driver will not
do anything until it gets an interrupt and it will not get an interrupt until
the ehci driver explictly turns over control of the port.  

Which it only does when it detects that a non-high speed device is connected.
Then, if the ehci driver detects a new connection, and it is a high speed 
device, the HCFS field in the ohci controller core is set back to suspend.

> This looks almost certain to break something -- deeply.
> 
> If you're going to turn on the OHCI hardware, do it the
> normal way; don't bypass its driver.

I don't see how to do that.  Because of the errata, the ohci driver
needs to be completely set up and the HCFS field in the core set to
suspend until, and only until, a full speed device is connected.  Then, 
if that device is disconnected and a high speed device connected, the 
HCFS field needs to be set to suspend.

--
Mark


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to