aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-09 10:59:26 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-09 10:59:26 -0700
commitcdc5ffc4100549654e19e6f068cf1fc0871a85c2 (patch)
tree06801ce011c022bb24f15d86b0b39c3eec3765a4 /drivers/ata/libata-eh.c
parentMerge tag 'for-5.3/block-20190708' of git://git.kernel.dk/linux-block (diff)
parentdrivers: ata: ahci_sunxi: Increased SATA/AHCI DMA TX/RX FIFOs (diff)
downloadlinux-dev-cdc5ffc4100549654e19e6f068cf1fc0871a85c2.tar.xz
linux-dev-cdc5ffc4100549654e19e6f068cf1fc0871a85c2.zip
Merge tag 'for-5.3/libata-20190708' of git://git.kernel.dk/linux-block
Pull libata updates from Jens Axboe: "These are the changes that are reviewed, tested, and queued up for this merge window. This contains: - Removal of redundant memset after dmam_alloc_coherent (Fuqian) - Expand blacklist check for ST1000LM024, making it independent of firmware version (Hans) - Request sense fix (Tejun) - ahci_sunxi FIFO fix (Uenal)" * tag 'for-5.3/libata-20190708' of git://git.kernel.dk/linux-block: drivers: ata: ahci_sunxi: Increased SATA/AHCI DMA TX/RX FIFOs libata: Drop firmware version check from the ST1000LM024 quirk ata: sata_sil24: Remove call to memset after dmam_alloc_coherent ata:sata_qstor: Remove call to memset after dmam_alloc_coherent ata: sata_nv: Remove call to memset after dmam_alloc_coherent ata: pdc_adma: Remove call to memset after dmam_alloc_coherent ata: libahci: Remove call to memset after dmam_alloc_coherent ata: acard-ahci: Remove call to memset after dmam_alloc_coherent libata: don't request sense data on !ZAC ATA devices
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 9d687e1d4325..3bfd9da58473 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1469,7 +1469,7 @@ static int ata_eh_read_log_10h(struct ata_device *dev,
tf->hob_lbah = buf[10];
tf->nsect = buf[12];
tf->hob_nsect = buf[13];
- if (ata_id_has_ncq_autosense(dev->id))
+ if (dev->class == ATA_DEV_ZAC && ata_id_has_ncq_autosense(dev->id))
tf->auxiliary = buf[14] << 16 | buf[15] << 8 | buf[16];
return 0;
@@ -1716,7 +1716,8 @@ void ata_eh_analyze_ncq_error(struct ata_link *link)
memcpy(&qc->result_tf, &tf, sizeof(tf));
qc->result_tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_LBA | ATA_TFLAG_LBA48;
qc->err_mask |= AC_ERR_DEV | AC_ERR_NCQ;
- if ((qc->result_tf.command & ATA_SENSE) || qc->result_tf.auxiliary) {
+ if (dev->class == ATA_DEV_ZAC &&
+ ((qc->result_tf.command & ATA_SENSE) || qc->result_tf.auxiliary)) {
char sense_key, asc, ascq;
sense_key = (qc->result_tf.auxiliary >> 16) & 0xff;
@@ -1770,10 +1771,11 @@ static unsigned int ata_eh_analyze_tf(struct ata_queued_cmd *qc,
}
switch (qc->dev->class) {
- case ATA_DEV_ATA:
case ATA_DEV_ZAC:
if (stat & ATA_SENSE)
ata_eh_request_sense(qc, qc->scsicmd);
+ /* fall through */
+ case ATA_DEV_ATA:
if (err & ATA_ICRC)
qc->err_mask |= AC_ERR_ATA_BUS;
if (err & (ATA_UNC | ATA_AMNF))