summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2020-07-16 21:18:29 +0000
committerkrw <krw@openbsd.org>2020-07-16 21:18:29 +0000
commit0b29cb4020a3de4d8480e4513c9bfc6c5e645518 (patch)
treeae61d0f55f0163b5d8d10e04bef1809895b7be3e /sys/dev/pci
parentMake lazy binding work. (diff)
downloadwireguard-openbsd-0b29cb4020a3de4d8480e4513c9bfc6c5e645518.tar.xz
wireguard-openbsd-0b29cb4020a3de4d8480e4513c9bfc6c5e645518.zip
Access adapter softc via link->bus->sb_adapter_softc.
In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth' via sb_adapter_buswidth. Removes last post-config uses of the copies of bus related information in scsi_link.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/arc.c4
-rw-r--r--sys/dev/pci/ips.c8
-rw-r--r--sys/dev/pci/mfii.c14
-rw-r--r--sys/dev/pci/mpii.c10
-rw-r--r--sys/dev/pci/qle.c6
-rw-r--r--sys/dev/pci/vmwpvs.c4
6 files changed, 23 insertions, 23 deletions
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c
index 10bc20da0f9..bbc787bc669 100644
--- a/sys/dev/pci/arc.c
+++ b/sys/dev/pci/arc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc.c,v 1.114 2020/07/12 11:28:55 krw Exp $ */
+/* $OpenBSD: arc.c,v 1.115 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -1117,7 +1117,7 @@ void
arc_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct arc_softc *sc = link->adapter_softc;
+ struct arc_softc *sc = link->bus->sb_adapter_softc;
struct arc_ccb *ccb;
struct arc_msg_scsicmd *cmd;
u_int32_t reg, cdb_len;
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index 7b39764dedd..57e88973543 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.122 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: ips.c,v 1.123 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -828,7 +828,7 @@ void
ips_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct ips_softc *sc = link->adapter_softc;
+ struct ips_softc *sc = link->bus->sb_adapter_softc;
struct ips_driveinfo *di = &sc->sc_info->drive;
struct ips_drive *drive;
struct scsi_inquiry_data inq;
@@ -960,7 +960,7 @@ void
ips_scsi_pt_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct ips_pt *pt = link->adapter_softc;
+ struct ips_pt *pt = link->bus->sb_adapter_softc;
struct ips_softc *sc = pt->pt_sc;
struct device *dev = link->device_softc;
struct ips_ccb *ccb = xs->io;
@@ -1046,7 +1046,7 @@ int
ips_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
#if NBIO > 0
- return (ips_ioctl(link->adapter_softc, cmd, addr));
+ return (ips_ioctl(link->bus->sb_adapter_softc, cmd, addr));
#else
return (ENOTTY);
#endif
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c
index 4114fd034e0..c88c2463fec 100644
--- a/sys/dev/pci/mfii.c
+++ b/sys/dev/pci/mfii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfii.c,v 1.76 2020/07/13 14:25:41 krw Exp $ */
+/* $OpenBSD: mfii.c,v 1.77 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@openbsd.org>
@@ -2079,7 +2079,7 @@ void
mfii_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct mfii_softc *sc = link->adapter_softc;
+ struct mfii_softc *sc = link->bus->sb_adapter_softc;
struct mfii_ccb *ccb = xs->io;
mfii_scrub_ccb(ccb);
@@ -2168,7 +2168,7 @@ mfii_scsi_cmd_done(struct mfii_softc *sc, struct mfii_ccb *ccb)
int
mfii_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct mfii_softc *sc = link->adapter_softc;
+ struct mfii_softc *sc = link->bus->sb_adapter_softc;
DNPRINTF(MFII_D_IOCTL, "%s: mfii_scsi_ioctl\n", DEVNAME(sc));
@@ -2190,7 +2190,7 @@ mfii_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
int
mfii_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
{
- struct mfii_softc *sc = link->adapter_softc;
+ struct mfii_softc *sc = link->bus->sb_adapter_softc;
int rv, wrenable, rdenable;
struct mfi_ld_prop ldp;
union mfi_mbox mbox;
@@ -2378,7 +2378,7 @@ void
mfii_pd_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct mfii_softc *sc = link->adapter_softc;
+ struct mfii_softc *sc = link->bus->sb_adapter_softc;
struct mfii_ccb *ccb = xs->io;
mfii_scrub_ccb(ccb);
@@ -2416,7 +2416,7 @@ done:
int
mfii_pd_scsi_probe(struct scsi_link *link)
{
- struct mfii_softc *sc = link->adapter_softc;
+ struct mfii_softc *sc = link->bus->sb_adapter_softc;
struct mfi_pd_details mpd;
union mfi_mbox mbox;
int rv;
@@ -2565,7 +2565,7 @@ mfii_scsi_cmd_tmo(void *xsp)
{
struct scsi_xfer *xs = xsp;
struct scsi_link *link = xs->sc_link;
- struct mfii_softc *sc = link->adapter_softc;
+ struct mfii_softc *sc = link->bus->sb_adapter_softc;
struct mfii_ccb *ccb = xs->io;
mtx_enter(&sc->sc_abort_mtx);
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index 3e8f243182d..adfcaf75a8a 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.134 2020/07/13 14:25:41 krw Exp $ */
+/* $OpenBSD: mpii.c,v 1.135 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -883,7 +883,7 @@ mpii_load_xs(struct mpii_ccb *ccb)
int
mpii_scsi_probe(struct scsi_link *link)
{
- struct mpii_softc *sc = link->adapter_softc;
+ struct mpii_softc *sc = link->bus->sb_adapter_softc;
struct mpii_cfg_sas_dev_pg0 pg0;
struct mpii_ecfg_hdr ehdr;
struct mpii_device *dev;
@@ -2899,7 +2899,7 @@ void
mpii_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct mpii_softc *sc = link->adapter_softc;
+ struct mpii_softc *sc = link->bus->sb_adapter_softc;
struct mpii_ccb *ccb = xs->io;
struct mpii_msg_scsi_io *io;
struct mpii_device *dev;
@@ -3194,7 +3194,7 @@ done:
int
mpii_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct mpii_softc *sc = link->adapter_softc;
+ struct mpii_softc *sc = link->bus->sb_adapter_softc;
struct mpii_device *dev = sc->sc_devs[link->target];
DNPRINTF(MPII_D_IOCTL, "%s: mpii_scsi_ioctl\n", DEVNAME(sc));
@@ -3221,7 +3221,7 @@ mpii_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
int
mpii_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
{
- struct mpii_softc *sc = link->adapter_softc;
+ struct mpii_softc *sc = link->bus->sb_adapter_softc;
struct mpii_device *dev = sc->sc_devs[link->target];
struct mpii_cfg_raid_vol_pg0 *vpg;
struct mpii_msg_raid_action_request *req;
diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c
index b0041841253..8a259b89664 100644
--- a/sys/dev/pci/qle.c
+++ b/sys/dev/pci/qle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qle.c,v 1.56 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: qle.c,v 1.57 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
@@ -1275,7 +1275,7 @@ qle_intr(void *xsc)
int
qle_scsi_probe(struct scsi_link *link)
{
- struct qle_softc *sc = link->adapter_softc;
+ struct qle_softc *sc = link->bus->sb_adapter_softc;
int rv = 0;
mtx_enter(&sc->sc_port_mtx);
@@ -1293,7 +1293,7 @@ void
qle_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct qle_softc *sc = link->adapter_softc;
+ struct qle_softc *sc = link->bus->sb_adapter_softc;
struct qle_ccb *ccb;
void *iocb;
struct qle_ccb_list list;
diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c
index 95cdf98a1aa..94d13b83e02 100644
--- a/sys/dev/pci/vmwpvs.c
+++ b/sys/dev/pci/vmwpvs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmwpvs.c,v 1.19 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: vmwpvs.c,v 1.20 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
@@ -846,7 +846,7 @@ void
vmwpvs_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct vmwpvs_softc *sc = link->adapter_softc;
+ struct vmwpvs_softc *sc = link->bus->sb_adapter_softc;
struct vmwpvs_ccb *ccb = xs->io;
bus_dmamap_t dmap = ccb->ccb_dmamap;
volatile struct vmwpvw_ring_state *s =