diff options
Diffstat (limited to 'sys')
47 files changed, 293 insertions, 291 deletions
diff --git a/sys/arch/luna88k/dev/mb89352.c b/sys/arch/luna88k/dev/mb89352.c index e2d208e3242..444f6a9235e 100644 --- a/sys/arch/luna88k/dev/mb89352.c +++ b/sys/arch/luna88k/dev/mb89352.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mb89352.c,v 1.27 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: mb89352.c,v 1.28 2020/07/20 14:41:12 krw Exp $ */ /* $NetBSD: mb89352.c,v 1.5 2000/03/23 07:01:31 thorpej Exp $ */ /* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */ @@ -214,14 +214,14 @@ spc_attach(struct spc_softc *sc, struct scsi_adapter *adapter) spc_init(sc); /* Init chip and driver */ - sc->sc_link.openings = 2; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_initiator; saa.saa_adapter = adapter; saa.saa_luns = saa.saa_adapter_buswidth = 8; + saa.saa_openings = 2; + saa.saa_pool = &sc->sc_iopool; + saa.saa_flags = saa.saa_quirks = 0; + saa.saa.wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c index c86d02e142f..e668d08c1af 100644 --- a/sys/arch/sparc64/dev/vdsk.c +++ b/sys/arch/sparc64/dev/vdsk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vdsk.c,v 1.59 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: vdsk.c,v 1.60 2020/07/20 14:41:12 krw Exp $ */ /* * Copyright (c) 2009, 2011 Mark Kettenis * @@ -345,15 +345,16 @@ vdsk_attach(struct device *parent, struct device *self, void *aux) scsi_iopool_init(&sc->sc_iopool, sc, vdsk_io_get, vdsk_io_put); - sc->sc_link.openings = sc->sc_vd->vd_nentries - 1; - sc->sc_link.pool = &sc->sc_iopool; - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &vdsk_switch; saa.saa_adapter_softc = self; saa.saa_adapter_buswidth = 1; saa.saa_luns = 1; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; + saa.saa_openings = sc->sc_vd->vd_nentries - 1; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.flags = 0; + saa.saa.wwpn = saa.saa_wwnn = 0; config_found(self, &saa, scsiprint); diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index b5df0df16b8..4a1a0008fd7 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.141 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: atascsi.c,v 1.142 2020/07/20 14:41:12 krw Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -182,14 +182,15 @@ atascsi_attach(struct device *self, struct atascsi_attach_args *aaa) as->as_host_ports = mallocarray(aaa->aaa_nports, sizeof(struct atascsi_host_port *), M_DEVBUF, M_WAITOK | M_ZERO); - as->as_link.openings = 1; - - saa.saa_sc_link = &as->as_link; saa.saa_adapter = &as->as_switch; saa.saa_adapter_softc = as; saa.saa_adapter_buswidth = aaa->aaa_nports; saa.saa_luns = SATA_PMP_MAX_PORTS; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; + saa.saa_openings = 1; + saa.saa_pool = NULL; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; as->as_scsibus = (struct scsibus_softc *)config_found(self, &saa, scsiprint); diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index a824432e108..83deb5ecc1a 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.114 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.115 2020/07/20 14:41:12 krw Exp $ */ /* * This code is derived from code with the copyright below. @@ -251,16 +251,17 @@ atapiscsi_attach(struct device *parent, struct device *self, void *aux) WDCDEBUG_PRINT(("driver caps %04x\n", drvp->atapi_cap), DEBUG_PROBE); - as->sc_adapterlink.openings = 1; - as->sc_adapterlink.flags = SDEV_ATAPI; - as->sc_adapterlink.pool = &wdc_xfer_iopool; - saa.saa_sc_link = &as->sc_adapterlink; saa.saa_adapter_softc = as; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = 2; saa.saa_adapter = &atapiscsi_switch; saa.saa_luns = 1; + saa.saa_openings = 1; + saa.saa_flags = SDEV_ATAPI; + saa.saa_pool = &wdc_xfer_iopool; + saa.saa_quirks = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; child = config_found((struct device *)as, &saa, scsiprint); diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index f883926d4b1..175bbb3c9a8 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac.c,v 1.83 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: aac.c,v 1.84 2020/07/20 14:41:12 krw Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -266,16 +266,17 @@ aac_attach(struct aac_softc *sc) if (error) return (error); - sc->aac_link.openings = (sc->total_fibs - 8) / - (sc->aac_container_count ? sc->aac_container_count : 1); - sc->aac_link.pool = &sc->aac_iopool; - saa.saa_sc_link = &sc->aac_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &aac_switch; saa.saa_adapter_buswidth = AAC_MAX_CONTAINERS; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_luns = 8; + saa.saa_openings = (sc->total_fibs - 8) / + (sc->aac_container_count ? sc->aac_container_count : 1); + saa.saa.pool = &sc->aac_iopool; + saa.saa_wwpn = saa.saa_wwnn = 0; + saa.saa_quirks = saa.saa_flags = 0; config_found(&sc->aac_dev, &saa, scsiprint); diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index 7a1d56eb728..151d456c189 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adv.c,v 1.47 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: adv.c,v 1.48 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */ /* @@ -499,15 +499,15 @@ adv_attach(sc) sc->sc_dev.dv_xname, i, ADV_MAX_CCB); } - sc->sc_link.openings = 4; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->chip_scsi_id; saa.saa_adapter = &adv_switch; saa.saa_adapter_buswidth = 7; saa.saa_luns = 8; + saa.saa_openings = 4; + saa.saa_pool = &sc->sc_iopool; + saa.saa_wwpn = saa.saa_wwnn = 0; + saa.saa_quirks = saa.saa_flags = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index 80865b0908c..88aa5b2c9af 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.65 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: adw.c,v 1.66 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -502,15 +502,15 @@ adw_attach(ADW_SOFTC *sc) break; } - sc->sc_link.openings = 4; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->chip_scsi_id; saa.saa_adapter = &adw_switch; saa.saa_adapter_buswidth = ADW_MAX_TID+1; saa.saa_luns = 8; + saa.saa_openings = 4; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/ic/aic6250.c b/sys/dev/ic/aic6250.c index 1394d63d8e0..2e603159a53 100644 --- a/sys/dev/ic/aic6250.c +++ b/sys/dev/ic/aic6250.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6250.c,v 1.11 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: aic6250.c,v 1.12 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2010, 2013 Miodrag Vallat. @@ -202,14 +202,14 @@ aic6250_attach(struct aic6250_softc *sc) aic6250_init(sc); /* init chip and driver */ - sc->sc_link.openings = 2; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_initiator; saa.saa_adapter = &aic6250_switch; saa.saa_luns = saa.saa_adapter_buswidth = 8; + saa.saa_openings = 2; + saa.saa_pool = &sc->sc_iopool; + saa.saa_wwpn = saa.saa_wwnn = 0; + saa.saa_quirks = saa.saa_flags = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c index a1b60fbc3dc..ed9ace02286 100644 --- a/sys/dev/ic/aic6360.c +++ b/sys/dev/ic/aic6360.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6360.c,v 1.36 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: aic6360.c,v 1.37 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */ #ifdef DDB @@ -263,14 +263,14 @@ aicattach(struct aic_softc *sc) aic_init(sc); /* init chip and driver */ - sc->sc_link.openings = 2; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_initiator; saa.saa_adapter = &aic_switch; saa.saa_luns = saa.saa_adapter_buswidth = 8; + saa.saa_openings = 2; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c index de796ddab85..af09cace499 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.56 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: aic79xx_openbsd.c,v 1.57 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -109,15 +109,15 @@ ahd_attach(struct ahd_softc *ahd) if (ahd->flags & AHD_RESET_BUS_A) ahd_reset_channel(ahd, 'A', TRUE); - ahd->sc_channel.openings = 16; /* Must ALWAYS be < 256!! */ - ahd->sc_channel.pool = &ahd->sc_iopool; - - saa.saa_sc_link = &ahd->sc_channel; saa.saa_adapter_target = ahd->our_id; saa.saa_adapter_buswidth = (ahd->features & AHD_WIDE) ? 16 : 8; saa.saa_adapter_softc = ahd; saa.saa_adapter = &ahd_switch; saa.saa_luns = 8; + saa.saa_openings = 16; /* Must ALWAYS be < 256!! */ + saa.saa_pool = &ahd->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; ahd->sc_child = config_found((void *)&ahd->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c index 5ef1d03d56f..56701c69fd0 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.66 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: aic7xxx_openbsd.c,v 1.67 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */ /* @@ -75,9 +75,6 @@ ahc_attach(struct ahc_softc *ahc) s = splbio(); - ahc->sc_channel.openings = 16; - ahc->sc_channel.pool = &ahc->sc_iopool; - if (ahc->features & AHC_TWIN) { ahc->sc_channel_b = ahc->sc_channel; } @@ -101,25 +98,25 @@ ahc_attach(struct ahc_softc *ahc) saa.saa_adapter_softc = ahc; saa.saa_adapter = &ahc_switch; saa.saa_luns = saa.saa_adapter_buswidth = 8; + saa.saa_openings = 16; + saa.saa_pool = &ahc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; if ((ahc->flags & AHC_PRIMARY_CHANNEL) == 0) { - saa.saa_sc_link = &ahc->sc_channel; saa.saa_adapter_target = ahc->our_id; ahc->sc_child = (struct scsibus_softc *)config_found( (void *)&ahc->sc_dev, &saa, scsiprint); if (ahc->features & AHC_TWIN) { - saa.saa_sc_link = &ahc->sc_channel_b; saa.saa_adapter_target = ahc->our_id; ahc->sc_child_b = (struct scsibus_softc *)config_found( (void *)&ahc->sc_dev, &saa, scsiprint); } } else { if (ahc->features & AHC_TWIN) { - saa.saa_sc_link = &ahc->sc_channel_b; saa.saa_adapter_target = ahc->our_id; ahc->sc_child = (struct scsibus_softc *)config_found( (void *)&ahc->sc_dev, &saa, scsiprint); } - saa.saa_sc_link = &ahc->sc_channel; saa.saa_adapter_target = ahc->our_id; ahc->sc_child_b = (struct scsibus_softc *)config_found( (void *)&ahc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 04dbbb10d0f..1e7858cd399 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.252 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: ami.c,v 1.253 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -535,15 +535,15 @@ ami_attach(struct ami_softc *sc) /* lock around ioctl requests */ rw_init(&sc->sc_lock, NULL); - sc->sc_link.openings = sc->sc_maxcmds; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &ami_switch; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = sc->sc_maxunits; saa.saa_luns = 8; + saa.saa_openings = sc->sc_maxcmds; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); @@ -584,15 +584,15 @@ ami_attach(struct ami_softc *sc) /* TODO fetch adapter_target from the controller */ - rsc->sc_link.openings = sc->sc_maxcmds; - rsc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &rsc->sc_link; saa.saa_adapter_softc = rsc; saa.saa_adapter = &ami_raw_switch; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = 16; saa.saa_luns = 8; + saa.saa_openings = sc->sc_maxcmds; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; ptbus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c index 28a57a2de3d..54bd15d6257 100644 --- a/sys/dev/ic/cac.c +++ b/sys/dev/ic/cac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cac.c,v 1.64 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: cac.c,v 1.65 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */ /* @@ -236,17 +236,17 @@ cac_init(struct cac_softc *sc, int startfw) return (-1); } - sc->sc_link.openings = CAC_MAX_CCBS / sc->sc_nunits; - if (sc->sc_link.openings < 4 ) - sc->sc_link.openings = 4; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &cac_switch; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = cinfo.num_drvs; saa.saa_luns = 8; + saa.saa_openings = CAC_MAX_CCBS / sc->sc_nunits; + if (saa.saa_openings < 4 ) + saa.saa_openings = 4; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dv, &saa, scsiprint); diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index d6ad5246c9d..2af41f73f07 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.86 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: ciss.c,v 1.87 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -353,15 +353,15 @@ ciss_attach(struct ciss_softc *sc) sc->sc_flush = CISS_FLUSH_ENABLE; - sc->sc_link.openings = sc->maxcmd; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &ciss_switch; saa.saa_luns = 1; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = sc->maxunits; + saa.saa_openings = sc->maxcmd; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; scsibus = (struct scsibus_softc *)config_found_sm(&sc->sc_dev, &saa, scsiprint, NULL); diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index 9fc5b02046f..c33c20f3c15 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.75 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.76 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved. @@ -461,20 +461,20 @@ gdt_attach(struct gdt_softc *sc) #endif gdt_cnt++; - if (sc->sc_ndevs == 0) - sc->sc_link.openings = 0; - else - sc->sc_link.openings = (GDT_MAXCMDS - GDT_CMD_RESERVE) / - sc->sc_ndevs; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &gdt_switch; saa.saa_adapter_buswidth = (sc->sc_class & GDT_FC) ? GDT_MAXID : GDT_MAX_HDRIVES; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_luns = 8; + if (sc->sc_ndevs == 0) + saa.saa_openings = 0; + else + saa.saa_openings = (GDT_MAXCMDS - GDT_CMD_RESERVE) / + sc->sc_ndevs; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index 6a492fa3417..efdc3dcdfbf 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.183 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: mfi.c,v 1.184 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -771,15 +771,15 @@ mfi_attach(struct mfi_softc *sc, enum mfi_iop iop) for (i = 0; i < sc->sc_ld_cnt; i++) sc->sc_ld[i].ld_present = 1; - sc->sc_link.openings = sc->sc_max_cmds - 1; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &mfi_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_buswidth = sc->sc_info.mci_max_lds; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_luns = 1; + saa.saa_openings = sc->sc_max_cmds - 1; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *) config_found(&sc->sc_dev, &saa, scsiprint); @@ -817,7 +817,6 @@ int mfi_syspd(struct mfi_softc *sc) { struct scsibus_attach_args saa; - struct scsi_link *link; struct mfi_pd_link *pl; struct mfi_pd_list *pd; u_int npds, i; @@ -846,16 +845,15 @@ mfi_syspd(struct mfi_softc *sc) free(pd, M_TEMP, sizeof *pd); - link = &sc->sc_pd->pd_link; - link->openings = sc->sc_max_cmds - 1; - link->pool = &sc->sc_iopool; - - saa.saa_sc_link = link; saa.saa_adapter = &mfi_pd_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_buswidth = MFI_MAX_PD; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_luns = 8; + saa.saa_openings = sc->sc_max_cmds - 1; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_pd->pd_scsibus = (struct scsibus_softc *) config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index 2a1bb62baa5..76f63ee17ba 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.220 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: mpi.c,v 1.221 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org> @@ -355,17 +355,16 @@ mpi_attach(struct mpi_softc *sc) } #endif /* NBIO > 0 */ - sc->sc_link.openings = MAX(sc->sc_maxcmds / sc->sc_buswidth, 16); - sc->sc_link.pool = &sc->sc_iopool; - sc->sc_link.port_wwn = sc->sc_port_wwn; - sc->sc_link.node_wwn = sc->sc_node_wwn; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &mpi_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_target; saa.saa_adapter_buswidth = sc->sc_buswidth; saa.saa_luns = 8; + saa.saa_openings = MAX(sc->sc_maxcmds / sc->sc_buswidth, 16); + saa.saa_pool = &sc->sc_iopool; + saa.saa_wwpn = sc->sc_port_wwn; + saa.saa_wwnn = sc->sc_node_wwn; + saa.saa_quirks = saa.saa_flags = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c index 590aa55c5ee..a360ce2cfe3 100644 --- a/sys/dev/ic/ncr53c9x.c +++ b/sys/dev/ic/ncr53c9x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr53c9x.c,v 1.75 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: ncr53c9x.c,v 1.76 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */ /* @@ -261,15 +261,15 @@ ncr53c9x_attach(sc) sc->sc_state = 0; ncr53c9x_init(sc, 1); - sc->sc_link.openings = 2; - sc->sc_link.pool = &ecb_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_id; saa.saa_adapter = &ncr53c9x_switch; saa.saa_adapter_buswidth = sc->sc_ntarg; saa.saa_luns = 8; + saa.saa_openings = 2; + saa.saa_pool = &ecb_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index af09ede0498..bf8f7744b76 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme.c,v 1.82 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: nvme.c,v 1.83 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2014 David Gwynne <dlg@openbsd.org> @@ -363,15 +363,15 @@ nvme_attach(struct nvme_softc *sc) sc->sc_namespaces = mallocarray(sc->sc_nn + 1, sizeof(*sc->sc_namespaces), M_DEVBUF, M_WAITOK|M_ZERO); - sc->sc_link.openings = 64; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &nvme_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_buswidth = sc->sc_nn + 1; saa.saa_luns = 1; saa.saa_adapter_target = 0; + saa.saa_openings = 64; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index a5767521e1c..cd9f60cd034 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: oosiop.c,v 1.32 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: oosiop.c,v 1.33 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */ /* @@ -256,16 +256,16 @@ oosiop_attach(struct oosiop_softc *sc) sc->sc_active = 0; oosiop_write_4(sc, OOSIOP_DSP, sc->sc_scrbase + Ent_wait_reselect); - sc->sc_link.openings = 1; /* XXX */ - sc->sc_link.pool = &sc->sc_iopool; - sc->sc_link.quirks = ADEV_NODOORLOCK; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &oosiop_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_buswidth = OOSIOP_NTGT; saa.saa_adapter_target = sc->sc_id; saa.saa_luns = 8; + saa.saa_openings = 1; /* XXX */ + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = ADEV_NODOORLOCK; + saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index 14948641e30..482e583bd04 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osiop.c,v 1.60 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: osiop.c,v 1.61 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */ /* @@ -324,15 +324,15 @@ osiop_attach(sc) */ osiop_init(sc); - sc->sc_link.openings = 4; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &osiop_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_buswidth = OSIOP_NTGT; saa.saa_adapter_target = sc->sc_id; saa.saa_luns = 8; + saa.saa_openings = 4; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c index 2aa37992308..149b02f34f2 100644 --- a/sys/dev/ic/qla.c +++ b/sys/dev/ic/qla.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qla.c,v 1.66 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: qla.c,v 1.67 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2011 David Gwynne <dlg@openbsd.org> @@ -672,20 +672,6 @@ qla_attach(struct qla_softc *sc) DEVNAME(sc)); } - sc->sc_link.openings = sc->sc_maxcmds; - sc->sc_link.pool = &sc->sc_iopool; - sc->sc_link.port_wwn = sc->sc_port_name; - sc->sc_link.node_wwn = sc->sc_node_name; - if (sc->sc_link.node_wwn == 0) { - /* - * mask out the port number from the port name to get - * the node name. - */ - sc->sc_link.node_wwn = sc->sc_link.port_wwn; - sc->sc_link.node_wwn &= ~(0xfULL << 56); - } - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &qla_switch; saa.saa_adapter_softc = sc; if (sc->sc_2k_logins) { @@ -695,6 +681,19 @@ qla_attach(struct qla_softc *sc) } saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_luns = 8; + saa.saa_openings = sc->sc_maxcmds; + saa.saa_pool = &sc->sc_iopool; + saa.saa_wwpn = sc->sc_port_name; + saa.saa_wwnn = sc->sc_node_name; + if (saa.saa_wwnn == 0) { + /* + * mask out the port number from the port name to get + * the node name. + */ + saa.saa_wwnn = saa.saa_wwpn; + saa.saa_wwnn &= ~(0xfULL << 56); + } + saa.saa_quirks = saa.saa_flags = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c index 51b4290d282..feb4925c952 100644 --- a/sys/dev/ic/qlw.c +++ b/sys/dev/ic/qlw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qlw.c,v 1.43 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: qlw.c,v 1.44 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2011 David Gwynne <dlg@openbsd.org> @@ -397,12 +397,12 @@ qlw_attach(struct qlw_softc *sc) saa.saa_adapter_softc = sc; saa.saa_adapter_buswidth = QLW_MAX_TARGETS; saa.saa_luns = QLW_MAX_LUNS; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; for (bus = 0; bus < sc->sc_numbusses; bus++) { saa.saa_adapter_target = sc->sc_initiator[bus]; - sc->sc_link[bus].openings = sc->sc_max_queue_depth[bus]; - sc->sc_link[bus].pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link[bus]; + saa.saa_openings = sc->sc_max_queue_depth[bus]; sc->sc_scsibus[bus] = (struct scsibus_softc *) config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 2a2aac3dff1..551ffed6a8b 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop.c,v 1.82 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: siop.c,v 1.83 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */ /* @@ -210,15 +210,15 @@ siop_attach(sc) siop_dump_script(sc); #endif - sc->sc_c.sc_link.openings = SIOP_NTAG; - sc->sc_c.sc_link.pool = &sc->iopool; - - saa.saa_sc_link = &sc->sc_c.sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &siop_switch; saa.saa_adapter_target = sc->sc_c.sc_id; saa.saa_adapter_buswidth = (sc->sc_c.features & SF_BUS_WIDE) ? 16 : 8; saa.saa_luns = 8; + saa.saa_openings = SIOP_NTAG; + saa.saa_pool = &sc->iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found((struct device*)sc, &saa, scsiprint); } diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c index 6dad26aa42b..c0f69cfcd23 100644 --- a/sys/dev/ic/twe.c +++ b/sys/dev/ic/twe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: twe.c,v 1.56 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: twe.c,v 1.57 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved. @@ -394,15 +394,15 @@ twe_attach(sc) /* TODO: fetch & print cache params? */ - sc->sc_link.openings = TWE_MAXCMDS / nunits; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &twe_switch; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = TWE_MAX_UNITS; saa.saa_luns = 8; + saa.saa_openings = TWE_MAXCMDS / nunits; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c index 80c66e69f21..03c3ebfe05c 100644 --- a/sys/dev/ic/uha.c +++ b/sys/dev/ic/uha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uha.c,v 1.35 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: uha.c,v 1.36 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */ #undef UHADEBUG @@ -120,14 +120,14 @@ uha_attach(sc) mtx_init(&sc->sc_mscp_mtx, IPL_BIO); scsi_iopool_init(&sc->sc_iopool, sc, uha_mscp_alloc, uha_mscp_free); - sc->sc_link.openings = 2; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_scsi_dev; saa.saa_adapter = &uha_switch; saa.saa_luns = saa.saa_adapter_buswidth = 8; + saa.saa_openings = 2; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, uhaprint); } diff --git a/sys/dev/ic/wd33c93.c b/sys/dev/ic/wd33c93.c index 2a55249cbda..78035b84860 100644 --- a/sys/dev/ic/wd33c93.c +++ b/sys/dev/ic/wd33c93.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd33c93.c,v 1.17 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: wd33c93.c,v 1.18 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: wd33c93.c,v 1.24 2010/11/13 13:52:02 uebayasi Exp $ */ /* @@ -202,15 +202,15 @@ wd33c93_attach(struct wd33c93_softc *sc, struct scsi_adapter *adapter) printf("\n"); } - sc->sc_link.openings = 2; - sc->sc_link.pool = &wd33c93_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_id; saa.saa_adapter_buswidth = SBIC_NTARG; saa.saa_adapter = adapter; saa.saa_luns = SBIC_NLUN; + saa.saa_openings = 2; + saa.saa_pool = &wd33c93_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); timeout_add_sec(&sc->sc_watchdog, 60); diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index 57987caf342..09565797ae5 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wds.c,v 1.53 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: wds.c,v 1.54 2020/07/20 14:41:13 krw Exp $ */ /* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */ #undef WDSDIAG @@ -287,14 +287,14 @@ wdsattach(struct device *parent, struct device *self, void *aux) /* XXX */ /* I don't think the -ASE can handle openings > 1. */ /* It gives Vendor Error 26 whenever I try it. */ - sc->sc_link.openings = 1; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_scsi_dev; saa.saa_adapter = &wds_switch; saa.saa_luns = saa.saa_adapter_buswidth = 8; + saa.saa_openings = 1; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(self, &saa, wdsprint); } diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c index b62e906d7bf..f80a9605ca3 100644 --- a/sys/dev/pci/arc.c +++ b/sys/dev/pci/arc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc.c,v 1.116 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: arc.c,v 1.117 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2006 David Gwynne <dlg@openbsd.org> @@ -801,15 +801,15 @@ arc_attach(struct device *parent, struct device *self, void *aux) goto unmap_pci; } - sc->sc_link.openings = sc->sc_req_count; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &arc_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = ARC_MAX_TARGET; saa.saa_luns = 8; + saa.saa_openings = sc->sc_req_count; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(self, &saa, scsiprint); diff --git a/sys/dev/pci/iha_pci.c b/sys/dev/pci/iha_pci.c index f01a374cdf4..d1f37bc3091 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.17 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: iha_pci.c,v 1.18 2020/07/20 14:41:13 krw Exp $ */ /*------------------------------------------------------------------------- * * Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller. @@ -134,15 +134,15 @@ iha_pci_attach(parent, self, aux) printf(": %s\n", intrstr); if (iha_init_tulip(sc) == 0) { - sc->sc_link.openings = 4; /* # xs's allowed per device */ - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &iha_switch; saa.saa_adapter_target = sc->sc_id; saa.saa_adapter_buswidth = sc->sc_maxtargets; saa.saa_luns = 8; + saa.saa_openings = 4; /* # xs's allowed per device */ + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_dev, &saa, scsiprint); } diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c index 7fcf00d96c4..1cae0d6d7ce 100644 --- a/sys/dev/pci/ips.c +++ b/sys/dev/pci/ips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ips.c,v 1.124 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: ips.c,v 1.125 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org> @@ -718,16 +718,18 @@ ips_attach(struct device *parent, struct device *self, void *aux) (sc->sc_nunits == 1 ? "" : "s")); printf("\n"); - if (sc->sc_nunits > 0) - sc->sc_scsi_link.openings = sc->sc_nccbs / sc->sc_nunits; - sc->sc_scsi_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_scsi_link; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = sc->sc_nunits; saa.saa_adapter = &ips_switch; saa.saa_adapter_softc = sc; saa.saa_luns = 8; + if (sc->sc_nunits > 0) + saa.saa_openings = sc->sc_nccbs / sc->sc_nunits; + else + saa.saa_openings = 0; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(self, &saa, scsiprint); @@ -735,7 +737,6 @@ ips_attach(struct device *parent, struct device *self, void *aux) /* For each channel attach SCSI pass-through bus */ for (i = 0; i < IPS_MAXCHANS; i++) { struct ips_pt *pt; - struct scsi_link *link; int target, lastarget; pt = &sc->sc_pt[i]; @@ -762,16 +763,15 @@ ips_attach(struct device *parent, struct device *self, void *aux) if (lastarget == -1) continue; - link = &pt->pt_link; - link->openings = 1; - link->pool = &sc->sc_iopool; - - saa.saa_sc_link = link; saa.saa_adapter = &ips_pt_switch; saa.saa_adapter_softc = pt; saa.saa_adapter_buswidth = lastarget + 1; saa.saa_adapter_target = IPS_MAXTARGETS; saa.saa_luns = 8; + saa.saa_openings = 1; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(self, &saa, scsiprint); } diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index 054edaf6c41..b63b840b16b 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.78 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: mfii.c,v 1.79 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2012 David Gwynne <dlg@openbsd.org> @@ -781,15 +781,15 @@ mfii_attach(struct device *parent, struct device *self, void *aux) if (sc->sc_ih == NULL) goto free_sgl; - sc->sc_link.openings = sc->sc_max_cmds; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &mfii_switch; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = sc->sc_info.mci_max_lds; saa.saa_luns = 8; + saa.saa_openings = sc->sc_max_cmds; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); @@ -908,7 +908,6 @@ int mfii_syspd(struct mfii_softc *sc) { struct scsibus_attach_args saa; - struct scsi_link *link; sc->sc_pd = malloc(sizeof(*sc->sc_pd), M_DEVBUF, M_WAITOK|M_ZERO); if (sc->sc_pd == NULL) @@ -917,16 +916,15 @@ mfii_syspd(struct mfii_softc *sc) if (mfii_dev_handles_update(sc) != 0) goto free_pdsc; - link = &sc->sc_pd->pd_link; - link->openings = sc->sc_max_cmds - 1; - link->pool = &sc->sc_iopool; - - saa.saa_sc_link = link; saa.saa_adapter = &mfii_pd_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_buswidth = MFI_MAX_PD; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_luns = 8; + saa.saa_openings = sc->sc_max_cmds - 1; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_pd->pd_scsibus = (struct scsibus_softc *) config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index 714cc2436b7..5ea23509e20 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpii.c,v 1.136 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: mpii.c,v 1.137 2020/07/20 14:41:13 krw Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov * Copyright (c) 2009 James Giannoules @@ -590,15 +590,15 @@ mpii_attach(struct device *parent, struct device *self, void *aux) sc->sc_pending = 1; config_pending_incr(); - sc->sc_link.openings = sc->sc_max_cmds - 1; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &mpii_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = sc->sc_max_devices; saa.saa_luns = 1; + saa.saa_openings = sc->sc_max_cmds - 1; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *) config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c index 65669ecd537..e39f6dd3cc6 100644 --- a/sys/dev/pci/qle.c +++ b/sys/dev/pci/qle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qle.c,v 1.58 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: qle.c,v 1.59 2020/07/20 14:41:14 krw Exp $ */ /* * Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org> @@ -654,30 +654,29 @@ qle_attach(struct device *parent, struct device *self, void *aux) DEVNAME(sc)); } - sc->sc_link.openings = sc->sc_maxcmds; - sc->sc_link.pool = &sc->sc_iopool; + saa.saa_adapter = &qle_switch; + saa.saa_adapter_softc = sc; + saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; + saa.saa_adapter_buswidth = QLE_MAX_TARGETS; + saa.saa_luns = 8; + saa.saa_openings = sc->sc_maxcmds; + saa.saa_pool = &sc->sc_iopool; if (sc->sc_nvram_valid) { - sc->sc_link.port_wwn = betoh64(sc->sc_nvram.port_name); - sc->sc_link.node_wwn = betoh64(sc->sc_nvram.node_name); + saa.saa_wwpn = betoh64(sc->sc_nvram.port_name); + saa.saa_wwnn = betoh64(sc->sc_nvram.node_name); } else { - sc->sc_link.port_wwn = QLE_DEFAULT_PORT_NAME; - sc->sc_link.node_wwn = 0; + saa.saa_wwpn = QLE_DEFAULT_PORT_NAME; + saa.saa_wwnn = 0; } - if (sc->sc_link.node_wwn == 0) { + if (saa.saa_wwnn == 0) { /* * mask out the port number from the port name to get * the node name. */ - sc->sc_link.node_wwn = sc->sc_link.port_wwn; - sc->sc_link.node_wwn &= ~(0xfULL << 56); + saa.saa_wwnn = saa.saa_wwpn; + saa.saa_wwnn &= ~(0xfULL << 56); } - - saa.saa_sc_link = &sc->sc_link; - saa.saa_adapter = &qle_switch; - saa.saa_adapter_softc = sc; - saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; - saa.saa_adapter_buswidth = QLE_MAX_TARGETS; - saa.saa_luns = 8; + saa.saa_quirks = saa.saa_flags = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/pci/trm_pci.c b/sys/dev/pci/trm_pci.c index fbb991a759e..cc0830e7241 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.9 2020/07/19 18:57:58 krw Exp $ +/* $OpenBSD: trm_pci.c,v 1.10 2020/07/20 14:41:14 krw Exp $ * ------------------------------------------------------------ * O.S : OpenBSD * FILE NAME : trm_pci.c @@ -161,15 +161,15 @@ trm_pci_attach(struct device *parent, struct device *self, void *aux) if (intrstr != NULL) printf(": %s\n", intrstr); - sc->sc_link.openings = 30; /* So TagMask (32 bit integer) always has space */ - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter_target = sc->sc_AdaptSCSIID; saa.saa_adapter = &trm_switch; saa.saa_adapter_buswidth = ((sc->sc_config & HCC_WIDE_CARD) == 0) ? 8:16; saa.saa_luns = 8; + saa.saa_openings = 30; /* So TagMask (32 bit integer) always has space */ + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(&sc->sc_device, &saa, scsiprint); } diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c index 5f9ad29a67d..5a7ff19f09c 100644 --- a/sys/dev/pci/vmwpvs.c +++ b/sys/dev/pci/vmwpvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmwpvs.c,v 1.21 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: vmwpvs.c,v 1.22 2020/07/20 14:41:14 krw Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -558,15 +558,15 @@ vmwpvs_attach(struct device *parent, struct device *self, void *aux) scsi_iopool_init(&sc->sc_iopool, sc, vmwpvs_ccb_get, vmwpvs_ccb_put); - sc->sc_link.openings = VMWPVS_OPENINGS; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &vmwpvs_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = sc->sc_bus_width; saa.saa_luns = 8; + saa.saa_openings = VMWPVS_OPENINGS; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/pv/hvs.c b/sys/dev/pv/hvs.c index 98c789bf98b..b1c74040666 100644 --- a/sys/dev/pv/hvs.c +++ b/sys/dev/pv/hvs.c @@ -308,15 +308,15 @@ hvs_attach(struct device *parent, struct device *self, void *aux) task_set(&sc->sc_probetask, hvs_scsi_probe, sc); - sc->sc_link.openings = sc->sc_nccb; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &hvs_switch; saa.saa_adapter_softc = self; saa.saa_luns = sc->sc_flags & HVSF_SCSI ? 64 : 1; saa.saa_adapter_buswidth = 2; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; + saa.saa_openings = sc->sc_nccb; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = config_found(self, &saa, scsiprint); diff --git a/sys/dev/pv/vioblk.c b/sys/dev/pv/vioblk.c index 17521d1e2f1..f177c9a395e 100644 --- a/sys/dev/pv/vioblk.c +++ b/sys/dev/pv/vioblk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioblk.c,v 1.24 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: vioblk.c,v 1.25 2020/07/20 14:41:14 krw Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch. @@ -238,17 +238,19 @@ vioblk_attach(struct device *parent, struct device *self, void *aux) DNPRINTF(1, "%s: qsize: %d\n", __func__, qsize); printf("\n"); - sc->sc_link.openings = sc->sc_nreqs; - sc->sc_link.pool = &sc->sc_iopool; - if (virtio_has_feature(vsc, VIRTIO_BLK_F_RO)) - sc->sc_link.flags |= SDEV_READONLY; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &vioblk_switch; saa.saa_adapter_softc = self; saa.saa_adapter_buswidth = 1; saa.saa_luns = 1; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; + saa.saa_openings = sc->sc_nreqs; + saa.saa_pool = &sc->sc_iopool; + if (virtio_has_feature(vsc, VIRTIO_BLK_F_RO)) + saa.saa_flags = SDEV_READONLY; + else + saa.saa_flags = 0; + saa.saa_quirks = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(self, &saa, scsiprint); diff --git a/sys/dev/pv/vioscsi.c b/sys/dev/pv/vioscsi.c index 7ad3e7a866a..d4ad1e3e59b 100644 --- a/sys/dev/pv/vioscsi.c +++ b/sys/dev/pv/vioscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioscsi.c,v 1.23 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: vioscsi.c,v 1.24 2020/07/20 14:41:14 krw Exp $ */ /* * Copyright (c) 2013 Google Inc. * @@ -159,15 +159,15 @@ vioscsi_attach(struct device *parent, struct device *self, void *aux) goto err; } - sc->sc_link.openings = (nreqs > cmd_per_lun) ? cmd_per_lun : nreqs; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &vioscsi_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = max_target; saa.saa_luns = 8; + saa.saa_openings = (nreqs > cmd_per_lun) ? cmd_per_lun : nreqs; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; config_found(self, &saa, scsiprint); return; diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 53c06ef7545..f47533afd3f 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.42 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: xbf.c,v 1.43 2020/07/20 14:41:14 krw Exp $ */ /* * Copyright (c) 2016, 2017 Mike Belopuhov @@ -300,15 +300,15 @@ xbf_attach(struct device *parent, struct device *self, void *aux) goto error; } - sc->sc_link.openings = sc->sc_nccb; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &xbf_switch; saa.saa_adapter_softc = self; saa.saa_adapter_buswidth = 1; saa.saa_luns = 1; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; + saa.saa_openings = sc->sc_nccb; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = config_found(self, &saa, scsiprint); diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c index f579f52a96e..76d1c7f1957 100644 --- a/sys/dev/sdmmc/sdmmc_scsi.c +++ b/sys/dev/sdmmc/sdmmc_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmc_scsi.c,v 1.50 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: sdmmc_scsi.c,v 1.51 2020/07/20 14:41:14 krw Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -137,16 +137,16 @@ sdmmc_scsi_attach(struct sdmmc_softc *sc) sc->sc_scsibus = scbus; - scbus->sc_link.openings = 1; - scbus->sc_link.pool = &scbus->sc_iopool; - bzero(&saa, sizeof(saa)); - saa.saa.saa_sc_link = &scbus->sc_link; saa.saa.saa_adapter_target = SDMMC_SCSIID_HOST; saa.saa.saa_adapter_buswidth = scbus->sc_ntargets; saa.saa.saa_adapter_softc = sc; saa.saa.saa_luns = 1; saa.saa.saa_adapter = &sdmmc_switch; + saa.saa.saa_openings = 1; + saa.saa.saa_pool = &scbus->sc_iopool; + saa.saa.saa_quirks = saa.saa.saa_flags = 0; + saa.saa.saa_wwpn = saa.saa.saa_wwnn = 0; scbus->sc_child = config_found(&sc->sc_dev, &saa, scsiprint); if (scbus->sc_child == NULL) { diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index a42c676e2f6..893fb4838a9 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.409 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.410 2020/07/20 14:41:12 krw Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -1802,12 +1802,15 @@ sr_attach(struct device *parent, struct device *self, void *aux) printf("\n"); - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter_softc = sc; saa.saa_adapter = &sr_switch; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = SR_MAX_LD; saa.saa_luns = 1; + saa.saa_openings = 0; + saa.saa_pool = NULL; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c index 4cacccf90d5..de85138e602 100644 --- a/sys/dev/usb/umass_scsi.c +++ b/sys/dev/usb/umass_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass_scsi.c,v 1.56 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: umass_scsi.c,v 1.57 2020/07/20 14:41:14 krw Exp $ */ /* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -109,17 +109,16 @@ umass_scsi_attach(struct umass_softc *sc) scsi_iopool_init(&scbus->sc_iopool, scbus, umass_io_get, umass_io_put); - scbus->sc_link.openings = 1; - scbus->sc_link.quirks = SDEV_ONLYBIG | sc->sc_busquirks; - scbus->sc_link.pool = &scbus->sc_iopool; - scbus->sc_link.flags = flags; - - saa.saa_sc_link = &scbus->sc_link; saa.saa_adapter_buswidth = 2; saa.saa_adapter = &umass_scsi_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_target = UMASS_SCSIID_HOST; saa.saa_luns = sc->maxlun + 1; + saa.saa_openings = 1; + saa.saa_quirks = SDEV_ONLYBIG | sc->sc_busquirks; + saa.saa_pool = &scbus->sc_iopool; + saa.saa_flags = flags; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_refcnt++; scbus->sc_child = config_found((struct device *)sc, &saa, scsiprint); diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c index 6ed16e46550..5b8faa11a0d 100644 --- a/sys/dev/vscsi.c +++ b/sys/dev/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.54 2020/07/19 18:57:57 krw Exp $ */ +/* $OpenBSD: vscsi.c,v 1.55 2020/07/20 14:41:12 krw Exp $ */ /* * Copyright (c) 2008 David Gwynne <dlg@openbsd.org> @@ -145,15 +145,15 @@ vscsi_attach(struct device *parent, struct device *self, void *aux) rw_init(&sc->sc_ioc_lock, "vscsiioc"); scsi_iopool_init(&sc->sc_iopool, sc, vscsi_ccb_get, vscsi_ccb_put); - sc->sc_link.openings = 16; - sc->sc_link.pool = &sc->sc_iopool; - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &vscsi_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = 256; saa.saa_luns = 8; + saa.saa_openings = 16; + saa.saa_pool = &sc->sc_iopool; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c index 489e249d202..68676524f69 100644 --- a/sys/scsi/mpath.c +++ b/sys/scsi/mpath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpath.c,v 1.51 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: mpath.c,v 1.52 2020/07/20 14:41:14 krw Exp $ */ /* * Copyright (c) 2009 David Gwynne <dlg@openbsd.org> @@ -119,14 +119,15 @@ mpath_attach(struct device *parent, struct device *self, void *aux) printf("\n"); - sc->sc_link.openings = 1024; /* XXX magical */ - - saa.saa_sc_link = &sc->sc_link; saa.saa_adapter = &mpath_switch; saa.saa_adapter_softc = sc; saa.saa_adapter_target = SDEV_NO_ADAPTER_TARGET; saa.saa_adapter_buswidth = MPATH_BUSWIDTH; saa.saa_luns = 1; + saa.saa_openings = 1024; /* XXX magical */ + saa.saa_pool = NULL; + saa.saa_quirks = saa.saa_flags = 0; + saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_scsibus = (struct scsibus_softc *)config_found(&sc->sc_dev, &saa, scsiprint); diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index e4a28aa0827..6df780c8940 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.228 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.229 2020/07/20 14:41:14 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -143,10 +143,10 @@ scsibusattach(struct device *parent, struct device *self, void *aux) SLIST_INIT(&sb->sc_link_list); sb->sb_adapter_softc = saa->saa_adapter_softc; sb->sb_adapter = saa->saa_adapter; - sb->sb_pool = saa->saa_sc_link->pool; - sb->sb_quirks = saa->saa_sc_link->quirks; - sb->sb_flags = saa->saa_sc_link->flags; - sb->sb_openings = saa->saa_sc_link->openings; + sb->sb_pool = saa->saa_pool; + sb->sb_quirks = saa->saa_quirks; + sb->sb_flags = saa->saa_flags; + sb->sb_openings = saa->saa_openings; sb->sb_adapter_buswidth = saa->saa_adapter_buswidth; sb->sb_adapter_target = saa->saa_adapter_target; sb->sb_luns = saa->saa_luns; @@ -159,11 +159,9 @@ scsibusattach(struct device *parent, struct device *self, void *aux) printf(": %d targets", sb->sb_adapter_buswidth); if (sb->sb_adapter_target < sb->sb_adapter_buswidth) printf(", initiator %d", sb->sb_adapter_target); - if (saa->saa_sc_link->port_wwn != 0x0 && - saa->saa_sc_link->node_wwn != 0x0) { - printf(", WWPN %016llx, WWNN %016llx", - saa->saa_sc_link->port_wwn, - saa->saa_sc_link->node_wwn); + if (saa->saa_wwpn != 0x0 && saa->saa_wwnn != 0x0) { + printf(", WWPN %016llx, WWNN %016llx", saa->saa_wwpn, + saa->saa_wwnn); } printf("\n"); diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 73c3169e000..a9c3b902339 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.192 2020/07/19 18:57:58 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.193 2020/07/20 14:41:14 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -339,9 +339,14 @@ struct scsi_inquiry_pattern { }; struct scsibus_attach_args { - struct scsi_link *saa_sc_link; struct scsi_adapter *saa_adapter; void *saa_adapter_softc; + struct scsi_iopool *saa_pool; + u_int64_t saa_wwpn; + u_int64_t saa_wwnn; + u_int16_t saa_quirks; + u_int16_t saa_flags; + u_int16_t saa_openings; u_int16_t saa_adapter_target; #define SDEV_NO_ADAPTER_TARGET 0xffff u_int16_t saa_adapter_buswidth; |