diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2006-02-11 18:02:04 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-11 18:02:04 -0500 |
commit | 1cb9d721d9df9182a42d1ff59427a100c6522efc (patch) | |
tree | 3c7d47828f89853de49e979f97ffe78fd1dba7d6 /include/linux/libata.h | |
parent | ca7d5e42d783e54f0057317c9226262d68ab7717 (diff) | |
parent | bef4a456b8dc8b3638f4d49a25a89e1467da9483 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 30 |
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); | |||
559 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 549 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |
560 | extern u8 ata_bmdma_status(struct ata_port *ap); | 550 | extern u8 ata_bmdma_status(struct ata_port *ap); |
561 | extern void ata_bmdma_irq_clear(struct ata_port *ap); | 551 | extern void ata_bmdma_irq_clear(struct ata_port *ap); |
562 | extern void ata_qc_complete(struct ata_queued_cmd *qc); | 552 | extern void __ata_qc_complete(struct ata_queued_cmd *qc); |
563 | extern void ata_eng_timeout(struct ata_port *ap); | 553 | extern void ata_eng_timeout(struct ata_port *ap); |
564 | extern void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, | 554 | extern 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 | */ | ||
763 | static 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. |