Hi Toby,

Just want to say a huge thanks for looking into this problem in detail.
I'm observing from the sidelines on linux-usb. :-)

- Chris


On Tue, Sep 14, 2010 at 05:56:20PM +0100, Toby Gray wrote:
>  Hi,
> 
> I've been looking at some issues with some disconnection issues seen 
> when using Barry (http://barry.sourceforge.net) to communicate with some 
> BlackBerry devices.
> 
> The underlying problem seems to be that the BlackBerry device fails to 
> respond to a Test Unit Ready SCSI command within the timeout period. 
> This causes the usb-storage driver to reset the USB device when handling 
> the timeout in usb_stor_invoke_transport(), which causes the Barry 
> communications on other endpoints to fail.
> 
> A sample of the output from usb_storage with debugging enabled is:
> [24924.910351] usb-storage: queuecommand called
> [24924.910390] usb-storage: *** thread awakened.
> [24924.910397] usb-storage: Command TEST_UNIT_READY (6 bytes)
> [24924.910399] usb-storage:  00 00 00 00 00 00
> [24924.910409] usb-storage: Bulk Command S 0x43425355 T 0x5a L 0 F 0 Trg 
> 0 LUN 0 CL 6
> [24924.910413] usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
> [24924.910543] usb-storage: Status code 0; transferred 31/31
> [24924.910546] usb-storage: -- transfer complete
> [24924.910549] usb-storage: Bulk command transfer result=0
> [24924.910551] usb-storage: Attempting to get CSW...
> [24924.910554] usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
> [24955.477542] usb-storage: command_abort called
> [24955.477547] usb-storage: usb_stor_stop_transport called
> [24955.477550] usb-storage: -- cancelling URB
> [24955.477660] usb-storage: Status code -104; transferred 0/13
> [24955.477663] usb-storage: -- transfer cancelled
> [24955.477665] usb-storage: Bulk status result = 4
> [24955.477668] usb-storage: -- command was aborted
> [24955.477787] usb-storage: usb_stor_pre_reset
> [24955.557453] usb 2-1.4: reset high speed USB device using ehci_hcd and 
> address 28
> [24955.679226] usb-storage: usb_stor_post_reset
> 
> My question therefore is if it is necessary to always reset the USB 
> device when a usb-storage command times out?
> 
> If there are other alternatives to resetting the whole device then could 
> someone give me a few suggestions to point me in the right direction?
> 
> The BlackBerry continues to communicate correctly on the other endpoints 
> while the usb-storage command is pending and when I tried a nasty hack 
> of just commenting out the resetting of the USB device so that the SCSI 
> layer could retry the command then it at least seems like the BlackBerry 
> can recover, with usb-storage and Barry continuing to work correctly. 
> I'm not suggesting that this hack is anything like a solution, but was 
> curious to see if the hanging command could be recovered from.
> 
> Regards,
> 
> Toby
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Barry-devel mailing list
Barry-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/barry-devel

Reply via email to