|
@@ -59,6 +59,8 @@
|
|
#define VPRINTK(fmt, args...)
|
|
#define VPRINTK(fmt, args...)
|
|
#endif /* ATA_DEBUG */
|
|
#endif /* ATA_DEBUG */
|
|
|
|
|
|
|
|
+#define BPRINTK(fmt, args...) if (ap->flags & ATA_FLAG_DEBUGMSG) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args)
|
|
|
|
+
|
|
#ifdef ATA_NDEBUG
|
|
#ifdef ATA_NDEBUG
|
|
#define assert(expr)
|
|
#define assert(expr)
|
|
#else
|
|
#else
|
|
@@ -119,6 +121,7 @@ enum {
|
|
ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
|
|
ATA_FLAG_PIO_DMA = (1 << 8), /* PIO cmds via DMA */
|
|
ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once
|
|
ATA_FLAG_NOINTR = (1 << 9), /* FIXME: Remove this once
|
|
* proper HSM is in place. */
|
|
* 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_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */
|
|
ATA_QCFLAG_SG = (1 << 3), /* have s/g table? */
|
|
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;
|
|
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.
|
|
* ata_irq_on - Enable interrupts on a port.
|