On Sat, 2 Sep 2006, Greg KH wrote:

> > > > Hm, I plugged a different 2.0 hub into my root port, and it showed up.
> > > > Then it suspended.  Plugged a device into it, nothing.  Removed the hub,
> > > > nothing then either.  The ehci driver still thinks this hub is present
> > > > :(
> > > 
> > > Tried it with the same hub in my laptop (different ehci controller).
> > > Same thing happened :(
> > 
> > Let's see if I understand this right:
> > 
> > You start out with nothing plugged in, and your EHCI root hub is 
> > suspended.
> 
> In one situation yes, in another no.
> 
> > Then you plug in a 2.0 hub; the root hub wakes up and recognizes the
> > external hub.  2 seconds later the external hub gets suspended and 2
> > seconds after that the root hub gets suspended.
> 
> Yes.
> 
> > If you plug another device into the external hub, nothing wakes up.
> 
> Correct.
> 
> > If you unplug the external hub from the computer, the root hub doesn't 
> > wake up.
> 
> Correct.
> 
> > This seems very strange.  Why should the root hub wake up when you connect 
> > the external hub but not when you disconnect it?
> 
> That seems to be the problem here :)
> 
> > Seeing the dmesg log might help.  You might also want to add some 
> > debugging printk's to ehci_irq() in ehci-hcd.c, especially in the "if 
> > (status & STS_PCD)" section.
> 
> There is nothing in the debug log when I remove the hub, or connect the
> device.
> 
> > (Hmmm, looking at that code it appears that "status" is not handled very
> > well.  The result from readl(&ehci->regs->command) shouldn't be allowed to
> > overwrite it.)
> 
> Care to make a fix?  :)
> 
> I don't have the time right now for the next few days to work much on
> this (family stuff.)  Let me get back to you on Tuesday...

When you have a chance to work on this, here are some things to try:

        In ehci-hcd.c:ehci_irq(), add a printk line to the
        "if (status & STS_PCD) {" section so that we can tell
        whether this section of code got to run at all.  It
        _should_ run when you plug in the external hub and again
        when you unplug the hub.

        At various strategic times, copy the contents of
        /sys/class/usb_host/usb_hostN/registers (where N is the
        bus number of your EHCI controller).  Some good times at
        which to do this are:

                Before plugging in anything, while the root hub
                is suspended.

                After plugging in the external hub, after
                everything has suspended.

                After unplugging the external hub, when nothing
                happens.

        Check the contents of 
        /sys/bus/usb/devices/usbN/device/power/wakeup.
        It should say "enabled".

Alan Stern


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&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

Reply via email to