cvs commit: src/sys/dev/usb usb_subr.c

Bill Paul wpaul at
Wed Sep 29 11:12:34 PDT 2004

wpaul       2004-09-29 18:12:33 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/usb          usb_subr.c 
  When opening a pipe, usbd_setup_pipe() will do a usbd_clear_endpoint_stall()
  to make sure the pipe is ready. Some devices apparently don't support
  the clear stall command however. So what happens when you issue such
  devices a clear stall command? Typically, the command just times out.
  This, at least, is the behavior I've observed with two devices that
  I own: a Rio600 mp3 player and a T-Mobile Sidekick II.
  It used to be that after the timeout expired, the pipe open operation
  would conclude and you could still access the device, with the only
  negative effect being a long delay on open. But in the recent past,
  someone added code to make the timeout a fatal error, thereby breaking
  the ability to communicate with these devices in any way.
  I don't know exactly what the right solution is for this problem:
  presumeably there is some way to determine whether or not a device
  supports the 'clear stall' command beyond just issuing one and waiting
  to see if it times out, but I don't know what that is. So for now,
  I've added a special case to the error checking code so that the
  timeout is once again non-fatal, thereby letting me use my two
  devices again.
  Revision  Changes    Path
  1.71      +8 -3      src/sys/dev/usb/usb_subr.c

More information about the cvs-src mailing list