diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2005-11-01 19:19:01 +0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-09 01:22:19 -0500 |
commit | 467b16d4bebe8d251ca974eaa5da50b315206e9d (patch) | |
tree | b9e2892e19e52f5889b16b14b1463958a900f51f /drivers/scsi/libata-core.c | |
parent | c7c6e9494cc9a4a5b1a2ca870ed4531ad2b98a83 (diff) | |
download | lwn-467b16d4bebe8d251ca974eaa5da50b315206e9d.tar.gz lwn-467b16d4bebe8d251ca974eaa5da50b315206e9d.zip |
[PATCH] libata irq-pio: misc fixes
- ata_pio_block(): add ata_altstatus(ap) to prevent reading device status before it is valid
- remove the unnecessary HSM_ST_IDLE state from ata_pio_task()
- raise BUG() when unknown state is found in ata_pio_task()
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
============
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index ce18de9705c4..15736e3313f0 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -3317,6 +3317,8 @@ static void ata_pio_block(struct ata_port *ap) ata_pio_sector(qc); } + + ata_altstatus(ap); /* flush */ } static void ata_pio_error(struct ata_port *ap) @@ -3344,9 +3346,6 @@ fsm_start: qc_completed = 0; switch (ap->hsm_task_state) { - case HSM_ST_IDLE: - return; - case HSM_ST: ata_pio_block(ap); break; @@ -3364,6 +3363,10 @@ fsm_start: case HSM_ST_ERR: ata_pio_error(ap); return; + + default: + BUG(); + return; } if (timeout) |