diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-21 12:41:29 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-21 12:41:29 +0000 |
commit | 3cb59447146005cb651999b073feac9d5983ab72 (patch) | |
tree | db56da88f2c12bad863f7041f3d98b0a52e9df94 /sys/dev/ata/atascsi.h | |
parent | 2daa434f700577c55beab0ab31f6c4bec7b2e9d9 (diff) |
Add support for issuing NCQ commands via AHCI.
Because you cannot have NCQ commands active at the same time as standard
(non-queued) commands, we must introduce a queueing scheme into the driver.
This scheme ensures that a standard command is only issued to the drive when
all currently active NCQ commands have finished, and that NCQ command issue
is delayed when we have a pending standard command.
Additionally, the queueing scheme adds a constraint to ensure that there are
never more than two standard commands issued on a port at once. This should
ensure that commands become active in the order they were submitted (regardless
of their command slot number) both initially and when the port is reactivated
after error recovery.
These points mean that issuing a standard command effectively serialises the
port, which may help us implement meaningful I/O barriers in the future.
Diffstat (limited to 'sys/dev/ata/atascsi.h')
-rw-r--r-- | sys/dev/ata/atascsi.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h index 4fd71385c93..9ad4176d397 100644 --- a/sys/dev/ata/atascsi.h +++ b/sys/dev/ata/atascsi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.h,v 1.18 2007/03/21 00:09:16 dlg Exp $ */ +/* $OpenBSD: atascsi.h,v 1.19 2007/03/21 12:41:28 pascoe Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -221,6 +221,7 @@ struct ata_xfer { #define ATA_F_POLL (1<<3) #define ATA_F_PIO (1<<4) #define ATA_F_PACKET (1<<5) +#define ATA_F_NCQ (1<<6) volatile int state; #define ATA_S_SETUP 0 #define ATA_S_PENDING 1 |