diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-20 04:38:12 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2007-03-20 04:38:12 +0000 |
commit | 87661eb58b8b48426d1646734f3701edb9aa48e7 (patch) | |
tree | 7941abe39c60d2f18b136d15238859e09f9de243 /sys/dev/ata/atascsi.h | |
parent | f358db4fa96515906a6f924dbeba42e426eae9cc (diff) |
Change API for struct ata_xfer allocation to move it into the device that
atascsi will be driving, and add it to the AHCI CCB.
This effectively gives us all the resources we need for a transfer in one
hit, meaning that we don't need to worry about whether we will have a pool
shortage or not enough CCBs. The SCSI mid layer should take care to never
exceed the number of CCBs we have available, based on our sc_link.openings.
Diffstat (limited to 'sys/dev/ata/atascsi.h')
-rw-r--r-- | sys/dev/ata/atascsi.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h index db745284b00..91ee6e2dfae 100644 --- a/sys/dev/ata/atascsi.h +++ b/sys/dev/ata/atascsi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.h,v 1.8 2007/03/13 11:22:36 dlg Exp $ */ +/* $OpenBSD: atascsi.h,v 1.9 2007/03/20 04:38:11 pascoe Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -21,7 +21,8 @@ struct ata_xfer; struct atascsi_methods { int (*probe)(void *, int); - int (*ata_cmd)(void *, struct ata_xfer *); + struct ata_xfer * (*ata_get_xfer)(void *, int ); + int (*ata_cmd)(struct ata_xfer *); }; struct atascsi_attach_args { @@ -64,7 +65,6 @@ struct ata_xfer { struct timeout stimeout; u_int timeout; - struct ata_port *port; int flags; #define ATA_F_READ (1<<0) #define ATA_F_WRITE (1<<1) @@ -75,8 +75,11 @@ struct ata_xfer { #define ATA_S_PENDING 1 #define ATA_S_COMPLETE 2 #define ATA_S_ERROR 3 +#define ATA_S_PUT 6 void *atascsi_private; + + void (*ata_put_xfer)(struct ata_xfer *); }; #define ATA_QUEUED 0 |