On Fri, 11 Nov 2005, decibels wrote: > >On Friday 11 November 2005 14:33, Oliver Neukum wrote: > > > > I can sort of replicate it, but I get a different error. > > Please recompile the driver with MTS_DO_DEBUG defined and try again. > > > > Regards > > Oliver > > > > Enabled MTS_DO_DEBUG in microtek.c . Quite a lot of info: > (Kern.log after plugging in scanner)
Correct me if I'm wrong: > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): Command INQUIRY (6 bytes) > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): 12 00 00 00 24 00 9d 00 > 96 98 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): desc at 0x2d9f5340: toggle > = 0101 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): ep_out=c0008300 > ep_response=c0010380 ep_image=c0018380 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): got to > drivers/usb/image/microtek.c:534 (mts_build_transfer_context) > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): Using scatter/gather > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): transfering from > desc->ep_response == 2 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): got to > drivers/usb/image/microtek.c:455 (mts_command_done) This is the callback after sending the CDB. Note that the driver does DMA from a non-aligned buffer. > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): transfer = 0x2e0dd200 > context = 0x2d9f5390 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): status = 0x0 data-length = > 0x24 sent = 0x6 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): desc at 0x2d9f5340: toggle > = 0301 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): ep_out=c0008300 > ep_response=c0010380 ep_image=c0018380 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): got to > drivers/usb/image/microtek.c:376 (mts_int_submit_urb) This is about to submit the URB to transfer the INQUIRY data. > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): transfer = 0x2e0dd200 > context = 0x2d9f5390 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): status = 0x0 data-length = > 0x24 sent = 0x6 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): desc at 0x2d9f5340: toggle > = 0301 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): ep_out=c0008300 > ep_response=c0010380 ep_image=c0018380 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): got to > drivers/usb/image/microtek.c:496 (mts_do_sg) This is the callback. Note that fragment 0 of a 1-fragment sg list has just been sent. Note also the use of page_address, which will fail for buffers in high memory. > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): transfer = 0x2e0dd200 > context = 0x2d9f5390 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): status = 0x0 data-length = > 0x24 sent = 0x24 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): desc at 0x2d9f5340: toggle > = 0305 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): ep_out=c0008300 > ep_response=c0010380 ep_image=c0018380 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): Processing fragment 0 of 1 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): got to > drivers/usb/image/microtek.c:376 (mts_int_submit_urb) Here the driver is about to submit a 0-length URB for the non-existent second fragment of a 1-fragment sg list. > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): transfer = 0x2e0dd200 > context = 0x2d9f5390 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): status = 0x0 data-length = > 0x24 sent = 0x24 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): desc at 0x2d9f5340: toggle > = 0305 > Nov 11 15:03:19 decibels microtek usb (rev 0.4.3): ep_out=c0008300 > ep_response=c0010380 ep_image=c0018380 > Nov 11 15:03:19 decibels ohci_hcd 0000:00:02.0: urb ffff81002e0dd200 path 2 > ep2in 83160000 cc 8 --> status -75 Not unnaturally, the device sends back more than 0 bytes, and you get -EOVERFLOW. It looks like the problem is in mts_command_done. It doesn't expect to deal with an sg list containing only one element. Alan Stern ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel