patch 1/8: In ata_hsm_qc_complete(): Calling ata_altstatus() after the qc completed looks unsafe. Move it to be before completing the qc.
Signed-off-by: Albert Lee <[EMAIL PROTECTED]> --- Don't know what the ata_altstatus() is doing here? Anyway, move it to be before ata_qc_complete(). diff -Nrup 00_libata-dev/drivers/ata/libata-core.c 01_flush_fix/drivers/ata/libata-core.c --- 00_libata-dev/drivers/ata/libata-core.c 2007-05-14 12:18:45.000000000 +0800 +++ 01_flush_fix/drivers/ata/libata-core.c 2007-05-15 10:05:33.000000000 +0800 @@ -4740,6 +4740,8 @@ static void ata_hsm_qc_complete(struct a struct ata_port *ap = qc->ap; unsigned long flags; + ata_altstatus(ap); /* flush */ + if (ap->ops->error_handler) { if (in_wq) { spin_lock_irqsave(ap->lock, flags); @@ -4772,8 +4774,6 @@ static void ata_hsm_qc_complete(struct a } else ata_qc_complete(qc); } - - ata_altstatus(ap); /* flush */ } /** - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html