READ_CAPACITY_OFFBY1

Henrik Gulbrandsen henrik at gulbra.net
Sun Dec 30 16:54:45 PST 2007


On Thu, 2007-12-27 at 21:15 +0100, Bernd Walter wrote:
> This is my cellphone with a 2GB micro-SD:
> da9 at umass-sim3 bus 3 target 0 lun 0
> da9: <  > Removable Direct Access SCSI-0 device 
> da9: 1.000MB/s transfers
> da9: 1950MB (3994377 512 byte sectors: 255H 63S/T 248C)
> 
> It offers not the complete media - it offers the slice as the whole
> media, so theoretically I can adjust the drive size by any number of
> blocks.

I hate when reality interferes with a clean design! :-)

OK. I'm convinced. We might still use heuristics as a hint for future
bug hunters, but I'm not going to worry about that for the moment.

This is the quirk patch needed for the 128 MB Creative MuVo device
(where "MB" seems to be 1024000 bytes...). I hope email formatting
works. PR usb/78984 can hopefully be closed once this is applied.

/Henrik

===============================================================================
--- sys/dev/usb/umass.c.orig	2007-12-29 11:13:06.000000000 +0100
+++ sys/dev/usb/umass.c	2007-12-29 14:37:57.000000000 +0100
@@ -374,6 +374,10 @@
 	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 	  FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE
 	},
+	{ USB_VENDOR_CREATIVE, USB_PRODUCT_CREATIVE_NOMAD, 0x001,
+	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+	  READ_CAPACITY_OFFBY1
+	},
 	{ USB_VENDOR_DESKNOTE, USB_PRODUCT_DESKNOTE_UCR_61S2B, RID_WILDCARD,
 	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 	  NO_QUIRKS
===============================================================================




More information about the freebsd-usb mailing list