[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>
This commit is contained in:
Tejun Heo
2006-11-16 10:50:50 +09:00
parent 8070217d30
commit 3d3cca3755
3 changed files with 15 additions and 6 deletions

View File

@ -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);