aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-18 11:44:17 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-18 11:44:17 -0500
commitf333b3f111e9db76109e304df8ee777ace7fbf86 (patch)
treece9a74a7327020c48c80d278e1db5f12552f0fb0 /include/linux/libata.h
parentf4256e301d9800b1e0276404cb01b3ac85b51067 (diff)
parent79bfb0a98fdc73ed6a18469cef245cbf50a1d8bb (diff)
Merge branch 'upstream'
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index a7cb46ca45e7..2929282beb40 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
@@ -120,6 +122,7 @@ enum {
120 ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */ 122 ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
121 ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD 123 ATA_FLAG_PIO_POLLING = (1 << 9), /* use polling PIO if LLD
122 * doesn't handle PIO interrupts */ 124 * doesn't handle PIO interrupts */
125 ATA_FLAG_DEBUGMSG = (1 << 10),
123 126
124 ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ 127 ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
125 ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */ 128 ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
@@ -330,8 +333,6 @@ struct ata_port {
330 333
331 u8 ctl; /* cache of ATA control register */ 334 u8 ctl; /* cache of ATA control register */
332 u8 last_ctl; /* Cache last written value */ 335 u8 last_ctl; /* Cache last written value */
333 unsigned int bus_state;
334 unsigned int port_state;
335 unsigned int pio_mask; 336 unsigned int pio_mask;
336 unsigned int mwdma_mask; 337 unsigned int mwdma_mask;
337 unsigned int udma_mask; 338 unsigned int udma_mask;
@@ -660,6 +661,17 @@ static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, uns
660 tf->device = ATA_DEVICE_OBS | ATA_DEV1; 661 tf->device = ATA_DEVICE_OBS | ATA_DEV1;
661} 662}
662 663
664static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
665{
666 qc->__sg = NULL;
667 qc->flags = 0;
668 qc->cursect = qc->cursg = qc->cursg_ofs = 0;
669 qc->nsect = 0;
670 qc->nbytes = qc->curbytes = 0;
671
672 ata_tf_init(qc->ap, &qc->tf, qc->dev->devno);
673}
674
663 675
664/** 676/**
665 * ata_irq_on - Enable interrupts on a port. 677 * ata_irq_on - Enable interrupts on a port.