Subject: CVS commit: [netbsd-2] src/sys/dev/ata
To: None <source-changes@NetBSD.org>
From: Matthias Scheler <tron@netbsd.org>
List: source-changes
Date: 04/16/2005 10:59:39
Module Name:	src
Committed By:	tron
Date:		Sat Apr 16 10:59:39 UTC 2005

Modified Files:
	src/sys/dev/ata [netbsd-2]: atavar.h

Log Message:
Pull up revision 1.65 via patch (requested by bouyer in ticket #1105):
Allow polled commands to be queued, if ata_exec_xfer() is called in thread
context. For this introduce 3 new xfer tags:
- C_WAIT, equivalent of AT_WAIT
- C_WAITACT, when there is a thread waiting on this xfer to become the active
  one (that is, to be at the head of the queue)
- C_FREE, set by ata_free_xfer() when it can't free the xfer because it's
  still in use. The holder should then free the xfer ASAP.
If ata_exec_xfer() is called with (C_POLL | C_WAIT), and there is already
xfers to be processed, assert C_WAITACT and sleep.
atastart() checks for C_WAITACT, and wakeup the thread waiting for this xfer
to become active if set. atastart() won't process this xfer, it's the
responsability of the thread waked up to handle it.
Fix (the right way) kern/27421 by Martin Husemann.


To generate a diff of this commit:
cvs rdiff -r1.40.2.2.2.1 -r1.40.2.2.2.2 src/sys/dev/ata/atavar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.