Bug 230038 - regression USB mass storage device
Summary: regression USB mass storage device
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 11.2-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-usb (Nobody)
Keywords: regression
Depends on:
Reported: 2018-07-25 13:51 UTC by Philip Homburg
Modified: 2020-06-27 20:34 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Philip Homburg 2018-07-25 13:51:43 UTC
Since upgrading to 11.2-RELEASE, my laptop doesn't fully recognize my Garmin 
GPSMAP 62s anymore. In mass storage mode, the Garmin presents two block
devices, one to access the internal flash and one for the micro-SD card.

When I connect the Garmin, only the first device appears. After a camcontrol
rescan, the second appears as well.

Here is the dmesg output of connecting the Garmin:
uhub_reattach_port: giving up port reset - device vanished
ugen0.6: <vendor 0x091e product 0x2459> at usbus0
umass0 on uhub2
umass0: <vendor 0x091e product 0x2459, class 0/0, rev 2.00/5.09, addr 6> on usb
umass0:  SCSI over Bulk-Only; quirks = 0xc000
umass0:5:0: Attached to scbus5
da0 at umass-sim0 bus 0 scbus5 target 0 lun 0
da0: <Garmin GARMIN Flash 1.00> Removable Direct Access SPC-3 SCSI device
da0: 40.000MB/s transfers
da0: 1848MB (3784704 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>

Then I run 
# camcontrol rescan 5:0:1

And the resulting dmesg output:
da1 at umass-sim0 bus 0 scbus5 target 0 lun 1
da1: <Garmin GARMIN SD Card 1.00> Removable Direct Access SPC-3 SCSI device
da1: 40.000MB/s transfers
da1: 7646MB (15659008 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE>
Comment 1 Anton Yuzhaninov 2018-08-01 17:59:42 UTC
I with the same problem on 11.2-PRERELEASE #0 r334549
Garmin GPSmap 62 SD card is recognized only after camcontrol rescan 5:0:1
Comment 2 Friedrich Volkmann 2020-06-27 20:29:28 UTC
Problem persists in 12.1-STABLE r358922. (My Garmin is a Dakota 20.) I get another scbus number, so I wrote a shell script that parses the output of "camcontrol devlist" as a workaround:

camline=`camcontrol devlist|grep 'GARMIN Flash'`
while test -z "$camline" ;do
        echo not found, waiting 5 seconds...
        sleep 5
        camline=`camcontrol devlist|grep 'GARMIN Flash'`
# output: <Garmin GARMIN Flash 1.00>         at scbus8 target 0 lun 0 (da0,pass4)
bus=${camline%% *}
camline=${camline#*target }
target=${camline%% *}
camline=${camline#*lun }
lun=${camline%% *}
echo -n bus:target:lun = $bus:$target:$lun
lun=$(($lun + 1))
echo " -> $bus:$target:$lun"

camcontrol rescan $bus:$target:$lun
Comment 3 Friedrich Volkmann 2020-06-27 20:34:29 UTC
How can we set the status to "confirmed" and the importance to "affects many people"?