diff options
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/aac.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/adv.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/adw.c | 10 | ||||
-rw-r--r-- | sys/dev/ic/aic6360.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/aic79xx_openbsd.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/aic7xxx_openbsd.c | 22 | ||||
-rw-r--r-- | sys/dev/ic/ami.c | 13 | ||||
-rw-r--r-- | sys/dev/ic/bha.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/cac.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/ciss.c | 11 | ||||
-rw-r--r-- | sys/dev/ic/gdt_common.c | 13 | ||||
-rw-r--r-- | sys/dev/ic/isp_openbsd.c | 13 | ||||
-rw-r--r-- | sys/dev/ic/mfi.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/mpi.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/ncr53c9x.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/oosiop.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/osiop.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/siop.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/twe.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/uha.c | 15 |
20 files changed, 147 insertions, 60 deletions
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index b934a4e0dd9..3a7c3fec973 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac.c,v 1.32 2006/07/21 19:11:11 mickey Exp $ */ +/* $OpenBSD: aac.c,v 1.33 2006/11/28 23:59:45 dlg Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -223,6 +223,7 @@ int aac_debug = AAC_DEBUG; int aac_attach(struct aac_softc *sc) { + struct scsibus_attach_args; int error; /* @@ -274,7 +275,10 @@ aac_attach(struct aac_softc *sc) sc->aac_link.adapter_buswidth = AAC_MAX_CONTAINERS; sc->aac_link.adapter_target = AAC_MAX_CONTAINERS; - config_found(&sc->aac_dev, &sc->aac_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->aac_link; + + config_found(&sc->aac_dev, &saa, scsiprint); /* Create the AIF thread */ sc->aifthread = 0; 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); } diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index d802fd7a511..f0b2a23cc8b 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.30 2005/12/03 16:53:15 krw Exp $ */ +/* $OpenBSD: adw.c,v 1.31 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -517,7 +517,8 @@ void adw_attach(sc) ADW_SOFTC *sc; { - int i, error; + struct scsibus_attach_args saa; + int i, error; TAILQ_INIT(&sc->sc_free_ccb); @@ -628,7 +629,10 @@ adw_attach(sc) sc->sc_link.openings = 4; sc->sc_link.adapter_buswidth = ADW_MAX_TID+1; - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + + config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c index b2d185cd9b8..72d97ac1344 100644 --- a/sys/dev/ic/aic6360.c +++ b/sys/dev/ic/aic6360.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6360.c,v 1.12 2006/06/03 01:51:54 martin Exp $ */ +/* $OpenBSD: aic6360.c,v 1.13 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */ #ifdef DDB @@ -264,6 +264,7 @@ void aicattach(sc) struct aic_softc *sc; { + struct scsibus_attach_args saa; AIC_TRACE(("aicattach ")); sc->sc_state = AIC_INIT; @@ -293,7 +294,10 @@ aicattach(sc) sc->sc_link.device = &aic_dev; sc->sc_link.openings = 2; - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + + config_found(&sc->sc_dev, &saa, scsiprint); } int diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c index dae58bc9e3c..d65be5480d8 100644 --- a/sys/dev/ic/aic79xx_openbsd.c +++ b/sys/dev/ic/aic79xx_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic79xx_openbsd.c,v 1.25 2006/05/22 20:35:12 krw Exp $ */ +/* $OpenBSD: aic79xx_openbsd.c,v 1.26 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -110,6 +110,7 @@ static struct scsi_device ahd_dev = int ahd_attach(struct ahd_softc *ahd) { + struct scsibus_attach_args saa; char ahd_info[256]; int s; @@ -138,8 +139,10 @@ ahd_attach(struct ahd_softc *ahd) if (ahd->flags & AHD_RESET_BUS_A) ahd_reset_channel(ahd, 'A', TRUE); - ahd->sc_child = config_found((void *)&ahd->sc_dev, - &ahd->sc_channel, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &ahd->sc_channel; + + ahd->sc_child = config_found((void *)&ahd->sc_dev, &saa, scsiprint); ahd_unlock(ahd, &s); diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c index 8969172287c..693bf2bd4ee 100644 --- a/sys/dev/ic/aic7xxx_openbsd.c +++ b/sys/dev/ic/aic7xxx_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic7xxx_openbsd.c,v 1.32 2006/03/04 14:20:37 krw Exp $ */ +/* $OpenBSD: aic7xxx_openbsd.c,v 1.33 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */ /* @@ -87,6 +87,7 @@ static struct scsi_device ahc_dev = int ahc_attach(struct ahc_softc *ahc) { + struct scsibus_attach_args saa; char ahc_info[256]; int s; @@ -121,18 +122,25 @@ ahc_attach(struct ahc_softc *ahc) if ((ahc->features & AHC_TWIN) && ahc->flags & AHC_RESET_BUS_B) ahc_reset_channel(ahc, 'B', TRUE); + bzero(&saa, sizeof(saa)); if ((ahc->flags & AHC_PRIMARY_CHANNEL) == 0) { + saa.saa_sc_link = &ahc->sc_channel; ahc->sc_child = config_found((void *)&ahc->sc_dev, - &ahc->sc_channel, scsiprint); - if (ahc->features & AHC_TWIN) + &saa, scsiprint); + if (ahc->features & AHC_TWIN) { + saa.saa_sc_link = &ahc->sc_channel_b; ahc->sc_child_b = config_found((void *)&ahc->sc_dev, - &ahc->sc_channel_b, scsiprint); + &saa, scsiprint); + } } else { - if (ahc->features & AHC_TWIN) + if (ahc->features & AHC_TWIN) { + saa.saa_sc_link = &ahc->sc_channel_b; ahc->sc_child = config_found((void *)&ahc->sc_dev, - &ahc->sc_channel_b, scsiprint); + &saa, scsiprint); + } + saa.saa_sc_link = &ahc->sc_channel; ahc->sc_child_b = config_found((void *)&ahc->sc_dev, - &ahc->sc_channel, scsiprint); + &saa, scsiprint); } ahc_unlock(ahc, &s); diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 570bd58d871..3d45012fe09 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.173 2006/08/28 01:34:52 krw Exp $ */ +/* $OpenBSD: ami.c,v 1.174 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -364,6 +364,7 @@ free_ccbs: int ami_attach(struct ami_softc *sc) { + struct scsibus_attach_args saa; struct ami_rawsoftc *rsc; struct ami_ccb iccb; struct ami_iocmd *cmd; @@ -539,7 +540,10 @@ ami_attach(struct ami_softc *sc) /* lock around ioctl requests */ lockinit(&sc->sc_lock, PZERO, DEVNAME(sc), 0, 0); - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + + config_found(&sc->sc_dev, &saa, scsiprint); /* can't do bioctls, sensors, or pass-through on broken devices */ if (sc->sc_flags & AMI_BROKEN) @@ -577,7 +581,10 @@ ami_attach(struct ami_softc *sc) rsc->sc_link.adapter_target = 16; rsc->sc_link.adapter_buswidth = 16; - config_found(&sc->sc_dev, &rsc->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &rsc->sc_link; + + config_found(&sc->sc_dev, &saa, scsiprint); } return (0); diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c index 2e142368308..98d365f3553 100644 --- a/sys/dev/ic/bha.c +++ b/sys/dev/ic/bha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bha.c,v 1.8 2005/12/03 16:53:15 krw Exp $ */ +/* $OpenBSD: bha.c,v 1.9 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: bha.c,v 1.27 1998/11/19 21:53:00 thorpej Exp $ */ #undef BHADEBUG @@ -312,6 +312,7 @@ bha_attach(sc, bpd) struct bha_softc *sc; struct bha_probe_data *bpd; { + struct scsibus_attach_args saa; int s; /* @@ -347,10 +348,13 @@ bha_attach(sc, bpd) splx(s); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + /* * ask the adapter what subunits are present */ - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + config_found(&sc->sc_dev, &saa, scsiprint); } integrate void diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c index d7e3bcc8c89..665e22ceeb8 100644 --- a/sys/dev/ic/cac.c +++ b/sys/dev/ic/cac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cac.c,v 1.22 2006/08/31 12:34:39 marco Exp $ */ +/* $OpenBSD: cac.c,v 1.23 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */ /* @@ -141,6 +141,7 @@ struct cac_linkage cac_l0 = { int cac_init(struct cac_softc *sc, int startfw) { + struct scsibus_attach_args saa; struct cac_controller_info cinfo; int error, rseg, size, i; bus_dma_segment_t seg[1]; @@ -241,7 +242,10 @@ cac_init(struct cac_softc *sc, int startfw) if (sc->sc_link.openings < 4 ) sc->sc_link.openings = 4; - config_found(&sc->sc_dv, &sc->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + + config_found(&sc->sc_dv, &saa, scsiprint); /* Set our `shutdownhook' before we start any device activity. */ if (cac_sdh == NULL) diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index 1f15ceaa402..36993173f27 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.21 2006/09/15 23:47:52 krw Exp $ */ +/* $OpenBSD: ciss.c,v 1.22 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -139,6 +139,7 @@ ciss_put_ccb(struct ciss_ccb *ccb) int ciss_attach(struct ciss_softc *sc) { + struct scsibus_attach_args saa; struct scsibus_softc *scsibus; struct ciss_ccb *ccb; struct ciss_cmd *cmd; @@ -382,8 +383,10 @@ ciss_attach(struct ciss_softc *sc) sc->sc_link.adapter = &ciss_switch; sc->sc_link.adapter_target = sc->maxunits; sc->sc_link.adapter_buswidth = sc->maxunits; + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; scsibus = (struct scsibus_softc *)config_found_sm(&sc->sc_dev, - &sc->sc_link, scsiprint, NULL); + &saa, scsiprint, NULL); #if 0 sc->sc_link_raw.device = &ciss_raw_dev; @@ -392,8 +395,10 @@ ciss_attach(struct ciss_softc *sc) sc->sc_link_raw.adapter = &ciss_raw_switch; sc->sc_link_raw.adapter_target = sc->ndrives; sc->sc_link_raw.adapter_buswidth = sc->ndrives; + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link_raw; rawbus = (struct scsibus_softc *)config_found_sm(&sc->sc_dev, - &sc->sc_link_raw, scsiprint, NULL); + &saa, scsiprint, NULL); #endif #if NBIO > 0 diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index 2db3a131f18..ed0b4b6f093 100644 --- a/sys/dev/ic/gdt_common.c +++ b/sys/dev/ic/gdt_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_common.c,v 1.36 2006/05/08 19:52:13 deraadt Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.37 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved. @@ -120,6 +120,7 @@ int gdt_attach(gdt) struct gdt_softc *gdt; { + struct scsibus_attach_args saa; u_int16_t cdev_cnt; int i, id, drv_cyls, drv_hds, drv_secs, error, nsegs; @@ -484,7 +485,10 @@ gdt_attach(gdt) #endif gdt_cnt++; - config_found(&gdt->sc_dev, &gdt->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &gdt->sc_link; + + config_found(&gdt->sc_dev, &saa, scsiprint); gdt->sc_raw_link = malloc(gdt->sc_bus_cnt * sizeof (struct scsi_link), M_DEVBUF, M_NOWAIT); @@ -502,7 +506,10 @@ gdt_attach(gdt) gdt->sc_raw_link[i].adapter_buswidth = (gdt->sc_class & GDT_FC) ? GDT_MAXID : 16; /* XXX */ - config_found(&gdt->sc_dev, &gdt->sc_raw_link[i], scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &gdt->sc_raw_link[i]; + + config_found(&gdt->sc_dev, &saa, scsiprint); } gdt_polling = 0; diff --git a/sys/dev/ic/isp_openbsd.c b/sys/dev/ic/isp_openbsd.c index ece2a2aa439..252e1e2df90 100644 --- a/sys/dev/ic/isp_openbsd.c +++ b/sys/dev/ic/isp_openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_openbsd.c,v 1.28 2005/12/03 16:53:16 krw Exp $ */ +/* $OpenBSD: isp_openbsd.c,v 1.29 2006/11/28 23:59:45 dlg Exp $ */ /* * Platform (OpenBSD) dependent common attachment code for Qlogic adapters. * @@ -85,6 +85,7 @@ struct cfdriver isp_cd = { void isp_attach(struct ispsoftc *isp) { + struct scsibus_attach_args saa; struct scsi_link *lptr = &isp->isp_osinfo._link[0]; isp->isp_osinfo._adapter.scsi_minphys = ispminphys; @@ -158,13 +159,19 @@ isp_attach(struct ispsoftc *isp) ISP_UNLOCK(isp); lptr->adapter_target = defid; } + + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = lptr; + /* * And attach children (if any). */ - config_found((void *)isp, lptr, scsiprint); + config_found((void *)isp, &saa, scsiprint); if (IS_DUALBUS(isp)) { lptr++; - config_found((void *)isp, lptr, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = lptr; + config_found((void *)isp, &saa, scsiprint); } } diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index ab36b4aded8..f17197b551b 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.65 2006/08/31 18:13:17 marco Exp $ */ +/* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -576,6 +576,7 @@ mfiminphys(struct buf *bp) int mfi_attach(struct mfi_softc *sc) { + struct scsibus_attach_args saa; uint32_t status, frames; int i; @@ -667,7 +668,10 @@ mfi_attach(struct mfi_softc *sc) sc->sc_link.adapter_target = MFI_MAX_LD; sc->sc_link.adapter_buswidth = sc->sc_max_ld; - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + + config_found(&sc->sc_dev, &saa, scsiprint); /* enable interrupts */ mfi_write(sc, MFI_OMSK, MFI_ENABLE_INTR); 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); diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c index eadec7473e9..700703f61fb 100644 --- a/sys/dev/ic/ncr53c9x.c +++ b/sys/dev/ic/ncr53c9x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr53c9x.c,v 1.32 2006/06/26 22:16:23 miod Exp $ */ +/* $OpenBSD: ncr53c9x.c,v 1.33 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */ /* @@ -191,6 +191,8 @@ ncr53c9x_attach(sc, adapter, dev) struct scsi_adapter *adapter; struct scsi_device *dev; { + struct scsibus_attach_args saa; + timeout_set(&sc->sc_watchdog, ncr53c9x_watch, sc); /* * Allocate SCSI message buffers. @@ -268,10 +270,13 @@ ncr53c9x_attach(sc, adapter, dev) sc->sc_link.openings = 2; sc->sc_link.adapter_buswidth = sc->sc_ntarg; + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + /* * Now try to attach all the sub-devices */ - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + config_found(&sc->sc_dev, &saa, scsiprint); timeout_add(&sc->sc_watchdog, 60*hz); } diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index b7eb32840fc..4c6928e17cc 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: oosiop.c,v 1.4 2004/03/14 19:23:33 miod Exp $ */ +/* $OpenBSD: oosiop.c,v 1.5 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */ /* @@ -145,6 +145,7 @@ struct scsi_device oosiop_dev = { void oosiop_attach(struct oosiop_softc *sc) { + struct scsibus_attach_args saa; bus_size_t scrsize; bus_dma_segment_t seg; struct oosiop_cb *cb; @@ -248,10 +249,13 @@ oosiop_attach(struct oosiop_softc *sc) sc->sc_link.adapter_target = sc->sc_id; sc->sc_link.quirks = ADEV_NODOORLOCK; + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + /* * Now try to attach all the sub devices. */ - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + config_found(&sc->sc_dev, &saa, scsiprint); } int diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index 442e6694f80..e9550d9bd2a 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osiop.c,v 1.26 2005/12/03 16:53:16 krw Exp $ */ +/* $OpenBSD: osiop.c,v 1.27 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */ /* @@ -202,6 +202,7 @@ void osiop_attach(sc) struct osiop_softc *sc; { + struct scsibus_attach_args saa; struct osiop_acb *acb; bus_dma_segment_t seg; int nseg; @@ -349,10 +350,13 @@ osiop_attach(sc) sc->sc_link.adapter_buswidth = OSIOP_NTGT; sc->sc_link.adapter_target = sc->sc_id; + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + /* * Now try to attach all the sub devices. */ - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + config_found(&sc->sc_dev, &saa, scsiprint); } /* diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 16c7caec417..745e6850bec 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop.c,v 1.44 2006/05/22 22:22:11 martin Exp $ */ +/* $OpenBSD: siop.c,v 1.45 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */ /* @@ -186,6 +186,8 @@ void siop_attach(sc) struct siop_softc *sc; { + struct scsibus_attach_args saa; + if (siop_common_attach(&sc->sc_c) != 0) return; @@ -218,7 +220,10 @@ siop_attach(sc) siop_dump_script(sc); #endif - config_found((struct device*)sc, &sc->sc_c.sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_c.sc_link; + + config_found((struct device*)sc, &saa, scsiprint); } void diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c index 3d2f4e77b62..dfe26330469 100644 --- a/sys/dev/ic/twe.c +++ b/sys/dev/ic/twe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: twe.c,v 1.25 2005/12/03 16:53:16 krw Exp $ */ +/* $OpenBSD: twe.c,v 1.26 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved. @@ -129,6 +129,7 @@ int twe_attach(sc) struct twe_softc *sc; { + struct scsibus_attach_args saa; /* this includes a buffer for drive config req, and a capacity req */ u_int8_t param_buf[2 * TWE_SECTOR_SIZE + TWE_ALIGN - 1]; struct twe_param *pb = (void *) @@ -388,7 +389,10 @@ twe_attach(sc) sc->sc_link.openings = TWE_MAXCMDS / nunits; sc->sc_link.adapter_buswidth = TWE_MAX_UNITS; - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + + config_found(&sc->sc_dev, &saa, scsiprint); kthread_create_deferred(twe_thread_create, sc); diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c index f9a04eab7b6..600203ee182 100644 --- a/sys/dev/ic/uha.c +++ b/sys/dev/ic/uha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uha.c,v 1.8 2005/12/03 16:53:16 krw Exp $ */ +/* $OpenBSD: uha.c,v 1.9 2006/11/28 23:59:45 dlg Exp $ */ /* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */ #undef UHADEBUG @@ -136,6 +136,7 @@ void uha_attach(sc) struct uha_softc *sc; { + struct scsibus_attach_args saa; (sc->init)(sc); TAILQ_INIT(&sc->sc_free_mscp); @@ -143,23 +144,19 @@ uha_attach(sc) /* * fill in the prototype scsi_link. */ -#ifndef __OpenBSD__ - sc->sc_link.channel = SCSI_CHANNEL_ONLY_ONE; -#endif sc->sc_link.adapter_softc = sc; sc->sc_link.adapter_target = sc->sc_scsi_dev; sc->sc_link.adapter = &uha_switch; sc->sc_link.device = &uha_dev; sc->sc_link.openings = 2; + bzero(&saa, sizeof(saa)); + saa.saa_sc_link = &sc->sc_link; + /* * ask the adapter what subunits are present */ -#ifdef __OpenBSD__ - config_found(&sc->sc_dev, &sc->sc_link, uhaprint); -#else - config_found(&sc->sc_dev, &sc->sc_link, scsiprint); -#endif + config_found(&sc->sc_dev, &saa, uhaprint); } integrate void |