summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-11-28 23:59:46 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-11-28 23:59:46 +0000
commit2612706dbdedc47a09b3d55694e5a0ae45da5431 (patch)
tree660420649bfaaad7808081141f49f2a2b02c6c03 /sys/dev/pci
parent056871ecd9a3940fddb99394529c31947383b338 (diff)
give scsi controllers a real attach args to fill in when attaching scsibus.
ok miod@ marco@ deraadt@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/arc.c8
-rw-r--r--sys/dev/pci/iha_pci.c9
-rw-r--r--sys/dev/pci/trm_pci.c8
3 files changed, 18 insertions, 7 deletions
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c
index 65d08b7c4a5..5f2d4ebcee7 100644
--- a/sys/dev/pci/arc.c
+++ b/sys/dev/pci/arc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc.c,v 1.54 2006/11/04 23:11:31 dlg Exp $ */
+/* $OpenBSD: arc.c,v 1.55 2006/11/28 23:59:45 dlg Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -508,6 +508,7 @@ arc_attach(struct device *parent, struct device *self, void *aux)
{
struct arc_softc *sc = (struct arc_softc *)self;
struct pci_attach_args *pa = aux;
+ struct scsibus_attach_args saa;
struct device *child;
sc->sc_talking = 0;
@@ -539,7 +540,10 @@ arc_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.adapter_buswidth = ARC_MAX_TARGET;
sc->sc_link.openings = sc->sc_req_count / ARC_MAX_TARGET;
- child = config_found(self, &sc->sc_link, scsiprint);
+ bzero(&saa, sizeof(saa));
+ saa.saa_sc_link = &sc->sc_link;
+
+ child = config_found(self, &saa, scsiprint);
sc->sc_scsibus = (struct scsibus_softc *)child;
/* enable interrupts */
diff --git a/sys/dev/pci/iha_pci.c b/sys/dev/pci/iha_pci.c
index 138d0cc6ec0..d787d1683d2 100644
--- a/sys/dev/pci/iha_pci.c
+++ b/sys/dev/pci/iha_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha_pci.c,v 1.9 2005/08/09 04:10:12 mickey Exp $ */
+/* $OpenBSD: iha_pci.c,v 1.10 2006/11/28 23:59:45 dlg Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -82,6 +82,7 @@ iha_pci_attach(parent, self, aux)
void *aux;
{
struct pci_attach_args *pa = aux;
+ struct scsibus_attach_args saa;
bus_space_handle_t ioh;
pci_intr_handle_t ih;
struct iha_softc *sc = (void *)self;
@@ -123,7 +124,9 @@ iha_pci_attach(parent, self, aux)
if (intrstr != NULL)
printf(": %s\n", intrstr);
- if (iha_init_tulip(sc) == 0)
- config_found(&sc->sc_dev, &sc->sc_link, scsiprint);
+ if (iha_init_tulip(sc) == 0) {
+ bzero(&saa, sizeof(saa));
+ saa.saa_sc_link = &sc->sc_link;
+ config_found(&sc->sc_dev, &saa, scsiprint);
}
}
diff --git a/sys/dev/pci/trm_pci.c b/sys/dev/pci/trm_pci.c
index faf719a67e8..584410e0637 100644
--- a/sys/dev/pci/trm_pci.c
+++ b/sys/dev/pci/trm_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trm_pci.c,v 1.3 2006/01/21 23:20:44 miod Exp $
+/* $OpenBSD: trm_pci.c,v 1.4 2006/11/28 23:59:45 dlg Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* FILE NAME : trm_pci.c
@@ -100,6 +100,7 @@ void
trm_pci_attach(struct device *parent, struct device *self, void *aux)
{
struct pci_attach_args *pa = aux;
+ struct scsibus_attach_args saa;
bus_space_handle_t ioh;/* bus space handle */
pci_intr_handle_t ih;
struct trm_softc *sc = (void *)self;
@@ -152,7 +153,10 @@ trm_pci_attach(struct device *parent, struct device *self, void *aux)
if (intrstr != NULL)
printf(": %s\n", intrstr);
+ bzero(&saa, sizeof(saa));
+ saa.saa_sc_link = &sc->sc_link;
+
/* Tell SCSI layer about our SCSI bus */
- config_found(&sc->sc_device, &sc->sc_link, scsiprint);
+ config_found(&sc->sc_device, &saa, scsiprint);
}
}