diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-15 12:45:33 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-15 12:45:33 -0800 |
commit | 7ae8c5ec122e4e909193dbbdb2ad2de349e307c9 (patch) | |
tree | 42ef1a96f9286f8ddab8edd6d037506a9cbe889f /include | |
parent | e1f1def6ef3f0c71d0df302c3759f6937adaf9ae (diff) | |
parent | 9f68a24853dd37d18f2cfa979cf4e131f5a10e8f (diff) | |
download | kernel-crypto-7ae8c5ec122e4e909193dbbdb2ad2de349e307c9.tar.gz kernel-crypto-7ae8c5ec122e4e909193dbbdb2ad2de349e307c9.tar.xz kernel-crypto-7ae8c5ec122e4e909193dbbdb2ad2de349e307c9.zip |
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.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index ad5996183ec..f2dbb684ce9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -59,6 +59,8 @@ #define VPRINTK(fmt, args...) #endif /* ATA_DEBUG */ +#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) + #ifdef ATA_NDEBUG #define assert(expr) #else @@ -119,6 +121,7 @@ enum { ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */ ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once * proper HSM is in place. */ + ATA_FLAG_DEBUGMSG = (1 << 10), ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ 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 tf->device = ATA_DEVICE_OBS | ATA_DEV1; } +static inline void ata_qc_reinit(struct ata_queued_cmd *qc) +{ + qc->__sg = NULL; + qc->flags = 0; + qc->cursect = qc->cursg = qc->cursg_ofs = 0; + qc->nsect = 0; + qc->nbytes = qc->curbytes = 0; + + ata_tf_init(qc->ap, &qc->tf, qc->dev->devno); +} + /** * ata_irq_on - Enable interrupts on a port. |