summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/aac.c8
-rw-r--r--sys/dev/ic/adv.c8
-rw-r--r--sys/dev/ic/adw.c8
-rw-r--r--sys/dev/ic/ahci.c3
-rw-r--r--sys/dev/ic/aic6250.c6
-rw-r--r--sys/dev/ic/aic6360.c6
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c6
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c8
-rw-r--r--sys/dev/ic/ami.c10
-rw-r--r--sys/dev/ic/cac.c4
-rw-r--r--sys/dev/ic/ciss.c4
-rw-r--r--sys/dev/ic/gdt_common.c12
-rw-r--r--sys/dev/ic/iha.c6
-rw-r--r--sys/dev/ic/mfi.c16
-rw-r--r--sys/dev/ic/mpi.c12
-rw-r--r--sys/dev/ic/ncr53c9x.c10
-rw-r--r--sys/dev/ic/nvme.c18
-rw-r--r--sys/dev/ic/oosiop.c6
-rw-r--r--sys/dev/ic/osiop.c4
-rw-r--r--sys/dev/ic/qla.c6
-rw-r--r--sys/dev/ic/qlw.c4
-rw-r--r--sys/dev/ic/siop.c8
-rw-r--r--sys/dev/ic/trm.c6
-rw-r--r--sys/dev/ic/twe.c4
-rw-r--r--sys/dev/ic/uha.c6
-rw-r--r--sys/dev/ic/wd33c93.c6
26 files changed, 97 insertions, 98 deletions
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index d42975213cf..d1431865aca 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.81 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: aac.c,v 1.82 2020/07/16 21:18:29 krw Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -2098,7 +2098,7 @@ aac_eval_mapping(size, cyls, heads, secs)
void
aac_copy_internal_data(struct scsi_xfer *xs, u_int8_t *data, size_t size)
{
- struct aac_softc *sc = xs->sc_link->adapter_softc;
+ struct aac_softc *sc = xs->sc_link->bus->sb_adapter_softc;
size_t copy_cnt;
AAC_DPRINTF(AAC_D_MISC, ("%s: aac_copy_internal_data\n",
@@ -2118,7 +2118,7 @@ void
aac_internal_cache_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct aac_softc *sc = link->adapter_softc;
+ struct aac_softc *sc = link->bus->sb_adapter_softc;
struct scsi_inquiry_data inq;
struct scsi_sense_data sd;
struct scsi_read_cap_data rcd;
@@ -2189,7 +2189,7 @@ void
aac_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct aac_softc *sc = link->adapter_softc;
+ struct aac_softc *sc = link->bus->sb_adapter_softc;
u_int8_t target = link->target;
struct aac_command *cm;
u_int32_t blockno, blockcnt;
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index dcd3b92a00b..fb89d866753 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.45 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: adv.c,v 1.46 2020/07/16 21:18:29 krw Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -521,7 +521,7 @@ adv_scsi_cmd(xs)
struct scsi_xfer *xs;
{
struct scsi_link *sc_link = xs->sc_link;
- ASC_SOFTC *sc = sc_link->adapter_softc;
+ ASC_SOFTC *sc = sc_link->bus->sb_adapter_softc;
bus_dma_tag_t dmat = sc->sc_dmat;
ADV_CCB *ccb;
int flags, error, nsegs;
@@ -705,7 +705,7 @@ adv_timeout(arg)
ADV_CCB *ccb = arg;
struct scsi_xfer *xs = ccb->xs;
struct scsi_link *sc_link = xs->sc_link;
- ASC_SOFTC *sc = sc_link->adapter_softc;
+ ASC_SOFTC *sc = sc_link->bus->sb_adapter_softc;
int s;
sc_print_addr(sc_link);
@@ -746,7 +746,7 @@ adv_watchdog(arg)
ADV_CCB *ccb = arg;
struct scsi_xfer *xs = ccb->xs;
struct scsi_link *sc_link = xs->sc_link;
- ASC_SOFTC *sc = sc_link->adapter_softc;
+ ASC_SOFTC *sc = sc_link->bus->sb_adapter_softc;
int s;
s = splbio();
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index 6014a88aeca..124c9640033 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.63 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: adw.c,v 1.64 2020/07/16 21:18:29 krw Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -523,7 +523,7 @@ void
adw_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *sc_link = xs->sc_link;
- ADW_SOFTC *sc = sc_link->adapter_softc;
+ ADW_SOFTC *sc = sc_link->bus->sb_adapter_softc;
ADW_CCB *ccb;
int s, retry = 0;
@@ -579,7 +579,7 @@ int
adw_build_req(struct scsi_xfer *xs, ADW_CCB *ccb, int flags)
{
struct scsi_link *sc_link = xs->sc_link;
- ADW_SOFTC *sc = sc_link->adapter_softc;
+ ADW_SOFTC *sc = sc_link->bus->sb_adapter_softc;
bus_dma_tag_t dmat = sc->sc_dmat;
ADW_SCSI_REQ_Q *scsiqp;
int error;
@@ -764,7 +764,7 @@ adw_timeout(void *arg)
ADW_CCB *ccb = arg;
struct scsi_xfer *xs = ccb->xs;
struct scsi_link *sc_link = xs->sc_link;
- ADW_SOFTC *sc = sc_link->adapter_softc;
+ ADW_SOFTC *sc = sc_link->bus->sb_adapter_softc;
int s;
sc_print_addr(sc_link);
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index 679a8ff0f88..571b29c29c4 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.36 2020/03/14 18:53:13 krw Exp $ */
+/* $OpenBSD: ahci.c,v 1.37 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -3266,7 +3266,6 @@ ahci_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size,
bus_sc = (struct scsibus_softc *)scsibus;
SLIST_FOREACH(link, &bus_sc->sc_link_list, bus_list) {
if (link->device_softc == disk) {
- /* link->adapter_softc == sc->sc_atascsi */
port = link->target;
if (link->lun > 0)
my->pmp_port = link->lun - 1;
diff --git a/sys/dev/ic/aic6250.c b/sys/dev/ic/aic6250.c
index f565e2d33de..03ea46dcdc8 100644
--- a/sys/dev/ic/aic6250.c
+++ b/sys/dev/ic/aic6250.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6250.c,v 1.9 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: aic6250.c,v 1.10 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2010, 2013 Miodrag Vallat.
@@ -384,7 +384,7 @@ void
aic6250_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *sc_link = xs->sc_link;
- struct aic6250_softc *sc = sc_link->adapter_softc;
+ struct aic6250_softc *sc = sc_link->bus->sb_adapter_softc;
struct aic6250_acb *acb;
int s, flags;
@@ -1789,7 +1789,7 @@ aic6250_timeout(void *arg)
struct aic6250_acb *acb = arg;
struct scsi_xfer *xs = acb->xs;
struct scsi_link *sc_link = xs->sc_link;
- struct aic6250_softc *sc = sc_link->adapter_softc;
+ struct aic6250_softc *sc = sc_link->bus->sb_adapter_softc;
int s;
sc_print_addr(sc_link);
diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c
index 8c483456c88..020d23cdec6 100644
--- a/sys/dev/ic/aic6360.c
+++ b/sys/dev/ic/aic6360.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6360.c,v 1.34 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: aic6360.c,v 1.35 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
#ifdef DDB
@@ -477,7 +477,7 @@ void
aic_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *sc_link = xs->sc_link;
- struct aic_softc *sc = sc_link->adapter_softc;
+ struct aic_softc *sc = sc_link->bus->sb_adapter_softc;
struct aic_acb *acb;
int s, flags;
@@ -1970,7 +1970,7 @@ aic_timeout(void *arg)
struct aic_acb *acb = arg;
struct scsi_xfer *xs = acb->xs;
struct scsi_link *sc_link = xs->sc_link;
- struct aic_softc *sc = sc_link->adapter_softc;
+ struct aic_softc *sc = sc_link->bus->sb_adapter_softc;
int s;
sc_print_addr(sc_link);
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index aeae89394e7..e7a87416bad 100644
--- a/sys/dev/ic/aic79xx_openbsd.c
+++ b/sys/dev/ic/aic79xx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx_openbsd.c,v 1.54 2020/07/13 13:43:31 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.55 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -257,7 +257,7 @@ ahd_action(struct scsi_xfer *xs)
u_int16_t quirks;
SC_DEBUG(xs->sc_link, SDEV_DB3, ("ahd_action\n"));
- ahd = xs->sc_link->adapter_softc;
+ ahd = xs->sc_link->bus->sb_adapter_softc;
target_id = xs->sc_link->target;
our_id = SCSI_SCSI_ID(ahd, xs->sc_link);
@@ -322,7 +322,7 @@ ahd_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
xs = scb->xs;
xs->error = CAM_REQ_INPROG;
xs->status = 0;
- ahd = xs->sc_link->adapter_softc;
+ ahd = xs->sc_link->bus->sb_adapter_softc;
if (nsegments != 0) {
void *sg;
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index bed97bd8442..b2921570ad1 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.64 2020/07/13 13:43:31 krw Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.65 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -257,7 +257,7 @@ ahc_action(struct scsi_xfer *xs)
u_int our_id;
SC_DEBUG(xs->sc_link, SDEV_DB3, ("ahc_action\n"));
- ahc = xs->sc_link->adapter_softc;
+ ahc = xs->sc_link->bus->sb_adapter_softc;
target_id = xs->sc_link->target;
our_id = SCSI_SCSI_ID(ahc, xs->sc_link);
@@ -311,7 +311,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
xs = scb->xs;
xs->error = CAM_REQ_INPROG;
xs->status = 0;
- ahc = xs->sc_link->adapter_softc;
+ ahc = xs->sc_link->bus->sb_adapter_softc;
if (nsegments != 0) {
struct ahc_dma_seg *sg;
@@ -554,7 +554,7 @@ ahc_timeout(void *arg)
char channel;
scb = arg;
- ahc = scb->xs->sc_link->adapter_softc;
+ ahc = scb->xs->sc_link->bus->sb_adapter_softc;
s = splbio();
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index f1e11ac532b..88dabf9bd0a 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.250 2020/07/13 14:25:41 krw Exp $ */
+/* $OpenBSD: ami.c,v 1.251 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1078,7 +1078,7 @@ ami_done_pt(struct ami_softc *sc, struct ami_ccb *ccb)
{
struct scsi_xfer *xs = ccb->ccb_xs;
struct scsi_link *link = xs->sc_link;
- struct ami_rawsoftc *rsc = link->adapter_softc;
+ struct ami_rawsoftc *rsc = link->bus->sb_adapter_softc;
u_int8_t target = link->target, type;
bus_dmamap_sync(sc->sc_dmat, AMIMEM_MAP(sc->sc_ccbmem_am),
@@ -1207,7 +1207,7 @@ void
ami_scsi_raw_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct ami_rawsoftc *rsc = link->adapter_softc;
+ struct ami_rawsoftc *rsc = link->bus->sb_adapter_softc;
struct ami_softc *sc = rsc->sc_softc;
u_int8_t channel = rsc->sc_channel, target = link->target;
struct ami_ccb *ccb;
@@ -1308,7 +1308,7 @@ void
ami_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct ami_softc *sc = link->adapter_softc;
+ struct ami_softc *sc = link->bus->sb_adapter_softc;
struct device *dev = link->device_softc;
struct ami_ccb *ccb;
struct ami_iocmd *cmd;
@@ -1547,7 +1547,7 @@ ami_intr(void *v)
int
ami_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct ami_softc *sc = link->adapter_softc;
+ struct ami_softc *sc = link->bus->sb_adapter_softc;
/* struct device *dev = (struct device *)link->device_softc; */
/* u_int8_t target = link->target; */
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 20e60d3d417..54cf5ca7c9a 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.62 2020/07/11 21:17:11 krw Exp $ */
+/* $OpenBSD: cac.c,v 1.63 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -581,7 +581,7 @@ cac_scsi_cmd(xs)
struct scsi_xfer *xs;
{
struct scsi_link *link = xs->sc_link;
- struct cac_softc *sc = link->adapter_softc;
+ struct cac_softc *sc = link->bus->sb_adapter_softc;
struct cac_drive_info *dinfo;
struct scsi_inquiry_data inq;
struct scsi_sense_data sd;
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index 4a7b3128b06..2d47a8459ea 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.84 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: ciss.c,v 1.85 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -951,7 +951,7 @@ int
ciss_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
#if NBIO > 0
- return ciss_ioctl(link->adapter_softc, cmd, addr);
+ return ciss_ioctl(link->bus->sb_adapter_softc, cmd, addr);
#else
return ENOTTY;
#endif
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c
index 208983951d4..3e82810054e 100644
--- a/sys/dev/ic/gdt_common.c
+++ b/sys/dev/ic/gdt_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt_common.c,v 1.73 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: gdt_common.c,v 1.74 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved.
@@ -540,7 +540,7 @@ void
gdt_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct gdt_softc *sc = link->adapter_softc;
+ struct gdt_softc *sc = link->bus->sb_adapter_softc;
u_int8_t target = link->target;
struct gdt_ccb *ccb;
u_int32_t blockno, blockcnt;
@@ -734,7 +734,7 @@ gdt_exec_ccb(struct gdt_ccb *ccb)
{
struct scsi_xfer *xs = ccb->gc_xs;
struct scsi_link *link = xs->sc_link;
- struct gdt_softc *sc = link->adapter_softc;
+ struct gdt_softc *sc = link->bus->sb_adapter_softc;
u_int8_t target = link->target;
u_int32_t sg_canz;
bus_dmamap_t xfer;
@@ -874,7 +874,7 @@ void
gdt_internal_cache_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct gdt_softc *sc = link->adapter_softc;
+ struct gdt_softc *sc = link->bus->sb_adapter_softc;
struct scsi_inquiry_data inq;
struct scsi_sense_data sd;
struct scsi_read_cap_data rcd;
@@ -1289,7 +1289,7 @@ gdt_timeout(void *arg)
{
struct gdt_ccb *ccb = arg;
struct scsi_link *link = ccb->gc_xs->sc_link;
- struct gdt_softc *sc = link->adapter_softc;
+ struct gdt_softc *sc = link->bus->sb_adapter_softc;
int s;
sc_print_addr(link);
@@ -1308,7 +1308,7 @@ gdt_watchdog(void *arg)
{
struct gdt_ccb *ccb = arg;
struct scsi_link *link = ccb->gc_xs->sc_link;
- struct gdt_softc *sc = link->adapter_softc;
+ struct gdt_softc *sc = link->bus->sb_adapter_softc;
int s;
s = splbio();
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index afa7a13f491..24247858254 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.c,v 1.50 2020/07/02 13:08:33 krw Exp $ */
+/* $OpenBSD: iha.c,v 1.51 2020/07/16 21:18:30 krw Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -242,7 +242,7 @@ iha_scsi_cmd(struct scsi_xfer *xs)
{
struct iha_scb *pScb;
struct scsi_link *sc_link = xs->sc_link;
- struct iha_softc *sc = sc_link->adapter_softc;
+ struct iha_softc *sc = sc_link->bus->sb_adapter_softc;
int error;
if ((xs->cmdlen > 12) || (sc_link->target >= IHA_MAX_TARGETS)) {
@@ -2397,7 +2397,7 @@ iha_timeout(void *arg)
if (xs != NULL) {
sc_print_addr(xs->sc_link);
printf("SCSI OpCode 0x%02x timed out\n", xs->cmd->opcode);
- iha_abort_xs(xs->sc_link->adapter_softc, xs, HOST_TIMED_OUT);
+ iha_abort_xs(xs->sc_link->bus->sb_adapter_softc, xs, HOST_TIMED_OUT);
}
}
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 96b0a055675..80d58c7f0b2 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.181 2020/07/13 14:25:41 krw Exp $ */
+/* $OpenBSD: mfi.c,v 1.182 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -1016,7 +1016,7 @@ mfi_scsi_io(struct mfi_softc *sc, struct mfi_ccb *ccb,
struct mfi_io_frame *io;
DNPRINTF(MFI_D_CMD, "%s: mfi_scsi_io: %d\n",
- DEVNAME((struct mfi_softc *)link->adapter_softc), link->target);
+ DEVNAME((struct mfi_softc *)link->bus->sb_adapter_softc), link->target);
if (!xs->data)
return (1);
@@ -1107,7 +1107,7 @@ mfi_scsi_ld(struct mfi_softc *sc, struct mfi_ccb *ccb, struct scsi_xfer *xs)
struct mfi_pass_frame *pf;
DNPRINTF(MFI_D_CMD, "%s: mfi_scsi_ld: %d\n",
- DEVNAME((struct mfi_softc *)link->adapter_softc), link->target);
+ DEVNAME((struct mfi_softc *)link->bus->sb_adapter_softc), link->target);
pf = &ccb->ccb_frame->mfr_pass;
pf->mpf_header.mfh_cmd = MFI_CMD_LD_SCSI_IO;
@@ -1150,7 +1150,7 @@ void
mfi_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct mfi_softc *sc = link->adapter_softc;
+ struct mfi_softc *sc = link->bus->sb_adapter_softc;
struct mfi_ccb *ccb = xs->io;
struct scsi_rw *rw;
struct scsi_rw_big *rwb;
@@ -1404,7 +1404,7 @@ done:
int
mfi_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct mfi_softc *sc = link->adapter_softc;
+ struct mfi_softc *sc = link->bus->sb_adapter_softc;
DNPRINTF(MFI_D_IOCTL, "%s: mfi_scsi_ioctl\n", DEVNAME(sc));
@@ -1426,7 +1426,7 @@ mfi_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
int
mfi_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
{
- struct mfi_softc *sc = link->adapter_softc;
+ struct mfi_softc *sc = link->bus->sb_adapter_softc;
int rv, wrenable, rdenable;
struct mfi_ld_prop ldp;
union mfi_mbox mbox;
@@ -2714,7 +2714,7 @@ int
mfi_pd_scsi_probe(struct scsi_link *link)
{
union mfi_mbox mbox;
- struct mfi_softc *sc = link->adapter_softc;
+ struct mfi_softc *sc = link->bus->sb_adapter_softc;
struct mfi_pd_link *pl = sc->sc_pd->pd_links[link->target];
if (link->lun > 0)
@@ -2740,7 +2740,7 @@ void
mfi_pd_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct mfi_softc *sc = link->adapter_softc;
+ struct mfi_softc *sc = link->bus->sb_adapter_softc;
struct mfi_ccb *ccb = xs->io;
struct mfi_pass_frame *pf = &ccb->ccb_frame->mfr_pass;
struct mfi_pd_link *pl = sc->sc_pd->pd_links[link->target];
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index e3feb00f34c..358fff02af6 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.218 2020/07/13 14:25:41 krw Exp $ */
+/* $OpenBSD: mpi.c,v 1.219 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org>
@@ -1297,7 +1297,7 @@ void
mpi_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct mpi_softc *sc = link->adapter_softc;
+ struct mpi_softc *sc = link->bus->sb_adapter_softc;
struct mpi_ccb *ccb;
struct mpi_ccb_bundle *mcb;
struct mpi_msg_scsi_io *io;
@@ -1602,7 +1602,7 @@ mpi_load_xs(struct mpi_ccb *ccb)
int
mpi_scsi_probe_virtual(struct scsi_link *link)
{
- struct mpi_softc *sc = link->adapter_softc;
+ struct mpi_softc *sc = link->bus->sb_adapter_softc;
struct mpi_cfg_hdr hdr;
struct mpi_cfg_raid_vol_pg0 *rp0;
int len;
@@ -1635,7 +1635,7 @@ mpi_scsi_probe_virtual(struct scsi_link *link)
int
mpi_scsi_probe(struct scsi_link *link)
{
- struct mpi_softc *sc = link->adapter_softc;
+ struct mpi_softc *sc = link->bus->sb_adapter_softc;
struct mpi_ecfg_hdr ehdr;
struct mpi_cfg_sas_dev_pg0 pg0;
u_int32_t address;
@@ -2956,7 +2956,7 @@ mpi_req_cfg_page(struct mpi_softc *sc, u_int32_t address, int flags,
int
mpi_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct mpi_softc *sc = link->adapter_softc;
+ struct mpi_softc *sc = link->bus->sb_adapter_softc;
DNPRINTF(MPI_D_IOCTL, "%s: mpi_scsi_ioctl\n", DEVNAME(sc));
@@ -2982,7 +2982,7 @@ mpi_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
int
mpi_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
{
- struct mpi_softc *sc = link->adapter_softc;
+ struct mpi_softc *sc = link->bus->sb_adapter_softc;
struct mpi_ccb *ccb;
int len, rv;
struct mpi_cfg_hdr hdr;
diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c
index fe33839c767..d6106e5b6ee 100644
--- a/sys/dev/ic/ncr53c9x.c
+++ b/sys/dev/ic/ncr53c9x.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr53c9x.c,v 1.73 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: ncr53c9x.c,v 1.74 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */
/*
@@ -769,7 +769,7 @@ ncr53c9x_free_ecb(void *null, void *ecb)
int
ncr53c9x_scsi_probe(struct scsi_link *sc_link)
{
- struct ncr53c9x_softc *sc = sc_link->adapter_softc;
+ struct ncr53c9x_softc *sc = sc_link->bus->sb_adapter_softc;
struct ncr53c9x_tinfo *ti = &sc->sc_tinfo[sc_link->target];
struct ncr53c9x_linfo *li;
int64_t lun = sc_link->lun;
@@ -796,7 +796,7 @@ ncr53c9x_scsi_probe(struct scsi_link *sc_link)
void
ncr53c9x_scsi_free(struct scsi_link *sc_link)
{
- struct ncr53c9x_softc *sc = sc_link->adapter_softc;
+ struct ncr53c9x_softc *sc = sc_link->bus->sb_adapter_softc;
struct ncr53c9x_tinfo *ti = &sc->sc_tinfo[sc_link->target];
struct ncr53c9x_linfo *li;
int64_t lun = sc_link->lun;
@@ -823,7 +823,7 @@ ncr53c9x_scsi_cmd(xs)
struct scsi_xfer *xs;
{
struct scsi_link *sc_link = xs->sc_link;
- struct ncr53c9x_softc *sc = sc_link->adapter_softc;
+ struct ncr53c9x_softc *sc = sc_link->bus->sb_adapter_softc;
struct ncr53c9x_ecb *ecb;
struct ncr53c9x_tinfo *ti;
struct ncr53c9x_linfo *li;
@@ -2764,7 +2764,7 @@ ncr53c9x_timeout(arg)
struct ncr53c9x_ecb *ecb = arg;
struct scsi_xfer *xs = ecb->xs;
struct scsi_link *sc_link = xs->sc_link;
- struct ncr53c9x_softc *sc = sc_link->adapter_softc;
+ struct ncr53c9x_softc *sc = sc_link->bus->sb_adapter_softc;
struct ncr53c9x_tinfo *ti = &sc->sc_tinfo[sc_link->target];
int s;
diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c
index 9ea255d0e8b..2830f9e68ca 100644
--- a/sys/dev/ic/nvme.c
+++ b/sys/dev/ic/nvme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvme.c,v 1.80 2020/07/12 00:36:01 krw Exp $ */
+/* $OpenBSD: nvme.c,v 1.81 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
@@ -433,7 +433,7 @@ disable:
int
nvme_scsi_probe(struct scsi_link *link)
{
- struct nvme_softc *sc = link->adapter_softc;
+ struct nvme_softc *sc = link->bus->sb_adapter_softc;
struct nvme_sqe sqe;
struct nvm_identify_namespace *identify;
struct nvme_dmamem *mem;
@@ -582,7 +582,7 @@ nvme_scsi_cmd(struct scsi_xfer *xs)
void
nvme_minphys(struct buf *bp, struct scsi_link *link)
{
- struct nvme_softc *sc = link->adapter_softc;
+ struct nvme_softc *sc = link->bus->sb_adapter_softc;
if (bp->b_bcount > sc->sc_mdts)
bp->b_bcount = sc->sc_mdts;
@@ -592,7 +592,7 @@ void
nvme_scsi_io(struct scsi_xfer *xs, int dir)
{
struct scsi_link *link = xs->sc_link;
- struct nvme_softc *sc = link->adapter_softc;
+ struct nvme_softc *sc = link->bus->sb_adapter_softc;
struct nvme_ccb *ccb = xs->io;
bus_dmamap_t dmap = ccb->ccb_dmamap;
int i;
@@ -705,7 +705,7 @@ void
nvme_scsi_sync(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct nvme_softc *sc = link->adapter_softc;
+ struct nvme_softc *sc = link->bus->sb_adapter_softc;
struct nvme_ccb *ccb = xs->io;
ccb->ccb_done = nvme_scsi_sync_done;
@@ -771,7 +771,7 @@ nvme_scsi_inquiry(struct scsi_xfer *xs)
{
struct scsi_inquiry_data inq;
struct scsi_link *link = xs->sc_link;
- struct nvme_softc *sc = link->adapter_softc;
+ struct nvme_softc *sc = link->bus->sb_adapter_softc;
struct nvm_identify_namespace *ns;
ns = sc->sc_namespaces[link->target].ident;
@@ -798,7 +798,7 @@ nvme_scsi_capacity16(struct scsi_xfer *xs)
{
struct scsi_read_cap_data_16 rcd;
struct scsi_link *link = xs->sc_link;
- struct nvme_softc *sc = link->adapter_softc;
+ struct nvme_softc *sc = link->bus->sb_adapter_softc;
struct nvm_identify_namespace *ns;
struct nvm_namespace_format *f;
u_int64_t nsze;
@@ -832,7 +832,7 @@ nvme_scsi_capacity(struct scsi_xfer *xs)
{
struct scsi_read_cap_data rcd;
struct scsi_link *link = xs->sc_link;
- struct nvme_softc *sc = link->adapter_softc;
+ struct nvme_softc *sc = link->bus->sb_adapter_softc;
struct nvm_identify_namespace *ns;
struct nvm_namespace_format *f;
u_int64_t nsze;
@@ -865,7 +865,7 @@ nvme_scsi_capacity(struct scsi_xfer *xs)
void
nvme_scsi_free(struct scsi_link *link)
{
- struct nvme_softc *sc = link->adapter_softc;
+ struct nvme_softc *sc = link->bus->sb_adapter_softc;
struct nvm_identify_namespace *identify;
identify = sc->sc_namespaces[link->target].ident;
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c
index b972895ce75..06e609f06aa 100644
--- a/sys/dev/ic/oosiop.c
+++ b/sys/dev/ic/oosiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oosiop.c,v 1.30 2020/07/13 13:43:31 krw Exp $ */
+/* $OpenBSD: oosiop.c,v 1.31 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
/*
@@ -723,7 +723,7 @@ oosiop_scsicmd(struct scsi_xfer *xs)
int s, err;
int dopoll;
- sc = xs->sc_link->adapter_softc;
+ sc = xs->sc_link->bus->sb_adapter_softc;
s = splbio();
@@ -1008,7 +1008,7 @@ oosiop_timeout(void *arg)
{
struct oosiop_cb *cb = arg;
struct scsi_xfer *xs = cb->xs;
- struct oosiop_softc *sc = xs->sc_link->adapter_softc;
+ struct oosiop_softc *sc = xs->sc_link->bus->sb_adapter_softc;
int s;
sc_print_addr(xs->sc_link);
diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c
index f0b60656166..7bf60bdad77 100644
--- a/sys/dev/ic/osiop.c
+++ b/sys/dev/ic/osiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osiop.c,v 1.58 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: osiop.c,v 1.59 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */
/*
@@ -372,7 +372,7 @@ osiop_scsicmd(xs)
{
struct scsi_link *periph = xs->sc_link;
struct osiop_acb *acb;
- struct osiop_softc *sc = periph->adapter_softc;
+ struct osiop_softc *sc = periph->bus->sb_adapter_softc;
int err, s;
int dopoll;
diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c
index 96bf47562ca..978082032f0 100644
--- a/sys/dev/ic/qla.c
+++ b/sys/dev/ic/qla.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qla.c,v 1.64 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: qla.c,v 1.65 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -942,7 +942,7 @@ qla_intr(void *xsc)
int
qla_scsi_probe(struct scsi_link *link)
{
- struct qla_softc *sc = link->adapter_softc;
+ struct qla_softc *sc = link->bus->sb_adapter_softc;
int rv = 0;
mtx_enter(&sc->sc_port_mtx);
@@ -964,7 +964,7 @@ void
qla_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct qla_softc *sc = link->adapter_softc;
+ struct qla_softc *sc = link->bus->sb_adapter_softc;
struct qla_ccb *ccb;
struct qla_iocb_req34 *iocb;
struct qla_ccb_list list;
diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c
index e35ff684a4c..fef616134ae 100644
--- a/sys/dev/ic/qlw.c
+++ b/sys/dev/ic/qlw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qlw.c,v 1.41 2020/07/14 00:43:29 krw Exp $ */
+/* $OpenBSD: qlw.c,v 1.42 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -788,7 +788,7 @@ void
qlw_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
- struct qlw_softc *sc = link->adapter_softc;
+ struct qlw_softc *sc = link->bus->sb_adapter_softc;
struct qlw_ccb *ccb;
struct qlw_iocb_req0 *iocb;
struct qlw_ccb_list list;
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index fbeb2bce494..84717d4520e 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.80 2020/07/13 13:43:31 krw Exp $ */
+/* $OpenBSD: siop.c,v 1.81 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */
/*
@@ -1392,7 +1392,7 @@ siop_cmd_put(void *cookie, void *io)
int
siop_scsiprobe(struct scsi_link *link)
{
- struct siop_softc *sc = link->adapter_softc;
+ struct siop_softc *sc = link->bus->sb_adapter_softc;
struct siop_target *siop_target;
const int target = link->target;
const int lun = link->lun;
@@ -1458,7 +1458,7 @@ void
siop_scsicmd(xs)
struct scsi_xfer *xs;
{
- struct siop_softc *sc = xs->sc_link->adapter_softc;
+ struct siop_softc *sc = xs->sc_link->bus->sb_adapter_softc;
struct siop_cmd *siop_cmd;
struct siop_target *siop_target;
int s, error, i, j;
@@ -2174,7 +2174,7 @@ siop_add_dev(sc, target, lun)
void
siop_scsifree(struct scsi_link *link)
{
- struct siop_softc *sc = link->adapter_softc;
+ struct siop_softc *sc = link->bus->sb_adapter_softc;
int target = link->target;
int lun = link->lun;
int i;
diff --git a/sys/dev/ic/trm.c b/sys/dev/ic/trm.c
index f796f168b96..f8fe4568a6b 100644
--- a/sys/dev/ic/trm.c
+++ b/sys/dev/ic/trm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trm.c,v 1.41 2020/07/13 13:43:31 krw Exp $
+/* $OpenBSD: trm.c,v 1.42 2020/07/16 21:18:30 krw Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* File Name : trm.c
@@ -317,7 +317,7 @@ trm_scsi_cmd(struct scsi_xfer *xs)
target = xs->sc_link->target;
lun = xs->sc_link->lun;
- sc = xs->sc_link->adapter_softc;
+ sc = xs->sc_link->bus->sb_adapter_softc;
ioh = sc->sc_iohandle;
iot = sc->sc_iotag;
@@ -618,7 +618,7 @@ trm_timeout(void *arg1)
xs = pSRB->xs;
if (xs != NULL) {
- sc = xs->sc_link->adapter_softc;
+ sc = xs->sc_link->bus->sb_adapter_softc;
sc_print_addr(xs->sc_link);
printf("SCSI OpCode 0x%02x ", xs->cmd->opcode);
if (pSRB->SRBFlag & TRM_AUTO_REQSENSE)
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index 3bba49f16ee..eb9b6293521 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.54 2020/06/27 17:28:58 krw Exp $ */
+/* $OpenBSD: twe.c,v 1.55 2020/07/16 21:18:30 krw Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -774,7 +774,7 @@ twe_scsi_cmd(xs)
struct scsi_xfer *xs;
{
struct scsi_link *link = xs->sc_link;
- struct twe_softc *sc = link->adapter_softc;
+ struct twe_softc *sc = link->bus->sb_adapter_softc;
struct twe_ccb *ccb = xs->io;
struct twe_cmd *cmd;
struct scsi_inquiry_data inq;
diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c
index 70abd1265d4..3352107eab8 100644
--- a/sys/dev/ic/uha.c
+++ b/sys/dev/ic/uha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uha.c,v 1.33 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: uha.c,v 1.34 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */
#undef UHADEBUG
@@ -261,7 +261,7 @@ uha_scsi_cmd(xs)
struct scsi_xfer *xs;
{
struct scsi_link *sc_link = xs->sc_link;
- struct uha_softc *sc = sc_link->adapter_softc;
+ struct uha_softc *sc = sc_link->bus->sb_adapter_softc;
struct uha_mscp *mscp;
struct uha_dma_seg *sg;
int seg; /* scatter gather seg being worked on */
@@ -413,7 +413,7 @@ uha_timeout(arg)
struct uha_mscp *mscp = arg;
struct scsi_xfer *xs = mscp->xs;
struct scsi_link *sc_link = xs->sc_link;
- struct uha_softc *sc = sc_link->adapter_softc;
+ struct uha_softc *sc = sc_link->bus->sb_adapter_softc;
int s;
sc_print_addr(sc_link);
diff --git a/sys/dev/ic/wd33c93.c b/sys/dev/ic/wd33c93.c
index 913b781d73d..769da233ebf 100644
--- a/sys/dev/ic/wd33c93.c
+++ b/sys/dev/ic/wd33c93.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd33c93.c,v 1.15 2020/07/01 00:02:08 krw Exp $ */
+/* $OpenBSD: wd33c93.c,v 1.16 2020/07/16 21:18:30 krw Exp $ */
/* $NetBSD: wd33c93.c,v 1.24 2010/11/13 13:52:02 uebayasi Exp $ */
/*
@@ -538,7 +538,7 @@ void
wd33c93_scsi_cmd(struct scsi_xfer *xs)
{
struct scsi_link *sc_link = xs->sc_link;
- struct wd33c93_softc *sc = sc_link->adapter_softc;
+ struct wd33c93_softc *sc = sc_link->bus->sb_adapter_softc;
struct wd33c93_acb *acb;
int flags, s;
@@ -2251,7 +2251,7 @@ wd33c93_timeout(void *arg)
struct wd33c93_acb *acb = arg;
struct scsi_xfer *xs = acb->xs;
struct scsi_link *sc_link = xs->sc_link;
- struct wd33c93_softc *sc = sc_link->adapter_softc;
+ struct wd33c93_softc *sc = sc_link->bus->sb_adapter_softc;
int s, asr, csr;
s = splbio();