diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-07-16 21:18:32 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-07-16 21:18:32 +0000 |
commit | 55bed41956fd54a23882af6ea9c5e9e3c20480a1 (patch) | |
tree | 72600dd1e2454e0de6339db57bc4d99e1dfa5356 /sys | |
parent | 86a6905da6200248b7428132fc88b96cac17e020 (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')
46 files changed, 193 insertions, 194 deletions
diff --git a/sys/arch/luna88k/dev/mb89352.c b/sys/arch/luna88k/dev/mb89352.c index bc0dfc6277f..5ad197b370f 100644 --- a/sys/arch/luna88k/dev/mb89352.c +++ b/sys/arch/luna88k/dev/mb89352.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mb89352.c,v 1.25 2020/07/11 13:34:05 krw Exp $ */ +/* $OpenBSD: mb89352.c,v 1.26 2020/07/16 21:18:29 krw Exp $ */ /* $NetBSD: mb89352.c,v 1.5 2000/03/23 07:01:31 thorpej Exp $ */ /* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */ @@ -405,7 +405,7 @@ void spc_scsi_cmd(struct scsi_xfer *xs) { struct scsi_link *sc_link = xs->sc_link; - struct spc_softc *sc = sc_link->adapter_softc; + struct spc_softc *sc = sc_link->bus->sb_adapter_softc; struct spc_acb *acb; int s, flags; @@ -1977,7 +1977,7 @@ spc_timeout(void *arg) struct spc_acb *acb = arg; struct scsi_xfer *xs = acb->xs; struct scsi_link *sc_link = xs->sc_link; - struct spc_softc *sc = sc_link->adapter_softc; + struct spc_softc *sc = sc_link->bus->sb_adapter_softc; int s; sc_print_addr(sc_link); diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c index 078c7240e3c..69813cb27a9 100644 --- a/sys/arch/sparc64/dev/vdsk.c +++ b/sys/arch/sparc64/dev/vdsk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vdsk.c,v 1.57 2020/07/11 13:34:05 krw Exp $ */ +/* $OpenBSD: vdsk.c,v 1.58 2020/07/16 21:18:29 krw Exp $ */ /* * Copyright (c) 2009, 2011 Mark Kettenis * @@ -923,7 +923,7 @@ vdsk_io_put(void *xsc, void *io) void vdsk_scsi_cmd(struct scsi_xfer *xs) { - struct vdsk_softc *sc = xs->sc_link->adapter_softc; + struct vdsk_softc *sc = xs->sc_link->bus->sb_adapter_softc; int timeout, s; int desc; @@ -992,7 +992,7 @@ vdsk_scsi_cmd(struct scsi_xfer *xs) int vdsk_submit_cmd(struct scsi_xfer *xs) { - struct vdsk_softc *sc = xs->sc_link->adapter_softc; + struct vdsk_softc *sc = xs->sc_link->bus->sb_adapter_softc; struct ldc_map *map = sc->sc_lm; struct vio_dring_msg dm; struct scsi_rw *rw; @@ -1115,7 +1115,7 @@ vdsk_submit_cmd(struct scsi_xfer *xs) void vdsk_complete_cmd(struct scsi_xfer *xs, int desc) { - struct vdsk_softc *sc = xs->sc_link->adapter_softc; + struct vdsk_softc *sc = xs->sc_link->bus->sb_adapter_softc; struct ldc_map *map = sc->sc_lm; int cookie, idx; int error; @@ -1151,7 +1151,7 @@ vdsk_scsi_inq(struct scsi_xfer *xs) void vdsk_scsi_inquiry(struct scsi_xfer *xs) { - struct vdsk_softc *sc = xs->sc_link->adapter_softc; + struct vdsk_softc *sc = xs->sc_link->bus->sb_adapter_softc; struct scsi_inquiry_data inq; char buf[5]; @@ -1186,7 +1186,7 @@ vdsk_scsi_inquiry(struct scsi_xfer *xs) void vdsk_scsi_capacity(struct scsi_xfer *xs) { - struct vdsk_softc *sc = xs->sc_link->adapter_softc; + struct vdsk_softc *sc = xs->sc_link->bus->sb_adapter_softc; struct scsi_read_cap_data rcd; uint64_t capacity; @@ -1207,7 +1207,7 @@ vdsk_scsi_capacity(struct scsi_xfer *xs) void vdsk_scsi_capacity16(struct scsi_xfer *xs) { - struct vdsk_softc *sc = xs->sc_link->adapter_softc; + struct vdsk_softc *sc = xs->sc_link->bus->sb_adapter_softc; struct scsi_read_cap_data_16 rcd; bzero(&rcd, sizeof(rcd)); diff --git a/sys/arch/sparc64/sparc64/autoconf.c b/sys/arch/sparc64/sparc64/autoconf.c index 17c2897d636..3036002fdfa 100644 --- a/sys/arch/sparc64/sparc64/autoconf.c +++ b/sys/arch/sparc64/sparc64/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.136 2020/07/05 19:20:06 krw Exp $ */ +/* $OpenBSD: autoconf.c,v 1.137 2020/07/16 21:18:29 krw Exp $ */ /* $NetBSD: autoconf.c,v 1.51 2001/07/24 19:32:11 eeh Exp $ */ /* @@ -1485,8 +1485,8 @@ device_register(struct device *dev, void *aux) /* * Bounds check: we know the target and lun widths. */ - if (target >= sl->adapter_buswidth || - lun >= sl->luns) { + if (target >= sl->bus->sb_adapter_buswidth || + lun >= sl->bus->sb_luns) { printf("SCSI disk bootpath component not accepted: " "target %u; lun %u\n", target, lun); return; diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 02def6dac05..1a32f90942b 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.138 2020/07/11 13:34:06 krw Exp $ */ +/* $OpenBSD: atascsi.c,v 1.139 2020/07/16 21:18:29 krw Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -215,7 +215,7 @@ atascsi_detach(struct atascsi *as, int flags) struct atascsi_port * atascsi_lookup_port(struct scsi_link *link) { - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_host_port *ahp; if (link->target >= as->as_link.adapter_buswidth) @@ -231,7 +231,7 @@ atascsi_lookup_port(struct scsi_link *link) int atascsi_probe(struct scsi_link *link) { - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_host_port *ahp; struct atascsi_port *ap; struct ata_xfer *xa; @@ -437,7 +437,7 @@ unsupported: void atascsi_free(struct scsi_link *link) { - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_host_port *ahp; struct atascsi_port *ap; int port; @@ -503,7 +503,7 @@ void atascsi_disk_cmd(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; struct ata_xfer *xa = xs->io; int flags = 0; @@ -951,7 +951,7 @@ void atascsi_disk_write_same_16(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; struct scsi_write_same_16 *cdb; struct ata_xfer *xa = xs->io; @@ -1094,7 +1094,7 @@ atascsi_disk_unmap_task(void *xxs) { struct scsi_xfer *xs = xxs; struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; struct ata_xfer *xa = xs->io; struct ata_fis_h2d *fis; @@ -1171,7 +1171,7 @@ void atascsi_disk_sync(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; struct ata_xfer *xa = xs->io; @@ -1393,7 +1393,7 @@ void atascsi_passthru_12(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; struct ata_xfer *xa = xs->io; struct scsi_ata_passthru_12 *cdb; @@ -1431,7 +1431,7 @@ void atascsi_passthru_16(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; struct ata_xfer *xa = xs->io; struct scsi_ata_passthru_16 *cdb; @@ -1517,7 +1517,7 @@ void atascsi_disk_start_stop(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; struct ata_xfer *xa = xs->io; struct scsi_start_stop *ss = (struct scsi_start_stop *)xs->cmd; @@ -1560,7 +1560,7 @@ atascsi_disk_start_stop_done(struct ata_xfer *xa) { struct scsi_xfer *xs = xa->atascsi_private; struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; switch (xa->state) { @@ -1607,7 +1607,7 @@ void atascsi_atapi_cmd(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct atascsi *as = link->adapter_softc; + struct atascsi *as = link->bus->sb_adapter_softc; struct atascsi_port *ap; struct ata_xfer *xa = xs->io; struct ata_fis_h2d *fis; diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index b4ae9242ae5..ff2741adbd3 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.112 2020/07/02 21:59:34 krw Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.113 2020/07/16 21:18:29 krw Exp $ */ /* * This code is derived from code with the copyright below. @@ -318,7 +318,7 @@ atapiscsi_detach(struct device *dev, int flags) void wdc_atapi_send_cmd(struct scsi_xfer *sc_xfer) { - struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; + struct atapiscsi_softc *as = sc_xfer->sc_link->bus->sb_adapter_softc; struct channel_softc *chp = as->chp; struct ata_drive_datas *drvp = &chp->ch_drive[as->drive]; struct wdc_xfer *xfer; @@ -421,7 +421,7 @@ wdc_atapi_send_cmd(struct scsi_xfer *sc_xfer) int wdc_atapi_ioctl (struct scsi_link *sc_link, u_long cmd, caddr_t addr, int flag) { - struct atapiscsi_softc *as = sc_link->adapter_softc; + struct atapiscsi_softc *as = sc_link->bus->sb_adapter_softc; struct channel_softc *chp = as->chp; struct ata_drive_datas *drvp = &chp->ch_drive[as->drive]; @@ -808,7 +808,7 @@ wdc_atapi_intr_command(struct channel_softc *chp, struct wdc_xfer *xfer, { struct scsi_xfer *sc_xfer = xfer->cmd; struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive]; - struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; + struct atapiscsi_softc *as = sc_xfer->sc_link->bus->sb_adapter_softc; int i; u_int8_t cmd[16]; struct scsi_sense *cmd_reqsense; @@ -909,7 +909,7 @@ char * wdc_atapi_in_data_phase(struct wdc_xfer *xfer, int len, int ire) { struct scsi_xfer *sc_xfer = xfer->cmd; - struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; + struct atapiscsi_softc *as = sc_xfer->sc_link->bus->sb_adapter_softc; char *message; if (as->protocol_phase != as_data) { @@ -1047,7 +1047,7 @@ wdc_atapi_intr_complete(struct channel_softc *chp, struct wdc_xfer *xfer, { struct scsi_xfer *sc_xfer = xfer->cmd; struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive]; - struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; + struct atapiscsi_softc *as = sc_xfer->sc_link->bus->sb_adapter_softc; WDCDEBUG_PRINT(("PHASE_COMPLETED\n"), DEBUG_INTR); @@ -1171,7 +1171,7 @@ wdc_atapi_pio_intr(struct channel_softc *chp, struct wdc_xfer *xfer, int timeout, struct atapi_return_args *ret) { struct scsi_xfer *sc_xfer = xfer->cmd; - struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; + struct atapiscsi_softc *as = sc_xfer->sc_link->bus->sb_adapter_softc; u_int8_t ireason; wdc_atapi_update_status(chp); 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(); diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index aed2b74c048..cdc39d2a6c5 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wds.c,v 1.51 2020/07/11 13:34:06 krw Exp $ */ +/* $OpenBSD: wds.c,v 1.52 2020/07/16 21:18:30 krw Exp $ */ /* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */ #undef WDSDIAG @@ -868,7 +868,7 @@ void wds_scsi_cmd(struct scsi_xfer *xs) { struct scsi_link *sc_link = xs->sc_link; - struct wds_softc *sc = sc_link->adapter_softc; + struct wds_softc *sc = sc_link->bus->sb_adapter_softc; bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; struct wds_scb *scb; @@ -1147,7 +1147,7 @@ wds_timeout(void *arg) s = splbio(); xs = scb->xs; sc_link = xs->sc_link; - sc = sc_link->adapter_softc; + sc = sc_link->bus->sb_adapter_softc; sc_print_addr(sc_link); printf("timed out"); 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 = 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)); diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c index f8d7572bd0c..3e10c29f0ba 100644 --- a/sys/dev/sdmmc/sdmmc_scsi.c +++ b/sys/dev/sdmmc/sdmmc_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdmmc_scsi.c,v 1.48 2020/07/13 13:43:31 krw Exp $ */ +/* $OpenBSD: sdmmc_scsi.c,v 1.49 2020/07/16 21:18:31 krw Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -305,7 +305,7 @@ void sdmmc_scsi_cmd(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct sdmmc_softc *sc = link->adapter_softc; + struct sdmmc_softc *sc = link->bus->sb_adapter_softc; struct sdmmc_scsi_softc *scbus = sc->sc_scsibus; struct sdmmc_scsi_target *tgt = &scbus->sc_tgt[link->target]; struct scsi_read_cap_data rcd; @@ -388,7 +388,7 @@ void sdmmc_inquiry(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct sdmmc_softc *sc = link->adapter_softc; + struct sdmmc_softc *sc = link->bus->sb_adapter_softc; struct sdmmc_scsi_softc *scbus = sc->sc_scsibus; struct sdmmc_scsi_target *tgt = &scbus->sc_tgt[link->target]; struct scsi_inquiry_data inq; @@ -480,7 +480,7 @@ sdmmc_complete_xs(void *arg) struct sdmmc_ccb *ccb = arg; struct scsi_xfer *xs = ccb->ccb_xs; struct scsi_link *link = xs->sc_link; - struct sdmmc_softc *sc = link->adapter_softc; + struct sdmmc_softc *sc = link->bus->sb_adapter_softc; struct sdmmc_scsi_softc *scbus = sc->sc_scsibus; struct sdmmc_scsi_target *tgt = &scbus->sc_tgt[link->target]; int error; @@ -512,7 +512,7 @@ sdmmc_done_xs(struct sdmmc_ccb *ccb) struct scsi_xfer *xs = ccb->ccb_xs; #ifdef SDMMC_DEBUG struct scsi_link *link = xs->sc_link; - struct sdmmc_softc *sc = link->adapter_softc; + struct sdmmc_softc *sc = link->bus->sb_adapter_softc; #endif timeout_del(&xs->stimeout); @@ -547,7 +547,7 @@ sdmmc_stimeout(void *arg) void sdmmc_minphys(struct buf *bp, struct scsi_link *sl) { - struct sdmmc_softc *sc = sl->adapter_softc; + struct sdmmc_softc *sc = sl->bus->sb_adapter_softc; struct sdmmc_scsi_softc *scbus = sc->sc_scsibus; struct sdmmc_scsi_target *tgt = &scbus->sc_tgt[sl->target]; struct sdmmc_function *sf = tgt->card; @@ -598,7 +598,7 @@ sdmmc_scsi_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size, sc = NULL; SLIST_FOREACH(link, &bus_sc->sc_link_list, bus_list) { if (link->device_softc == disk) { - sc = link->adapter_softc; + sc = link->bus->sb_adapter_softc; scsi_sc = sc->sc_scsibus; sf = scsi_sc->sc_tgt[link->target].card; } diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 3815cca7e58..7a3774b861e 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.407 2020/07/13 00:05:39 kn Exp $ */ +/* $OpenBSD: softraid.c,v 1.408 2020/07/16 21:18:29 krw Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -2326,7 +2326,7 @@ void sr_scsi_cmd(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct sr_softc *sc = link->adapter_softc; + struct sr_softc *sc = link->bus->sb_adapter_softc; struct sr_workunit *wu = xs->io; struct sr_discipline *sd; @@ -2428,7 +2428,7 @@ complete: int sr_scsi_probe(struct scsi_link *link) { - struct sr_softc *sc = link->adapter_softc; + struct sr_softc *sc = link->bus->sb_adapter_softc; struct sr_discipline *sd; KASSERT(link->target < SR_MAX_LD && link->lun == 0); @@ -2449,7 +2449,7 @@ sr_scsi_probe(struct scsi_link *link) int sr_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag) { - struct sr_softc *sc = link->adapter_softc; + struct sr_softc *sc = link->bus->sb_adapter_softc; struct sr_discipline *sd; sd = sc->sc_targets[link->target]; diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c index 881323fa2a3..81d046fed4e 100644 --- a/sys/dev/usb/umass_scsi.c +++ b/sys/dev/usb/umass_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass_scsi.c,v 1.54 2020/07/11 14:48:53 krw Exp $ */ +/* $OpenBSD: umass_scsi.c,v 1.55 2020/07/16 21:18:31 krw Exp $ */ /* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -148,7 +148,7 @@ umass_scsi_detach(struct umass_softc *sc, int flags) int umass_scsi_probe(struct scsi_link *link) { - struct umass_softc *sc = link->adapter_softc; + struct umass_softc *sc = link->bus->sb_adapter_softc; struct usb_device_info udi; size_t len; @@ -179,7 +179,7 @@ void umass_scsi_cmd(struct scsi_xfer *xs) { struct scsi_link *sc_link = xs->sc_link; - struct umass_softc *sc = sc_link->adapter_softc; + struct umass_softc *sc = sc_link->bus->sb_adapter_softc; struct scsi_generic *cmd; int cmdlen, dir; diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c index 541045c5024..525ebc5d4d0 100644 --- a/sys/dev/vscsi.c +++ b/sys/dev/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.52 2020/06/27 17:28:58 krw Exp $ */ +/* $OpenBSD: vscsi.c,v 1.53 2020/07/16 21:18:29 krw Exp $ */ /* * Copyright (c) 2008 David Gwynne <dlg@openbsd.org> @@ -162,7 +162,7 @@ void vscsi_cmd(struct scsi_xfer *xs) { struct scsi_link *link = xs->sc_link; - struct vscsi_softc *sc = link->adapter_softc; + struct vscsi_softc *sc = link->bus->sb_adapter_softc; struct vscsi_ccb *ccb = xs->io; int polled = ISSET(xs->flags, SCSI_POLL); int running = 0; @@ -219,7 +219,7 @@ vscsi_done(struct vscsi_softc *sc, struct vscsi_ccb *ccb) int vscsi_probe(struct scsi_link *link) { - struct vscsi_softc *sc = link->adapter_softc; + struct vscsi_softc *sc = link->bus->sb_adapter_softc; int rv = 0; mtx_enter(&sc->sc_state_mtx); @@ -235,7 +235,7 @@ vscsi_probe(struct scsi_link *link) void vscsi_free(struct scsi_link *link) { - struct vscsi_softc *sc = link->adapter_softc; + struct vscsi_softc *sc = link->bus->sb_adapter_softc; mtx_enter(&sc->sc_state_mtx); sc->sc_ref_count--; |