aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b169f9098649..9873f4c54f1e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -62,16 +62,6 @@
62 62
63#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) 63#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
64 64
65#ifdef ATA_NDEBUG
66#define assert(expr)
67#else
68#define assert(expr) \
69 if(unlikely(!(expr))) { \
70 printk(KERN_ERR "Assertion failed! %s,%s,%s,line=%d\n", \
71 #expr,__FILE__,__FUNCTION__,__LINE__); \
72 }
73#endif
74
75/* NEW: debug levels */ 65/* NEW: debug levels */
76#define HAVE_LIBATA_MSG 1 66#define HAVE_LIBATA_MSG 1
77 67
@@ -559,7 +549,7 @@ extern void ata_bmdma_start (struct ata_queued_cmd *qc);
559extern void ata_bmdma_stop(struct ata_queued_cmd *qc); 549extern void ata_bmdma_stop(struct ata_queued_cmd *qc);
560extern u8 ata_bmdma_status(struct ata_port *ap); 550extern u8 ata_bmdma_status(struct ata_port *ap);
561extern void ata_bmdma_irq_clear(struct ata_port *ap); 551extern void ata_bmdma_irq_clear(struct ata_port *ap);
562extern void ata_qc_complete(struct ata_queued_cmd *qc); 552extern void __ata_qc_complete(struct ata_queued_cmd *qc);
563extern void ata_eng_timeout(struct ata_port *ap); 553extern void ata_eng_timeout(struct ata_port *ap);
564extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, 554extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev,
565 struct scsi_cmnd *cmd, 555 struct scsi_cmnd *cmd,
@@ -759,6 +749,24 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
759 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); 749 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
760} 750}
761 751
752/**
753 * ata_qc_complete - Complete an active ATA command
754 * @qc: Command to complete
755 * @err_mask: ATA Status register contents
756 *
757 * Indicate to the mid and upper layers that an ATA
758 * command has completed, with either an ok or not-ok status.
759 *
760 * LOCKING:
761 * spin_lock_irqsave(host_set lock)
762 */
763static inline void ata_qc_complete(struct ata_queued_cmd *qc)
764{
765 if (unlikely(qc->flags & ATA_QCFLAG_EH_SCHEDULED))
766 return;
767
768 __ata_qc_complete(qc);
769}
762 770
763/** 771/**
764 * ata_irq_on - Enable interrupts on a port. 772 * ata_irq_on - Enable interrupts on a port.