On Sunday 27 October 2002 00:45, Alan Cox wrote:
> On Sat, 2002-10-26 at 00:06, Duncan Sands wrote:
> > +   status = inw(io_addr + USBCMD);
> > +   outw(status & ~USBCMD_RS, io_addr + USBCMD);
> > +
> > +   /* Wait for the current transaction to finish */
> > +   status = inw(io_addr + USBSTS);
> > +   while (!(status & USBSTS_HCH))
> > +           status = inw(io_addr + USBSTS);
> > +
> >     outw(USBCMD_EGSM, io_addr + USBCMD);
>
> These loops need timeouts. Suppose I unplugged the USB controller on my
> cardbus at that moment ?

Then the system will go down!  A devil tempts me to point out that it would have
gone down before this patch as well - look in wakeup_hc a few lines below...
But you are right of course - I will put in a timeout and, sigh, I will audit uhci.c
and put in timeouts everywhere else as well.

Ciao, Duncan.


-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to