umass/cam headaches

Ulrich Spoerlein uspoerlein at gmail.com
Sat Jul 14 11:28:21 UTC 2007


I further played with lots of USB quirks and found something bizarr.
When adding the NO_INQUIRY quirk to this device, da(4) will attach
instead of cd(4), and believe it or not, geom_label and diskinfo(1)
suddenly start working:

kernel: umass0 on uhub3
kernel: umass0: SCSI over Bulk-Only; quirks = 0x0400
kernel: umass0:1:0:-1: Attached to scbus1
kernel: da0 at umass-sim0 bus 0 target 0 lun 0
kernel: da0: <  > Removable Direct Access SCSI-2 device 
kernel: da0: 40.000MB/s transfers
kernel: da0: 4482MB (2294912 2048 byte sectors: 255H 63S/T 142C)
kernel: GEOM_LABEL: Label for provider da0 is iso9660/DVD_VIDEO.

root at roadrunner: /data# diskinfo -v /dev/da0
/dev/da0
        2048            # sectorsize
        4699979776      # mediasize in bytes (4.4G)
        2294912         # mediasize in sectors
        142             # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.

I can even switch media and it's still working:

root at roadrunner: /data# diskinfo -v /dev/da0
/dev/da0
        2048            # sectorsize
        7403274240      # mediasize in bytes (6.9G)
        3614880         # mediasize in sectors
        225             # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.

Heck, even reading from the media works. Why won't cd(4) just work?

Cheers,
Ulrich Spoerlein
-- 
"The trouble with the dictionary is you have to know how the word is
spelled before you can look it up to see how it is spelled."
-- Will Cuppy


More information about the freebsd-usb mailing list