summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2020-06-24 01:35:29 +0000
committerkrw <krw@openbsd.org>2020-06-24 01:35:29 +0000
commit3c596f75c288e642ccc572cf7f3a83874dc43a68 (patch)
tree20f42061fc1c8258a169a8d1b439f0f9c2aa4123 /sys
parentremove ifdeffed out code for redistributing pyro eq interrupts over cpus. (diff)
downloadwireguard-openbsd-3c596f75c288e642ccc572cf7f3a83874dc43a68.tar.xz
wireguard-openbsd-3c596f75c288e642ccc572cf7f3a83874dc43a68.zip
Nuke some pointless *_dev_probe() and *_dev_free() functions and
set/trust the scsiconf.c probing limits. Same as was done to vioblk(4). ok dlg@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/qlw.c15
-rw-r--r--sys/dev/pv/xbf.c19
2 files changed, 8 insertions, 26 deletions
diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c
index 8c1304f5acd..8ba910ff959 100644
--- a/sys/dev/ic/qlw.c
+++ b/sys/dev/ic/qlw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qlw.c,v 1.34 2020/02/05 16:29:30 krw Exp $ */
+/* $OpenBSD: qlw.c,v 1.35 2020/06/24 01:35:29 krw Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -62,7 +62,6 @@ struct cfdriver qlw_cd = {
};
void qlw_scsi_cmd(struct scsi_xfer *);
-int qlw_scsi_probe(struct scsi_link *);
u_int16_t qlw_read(struct qlw_softc *, bus_size_t);
void qlw_write(struct qlw_softc *, bus_size_t, u_int16_t);
@@ -164,7 +163,7 @@ qlw_queue_write(struct qlw_softc *sc, bus_size_t offset, u_int16_t value)
}
struct scsi_adapter qlw_switch = {
- qlw_scsi_cmd, NULL, qlw_scsi_probe, NULL, NULL
+ qlw_scsi_cmd, NULL, NULL, NULL, NULL
};
int
@@ -400,6 +399,7 @@ qlw_attach(struct qlw_softc *sc)
sc->sc_link[bus].adapter_softc = sc;
sc->sc_link[bus].adapter_target = sc->sc_initiator[bus];
sc->sc_link[bus].adapter_buswidth = QLW_MAX_TARGETS;
+ sc->sc_link[bus].luns = QLW_MAX_LUNS;
sc->sc_link[bus].openings = sc->sc_max_queue_depth[bus];
sc->sc_link[bus].pool = &sc->sc_iopool;
@@ -787,15 +787,6 @@ qlw_intr(void *xsc)
return (1);
}
-int
-qlw_scsi_probe(struct scsi_link *link)
-{
- if (link->lun >= QLW_MAX_LUNS)
- return (EINVAL);
-
- return (0);
-}
-
void
qlw_scsi_cmd(struct scsi_xfer *xs)
{
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c
index 5ccf2023ca2..34965f404fa 100644
--- a/sys/dev/pv/xbf.c
+++ b/sys/dev/pv/xbf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbf.c,v 1.36 2020/02/12 14:08:56 krw Exp $ */
+/* $OpenBSD: xbf.c,v 1.37 2020/06/24 01:35:29 krw Exp $ */
/*
* Copyright (c) 2016, 2017 Mike Belopuhov
@@ -227,10 +227,9 @@ void xbf_scsi_cmd(struct scsi_xfer *);
int xbf_submit_cmd(struct scsi_xfer *);
int xbf_poll_cmd(struct scsi_xfer *);
void xbf_complete_cmd(struct xbf_softc *, struct xbf_ccb_queue *, int);
-int xbf_dev_probe(struct scsi_link *);
struct scsi_adapter xbf_switch = {
- xbf_scsi_cmd, NULL, xbf_dev_probe, NULL, NULL
+ xbf_scsi_cmd, NULL, NULL, NULL, NULL
};
void xbf_scsi_inq(struct scsi_xfer *);
@@ -303,9 +302,10 @@ xbf_attach(struct device *parent, struct device *self, void *aux)
sc->sc_link.adapter = &xbf_switch;
sc->sc_link.adapter_softc = self;
- sc->sc_link.adapter_buswidth = 2;
+ /* Only valid target/lun is 0/0. */
+ sc->sc_link.adapter_buswidth = 1;
sc->sc_link.luns = 1;
- sc->sc_link.adapter_target = 2;
+ sc->sc_link.adapter_target = sc->sc_link.adapter_buswidth;
sc->sc_link.openings = sc->sc_nccb;
sc->sc_link.pool = &sc->sc_iopool;
@@ -900,15 +900,6 @@ xbf_scsi_done(struct scsi_xfer *xs, int error)
}
int
-xbf_dev_probe(struct scsi_link *link)
-{
- if (link->target == 0)
- return (0);
-
- return (ENODEV);
-}
-
-int
xbf_get_type(struct xbf_softc *sc)
{
unsigned long long res;