Skip to contentSkip to conversation

libata: minor fix for 2.6.16-rc3

PATCH In review Albert Lee 3 participants 4 messages Feb 13, 2006 – Feb 20, 2006

Subsystems (2)
lore
Share & tools
lore

Albert Lee

author
#0 lore raw

PATCH 1/1 libata: minor fix for 2.6.16-rc3

Jeff,

Just two minor fixes from libata-dev tree that might be good for 2.6.16:
- Fix the array index value in ata_rwcmd_protocol() for the added FUA commands.
- Filter out ATAPI packet command error messages in ata_pio_error()

Patch against the mainline 2.6.16-rc3 tree.
For your review, thanks.

Albert

---

drivers/scsi/libata-core.c +4 -3
@@ -614,7 +614,7 @@ int ata_rwcmd_protocol(struct ata_queued
 	} else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) {
 		/* Unable to use DMA due to host limitation */
 		tf->protocol = ATA_PROT_PIO;
-		index = dev->multi_count ? 0 : 4;
+		index = dev->multi_count ? 0 : 8;
 	} else {
 		tf->protocol = ATA_PROT_DMA;
 		index = 16;
@@ -3357,11 +3357,12 @@ static void ata_pio_error(struct ata_por
 {
 	struct ata_queued_cmd *qc;
 
-	printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
-
 	qc = ata_qc_from_tag(ap, ap->active_tag);
 	assert(qc != NULL);
 
+	if (qc->tf.command != ATA_CMD_PACKET)
+		printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
+
 	/* make sure qc->err_mask is available to 
 	 * know what's wrong and recover
 	 */
Acked-by on v1 1/1
#1 lore raw

Hello, Albert. Hello, Jeff.

Quoted 4 lines · Albert Lee

Jeff,

Just two minor fixes from libata-dev tree that might be good for 2.6.16:
- Fix the array index value in ata_rwcmd_protocol() for the added FUA commands.

Oops, this one seems critical. Guess I messed up during FUA changes, sorry. :-( Albert, can you please re-spin this part of the patch against #upstream?

Thanks.

Quoted 37 lines

- Filter out ATAPI packet command error messages in ata_pio_error()

Patch against the mainline 2.6.16-rc3 tree.
For your review, thanks.

Albert

---

drivers/scsi/libata-core.c +4 -3
@@ -614,7 +614,7 @@ int ata_rwcmd_protocol(struct ata_queued
 	} else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) {
 		/* Unable to use DMA due to host limitation */
 		tf->protocol = ATA_PROT_PIO;
-		index = dev->multi_count ? 0 : 4;
+		index = dev->multi_count ? 0 : 8;
 	} else {
 		tf->protocol = ATA_PROT_DMA;
 		index = 16;
@@ -3357,11 +3357,12 @@ static void ata_pio_error(struct ata_por
 {
 	struct ata_queued_cmd *qc;
 
-	printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
-
 	qc = ata_qc_from_tag(ap, ap->active_tag);
 	assert(qc != NULL);
 
+	if (qc->tf.command != ATA_CMD_PACKET)
+		printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
+
 	/* make sure qc->err_mask is available to 
 	 * know what's wrong and recover
 	 */
Signature · 1 line
tejun
author
#2 lore raw

PATCH 1/1 libata: minor fix for 2.6.16 (respin)

Jeff,

Respin two minor fixes from libata-dev tree that might be good for 2.6.16:
- Fix the array index value in ata_rwcmd_protocol() for the added FUA commands. (This only affects some VIA PATA adapters. Other hardware is safe from this bug.)
- Filter out ATAPI packet command error messages in ata_pio_error()

Patch against the libata-dev upstream branch
(f1b318793dcd2d9ff6b5ac06e7762098fa079cee).
For your review, thanks.

Albert

---

drivers/scsi/libata-core.c +4 -3
@@ -213,7 +213,7 @@ int ata_rwcmd_protocol(struct ata_queued
 	} else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) {
 		/* Unable to use DMA due to host limitation */
 		tf->protocol = ATA_PROT_PIO;
-		index = dev->multi_count ? 0 : 4;
+		index = dev->multi_count ? 0 : 8;
 	} else {
 		tf->protocol = ATA_PROT_DMA;
 		index = 16;
@@ -3426,11 +3426,12 @@ static void ata_pio_error(struct ata_por
 {
 	struct ata_queued_cmd *qc;
 
-	printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
-
 	qc = ata_qc_from_tag(ap, ap->active_tag);
 	WARN_ON(qc == NULL);
 
+	if (qc->tf.command != ATA_CMD_PACKET)
+		printk(KERN_WARNING "ata%u: PIO error\n", ap->id);
+
 	/* make sure qc->err_mask is available to 
 	 * know what's wrong and recover
 	 */
#3 lore raw

Re: [PATCH] libata: minor fix for 2.6.16 (respin)

Quoted 10 lines · Albert Lee

Jeff,

Respin two minor fixes from libata-dev tree that might be good for 2.6.16:
- Fix the array index value in ata_rwcmd_protocol() for the added FUA commands. (This only affects some VIA PATA adapters. Other hardware is safe from this bug.)
- Filter out ATAPI packet command error messages in ata_pio_error()

Patch against the libata-dev upstream branch
(f1b318793dcd2d9ff6b5ac06e7762098fa079cee).
For your review, thanks.

I pulled this in via upstream-fixes, please confirm that #upstream and #irq-pio look OK...

Jeff