summaryrefslogtreecommitdiff
path: root/sys/dev/ata/atascsi.c
diff options
context:
space:
mode:
authorChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-20 05:33:03 +0000
committerChristopher Pascoe <pascoe@cvs.openbsd.org>2007-03-20 05:33:03 +0000
commit9fb1d43f1cea1b7eb677e379814102a571fcbea9 (patch)
treed6bf500c096fa49cb26687878ca2f8287773e1a8 /sys/dev/ata/atascsi.c
parent87661eb58b8b48426d1646734f3701edb9aa48e7 (diff)
Instead of having a copy of every register that we will issue in the ata_cmd,
simply include a pointer to the command FIS that we will issue to the device. Include another space where we can copy back an error register set from a failed command. This means that we can now build and issue arbitrary commands from atascsi, and retrieve errors back.
Diffstat (limited to 'sys/dev/ata/atascsi.c')
-rw-r--r--sys/dev/ata/atascsi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 0bc0d856652..2a2c902ddcb 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.16 2007/03/20 04:38:11 pascoe Exp $ */
+/* $OpenBSD: atascsi.c,v 1.17 2007/03/20 05:33:02 pascoe Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -272,7 +272,9 @@ ata_setup_identify(struct ata_port *ap, int nosleep)
bzero(xa->data, 512);
xa->datalen = 512;
- xa->cmd.command = ATA_C_IDENTIFY;
+ xa->cmd.tx->regs[H2D_DEVCTL_OR_COMMAND] = H2D_DEVCTL_OR_COMMAND_COMMAND;
+ xa->cmd.tx->regs[H2D_COMMAND] = ATA_C_IDENTIFY;
+
xa->cmd.st_bmask = 0x40; /* XXX magic WDCS_DRDY */;
xa->cmd.st_pmask = 0x00;