Re: USB2.0 disk format failure in windows guest

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

 



On Wed, 10 Apr 2013, Gonglei (Arei) wrote:

> Hi Alan,
> We pass-throughed USB 2.0 disk to guest using usb-host (qemu option: -device usb-ehci,id=ehci -device usb-host,bus=ehci.0,hostbus=2,hostport=1) on KVM(on linux-3.8.3 or linux-3.0.13) and qemu 1.4.0 ,

Are you sure this disk was using EHCI?  The attached log shows bulk
packet sizes that aren't multiples of 512, which isn't possible in the
middle of a high-speed transfer.

Also, the log doesn't show data for the IN transfers.  Did you remove 
it?

>  it worked fine for reading and writing data, but failed when format it in a windows Guest OS such as winXP,win7,win2003. We captured usb operations on Dom0, found below logs:
>   ...
> Feb  1 11:17:50 linux-bLKBXy kernel: [66642.325169] usb 6-1: usbdev_do_ioctl: REAPURBNDELAY
> Feb  1 11:17:50 linux-bLKBXy kernel: [66642.325172] usb 6-1: usbdev_do_ioctl: REAPURBNDELAY
> Feb  1 11:17:50 linux-bLKBXy kernel: [66642.325176] usb 6-1: usbdev_do_ioctl: REAPURBNDELAY
> Feb  1 11:17:50 linux-bLKBXy kernel: [66642.326757] usb 6-1: urb complete
> Feb  1 11:17:50 linux-bLKBXy kernel: [66642.326761] usb 6-1: userurb 00007fa196d04b10, ep2 bulk-out, actual_length 4096 status 0
> Feb  1 11:17:50 linux-bLKBXy kernel: [66642.326780] usb 6-1: usbdev_do_ioctl: REAPURBNDELAY
> Feb  1 11:17:50 linux-bLKBXy kernel: [66642.326787] usb 6-1: usbdev_do_ioctl: REAPURBNDELAY    --- stuck here about one minute or 10 seconds
> Feb  1 11:18:50 linux-bLKBXy kernel: [66702.289239] usb 6-1: usbdev_do_ioctl: DISCARDURB             --- received a DISCARD instruction
> Feb  1 11:18:50 linux-bLKBXy kernel: [66702.289398] usb 6-1: urb complete
> Feb  1 11:18:50 linux-bLKBXy kernel: [66702.289403] usb 6-1: userurb 00007fa196d04d00, ep2 bulk-out, actual_length 512 status -2      
> Feb  1 11:18:50 linux-bLKBXy kernel: [66702.289437] usb 6-1: usbdev_do_ioctl: REAPURBNDELAY
> Feb  1 11:18:50 linux-bLKBXy kernel: [66702.289450] usb 6-1: usbdev_do_ioctl: REAPURBNDELAY
> Feb  1 11:18:50 linux-bLKBXy kernel: [66702.428985] usb 6-1: usbdev_do_ioctl: RESET                 --- received a reset instruction to retry
> 
> We are wondering why the usb operation will be stuck one minute and then DISCARD instruction was issued. Was DISCARD instruction triggered by a time out in format software? Any ideas? Thanks.
> 
> BTW, We attached usb operation logs:  windows format log (failure)  

What kernel version did you use while recording this log?

This looks like a hardware problem in the disk drive's USB interface or
in the computer's USB controller.  Either the drive stopped accepting
data or else the controller stopped sending data.  After 10 seconds (or
one minute), the command timed out and the URB was cancelled.

To find out exactly what is going wrong, you would need to use a USB 
bus analyzer to monitor the packets as they go across the USB cable.

Alan Stern

P.S.: For recording USB data transfers, it's generally better to use 
usbmon rather than usbfs_snoop.

--
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