Bug 210544 - USB quirk for Garmin FR230
Summary: USB quirk for Garmin FR230
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on: 195372
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-24 22:37 UTC by Conrad Meyer
Modified: 2016-06-29 06:44 UTC (History)
5 users (show)

See Also:


Attachments
Untested quirk patch for the device (1.15 KB, patch)
2016-06-24 22:59 UTC, Conrad Meyer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Meyer freebsd_committer freebsd_triage 2016-06-24 22:37:59 UTC
$ dmesg
...
ugen0.2: <vendor 0x091e> at usbus0
umass0: <vendor 0x091e product 0x086d, class 0/0, rev 2.00/5.09, addr 4> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0xc100
umass0:4:0: Attached to scbus4
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <Garmin FR230 Flash 1.00> Removable Direct Access SPC-3 SCSI device
da0: 1.000MB/s transfers
da0: 0MB (0 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
g_vfs_done():da0[READ(offset=0, length=8192)]error = 6

...

$ usbconfig -d 0.2 dump_device_desc
ugen0.2: <product 0x086d vendor 0x091e> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x091e
  idProduct = 0x086d
  bcdDevice = 0x0509
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0000  <no string>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

< re-plug >

$ dmesg
...
ugen0.2: <vendor 0x091e> at usbus0
umass0: <vendor 0x091e product 0x086d, class 0/0, rev 2.00/5.09, addr 5> on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0xc500
umass0:4:0: Attached to scbus4
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <  > Removable Direct Access SCSI-2 device
da0: 1.000MB/s transfers
da0: 11MB (24242 512 byte sectors)
     ^^^^
da0: quirks=0x2<NO_6_BYTE>

(mount succeeds)

+++ This bug was initially created as a clone of Bug #195372 +++
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2016-06-24 22:39:40 UTC
Should this quirk be inferred automatically somehow whenever a USB disk inquiry reports zero capacity?  Is there any reason to believe a 0MB value over the previous non-zero value?
Comment 2 Conrad Meyer freebsd_committer freebsd_triage 2016-06-24 22:59:30 UTC
Created attachment 171766 [details]
Untested quirk patch for the device

I haven't tried to compile this patch, but it seems the correct thing to do (modeled off the cloned issue).
Comment 3 Hans Petter Selasky freebsd_committer freebsd_triage 2016-06-25 10:16:40 UTC
Patch looks good. Can you compile and commit it? Then add MFC tag for 1 week?

--HPS
Comment 4 Conrad Meyer freebsd_committer freebsd_triage 2016-06-25 13:23:54 UTC
I can't run-time test the patch before Mon/Tue, unfortunately.  It compiles locally, though.
Comment 5 Conrad Meyer freebsd_committer freebsd_triage 2016-06-28 19:15:35 UTC
Commit request sent to re@.
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-06-29 06:43:12 UTC
A commit references this bug:

Author: cem
Date: Wed Jun 29 06:42:20 UTC 2016
New revision: 302262
URL: https://svnweb.freebsd.org/changeset/base/302262

Log:
  USB: Add Garmin FR230 device quirk (broken INQUIRY)

  PR:		210544
  Reviewed by:	hps
  Approved by:	re

Changes:
  head/sys/dev/usb/quirk/usb_quirk.c
  head/sys/dev/usb/usbdevs