Skip to contentSkip to conversation

libata: remove reading alt_status from ata_hsm_qc_complete()

PATCH Applied Albert Lee 2 participants 2 messages Jun 28, 2007 – Jul 2, 2007 libata

lore
Share & tools
lore

Albert Lee

author
#0 lore raw

PATCH 1/1 libata: remove reading alt_status from ata_hsm_qc_complete()

In ata_hsm_qc_complete():
Calling ata_altstatus() after the qc is completed might race with next qc. Remove it.

---
Jeff,

(Sorry for re-submitting this patch so late.)
The unneeded reading of alt_status might cause trouble when another command doing activity like pio data xfer. After checking, the flush here is leftover/merge damage of ata_pio_block( ) in 2.6.17-rc5:
http://git.kernel.org/?p=linux/kernel/git/jgarzik/libata-dev.git;a=commitdiff;h=bb31a8faa270beafcc51a65880c5564c6b718bd6
We can safely remove it.

drivers/ata/libata-core.c renamed from drivers/ata/libata-core.c.ori +0 -2
@@ -4799,8 +4799,6 @@ static void ata_hsm_qc_complete(struct a
 		} else
 			ata_qc_complete(qc);
 	}
-
-	ata_altstatus(ap); /* flush */
 }
 
 /**
Applied
#1 lore raw
Quoted 4 lines · Albert Lee

In ata_hsm_qc_complete():
Calling ata_altstatus() after the qc is completed might race with next qc. Remove it.

Quoted 8 lines

---
Jeff,

(Sorry for re-submitting this patch so late.)
The unneeded reading of alt_status might cause trouble when another command doing activity like pio data xfer. After checking, the flush here is leftover/merge damage of ata_pio_block( ) in 2.6.17-rc5:
http://git.kernel.org/?p=linux/kernel/git/jgarzik/libata-dev.git;a=commitdiff;h=bb31a8faa270beafcc51a65880c5564c6b718bd6
We can safely remove it.

applied