Skip to contentSkip to conversation

libata-scsi: Fixup ata_gen_passthru_sense()

PATCH Applied Hannes Reinecke 2 participants 2 messages Oct 31, 2016 – Nov 1, 2016 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata-scsi: Fixup ata_gen_passthru_sense()

There's a typo in ata_gen_passthru_sense(), where the first byte would be overwritten incorrectly later on.

---
 drivers/ata/libata-scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ata/libata-scsi.c +1 -1
index 9cceb4a..c4eb4ae 100644
@@ -1088,7 +1088,7 @@ static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
 		desc[1] = tf->command; /* status */
 		desc[2] = tf->device;
 		desc[3] = tf->nsect;
-		desc[0] = 0;
+		desc[7] = 0;
 		if (tf->flags & ATA_TFLAG_LBA48)  {
 			desc[8] |= 0x80;
 			if (tf->hob_nsect)
Signature · 1 line
2.6.6