Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ata-6.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata fix from Damien Le Moal:

- Fix how sense data from the sense data for successfull NCQ commands
log page is used to fully initialize the result_tf of a completed
command, so that the sense data returned to the scsi layer is fully
initialized with all the device provided information (from Niklas)

* tag 'ata-6.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
ata: libata-sata: Save all fields from sense data descriptor

+15
+15
drivers/ata/libata-sata.c
··· 1510 1510 unsigned int err_mask, tag; 1511 1511 u8 *sense, sk = 0, asc = 0, ascq = 0; 1512 1512 u64 sense_valid, val; 1513 + u16 extended_sense; 1514 + bool aux_icc_valid; 1513 1515 int ret = 0; 1514 1516 1515 1517 err_mask = ata_read_log_page(dev, ATA_LOG_SENSE_NCQ, 0, buf, 2); ··· 1531 1529 1532 1530 sense_valid = (u64)buf[8] | ((u64)buf[9] << 8) | 1533 1531 ((u64)buf[10] << 16) | ((u64)buf[11] << 24); 1532 + extended_sense = get_unaligned_le16(&buf[14]); 1533 + aux_icc_valid = extended_sense & BIT(15); 1534 1534 1535 1535 ata_qc_for_each_raw(ap, qc, tag) { 1536 1536 if (!(qc->flags & ATA_QCFLAG_EH) || ··· 1559 1555 ret = -EIO; 1560 1556 continue; 1561 1557 } 1558 + 1559 + qc->result_tf.nsect = sense[6]; 1560 + qc->result_tf.hob_nsect = sense[7]; 1561 + qc->result_tf.lbal = sense[8]; 1562 + qc->result_tf.lbam = sense[9]; 1563 + qc->result_tf.lbah = sense[10]; 1564 + qc->result_tf.hob_lbal = sense[11]; 1565 + qc->result_tf.hob_lbam = sense[12]; 1566 + qc->result_tf.hob_lbah = sense[13]; 1567 + if (aux_icc_valid) 1568 + qc->result_tf.auxiliary = get_unaligned_le32(&sense[16]); 1562 1569 1563 1570 /* Set sense without also setting scsicmd->result */ 1564 1571 scsi_build_sense_buffer(dev->flags & ATA_DFLAG_D_SENSE,