[Bug 211716] [PATCH] USB Driver didn't get the right size

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Aug 10 07:10:45 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211716

            Bug ID: 211716
           Summary: [PATCH] USB Driver didn't get the right size
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: usb
          Assignee: freebsd-usb at FreeBSD.org
          Reporter: howard0su at gmail.com
          Keywords: patch

One I-O Data USB Flash Disk cannot get the right size. the dmesg shows
umass0: <I-O DATA USB Flash Disk, class 0/0, rev 2.10/0.01, addr 2> on usbus7
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:6:0: Attached to scbus6
da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <I-O DATA USB Flash Disk 1.00> Removable Direct Access SPC-4 SCSI device
da0: Serial Number 137161312223005B
da0: 40.000MB/s transfers
da0: 0MB (1 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>

The following patch solves the problem:
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index b869467..0614b28 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1295,6 +1295,13 @@ static struct da_quirk_entry da_quirk_table[] =
                { T_DIRECT, SIP_MEDIA_REMOVABLE, "MX", "MXUB3*", "*"},
                /*quirks*/DA_Q_NO_RC16
        },
+       {
+               /*
+                * I-O Data USB Flash Disk
+                */
+               { T_DIRECT, SIP_MEDIA_REMOVABLE, "I-O DATA", "USB Flash Disk*",
"*"},
+               /*quirks*/DA_Q_NO_RC16
+       },
 };

 static disk_strategy_t dastrategy;

After the patch the size is correctly detected.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-usb mailing list