summaryrefslogtreecommitdiff
path: root/sys/dev/pv
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-07-16 21:18:32 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-07-16 21:18:32 +0000
commit55bed41956fd54a23882af6ea9c5e9e3c20480a1 (patch)
tree72600dd1e2454e0de6339db57bc4d99e1dfa5356 /sys/dev/pv
parent86a6905da6200248b7428132fc88b96cac17e020 (diff)
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/pv')
-rw-r--r--sys/dev/pv/hvs.c6
-rw-r--r--sys/dev/pv/vioblk.c8
-rw-r--r--sys/dev/pv/vioscsi.c4
-rw-r--r--sys/dev/pv/xbf.c20
4 files changed, 19 insertions, 19 deletions
diff --git a/sys/dev/pv/hvs.c b/sys/dev/pv/hvs.c
index ee25717e806..5165e6f4a97 100644
--- a/sys/dev/pv/hvs.c
+++ b/sys/dev/pv/hvs.c
@@ -334,7 +334,7 @@ void
hvs_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct hvs_softc *sc = link->adapter_softc;
+ struct hvs_softc *sc = link->bus->sb_adapter_softc;
struct hvs_ccb *ccb = xs->io;
union hvs_cmd cmd;
struct hvs_cmd_io *io = &cmd.io;
@@ -586,7 +586,7 @@ is_inquiry_valid(struct scsi_inquiry_data *inq)
static inline void
fixup_inquiry(struct scsi_xfer *xs, struct hvs_srb *srb)
{
- struct hvs_softc *sc = xs->sc_link->adapter_softc;
+ struct hvs_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct scsi_inquiry_data *inq = (struct scsi_inquiry_data *)xs->data;
int datalen, resplen;
char vendor[8];
@@ -620,7 +620,7 @@ void
hvs_scsi_cmd_done(struct hvs_ccb *ccb)
{
struct scsi_xfer *xs = ccb->ccb_xfer;
- struct hvs_softc *sc = xs->sc_link->adapter_softc;
+ struct hvs_softc *sc = xs->sc_link->bus->sb_adapter_softc;
union hvs_cmd *cmd = ccb->ccb_cmd;
struct hvs_srb *srb;
bus_dmamap_t map;
diff --git a/sys/dev/pv/vioblk.c b/sys/dev/pv/vioblk.c
index 1ef13cd8180..fb556a785a6 100644
--- a/sys/dev/pv/vioblk.c
+++ b/sys/dev/pv/vioblk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vioblk.c,v 1.22 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: vioblk.c,v 1.23 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2012 Stefan Fritsch.
@@ -391,7 +391,7 @@ vioblk_reset(struct vioblk_softc *sc)
void
vioblk_scsi_cmd(struct scsi_xfer *xs)
{
- struct vioblk_softc *sc = xs->sc_link->adapter_softc;
+ struct vioblk_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct virtqueue *vq = &sc->sc_vq[0];
struct virtio_softc *vsc = sc->sc_virtio;
struct virtio_blk_req *vr;
@@ -586,7 +586,7 @@ vioblk_scsi_inq(struct scsi_xfer *xs)
void
vioblk_scsi_capacity(struct scsi_xfer *xs)
{
- struct vioblk_softc *sc = xs->sc_link->adapter_softc;
+ struct vioblk_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct scsi_read_cap_data rcd;
uint64_t capacity;
@@ -606,7 +606,7 @@ vioblk_scsi_capacity(struct scsi_xfer *xs)
void
vioblk_scsi_capacity16(struct scsi_xfer *xs)
{
- struct vioblk_softc *sc = xs->sc_link->adapter_softc;
+ struct vioblk_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct scsi_read_cap_data_16 rcd;
bzero(&rcd, sizeof(rcd));
diff --git a/sys/dev/pv/vioscsi.c b/sys/dev/pv/vioscsi.c
index 5849d16e54a..eb36ae7a701 100644
--- a/sys/dev/pv/vioscsi.c
+++ b/sys/dev/pv/vioscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vioscsi.c,v 1.21 2020/07/11 20:15:52 krw Exp $ */
+/* $OpenBSD: vioscsi.c,v 1.22 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2013 Google Inc.
*
@@ -179,7 +179,7 @@ err:
void
vioscsi_scsi_cmd(struct scsi_xfer *xs)
{
- struct vioscsi_softc *sc = xs->sc_link->adapter_softc;
+ struct vioscsi_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct virtio_softc *vsc = (struct virtio_softc *)sc->sc_dev.dv_parent;
struct vioscsi_req *vr = xs->io;
struct virtio_scsi_req_hdr *req = &vr->vr_req;
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c
index 72229e3b111..b090e1829f6 100644
--- a/sys/dev/pv/xbf.c
+++ b/sys/dev/pv/xbf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbf.c,v 1.40 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: xbf.c,v 1.41 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2016, 2017 Mike Belopuhov
@@ -384,7 +384,7 @@ xbf_intr(void *xsc)
void
xbf_scsi_cmd(struct scsi_xfer *xs)
{
- struct xbf_softc *sc = xs->sc_link->adapter_softc;
+ struct xbf_softc *sc = xs->sc_link->bus->sb_adapter_softc;
switch (xs->cmd->opcode) {
case READ_BIG:
@@ -449,7 +449,7 @@ xbf_scsi_cmd(struct scsi_xfer *xs)
int
xbf_load_cmd(struct scsi_xfer *xs)
{
- struct xbf_softc *sc = xs->sc_link->adapter_softc;
+ struct xbf_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct xbf_ccb *ccb = xs->io;
struct xbf_sge *sge;
union xbf_ring_desc *xrd;
@@ -513,7 +513,7 @@ xbf_load_cmd(struct scsi_xfer *xs)
int
xbf_bounce_cmd(struct scsi_xfer *xs)
{
- struct xbf_softc *sc = xs->sc_link->adapter_softc;
+ struct xbf_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct xbf_ccb *ccb = xs->io;
struct xbf_sge *sge;
struct xbf_dma_mem *dma;
@@ -589,7 +589,7 @@ xbf_bounce_cmd(struct scsi_xfer *xs)
void
xbf_reclaim_cmd(struct scsi_xfer *xs)
{
- struct xbf_softc *sc = xs->sc_link->adapter_softc;
+ struct xbf_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct xbf_ccb *ccb = xs->io;
struct xbf_dma_mem *dma = &ccb->ccb_bbuf;
@@ -605,7 +605,7 @@ xbf_reclaim_cmd(struct scsi_xfer *xs)
int
xbf_submit_cmd(struct scsi_xfer *xs)
{
- struct xbf_softc *sc = xs->sc_link->adapter_softc;
+ struct xbf_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct xbf_ccb *ccb = xs->io;
union xbf_ring_desc *xrd;
struct scsi_rw *rw;
@@ -737,7 +737,7 @@ xbf_poll_cmd(struct scsi_xfer *xs)
delay(10);
else
tsleep_nsec(xs, PRIBIO, "xbfpoll", USEC_TO_NSEC(10));
- xbf_intr(xs->sc_link->adapter_softc);
+ xbf_intr(xs->sc_link->bus->sb_adapter_softc);
} while(--timo > 0);
return (0);
@@ -821,7 +821,7 @@ xbf_scsi_inq(struct scsi_xfer *xs)
void
xbf_scsi_inquiry(struct scsi_xfer *xs)
{
- struct xbf_softc *sc = xs->sc_link->adapter_softc;
+ struct xbf_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct scsi_inquiry_data inq;
/* char buf[5]; */
@@ -852,7 +852,7 @@ xbf_scsi_inquiry(struct scsi_xfer *xs)
void
xbf_scsi_capacity(struct scsi_xfer *xs)
{
- struct xbf_softc *sc = xs->sc_link->adapter_softc;
+ struct xbf_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct scsi_read_cap_data rcd;
uint64_t capacity;
@@ -873,7 +873,7 @@ xbf_scsi_capacity(struct scsi_xfer *xs)
void
xbf_scsi_capacity16(struct scsi_xfer *xs)
{
- struct xbf_softc *sc = xs->sc_link->adapter_softc;
+ struct xbf_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct scsi_read_cap_data_16 rcd;
bzero(&rcd, sizeof(rcd));