summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-02-19 12:10:41 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-02-19 12:10:41 +0000
commit66df0885c3de39a18d5e01ca463056eaf4df0657 (patch)
treed4f56782f2bfc0099601b632fb49b42d69c9e47c
parentc77a83e778b564a34d3a276c9893b3408af9442d (diff)
i think ata_xfers should look more like this. stash the number of the port
in the ata_port struct so a hba can find its own info for that port.
-rw-r--r--sys/dev/ata/atascsi.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h
index 70b72ffc4a5..ba69ff4916d 100644
--- a/sys/dev/ata/atascsi.h
+++ b/sys/dev/ata/atascsi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.h,v 1.3 2007/02/19 11:53:34 dlg Exp $ */
+/* $OpenBSD: atascsi.h,v 1.4 2007/02/19 12:10:40 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -34,23 +34,40 @@ struct atascsi_attach_args {
};
struct ata_port {
+ int ap_port;
int ap_type;
#define ATA_PORT_T_NONE 0
#define ATA_PORT_T_DISK 1
#define ATA_PORT_T_ATAPI 2
};
+struct ata_cmd {
+ u_int8_t command;
+ u_int8_t head;
+ u_int16_t cyl;
+ u_int8_t sector;
+ u_int8_t count;
+ u_int8_t precomp;
+ u_int8_t st_bmask;
+ u_int8_t st_pmask;
+ u_int8_t error;
+};
+
struct ata_xfer {
- int port;
+ struct ata_cmd cmd;
+ u_int8_t *data;
+ size_t datalen;
- int flags;
-#define ATA_F_POLL (1<<0)
-#define ATA_F_NOSLEEP (1<<1)
+ void (*complete)(void *);
- u_int8_t *cmd;
+ struct ata_port *port;
+ int flags;
+#define ATA_F_READ (1<<0)
+#define ATA_F_WRITE (1<<1)
+#define ATA_F_NOWAIT (1<<2)
+#define ATA_F_POLL (1<<2)
- u_int8_t *data;
- size_t datalen;
+ void *atascsi_private;
};
struct atascsi *atascsi_attach(struct device *, struct atascsi_attach_args *);