summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/mpi.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/mpi.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/mpi.c')
-rw-r--r--sys/dev/ic/mpi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index f96f7551db9..8e358a0cf84 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.81 2006/11/28 13:22:56 dlg Exp $ */
+/* $OpenBSD: mpi.c,v 1.82 2006/11/28 23:59:45 dlg Exp $ */
/*
* Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org>
@@ -147,6 +147,7 @@ int mpi_cfg_page(struct mpi_softc *, u_int32_t,
int
mpi_attach(struct mpi_softc *sc)
{
+ struct scsibus_attach_args saa;
struct mpi_ccb *ccb;
printf("\n");
@@ -224,10 +225,12 @@ mpi_attach(struct mpi_softc *sc)
sc->sc_link.adapter_buswidth = sc->sc_buswidth;
sc->sc_link.openings = sc->sc_maxcmds / sc->sc_buswidth;
+ bzero(&saa, sizeof(saa));
+ saa.saa_sc_link = &sc->sc_link;
- /* config_found() returns the scsibus we should attach to */
+ /* config_found() returns the scsibus attached to us */
sc->sc_scsibus = (struct scsibus_softc *) config_found(&sc->sc_dev,
- &sc->sc_link, scsiprint);
+ &saa, scsiprint);
/* get raid pages */
mpi_get_raid(sc);