summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2020-06-30 18:43:36 +0000
committerkrw <krw@openbsd.org>2020-06-30 18:43:36 +0000
commit0fbd355cdf1ba4ea19f7626f983b2b6f4e93e5f3 (patch)
tree7f5d4e3d3643725c79e44a14b3ea629fffcc8f9e /sys
parentGarbage collect SDEV_S_WAITING, last used in scsi_base.c r1.167 in (diff)
downloadwireguard-openbsd-0fbd355cdf1ba4ea19f7626f983b2b6f4e93e5f3.tar.xz
wireguard-openbsd-0fbd355cdf1ba4ea19f7626f983b2b6f4e93e5f3.zip
Nuke unneeded 'sa_inqbuf' member of struct scsi_attach_args. It always
points to the inquiry data contained in the struct scsi_link pointed to by the other member, sa_sc_link.
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/cd.c7
-rw-r--r--sys/scsi/ch.c9
-rw-r--r--sys/scsi/mpath_emc.c4
-rw-r--r--sys/scsi/mpath_hds.c4
-rw-r--r--sys/scsi/mpath_rdac.c4
-rw-r--r--sys/scsi/mpath_sym.c6
-rw-r--r--sys/scsi/safte.c4
-rw-r--r--sys/scsi/scsiconf.c3
-rw-r--r--sys/scsi/scsiconf.h3
-rw-r--r--sys/scsi/sd.c8
-rw-r--r--sys/scsi/ses.c4
-rw-r--r--sys/scsi/st.c6
12 files changed, 30 insertions, 32 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 4dbe81ef6c9..d3b5b33775e 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.245 2020/02/20 16:26:01 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.246 2020/06/30 18:43:36 krw Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -177,9 +177,10 @@ int
cdmatch(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
int priority;
- scsi_inqmatch(sa->sa_inqbuf, cd_patterns, nitems(cd_patterns),
+ scsi_inqmatch(inq, cd_patterns, nitems(cd_patterns),
sizeof(cd_patterns[0]), &priority);
return priority;
@@ -217,7 +218,7 @@ cdattach(struct device *parent, struct device *self, void *aux)
* Note if this device is ancient. This is used in cdminphys().
*/
if (!ISSET(link->flags, SDEV_ATAPI) &&
- SID_ANSII_REV(sa->sa_inqbuf) == SCSI_REV_0)
+ SID_ANSII_REV(&link->inqdata) == SCSI_REV_0)
SET(sc->sc_flags, CDF_ANCIENT);
printf("\n");
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c
index d3390ef7e24..610180b12b4 100644
--- a/sys/scsi/ch.c
+++ b/sys/scsi/ch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ch.c,v 1.64 2019/12/06 16:57:24 krw Exp $ */
+/* $OpenBSD: ch.c,v 1.65 2020/06/30 18:43:37 krw Exp $ */
/* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */
/*
@@ -136,10 +136,10 @@ int
chmatch(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
int priority;
- (void)scsi_inqmatch(sa->sa_inqbuf,
- ch_patterns, nitems(ch_patterns),
+ (void)scsi_inqmatch(inq, ch_patterns, nitems(ch_patterns),
sizeof(ch_patterns[0]), &priority);
return priority;
@@ -163,8 +163,7 @@ chattach(struct device *parent, struct device *self, void *aux)
/*
* Store our our device's quirks.
*/
- ch_get_quirks(sc, sa->sa_inqbuf);
-
+ ch_get_quirks(sc, &link->inqdata);
}
int
diff --git a/sys/scsi/mpath_emc.c b/sys/scsi/mpath_emc.c
index b4ddb802593..6237f5c0024 100644
--- a/sys/scsi/mpath_emc.c
+++ b/sys/scsi/mpath_emc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpath_emc.c,v 1.22 2019/08/17 15:31:41 krw Exp $ */
+/* $OpenBSD: mpath_emc.c,v 1.23 2020/06/30 18:43:37 krw Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -116,7 +116,7 @@ int
emc_match(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
- struct scsi_inquiry_data *inq = sa->sa_inqbuf;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
struct emc_device *s;
int i;
diff --git a/sys/scsi/mpath_hds.c b/sys/scsi/mpath_hds.c
index 5b6a23fe106..3662beb26ec 100644
--- a/sys/scsi/mpath_hds.c
+++ b/sys/scsi/mpath_hds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpath_hds.c,v 1.22 2019/08/17 15:31:41 krw Exp $ */
+/* $OpenBSD: mpath_hds.c,v 1.23 2020/06/30 18:43:37 krw Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -117,8 +117,8 @@ int
hds_match(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
- struct scsi_inquiry_data *inq = sa->sa_inqbuf;
struct scsi_link *link = sa->sa_sc_link;
+ struct scsi_inquiry_data *inq = &link->inqdata;
struct hds_device *s;
int i, mode;
diff --git a/sys/scsi/mpath_rdac.c b/sys/scsi/mpath_rdac.c
index 7946ddf51d3..8c5cc0352a0 100644
--- a/sys/scsi/mpath_rdac.c
+++ b/sys/scsi/mpath_rdac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpath_rdac.c,v 1.24 2019/08/17 15:31:41 krw Exp $ */
+/* $OpenBSD: mpath_rdac.c,v 1.25 2020/06/30 18:43:37 krw Exp $ */
/*
* Copyright (c) 2010 David Gwynne <dlg@openbsd.org>
@@ -178,7 +178,7 @@ int
rdac_match(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
- struct scsi_inquiry_data *inq = sa->sa_inqbuf;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
struct rdac_device *s;
int i;
diff --git a/sys/scsi/mpath_sym.c b/sys/scsi/mpath_sym.c
index f6ebec14748..11f5e224513 100644
--- a/sys/scsi/mpath_sym.c
+++ b/sys/scsi/mpath_sym.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpath_sym.c,v 1.24 2019/08/17 15:31:41 krw Exp $ */
+/* $OpenBSD: mpath_sym.c,v 1.25 2020/06/30 18:43:37 krw Exp $ */
/*
* Copyright (c) 2010 David Gwynne <dlg@openbsd.org>
@@ -104,7 +104,7 @@ int
sym_match(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
- struct scsi_inquiry_data *inq = sa->sa_inqbuf;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
struct sym_device *s;
int i;
@@ -135,7 +135,7 @@ sym_attach(struct device *parent, struct device *self, void *aux)
struct sym_softc *sc = (struct sym_softc *)self;
struct scsi_attach_args *sa = aux;
struct scsi_link *link = sa->sa_sc_link;
- struct scsi_inquiry_data *inq = sa->sa_inqbuf;
+ struct scsi_inquiry_data *inq = &link->inqdata;
const struct mpath_ops *ops = &sym_mpath_sym_ops;
struct sym_device *s;
u_int id = 0;
diff --git a/sys/scsi/safte.c b/sys/scsi/safte.c
index 29cfcf0135c..ec2ba51504f 100644
--- a/sys/scsi/safte.c
+++ b/sys/scsi/safte.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: safte.c,v 1.61 2019/12/07 14:13:49 krw Exp $ */
+/* $OpenBSD: safte.c,v 1.62 2020/06/30 18:43:37 krw Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -110,7 +110,7 @@ safte_match(struct device *parent, void *match, void *aux)
{
struct scsi_inquiry_data *inqbuf;
struct scsi_attach_args *sa = aux;
- struct scsi_inquiry_data *inq = sa->sa_inqbuf;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
struct scsi_xfer *xs;
struct safte_inq *si;
int error, flags = 0, length;
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 1c368b93c65..812a22d2091 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.223 2020/02/05 16:29:30 krw Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.224 2020/06/30 18:43:37 krw Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -1013,7 +1013,6 @@ scsi_probedev(struct scsibus_softc *sb, int target, int lun, int dumbscan)
SET(link->flags, SDEV_REMOVABLE);
sa.sa_sc_link = link;
- sa.sa_inqbuf = &link->inqdata;
if ((cf = config_search(scsibussubmatch, (struct device *)sb,
&sa)) == 0) {
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 788c0cc39b9..64b7f771776 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.188 2020/06/30 18:05:02 krw Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.189 2020/06/30 18:43:37 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -369,7 +369,6 @@ struct scsibus_softc {
*/
struct scsi_attach_args {
struct scsi_link *sa_sc_link;
- struct scsi_inquiry_data *sa_inqbuf;
};
/*
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index eab07c55431..19acb5e05d7 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.311 2020/03/10 02:01:21 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.312 2020/06/30 18:43:37 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -139,10 +139,10 @@ int
sdmatch(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
int priority;
- (void)scsi_inqmatch(sa->sa_inqbuf,
- sd_patterns, nitems(sd_patterns),
+ (void)scsi_inqmatch(inq, sd_patterns, nitems(sd_patterns),
sizeof(sd_patterns[0]), &priority);
return priority;
@@ -186,7 +186,7 @@ sdattach(struct device *parent, struct device *self, void *aux)
* Note if this device is ancient. This is used in sdminphys().
*/
if (!ISSET(link->flags, SDEV_ATAPI) &&
- SID_ANSII_REV(sa->sa_inqbuf) == SCSI_REV_0)
+ SID_ANSII_REV(&link->inqdata) == SCSI_REV_0)
SET(sc->flags, SDF_ANCIENT);
/*
diff --git a/sys/scsi/ses.c b/sys/scsi/ses.c
index c549eda011d..c483534313a 100644
--- a/sys/scsi/ses.c
+++ b/sys/scsi/ses.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ses.c,v 1.60 2019/12/07 13:03:57 krw Exp $ */
+/* $OpenBSD: ses.c,v 1.61 2020/06/30 18:43:37 krw Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -123,7 +123,7 @@ int
ses_match(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
- struct scsi_inquiry_data *inq = sa->sa_inqbuf;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
if (inq == NULL)
return 0;
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 96e3232e25e..b7b87273a1f 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.177 2020/02/20 16:26:02 krw Exp $ */
+/* $OpenBSD: st.c,v 1.178 2020/06/30 18:43:37 krw Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
@@ -247,10 +247,10 @@ int
stmatch(struct device *parent, void *match, void *aux)
{
struct scsi_attach_args *sa = aux;
+ struct scsi_inquiry_data *inq = &sa->sa_sc_link->inqdata;
int priority;
- (void)scsi_inqmatch(sa->sa_inqbuf,
- st_patterns, nitems(st_patterns),
+ (void)scsi_inqmatch(inq, st_patterns, nitems(st_patterns),
sizeof(st_patterns[0]), &priority);
return priority;
}