SDHCI: serious issues with USB SD Card reader/writer

From: O. Hartmann <ohartmann_at_walstatt.org>
Date: Mon, 10 Dec 2018 12:52:47 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Using the USB attached SD card reader/writer of my Dell screen, since 13-CURRENT is out
recently I have serious trouble with the assortment of SD cards I use.

While 12-PRE seems to not have any problems, 13-CURRENT (FreeBSD 13.0-CURRENT #912
r341770: Sun Dec  9 23:02:16 CET 2018 amd64) has.
The phenomenon looks like when written successfully an image to  a 16 or 32 GB SD card
and put in a Samsung 32GB SD card (a Samsung EVO, or the one that comes with the Raspberry
Pi 3B+ these days, I have two of them and the problem is on both the same), I receive the
console message after trying to "dd" some images onto /dev/da0:

sudo dd if=2018-11-13-raspbian-stretch-full.img of=/dev/da0 bs=1m
dd: /dev/da0: Operation not permitted

This happens even as root.

The console shows:

[...]
ugen0.4: <Generic Ultra Fast Media Reader> at usbus0
umass0 on uhub6
umass0: <Generic Ultra Fast Media Reader, class 0/0, rev 2.00/1.91, addr 3> on usbus0
da0 at umass-sim0 bus 0 scbus10 target 0 lun 0
da0: <Generic Ultra HS-SD/MMC 1.91> Removable Direct Access SCSI device
da0: Serial Number 000000264001
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>
[...]
(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 00 00 00 00 10 00 
(da0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI status: Check Condition
(da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(da0:umass-sim0:0:0:0): Error 5, Unretryable error
[...]
GEOM_PART: integrity check failed (da0, MBR)
GEOM_PART: da0 was automatically resized.
  Use `gpart commit da0` to save changes or `gpart undo da0` to revert them.
GEOM_PART: da0 was automatically resized.
  Use `gpart commit da0` to save changes or `gpart undo da0` to revert them.
GEOM_PART: da0 was automatically resized.
  Use `gpart commit da0` to save changes or `gpart undo da0` to revert them.
GEOM_PART: da0 was automatically resized.
  Use `gpart commit da0` to save changes or `gpart undo da0` to revert them.
g_access(958): provider diskid/DISK-000000264001 has error 6 set
g_access(958): provider diskid/DISK-000000264001 has error 6 set
g_access(958): provider diskid/DISK-000000264001 has error 6 set
g_access(958): provider diskid/DISK-000000264001 has error 6 set
g_access(958): provider diskid/DISK-000000264001 has error 6 set
g_access(958): provider diskid/DISK-000000264001 has error 6 set
g_access(958): provider diskid/DISK-000000264001 has error 6 set
g_access(958): provider diskid/DISK-000000264001 has error 6 set
g_access(958): provider diskid/DISK-000000264001 has error 6 set
[...]

The CAM error above occurs on a lot of SD cards which worked earlier.

In some cases, the problem disappears after a reboot, but it seems to be persistent with
some types of the SD cards. Since I've written all of them in the past with 12-CURRENT
and the very same SD card reader, I suspect some serious bug in recent updates either to
the SCSI subsystem or SDHCI.

I just ordered an alternative USB SD card reader/writer just in case the error indicates
a hardware failure.

Kind regards,

O. Hartmann



- -- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-----BEGIN PGP SIGNATURE-----

iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCXA5TqgAKCRDS528fyFhY
lJ7eAf98BJ7zbDfEd3JqQRykn4iEvLsHPBofzsb+uj9ZS1uJsnk70kMwyIPitdtd
CuHue4UGps2Ozt+KEtaRnAqxuMk4AgCA/K/3Y5lsYu0o6e2p4oKXu323fe8akco1
PxTGVTEsr/0BJEbTrSbOnRqIXY4lF86GspSzSZtnoKM9Av+5EbuO
=/a+G
-----END PGP SIGNATURE-----
Received on Mon Dec 10 2018 - 10:53:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:19 UTC