diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2007-08-15 03:19:45 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:32 -0400 |
commit | 4cc980b34b2a25f600576dcd11de388bc44e1ebd (patch) | |
tree | 06acf97de2b32be5d65de4e1f3749c5ca1363fb4 /drivers | |
parent | 0bc2a79a2002e3cc1b514c100b6c576983da6a90 (diff) |
libata: move ata_altstatus() to pio data xfer functions
Move ata_altstatus() out from ata_hsm_move() to the pio data xfer
functions like ata_pio_sectors() and atapi_pio_bytes() where it makes
more sense.
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ata/libata-core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 02425e401a6d..fc0679370638 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4614,6 +4614,8 @@ static void ata_pio_sectors(struct ata_queued_cmd *qc) | |||
4614 | ata_pio_sector(qc); | 4614 | ata_pio_sector(qc); |
4615 | } else | 4615 | } else |
4616 | ata_pio_sector(qc); | 4616 | ata_pio_sector(qc); |
4617 | |||
4618 | ata_altstatus(qc->ap); /* flush */ | ||
4617 | } | 4619 | } |
4618 | 4620 | ||
4619 | /** | 4621 | /** |
@@ -4788,6 +4790,7 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc) | |||
4788 | VPRINTK("ata%u: xfering %d bytes\n", ap->print_id, bytes); | 4790 | VPRINTK("ata%u: xfering %d bytes\n", ap->print_id, bytes); |
4789 | 4791 | ||
4790 | __atapi_pio_bytes(qc, bytes); | 4792 | __atapi_pio_bytes(qc, bytes); |
4793 | ata_altstatus(ap); /* flush */ | ||
4791 | 4794 | ||
4792 | return; | 4795 | return; |
4793 | 4796 | ||
@@ -4959,7 +4962,6 @@ fsm_start: | |||
4959 | */ | 4962 | */ |
4960 | ap->hsm_task_state = HSM_ST; | 4963 | ap->hsm_task_state = HSM_ST; |
4961 | ata_pio_sectors(qc); | 4964 | ata_pio_sectors(qc); |
4962 | ata_altstatus(ap); /* flush */ | ||
4963 | } else | 4965 | } else |
4964 | /* send CDB */ | 4966 | /* send CDB */ |
4965 | atapi_send_cdb(ap, qc); | 4967 | atapi_send_cdb(ap, qc); |
@@ -5040,7 +5042,6 @@ fsm_start: | |||
5040 | 5042 | ||
5041 | if (!(qc->tf.flags & ATA_TFLAG_WRITE)) { | 5043 | if (!(qc->tf.flags & ATA_TFLAG_WRITE)) { |
5042 | ata_pio_sectors(qc); | 5044 | ata_pio_sectors(qc); |
5043 | ata_altstatus(ap); | ||
5044 | status = ata_wait_idle(ap); | 5045 | status = ata_wait_idle(ap); |
5045 | } | 5046 | } |
5046 | 5047 | ||
@@ -5060,13 +5061,11 @@ fsm_start: | |||
5060 | if (ap->hsm_task_state == HSM_ST_LAST && | 5061 | if (ap->hsm_task_state == HSM_ST_LAST && |
5061 | (!(qc->tf.flags & ATA_TFLAG_WRITE))) { | 5062 | (!(qc->tf.flags & ATA_TFLAG_WRITE))) { |
5062 | /* all data read */ | 5063 | /* all data read */ |
5063 | ata_altstatus(ap); | ||
5064 | status = ata_wait_idle(ap); | 5064 | status = ata_wait_idle(ap); |
5065 | goto fsm_start; | 5065 | goto fsm_start; |
5066 | } | 5066 | } |
5067 | } | 5067 | } |
5068 | 5068 | ||
5069 | ata_altstatus(ap); /* flush */ | ||
5070 | poll_next = 1; | 5069 | poll_next = 1; |
5071 | break; | 5070 | break; |
5072 | 5071 | ||