From 63a2ea09fb6fa17943a9bfd9cb1732704eb96d01 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Thu, 13 May 2004 14:39:17 -0400 Subject: [libata] random minor bug fixes * Only call ata_sg_setup{_one} if ATA_QCFLAG_SG is set. Preparation for future use, as currently ATA_QCFLAG_SG is always set when ata_qc_issue is called. This change in theory is incorrect for Promise TX/SX4 drivers, since those drivers set up the Promise-specific packet in their ->fill_sg hook, which is now called conditionally. A FIXME that doesn't affect anything, for now. * ATA_PROT_ATAPI and ATA_PROT_ATAPI_DMA command issue need to be differentiated. * Create and use ata_qc_set_polling() to consistently set/clear the flags associated with using polling instead of interrupts. --- include/linux/libata.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/linux/libata.h b/include/linux/libata.h index cf2a784a8850..05ebe16fc02f 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -481,6 +481,13 @@ static inline u8 ata_wait_idle(struct ata_port *ap) return status; } +static inline void ata_qc_set_polling(struct ata_queued_cmd *qc) +{ + qc->flags |= ATA_QCFLAG_POLL; + qc->flags &= ~ATA_QCFLAG_DMA; + qc->tf.ctl |= ATA_NIEN; +} + static inline struct ata_queued_cmd *ata_qc_from_tag (struct ata_port *ap, unsigned int tag) { -- cgit v1.2.3