summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-06-24 18:59:31 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-06-24 18:59:31 +0000
commitd4a9a79b9dc90e251efad41e80fece016e61e5a7 (patch)
tree3322a878bbe1997fca616eacea1a61efdc62ac31 /sys
parent04a06dd7185ce35e9619627a6d1cd6b6bd767915 (diff)
Use SDEV_NO_ADAPTER_TARGET instead of the value that is being
aassigned to adapter_buswidth to indicate the adapter is not a target on the bus. ok dlg@ as part of a larger diff.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/atascsi.c4
-rw-r--r--sys/dev/ic/aac.c4
-rw-r--r--sys/dev/ic/ami.c6
-rw-r--r--sys/dev/ic/cac.c4
-rw-r--r--sys/dev/ic/ciss.c4
-rw-r--r--sys/dev/ic/twe.c4
-rw-r--r--sys/dev/pci/arc.c4
-rw-r--r--sys/dev/pci/ips.c4
-rw-r--r--sys/dev/pci/mfii.c4
-rw-r--r--sys/dev/pci/qle.c4
-rw-r--r--sys/dev/pv/hvs.c2
-rw-r--r--sys/dev/pv/vioscsi.c4
-rw-r--r--sys/dev/softraid.c4
-rw-r--r--sys/dev/vscsi.c4
-rw-r--r--sys/scsi/mpath.c4
15 files changed, 30 insertions, 30 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index 645c81249f2..c4d83f0a1c0 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.133 2020/02/05 16:29:29 krw Exp $ */
+/* $OpenBSD: atascsi.c,v 1.134 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -184,7 +184,7 @@ atascsi_attach(struct device *self, struct atascsi_attach_args *aaa)
as->as_link.adapter_softc = as;
as->as_link.adapter_buswidth = aaa->aaa_nports;
as->as_link.luns = SATA_PMP_MAX_PORTS;
- as->as_link.adapter_target = aaa->aaa_nports;
+ as->as_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
as->as_link.openings = 1;
as->as_host_ports = mallocarray(aaa->aaa_nports,
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index 8cceb1e81ce..529b1c70dac 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.76 2020/02/18 16:05:56 krw Exp $ */
+/* $OpenBSD: aac.c,v 1.77 2020/06/24 18:59:30 krw Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -272,7 +272,7 @@ aac_attach(struct aac_softc *sc)
sc->aac_link.openings = (sc->total_fibs - 8) /
(sc->aac_container_count ? sc->aac_container_count : 1);
sc->aac_link.adapter_buswidth = AAC_MAX_CONTAINERS;
- sc->aac_link.adapter_target = AAC_MAX_CONTAINERS;
+ sc->aac_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->aac_link.pool = &sc->aac_iopool;
bzero(&saa, sizeof(saa));
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 6e655074757..4430e2afbf7 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.241 2020/02/15 18:02:00 krw Exp $ */
+/* $OpenBSD: ami.c,v 1.242 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -519,7 +519,7 @@ ami_attach(struct ami_softc *sc)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &ami_switch;
- sc->sc_link.adapter_target = sc->sc_maxunits;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = sc->sc_maxunits;
sc->sc_link.pool = &sc->sc_iopool;
@@ -586,7 +586,7 @@ ami_attach(struct ami_softc *sc)
rsc->sc_link.adapter = &ami_raw_switch;
rsc->sc_proctarget = -1;
/* TODO fetch it from the controller */
- rsc->sc_link.adapter_target = 16;
+ rsc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
rsc->sc_link.adapter_buswidth = 16;
rsc->sc_link.pool = &sc->sc_iopool;
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 51d6a21701f..0fd85c90076 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.59 2020/02/15 18:02:00 krw Exp $ */
+/* $OpenBSD: cac.c,v 1.60 2020/06/24 18:59:30 krw Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -238,7 +238,7 @@ cac_init(struct cac_softc *sc, int startfw)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &cac_switch;
- sc->sc_link.adapter_target = cinfo.num_drvs;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = cinfo.num_drvs;
sc->sc_link.openings = CAC_MAX_CCBS / sc->sc_nunits;
if (sc->sc_link.openings < 4 )
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index 522ea1a4aaa..529f8bd6dba 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.81 2020/02/13 15:11:32 krw Exp $ */
+/* $OpenBSD: ciss.c,v 1.82 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -357,7 +357,7 @@ ciss_attach(struct ciss_softc *sc)
sc->sc_link.openings = sc->maxcmd;
sc->sc_link.adapter = &ciss_switch;
sc->sc_link.luns = 1;
- sc->sc_link.adapter_target = sc->maxunits;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = sc->maxunits;
sc->sc_link.pool = &sc->sc_iopool;
bzero(&saa, sizeof(saa));
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index 6b6a8a6f30a..ad17f0b33d3 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.51 2020/02/15 18:02:00 krw Exp $ */
+/* $OpenBSD: twe.c,v 1.52 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -396,7 +396,7 @@ twe_attach(sc)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &twe_switch;
- sc->sc_link.adapter_target = TWE_MAX_UNITS;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.openings = TWE_MAXCMDS / nunits;
sc->sc_link.adapter_buswidth = TWE_MAX_UNITS;
sc->sc_link.pool = &sc->sc_iopool;
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c
index d297d601560..6f8ec1bf70e 100644
--- a/sys/dev/pci/arc.c
+++ b/sys/dev/pci/arc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc.c,v 1.110 2020/02/13 15:11:32 krw Exp $ */
+/* $OpenBSD: arc.c,v 1.111 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -804,7 +804,7 @@ arc_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.adapter = &arc_switch;
sc->sc_link.adapter_softc = sc;
- sc->sc_link.adapter_target = ARC_MAX_TARGET;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = ARC_MAX_TARGET;
sc->sc_link.openings = sc->sc_req_count;
sc->sc_link.pool = &sc->sc_iopool;
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index a448f0d17f3..cbcb06c8213 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.118 2020/02/19 01:31:38 cheloha Exp $ */
+/* $OpenBSD: ips.c,v 1.119 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -721,7 +721,7 @@ ips_attach(struct device *parent, struct device *self, void *aux)
/* Attach SCSI bus */
if (sc->sc_nunits > 0)
sc->sc_scsi_link.openings = sc->sc_nccbs / sc->sc_nunits;
- sc->sc_scsi_link.adapter_target = sc->sc_nunits;
+ sc->sc_scsi_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_scsi_link.adapter_buswidth = sc->sc_nunits;
sc->sc_scsi_link.adapter = &ips_switch;
sc->sc_scsi_link.adapter_softc = sc;
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c
index 2920d7cd9b3..6c399712763 100644
--- a/sys/dev/pci/mfii.c
+++ b/sys/dev/pci/mfii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfii.c,v 1.69 2020/06/24 18:33:50 krw Exp $ */
+/* $OpenBSD: mfii.c,v 1.70 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@openbsd.org>
@@ -784,7 +784,7 @@ mfii_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.openings = sc->sc_max_cmds;
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &mfii_switch;
- sc->sc_link.adapter_target = sc->sc_info.mci_max_lds;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = sc->sc_info.mci_max_lds;
sc->sc_link.pool = &sc->sc_iopool;
diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c
index 383ff3d504d..ea2dba1074a 100644
--- a/sys/dev/pci/qle.c
+++ b/sys/dev/pci/qle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qle.c,v 1.52 2020/03/25 05:30:18 jmatthew Exp $ */
+/* $OpenBSD: qle.c,v 1.53 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
@@ -657,7 +657,7 @@ qle_attach(struct device *parent, struct device *self, void *aux)
/* we should be good to go now, attach scsibus */
sc->sc_link.adapter = &qle_switch;
sc->sc_link.adapter_softc = sc;
- sc->sc_link.adapter_target = QLE_MAX_TARGETS;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = QLE_MAX_TARGETS;
sc->sc_link.openings = sc->sc_maxcmds;
sc->sc_link.pool = &sc->sc_iopool;
diff --git a/sys/dev/pv/hvs.c b/sys/dev/pv/hvs.c
index b9b6bc5b5d7..02487c3b77e 100644
--- a/sys/dev/pv/hvs.c
+++ b/sys/dev/pv/hvs.c
@@ -312,7 +312,7 @@ hvs_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.adapter_softc = self;
sc->sc_link.luns = sc->sc_flags & HVSF_SCSI ? 64 : 1;
sc->sc_link.adapter_buswidth = 2;
- sc->sc_link.adapter_target = 2;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.openings = sc->sc_nccb;
sc->sc_link.pool = &sc->sc_iopool;
diff --git a/sys/dev/pv/vioscsi.c b/sys/dev/pv/vioscsi.c
index 08345c330cb..955657cd806 100644
--- a/sys/dev/pv/vioscsi.c
+++ b/sys/dev/pv/vioscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vioscsi.c,v 1.16 2020/02/14 15:56:47 krw Exp $ */
+/* $OpenBSD: vioscsi.c,v 1.17 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2013 Google Inc.
*
@@ -163,7 +163,7 @@ vioscsi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.adapter = &vioscsi_switch;
sc->sc_link.adapter_softc = sc;
- sc->sc_link.adapter_target = max_target;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = max_target;
sc->sc_link.pool = &sc->sc_iopool;
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 95b7ddd57b4..ed03a5536c2 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.402 2020/06/08 19:17:12 kn Exp $ */
+/* $OpenBSD: softraid.c,v 1.403 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -1804,7 +1804,7 @@ sr_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.adapter_softc = sc;
sc->sc_link.adapter = &sr_switch;
- sc->sc_link.adapter_target = SR_MAX_LD;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = SR_MAX_LD;
sc->sc_link.luns = 1;
diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c
index 59e39cdee42..de391e61c25 100644
--- a/sys/dev/vscsi.c
+++ b/sys/dev/vscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscsi.c,v 1.49 2020/04/07 13:27:51 visa Exp $ */
+/* $OpenBSD: vscsi.c,v 1.50 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2008 David Gwynne <dlg@openbsd.org>
@@ -147,7 +147,7 @@ vscsi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.adapter = &vscsi_switch;
sc->sc_link.adapter_softc = sc;
- sc->sc_link.adapter_target = 256;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = 256;
sc->sc_link.openings = 16;
sc->sc_link.pool = &sc->sc_iopool;
diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c
index b6d82649c1c..81e5903d0a4 100644
--- a/sys/scsi/mpath.c
+++ b/sys/scsi/mpath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpath.c,v 1.47 2020/02/05 21:50:41 krw Exp $ */
+/* $OpenBSD: mpath.c,v 1.48 2020/06/24 18:59:30 krw Exp $ */
/*
* Copyright (c) 2009 David Gwynne <dlg@openbsd.org>
@@ -121,7 +121,7 @@ mpath_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.adapter = &mpath_switch;
sc->sc_link.adapter_softc = sc;
- sc->sc_link.adapter_target = MPATH_BUSWIDTH;
+ sc->sc_link.adapter_target = SDEV_NO_ADAPTER_TARGET;
sc->sc_link.adapter_buswidth = MPATH_BUSWIDTH;
sc->sc_link.luns = 1;
sc->sc_link.openings = 1024; /* XXX magical */