usb/177895: similar 1TB Western Digital "My Passports" - some load, some don't

Velcro Leaf velcroleaf at rocketmail.com
Thu May 2 13:34:52 UTC 2013


I've made a minor 
breakthrough.  After some mucking about with dd, I was able to get the 
system to acknowledge that the "bad" drive exists.  I was then able to 
reformat the drive.  By that I mean I performed the following 
operations:

# fdisk -BI /dev/da0
# bsdlabel -Bw /dev/da0s1
# newfs /dev/da0s1

The new behavior is that once the quirk command has been used, the drive 
will function normally.  If the drive is removed and replaced, it will 
be fine.  If the system is rebooted and the drive remains attached, it 
will be fine.

If
 the drive is removed from the system, then there's a reboot, then the 
drive is reattached, it will again generate the "CAM status" errors and 
not work.

When
 the quirk command is issued again, everything is fine.  This is true no
 matter which USB port the drive is moved to, despite the fact that the 
quirk command seems to be port-specific.  For reference, here is the 
command that works:

# usbconfig -d ugen1.2 add_quirk UQ_MSC_NO_SYNC_CACHE

Additionally, I can narrow down the specific quirkiness reported by the system when the drives are connected:

"Bad" drive in functional mode = 0x4000
"Bad" drive in broken mode = 0x4001
"Good" drive = 0x0000

All
 of this seems largely rational, but it still doesn't explain the basic 
issue of why seemingly identical drives either have this problem or work
 flawlessly.

A
 possible solution is to find some way to auto-apply this quirk on the 
"bad" drives, but ideally I'd like to fix the root of the issue and make
 the system think the "bad" drives are clean (assuming 0x0000 means "no 
quirks").

Is
 it possible that the bad drives have been "blessed" (or rather 
"cursed") by some process during my attempts to format them?  I didn't 
settle on a standardized method of formatting until I'd gotten a few of 
these drives, so it's possible there was some bad dd juju applied to the
 bad drives.  It took me a while to figure out how to get the systems to
 notice the drives.

My current method is to apply the three commands listed above directly to new drives fresh out of the box.

Alternately, is there a way to tell FreeBSD to stop trying to be clever and use no 
quirks at all (again, assuming 0x0000 means "no quirks")? 

Leif


More information about the freebsd-usb mailing list