diff options
author | Tejun Heo <htejun@gmail.com> | 2006-11-15 20:50:50 -0500 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-12-03 03:56:23 -0500 |
commit | 3d3cca37559e3ab2b574eda11ed5207ccdb8980a (patch) | |
tree | f3f3794cd7d68c681c69e85d50345a22aecc5eac /drivers/ata/libata-core.c | |
parent | 8070217d301d0ceab7d0c255d7b9d796256d37e7 (diff) |
[PATCH] libata: implement ATA_FLAG_SETXFER_POLLING and use it in pata_via, take #2
This patch implements ATA_FLAG_SETXFER_POLLING and use in pata_via.
If this flag is set, transfer mode setting performed by polling not by
interrupt. This should help those controllers which raise interrupt
before the command is actually complete on SETXFER.
Rationale for this approach.
* uses existing facility and relatively simple
* no busy sleep in the interrupt handler
* updating drivers is easy
While at it, kill now unused flag ATA_FLAG_SRST in pata_via.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3fd7c7932707..b35fdcb104ec 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4821,6 +4821,14 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
4821 | } | 4821 | } |
4822 | } | 4822 | } |
4823 | 4823 | ||
4824 | /* Some controllers show flaky interrupt behavior after | ||
4825 | * setting xfer mode. Use polling instead. | ||
4826 | */ | ||
4827 | if (unlikely(qc->tf.command == ATA_CMD_SET_FEATURES && | ||
4828 | qc->tf.feature == SETFEATURES_XFER) && | ||
4829 | (ap->flags & ATA_FLAG_SETXFER_POLLING)) | ||
4830 | qc->tf.flags |= ATA_TFLAG_POLLING; | ||
4831 | |||
4824 | /* select the device */ | 4832 | /* select the device */ |
4825 | ata_dev_select(ap, qc->dev->devno, 1, 0); | 4833 | ata_dev_select(ap, qc->dev->devno, 1, 0); |
4826 | 4834 | ||