summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_samsung_cf.c
diff options
context:
space:
mode:
authorNiklas Cassel <niklas.cassel@wdc.com>2022-09-26 22:53:08 +0200
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2022-10-17 04:31:52 +0200
commit013115d90e007585bb85b45a5dc301ef1be62aab (patch)
treeee49cdfbc192bd042691294f2b2eefa28c7cf5ac /drivers/ata/pata_samsung_cf.c
parentata: libata: only set sense valid flag if sense data is valid (diff)
downloadlinux-013115d90e007585bb85b45a5dc301ef1be62aab.tar.xz
linux-013115d90e007585bb85b45a5dc301ef1be62aab.zip
ata: libata: fetch sense data for ATA devices supporting sense reporting
Currently, the sense data reporting feature set is enabled for all ATA devices which supports the feature set (ata_id_has_sense_reporting()), see ata_dev_config_sense_reporting(). However, even if sense data reporting is enabled, and the device indicates that sense data is available, the sense data is only fetched for ATA ZAC devices. For regular ATA devices, the available sense data is never fetched, it is simply ignored. Instead, libata will use the ERROR + STATUS fields and map them to a very generic and reduced set of sense data, see ata_gen_ata_sense() and ata_to_sense_error(). When sense data reporting was first implemented, regular ATA devices did fetch the sense data from the device. However, this was restricted to only ATA ZAC devices in commit ca156e006add ("libata: don't request sense data on !ZAC ATA devices"). With recent changes related to sense data and NCQ autosense, we want to, once again, fetch the sense data for all ATA devices supporting sense reporting. ata_gen_ata_sense() should only be used for devices that don't support the sense data reporting feature set. hopefully the features will be more robust this time around. It is not just ZAC, many new ATA features, e.g. Command Duration Limits, relies on working NCQ autosense and sense data. Therefore, it is not really an option to avoid fetching the sense data forever. If we encounter a device that is misbehaving because the sense data is actually fetched, then that device should be quirked such that it never enables the sense data reporting feature set in the first place, since such a device is obviously not compliant with the specification. The order in which we will try to add sense data to a scsi_cmnd: 1) NCQ autosense (if supported) - ata_eh_analyze_ncq_error() 2) REQUEST SENSE DATA EXT (if supported) - ata_eh_request_sense() 3) error + status field translation - ata_gen_ata_sense(), called by ata_scsi_qc_complete() if neither 1) or 2) is supported. Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'drivers/ata/pata_samsung_cf.c')
0 files changed, 0 insertions, 0 deletions