On Mon, 2 Apr 2007 20:06:49 -0700 [EMAIL PROTECTED] wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=8297 > > Summary: ldusb returns bad data on subsequent reads if no data is > available. > Kernel Version: 2.6.21-rc5 > Status: NEW > Severity: normal > Owner: [EMAIL PROTECTED] > Submitter: [EMAIL PROTECTED] > > > Problem Description: > Using my Go!Temp temperature probe with the ldusb driver I decided to cat the > device file /dev/ldusb0 to see what it would return. Bad idea, I was > presented > with an endless spewing of crap. > > After a little debugging it seems the problem is that in ld_usb_open > dev->interrupt_in_done is set to 0, and the URB is submitted. When > ld_usb_read > is called if no data is in the buffer it waits for > ld_usb_interrupt_in_callback > to complete by checking if dev->interrupt_in_done has been set to 1. That > works > fine if you only read once after calling open however, if you happen to read > more than once dev->interrupt_in_done is never reset so you read from the > empty > buffer even though no data has arrived. > > Steps to reproduce: > Plug in a Go!Temp temperature probe > dd if=/dev/ldusb0 ibs=8 count=10 > dmesg > notice strange error message (ldusb 4-2:1.0: Read buffer overflow, 1095783997 > bytes dropped)
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel