Created attachment 149834 [details] patch for 10-STABLE kernel The Lexar Jumpdrive key is unusable out of the box, can't disk size, wrongly assumes 0 block. The attached patch allows the USB drive to be correctly recognized and used.
I have the same problem with Lexar Jump Drive 32GB, so it should be made more generic fix: kernel: ugen1.6: <Lexar> at usbus1 kernel: umass0: <Lexar USB Flash Drive, class 0/0, rev 2.10/11.00, addr 6> on usbus1 kernel: umass0: SCSI over Bulk-Only; quirks = 0x0100 kernel: umass0:2:0:-1: Attached to scbus2 kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 kernel: da0: <Lexar USB Flash Drive 1100> Removable Direct Access SCSI-6 device kernel: da0: Serial Number AA33JJ7ZJFJG8N3C9RM7 kernel: da0: 40.000MB/s transfers kernel: da0: 0MB (1 512 byte sectors: 64H 32S/T 0C) kernel: da0: quirks=0x2<NO_6_BYTE> kernel: GEOM_PART: integrity check failed (da0, MBR) kernel: GEOM_PART: integrity check failed (diskid/DISK-AA33JJ7ZJFJG8N3C9RM7, MBR) volmand: CREATE da0 What more should I provide for this flashdisk?
(In reply to Miroslav Lachman from comment #1) > kernel: GEOM_PART: integrity check failed (da0, MBR) > kernel: GEOM_PART: integrity check failed (diskid/DISK-AA33JJ7ZJFJG8N3C9RM7, > MBR) > volmand: CREATE da0 > > > What more should I provide for this flashdisk? Use: usbconfig -d 1.6 dump_device_desc Then give idProduct, idVendor so the device can be added to usbdevs. Note that you can add a dynamic quirk to check if the same quirk works with your key: usbconfig -d 1.6 add_quirk UQ_MSC_NO_INQUIRY
~/> usbconfig -d 1.5 dump_device_desc ugen1.5: <USB Flash Drive Lexar> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0210 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x05dc idProduct = 0xa833 bcdDevice = 0x1100 iManufacturer = 0x0001 <Lexar> iProduct = 0x0002 <USB Flash Drive> iSerialNumber = 0x0003 <AA33JJ7ZJFJG8N3C9RM7> bNumConfigurations = 0x0001 ~/> sudo usbconfig -d 1.5 add_quirk UQ_MSC_NO_INQUIRY And now it is correctly identified as 30GB kernel: ugen1.5: <Lexar> at usbus1 kernel: umass0: <Lexar USB Flash Drive, class 0/0, rev 2.10/11.00, addr 5> on usbus1 kernel: umass0: SCSI over Bulk-Only; quirks = 0x0500 kernel: umass0:2:0:-1: Attached to scbus2 kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 kernel: da0: < > Removable Direct Access SCSI-2 device kernel: da0: 40.000MB/s transfers kernel: da0: 30560MB (62586880 512 byte sectors: 255H 63S/T 3895C) kernel: da0: quirks=0x2<NO_6_BYTE> volmand: CREATE da0 volmand: CREATE da0s1 volmand: CREATE msdosfs/Lexar It works in USB 3.0 port too: kernel: ugen0.2: <Lexar> at usbus0 kernel: umass0: <Lexar USB Flash Drive, class 0/0, rev 3.00/11.00, addr 4> on usbus0 kernel: umass0: SCSI over Bulk-Only; quirks = 0x0500 kernel: umass0:2:0:-1: Attached to scbus2 kernel: da0 at umass-sim0 bus 0 scbus2 target 0 lun 0 kernel: da0: < > Removable Direct Access SCSI-2 device kernel: da0: 400.000MB/s transfers kernel: da0: 30560MB (62586880 512 byte sectors: 255H 63S/T 3895C) kernel: da0: quirks=0x2<NO_6_BYTE> Thank you very much!
Do you think this quirk applies to all Lexar products? It is possible to mask away the idProduct match and only match the idVendor. --HPS
(In reply to Hans Petter Selasky from comment #4) > Do you think this quirk applies to all Lexar products? It is possible to > mask away the idProduct match and only match the idVendor. > > --HPS I'm not sure, but I don't fully understand how the quirks templates match works. Note that the idProduct for Miroslav's 32 GB key is the same as for my 64 GB key (0xa833), so we can assume it's the same for all their Jumpstart flash keys. Apparently Lexar has other umass products which work with different quirks already in usb_quirk.c (see CF_READER).
Hi, Can you make a complete patch adding the quirks you need to: sys/dev/usb/usb_quirk.c and sys/dev/usb/usbdevs ? Use the ones already there as example! --HPS
Should be: sys/dev/usb/quirk/usb_quirk.c
Created attachment 149877 [details] patch for 10-STABLE or 11-current kernel
(In reply to Hans Petter Selasky from comment #6) > Hi, > > Can you make a complete patch adding the quirks you need to: > > sys/dev/usb/usb_quirk.c and sys/dev/usb/usbdevs > > ? > > Use the ones already there as example! > > --HPS I already had attached a patch for 10-STABLE in my initial report but I have adapted it for 32 GB key (removed the "64" suffix in the label) and it applies cleanly on -current.
A commit references this bug: Author: hselasky Date: Wed Nov 26 10:58:09 UTC 2014 New revision: 275110 URL: https://svnweb.freebsd.org/changeset/base/275110 Log: Add new USB quirk. MFC after: 1 week PR: 195372 Changes: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs
Can you verify the patch above?
(In reply to Hans Petter Selasky from comment #11) > Can you verify the patch above? Seems ok. Note, I don't have a -current system at the moment. Working on that. The patch was tested successfully on FreeBSD 10.1-STABLE with a 64 GB key.
(In reply to Hans Petter Selasky from comment #11) > Can you verify the patch above? Works (tested on 10.1-STABLE/amd64 and 11-CURRENT/i386)
A commit references this bug: Author: hselasky Date: Wed Dec 3 09:14:15 UTC 2014 New revision: 275450 URL: https://svnweb.freebsd.org/changeset/base/275450 Log: MFC r275110: Add new USB quirk. PR: 195372 Changes: _U stable/10/ stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs
A commit references this bug: Author: hselasky Date: Wed Dec 3 09:16:03 UTC 2014 New revision: 275451 URL: https://svnweb.freebsd.org/changeset/base/275451 Log: MFC r275110: Add new USB quirk. PR: 195372 Changes: _U stable/9/sys/ _U stable/9/sys/dev/ stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs
A commit references this bug: Author: hselasky Date: Fri Dec 26 11:17:00 UTC 2014 New revision: 276241 URL: https://svnweb.freebsd.org/changeset/base/276241 Log: MFC r259675, r262128, r262129, r275605, r276239 and r276240: Add more USB quirks. PR: 178771 PR: 180617 PR: 195372 Changes: _U stable/10/ stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/usbdevs
A commit references this bug: Author: hselasky Date: Fri Dec 26 11:25:57 UTC 2014 New revision: 276242 URL: https://svnweb.freebsd.org/changeset/base/276242 Log: MFC r262128, r262129, r275605, r276239 and r276240: Add more USB quirks. PR: 178771 PR: 180617 PR: 195372 Changes: _U stable/9/sys/ _U stable/9/sys/dev/ stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs