aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-02-11 01:13:49 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-11 17:51:56 -0500
commit76014427e60f7ecfdc689dfbcb48e9760e1da4fb (patch)
treecf885f718315ed7819fd8f6f4a375540847baf2f /include/linux/libata.h
parentcbefa3258eade263dbc9ae2c1f1ea2ca96e6b457 (diff)
[PATCH] libata: inline ata_qc_complete()
This patch inlines ata_qc_complete() and uninlines __ata_qc_complete() as suggested by Jeff Garzik. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index c1e198655bb1..695d9ae6ec03 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -556,7 +556,7 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc);
556extern void ata_bmdma_stop(struct ata_queued_cmd *qc); 556extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
557extern u8 ata_bmdma_status(struct ata_port *ap); 557extern u8 ata_bmdma_status(struct ata_port *ap);
558extern void ata_bmdma_irq_clear(struct ata_port *ap); 558extern void ata_bmdma_irq_clear(struct ata_port *ap);
559extern void ata_qc_complete(struct ata_queued_cmd *qc); 559extern void __ata_qc_complete(struct ata_queued_cmd *qc);
560extern void ata_eng_timeout(struct ata_port *ap); 560extern void ata_eng_timeout(struct ata_port *ap);
561extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, 561extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev,
562 struct scsi_cmnd *cmd, 562 struct scsi_cmnd *cmd,
@@ -756,6 +756,24 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
756 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); 756 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
757} 757}
758 758
759/**
760 * ata_qc_complete - Complete an active ATA command
761 * @qc: Command to complete
762 * @err_mask: ATA Status register contents
763 *
764 * Indicate to the mid and upper layers that an ATA
765 * command has completed, with either an ok or not-ok status.
766 *
767 * LOCKING:
768 * spin_lock_irqsave(host_set lock)
769 */
770static inline void ata_qc_complete(struct ata_queued_cmd *qc)
771{
772 if (unlikely(qc->flags & ATA_QCFLAG_EH_SCHEDULED))
773 return;
774
775 __ata_qc_complete(qc);
776}
759 777
760/** 778/**
761 * ata_irq_on - Enable interrupts on a port. 779 * ata_irq_on - Enable interrupts on a port.