diff options
author | Tejun Heo <htejun@gmail.com> | 2006-11-16 10:50:50 +0900 |
---|---|---|
committer | Tejun Heo <htejun@gmail.com> | 2006-12-03 17:56:23 +0900 |
commit | 3d3cca37559e3ab2b574eda11ed5207ccdb8980a (patch) | |
tree | f3f3794cd7d68c681c69e85d50345a22aecc5eac /drivers/ata/libata-core.c | |
parent | 8070217d301d0ceab7d0c255d7b9d796256d37e7 (diff) | |
download | linux-3d3cca37559e3ab2b574eda11ed5207ccdb8980a.tar.bz2 |
[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) } } + /* Some controllers show flaky interrupt behavior after + * setting xfer mode. Use polling instead. + */ + if (unlikely(qc->tf.command == ATA_CMD_SET_FEATURES && + qc->tf.feature == SETFEATURES_XFER) && + (ap->flags & ATA_FLAG_SETXFER_POLLING)) + qc->tf.flags |= ATA_TFLAG_POLLING; + /* select the device */ ata_dev_select(ap, qc->dev->devno, 1, 0); |