Hi, Windows operating systems and Linux will hide these errors from the user 
interface. They silently reset the drive when such errors occur and go on. Such 
a reset sequence can be noticed by that the device is not responding for 
several hundred milliseconds. There is no reason that USB traffic should stop 
at the USB host side, except for a known lost interrupt bug. See the 
hw.usb.ehci.lostintrbug sysctl. If this variable is set and you still see 
errors, then there is most likely a USB firmware error in your device and not 
FreeBSD that makes the so-called USB endpoints on the device side stop receving 
data suddenly. You can verify my claims by checking the USB traffic using 
usbdump -i usbusX -f Y . --HPS
 Thank you for your reply.

 I see I mistakenly wrote Western Digital USB 2gig drive. I meant to write 2 
terrabyte drive. Both usb drives that I am having errors writing to are the 
Western Digital 2 terrabyte drives. Both are formatted msdosfs.

 I added hw.usb.ehci.lostintrbug=1 to my /boot/loader.conf.

 Verified it was set:

 sysctl -a | grep hw.usb.ehci.lostintrbug
hw.usb.ehci.lostintrbug: 1

 Any file operation immediately fails with the g_vfs_errors in 
/var/log/messages. Even just simply touching a new file from a shell at the 
root of the USB drive fails. Reading from the drive works perfectly.

 I ran usbdump before trying any IO on the the USB drive. This is the output:

 sudo usbdump -i usbus1 -f 3
 15:41:24.450550 usbus1.3 SUBM-BULK-EP=00000002,SPD=HIGH,NFR=1,SLEN=32,IVAL=0
 15:41:24.450678 usbus1.3 
DONE-BULK-EP=00000002,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=0
 15:41:24.450687 usbus1.3 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0
 15:41:24.835080 usbus1.3 
DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=32768,IVAL=0,ERR=0
 15:41:24.835099 usbus1.3 SUBM-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=0,IVAL=0
 15:41:24.835180 usbus1.3 
DONE-BULK-EP=00000081,SPD=HIGH,NFR=1,SLEN=16,IVAL=0,ERR=0
 15:42:00.986199 usbus1.3 SUBM-BULK-EP=00000002,SPD=HIGH,NFR=1,SLEN=32,IVAL=0
 15:42:00.986334 usbus1.3 
DONE-BULK-EP=00000002,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=0
 I checked smartctl for the drive and it showed that the overall self-assesment 
test result: PASSED

 Thank you for your help in trying to track down what the problem is.
_______________________________________________
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "freebsd-usb-unsubscr...@freebsd.org"

Reply via email to