summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/adv.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2006-11-28 23:59:45 +0000
committerdlg <dlg@openbsd.org>2006-11-28 23:59:45 +0000
commit73d09fc56bd87109cdbe2d90369b3c6a93a5e94e (patch)
tree489a1b920e2f327a4553184e9dddca9852de0863 /sys/dev/ic/adv.c
parentI just don't know why I decided to set block count to 512 unconditionaly (diff)
downloadwireguard-openbsd-73d09fc56bd87109cdbe2d90369b3c6a93a5e94e.tar.xz
wireguard-openbsd-73d09fc56bd87109cdbe2d90369b3c6a93a5e94e.zip
give scsi controllers a real attach args to fill in when attaching scsibus.
ok miod@ marco@ deraadt@
Diffstat (limited to 'sys/dev/ic/adv.c')
-rw-r--r--sys/dev/ic/adv.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index cc9f47404f3..3b393a486e8 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.15 2005/12/03 16:53:15 krw Exp $ */
+/* $OpenBSD: adv.c,v 1.16 2006/11/28 23:59:45 dlg Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -549,7 +549,8 @@ void
adv_attach(sc)
ASC_SOFTC *sc;
{
- int i, error;
+ struct scsibus_attach_args saa;
+ int i, error;
/*
* Initialize board RISC chip and enable interrupts.
@@ -614,7 +615,10 @@ adv_attach(sc)
printf("%s: WARNING: only %d of %d control blocks created\n",
sc->sc_dev.dv_xname, i, ADV_MAX_CCB);
}
- config_found(&sc->sc_dev, &sc->sc_link, scsiprint);
+
+ bzero(&saa, sizeof(saa));
+ saa->sa_sc_link = &sc->sc_link;
+ config_found(&sc->sc_dev, &saa, scsiprint);
}