summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2007-02-19 12:06:16 +0000
committerdlg <dlg@openbsd.org>2007-02-19 12:06:16 +0000
commitc9233d066a5184aebaccec16657e40dfc7a60eac (patch)
tree25ee2f0cede435cba2a184b8387aead65263e4d7 /sys
parentcode to set up a global pool for allocating ata_xfers out of, and for (diff)
downloadwireguard-openbsd-c9233d066a5184aebaccec16657e40dfc7a60eac.tar.xz
wireguard-openbsd-c9233d066a5184aebaccec16657e40dfc7a60eac.zip
actually init and destroy the shared ata stuff when an atascsi instance
is created or destroyed.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/atascsi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 69aaad24b3e..dbd96b6376e 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.6 2007/02/19 12:04:01 dlg Exp $ */
+/* $OpenBSD: atascsi.c,v 1.7 2007/02/19 12:06:16 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -88,6 +88,8 @@ atascsi_attach(struct device *self, struct atascsi_attach_args *aaa)
struct atascsi *as;
int i;
+ ata_init();
+
as = malloc(sizeof(struct atascsi), M_DEVBUF, M_WAITOK);
bzero(as, sizeof(struct atascsi));
@@ -129,6 +131,8 @@ atascsi_attach(struct device *self, struct atascsi_attach_args *aaa)
int
atascsi_detach(struct atascsi *as)
{
+ ata_destroy();
+
return (0);
}