summaryrefslogtreecommitdiff
path: root/sys/dev/ic/wdcvar.h
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-05-09 22:33:55 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-05-09 22:33:55 +0000
commit15cd6a42ff78f176a0db39dfa7401274f1792bfc (patch)
tree69a950d47edcd44df04df75de2fe47d28c886f8c /sys/dev/ic/wdcvar.h
parenta9b23f00f1cdf8ec5565371412b53af1247703da (diff)
Refactor queue allocation and initialization into a wdc_alloc_queue()
function, and let attachment code calls this rather than malloc(9). This prevents re-initialization of the queue in shared queue chipsets. Also, add wdc_free_queue() as a complementary function. Earlier version (without wdc_free_queue()) tested by sthen@ and Amit Kulkarni on various pciide(4) chips. ok dlg@
Diffstat (limited to 'sys/dev/ic/wdcvar.h')
-rw-r--r--sys/dev/ic/wdcvar.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h
index ea7b16f292b..1ab0136f9b3 100644
--- a/sys/dev/ic/wdcvar.h
+++ b/sys/dev/ic/wdcvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdcvar.h,v 1.50 2011/05/08 17:33:57 matthew Exp $ */
+/* $OpenBSD: wdcvar.h,v 1.51 2011/05/09 22:33:54 matthew Exp $ */
/* $NetBSD: wdcvar.h,v 1.17 1999/04/11 20:50:29 bouyer Exp $ */
/*-
@@ -259,6 +259,8 @@ int wdcprobe(struct channel_softc *);
void wdcattach(struct channel_softc *);
int wdcdetach(struct channel_softc *, int);
int wdcintr(void *);
+struct channel_queue *wdc_alloc_queue(void);
+void wdc_free_queue(struct channel_queue *);
void wdc_exec_xfer(struct channel_softc *, struct wdc_xfer *);
struct wdc_xfer *wdc_get_xfer(int); /* int = WDC_NOSLEEP/CANSLEEP */
#define WDC_CANSLEEP 0x00