Thread (68 messages) 68 messages, 8 authors, 2005-05-31

Re: Playing with SATA NCQ

From: Jens Axboe <hidden>
Date: 2005-05-27 07:22:41
Also in: lkml

On Thu, May 26 2005, Jeff Garzik wrote:
quoted
+	return 0;
+}
+
+/**
 *	ata_bus_probe - Reset and probe ATA bus
 *	@ap: Bus to probe
 *
@@ -2753,6 +2830,16 @@
	struct ata_port *ap = qc->ap;
	unsigned int tag, do_clear = 0;

+	if (likely(qc->flags & ATA_QCFLAG_ACCOUNT)) {
+		if (qc->flags & ATA_QCFLAG_NCQ) {
+			assert(ap->ncq_depth);
+			ap->ncq_depth--;
+		} else {
+			assert(ap->depth);
+			ap->depth--;
+		}
+	}
why is this accounting conditional?
I double checked this. If you agree to move the setting of QCFLAG_ACTIVE
_after_ successful ap->ops->qc_issue(qc) and clear it _after_
__ata_qc_complete(qc) then I can just use that bit and kill
ATA_QCFLAG_ACCOUNT.

What do you think?

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help