aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-15 15:45:33 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-15 15:45:33 -0500
commit7ae8c5ec122e4e909193dbbdb2ad2de349e307c9 (patch)
tree42ef1a96f9286f8ddab8edd6d037506a9cbe889f /include
parente1f1def6ef3f0c71d0df302c3759f6937adaf9ae (diff)
parent9f68a24853dd37d18f2cfa979cf4e131f5a10e8f (diff)
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index ad5996183ec2..f2dbb684ce9e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -59,6 +59,8 @@
59#define VPRINTK(fmt, args...) 59#define VPRINTK(fmt, args...)
60#endif /* ATA_DEBUG */ 60#endif /* ATA_DEBUG */
61 61
62#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
63
62#ifdef ATA_NDEBUG 64#ifdef ATA_NDEBUG
63#define assert(expr) 65#define assert(expr)
64#else 66#else
@@ -119,6 +121,7 @@ enum {
119 ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */ 121 ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
120 ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once 122 ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once
121 * proper HSM is in place. */ 123 * proper HSM is in place. */
124 ATA_FLAG_DEBUGMSG = (1 << 10),
122 125
123 ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ 126 ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
124 ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ 127 ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
@@ -659,6 +662,17 @@ static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, uns
659 tf->device = ATA_DEVICE_OBS | ATA_DEV1; 662 tf->device = ATA_DEVICE_OBS | ATA_DEV1;
660} 663}
661 664
665static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
666{
667 qc->__sg = NULL;
668 qc->flags = 0;
669 qc->cursect = qc->cursg = qc->cursg_ofs = 0;
670 qc->nsect = 0;
671 qc->nbytes = qc->curbytes = 0;
672
673 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
674}
675
662 676
663/** 677/**
664 * ata_irq_on - Enable interrupts on a port. 678 * ata_irq_on - Enable interrupts on a port.