Re: usbfs reopen yields unusable device.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Mar 2009, Dave Mielke wrote:

> I'm using usbfs to support braille devices. I'm experiencing a problem with one 
> such device that I've never encountered before. When the device is opened for 
> the first time (after connecting the USB cable), it works fine. All operations 
> succeed as expected. When the device is closed and reopened, however, it no 
> longer responds (for example, to "get descriptor" requests), i.e. the ioctl()s 
> yield timeouts. Disconnecting/reconnecting the USB cable restores normal 
> operation, but only for one open.
> 
> I know this problem has nothing to do with faulty support of autosuspend 
> because I've made sure that feature was disabled via writing "on" to 
> "power/level" and by writing "-1" to "power/autosuspend".
> 
> One unusual thing I'm noticing is that the "release interface" which is done 
> just before the close of the device takes about five seconds to complete. From 
> strace:
> 
>    08:59:17.106788 ioctl(10, USBDEVFS_RELEASEINTERFACE, 0xbfe8a58c) = 0 <5.001493>
>    08:59:22.108524 close(10)               = 0 <0.000032>
> 
> The vendor assures me that reopening (without disconnect/reconect) the device 
> does work on Windows.
> 
> Can any of you think of any possibilities that I should check?

Most likely you have found the problem: The device doesn't like the 
Set-Interface request sent automatically by the kernel when the 
"release interface" occurs.

In 2.6.29 the kernel won't send this request if it isn't needed.  You 
might want to try 2.6.29-rc8 to see if it fixes the problem.

> Is there any way I can get the kernel to log all of the low-level USB 
> operations involving the device?

There are two things you can do: enable CONFIG_USB_DEBUG and collect a 
usbmon trace (see Documentation/usb/usbmon.txt).

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux