SMART status not reported properly for SSD disks
I get this message "smartctl SMART Status not supported: Incomplete response, ATA output registers missing" when trying to use smartctl on SSDs (that don't return that message under Linux for example) using both master and release 5.8.1.
Searching a bit lead me to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191717
So I'm wondering if something could be wrong on DragonFly's side as it seems it was on FreeBSD iscsi driver, though in my case it's not a iscsi disk.
I've ran "smartctl -H -d sat -r ioctl,2 /dev/da0" to compare and I've attached the result, the interesting part is at the end :
REPORT-IOCTL: Device=/dev/da0 Command=SMART STATUS CHECK
Input: FR=0xda, SC=...., LL=...., LM=0x4f, LH=0xc2, DEV=...., CMD=0xb0
[ata pass-through(16): 85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00 ]
CAM status=0x1, SCSI status=0x0, resid=0x0
REPORT-IOCTL: Device=/dev/da0 Command=SMART STATUS CHECK returned -1 errno=78 [Incomplete response, ATA output registers missing]
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.
It looks like the answer to the STATUS CHECK command is not taken into account properly.
Updated by deef about 1 year ago
I've analyzed this a bit further... Major issue here is that smartctl(8) uses different code paths on Dragonfly versus FreeBSD.
Dragonfly: /dev/da0: Device of type 'scsi' [SCSI] detected
FreeBSD: /dev/ada0: Device of type 'atacam' [ATA] detected
The reason is that particular support code is excluded via this #if:
And, in fact, method freebsd_atacam_device::do_cmd() is tailored specifically for FreeBSD, ie. it does not compile on Dragonfly.