From a454aff3d36bc4380eb6cbe6ad399a96a9b74889 Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 16 Apr 2022 19:19:58 +0000 Subject: [PATCH] constify SCSI adapter entry points ok krw@ --- sys/arch/luna88k/dev/mb89352.c | 4 ++-- sys/arch/luna88k/dev/mb89352var.h | 4 ++-- sys/arch/luna88k/dev/spc.c | 4 ++-- sys/arch/sparc64/dev/vdsk.c | 4 ++-- sys/dev/ata/atascsi.c | 4 ++-- sys/dev/atapiscsi/atapiscsi.c | 4 ++-- sys/dev/ic/aac.c | 4 ++-- sys/dev/ic/adv.c | 4 ++-- sys/dev/ic/adw.c | 4 ++-- sys/dev/ic/aic6360.c | 4 ++-- sys/dev/ic/aic79xx_openbsd.c | 4 ++-- sys/dev/ic/aic7xxx_openbsd.c | 4 ++-- sys/dev/ic/ami.c | 6 +++--- sys/dev/ic/cac.c | 4 ++-- sys/dev/ic/ciss.c | 4 ++-- sys/dev/ic/gdt_common.c | 4 ++-- sys/dev/ic/mfi.c | 6 +++--- sys/dev/ic/mpi.c | 4 ++-- sys/dev/ic/ncr53c9x.c | 4 ++-- sys/dev/ic/nvme.c | 4 ++-- sys/dev/ic/oosiop.c | 4 ++-- sys/dev/ic/osiop.c | 4 ++-- sys/dev/ic/qla.c | 4 ++-- sys/dev/ic/qlw.c | 4 ++-- sys/dev/ic/siop.c | 4 ++-- sys/dev/ic/twe.c | 4 ++-- sys/dev/ic/uha.c | 4 ++-- sys/dev/isa/wds.c | 4 ++-- sys/dev/pci/arc.c | 4 ++-- sys/dev/pci/iha_pci.c | 4 ++-- sys/dev/pci/ips.c | 6 +++--- sys/dev/pci/mfii.c | 6 +++--- sys/dev/pci/mpii.c | 4 ++-- sys/dev/pci/qle.c | 4 ++-- sys/dev/pci/trm_pci.c | 4 ++-- sys/dev/pci/vmwpvs.c | 4 ++-- sys/dev/pv/hvs.c | 2 +- sys/dev/pv/vioblk.c | 4 ++-- sys/dev/pv/vioscsi.c | 4 ++-- sys/dev/pv/xbf.c | 4 ++-- sys/dev/sdmmc/sdmmc_scsi.c | 4 ++-- sys/dev/softraid.c | 4 ++-- sys/dev/usb/umass_scsi.c | 4 ++-- sys/dev/vscsi.c | 4 ++-- sys/scsi/mpath.c | 4 ++-- sys/scsi/scsiconf.h | 6 +++--- 46 files changed, 96 insertions(+), 96 deletions(-) diff --git a/sys/arch/luna88k/dev/mb89352.c b/sys/arch/luna88k/dev/mb89352.c index 450ebece88b..5e2f07fedd0 100644 --- a/sys/arch/luna88k/dev/mb89352.c +++ b/sys/arch/luna88k/dev/mb89352.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mb89352.c,v 1.32 2021/09/25 23:53:35 aoyama Exp $ */ +/* $OpenBSD: mb89352.c,v 1.33 2022/04/16 19:19:58 naddy 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 */ @@ -190,7 +190,7 @@ do { \ void /* spc_attach(sc) */ -spc_attach(struct spc_softc *sc, struct scsi_adapter *adapter) +spc_attach(struct spc_softc *sc, const struct scsi_adapter *adapter) { struct scsibus_attach_args saa; SPC_TRACE(("spc_attach ")); diff --git a/sys/arch/luna88k/dev/mb89352var.h b/sys/arch/luna88k/dev/mb89352var.h index 0df2bc6358f..4287abadf8a 100644 --- a/sys/arch/luna88k/dev/mb89352var.h +++ b/sys/arch/luna88k/dev/mb89352var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mb89352var.h,v 1.8 2021/03/11 11:16:58 jsg Exp $ */ +/* $OpenBSD: mb89352var.h,v 1.9 2022/04/16 19:19:58 naddy Exp $ */ /* $NetBSD: mb89352var.h,v 1.6 2003/08/02 12:48:09 tsutsui Exp $ */ /* NecBSD: mb89352var.h,v 1.4 1998/03/14 07:31:22 kmatsuda Exp */ @@ -203,7 +203,7 @@ extern int spc_debug; /* SPC_SHOWSTART|SPC_SHOWMISC|SPC_SHOWTRACE; */ #define SPC_TRACE(s) SPC_PRINT(SPC_SHOWTRACE, s) #define SPC_START(s) SPC_PRINT(SPC_SHOWSTART, s) -void spc_attach(struct spc_softc *, struct scsi_adapter *); +void spc_attach(struct spc_softc *, const struct scsi_adapter *); int spc_intr(void *); int spc_find(bus_space_tag_t, bus_space_handle_t, int); void spc_init(struct spc_softc *); diff --git a/sys/arch/luna88k/dev/spc.c b/sys/arch/luna88k/dev/spc.c index 91113f2ee10..99165b0ab3a 100644 --- a/sys/arch/luna88k/dev/spc.c +++ b/sys/arch/luna88k/dev/spc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spc.c,v 1.12 2022/04/06 18:59:26 naddy Exp $ */ +/* $OpenBSD: spc.c,v 1.13 2022/04/16 19:19:58 naddy Exp $ */ /* $NetBSD: spc.c,v 1.4 2003/07/05 19:00:17 tsutsui Exp $ */ /*- @@ -59,7 +59,7 @@ struct cfdriver spc_cd = { NULL, "spc", DV_DULL }; -struct scsi_adapter spc_switch = { +const struct scsi_adapter spc_switch = { spc_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c index 8c3c41b0679..61df87c871a 100644 --- a/sys/arch/sparc64/dev/vdsk.c +++ b/sys/arch/sparc64/dev/vdsk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vdsk.c,v 1.72 2021/10/24 17:05:04 mpi Exp $ */ +/* $OpenBSD: vdsk.c,v 1.73 2022/04/16 19:19:58 naddy Exp $ */ /* * Copyright (c) 2009, 2011 Mark Kettenis * @@ -179,7 +179,7 @@ struct cfdriver vdsk_cd = { void vdsk_scsi_cmd(struct scsi_xfer *); -struct scsi_adapter vdsk_switch = { +const struct scsi_adapter vdsk_switch = { vdsk_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index c1b3237c622..934ed425630 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.152 2022/04/09 20:10:26 naddy Exp $ */ +/* $OpenBSD: atascsi.c,v 1.153 2022/04/16 19:19:58 naddy Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -94,7 +94,7 @@ int atascsi_probe(struct scsi_link *); void atascsi_free(struct scsi_link *); /* template */ -struct scsi_adapter atascsi_switch = { +const struct scsi_adapter atascsi_switch = { atascsi_cmd, NULL, atascsi_probe, atascsi_free, NULL }; diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index 622d1687499..5a2d58f7e9f 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.119 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.120 2022/04/16 19:19:58 naddy Exp $ */ /* * This code is derived from code with the copyright below. @@ -156,7 +156,7 @@ struct atapiscsi_softc { int wdc_atapi_ioctl(struct scsi_link *, u_long, caddr_t, int); void wdc_atapi_send_cmd(struct scsi_xfer *sc_xfer); -static struct scsi_adapter atapiscsi_switch = { +static const struct scsi_adapter atapiscsi_switch = { wdc_atapi_send_cmd, NULL, NULL, NULL, wdc_atapi_ioctl }; diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index fe91366547e..33e5fc2687b 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac.c,v 1.93 2022/01/09 05:42:37 jsg Exp $ */ +/* $OpenBSD: aac.c,v 1.94 2022/04/16 19:19:58 naddy Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -129,7 +129,7 @@ struct cfdriver aac_cd = { NULL, "aac", DV_DULL }; -struct scsi_adapter aac_switch = { +const struct scsi_adapter aac_switch = { aac_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index 3ee97dfee35..e32f1da5b26 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adv.c,v 1.52 2021/03/07 06:21:38 jsg Exp $ */ +/* $OpenBSD: adv.c,v 1.53 2022/04/16 19:19:58 naddy Exp $ */ /* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */ /* @@ -81,7 +81,7 @@ struct cfdriver adv_cd = { }; -struct scsi_adapter adv_switch = { +const struct scsi_adapter adv_switch = { adv_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index 60dfe556e10..5b7663970e7 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw.c,v 1.68 2020/09/22 19:32:52 krw Exp $ */ +/* $OpenBSD: adw.c,v 1.69 2022/04/16 19:19:58 naddy Exp $ */ /* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */ /* @@ -82,7 +82,7 @@ struct cfdriver adw_cd = { NULL, "adw", DV_DULL }; -struct scsi_adapter adw_switch = { +const struct scsi_adapter adw_switch = { adw_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c index 50da35ee95b..f1b294333a8 100644 --- a/sys/dev/ic/aic6360.c +++ b/sys/dev/ic/aic6360.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6360.c,v 1.39 2022/01/09 05:42:38 jsg Exp $ */ +/* $OpenBSD: aic6360.c,v 1.40 2022/04/16 19:19:58 naddy Exp $ */ /* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */ #ifdef DDB @@ -184,7 +184,7 @@ struct cfdriver aic_cd = { NULL, "aic", DV_DULL }; -struct scsi_adapter aic_switch = { +const struct scsi_adapter aic_switch = { aic_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c index 0601dcaa680..e881ad5c2bb 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.59 2020/09/22 19:32:52 krw Exp $ */ +/* $OpenBSD: aic79xx_openbsd.c,v 1.60 2022/04/16 19:19:58 naddy Exp $ */ /* * Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom @@ -81,7 +81,7 @@ struct cfdriver ahd_cd = { NULL, "ahd", DV_DULL }; -static struct scsi_adapter ahd_switch = { +static const struct scsi_adapter ahd_switch = { ahd_action, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c index 7c855474b87..030068dd641 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.71 2020/09/22 19:32:52 krw Exp $ */ +/* $OpenBSD: aic7xxx_openbsd.c,v 1.72 2022/04/16 19:19:58 naddy Exp $ */ /* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */ /* @@ -60,7 +60,7 @@ struct cfdriver ahc_cd = { NULL, "ahc", DV_DULL }; -static struct scsi_adapter ahc_switch = { +static const struct scsi_adapter ahc_switch = { ahc_action, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index c1b6374dc41..7b8ed4c48e3 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.261 2022/01/09 05:42:38 jsg Exp $ */ +/* $OpenBSD: ami.c,v 1.262 2022/04/16 19:19:58 naddy Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -96,13 +96,13 @@ struct cfdriver ami_cd = { void ami_scsi_cmd(struct scsi_xfer *); int ami_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int); -struct scsi_adapter ami_switch = { +const struct scsi_adapter ami_switch = { ami_scsi_cmd, NULL, NULL, NULL, ami_scsi_ioctl }; void ami_scsi_raw_cmd(struct scsi_xfer *); -struct scsi_adapter ami_raw_switch = { +const struct scsi_adapter ami_raw_switch = { ami_scsi_raw_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c index 8d19018d673..b2f2e24b765 100644 --- a/sys/dev/ic/cac.c +++ b/sys/dev/ic/cac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cac.c,v 1.75 2022/01/09 05:42:38 jsg Exp $ */ +/* $OpenBSD: cac.c,v 1.76 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */ /* @@ -97,7 +97,7 @@ struct cfdriver cac_cd = { void cac_scsi_cmd(struct scsi_xfer *); -struct scsi_adapter cac_switch = { +const struct scsi_adapter cac_switch = { cac_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index c3dbed0f225..092d403b713 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.90 2022/01/09 05:42:38 jsg Exp $ */ +/* $OpenBSD: ciss.c,v 1.91 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -69,7 +69,7 @@ struct cfdriver ciss_cd = { void ciss_scsi_cmd(struct scsi_xfer *xs); int ciss_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int); -struct scsi_adapter ciss_switch = { +const struct scsi_adapter ciss_switch = { ciss_scsi_cmd, NULL, NULL, NULL, ciss_scsi_ioctl }; diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index c19ee86ecb0..50b20795ae4 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.84 2021/08/30 14:44:39 jasper Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.85 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved. @@ -91,7 +91,7 @@ struct cfdriver gdt_cd = { NULL, "gdt", DV_DULL }; -struct scsi_adapter gdt_switch = { +const struct scsi_adapter gdt_switch = { gdt_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c index ca75c17e6c1..724783a8b22 100644 --- a/sys/dev/ic/mfi.c +++ b/sys/dev/ic/mfi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfi.c,v 1.187 2020/09/22 19:32:52 krw Exp $ */ +/* $OpenBSD: mfi.c,v 1.188 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2006 Marco Peereboom * @@ -62,11 +62,11 @@ int mfi_ioctl_cache(struct scsi_link *, u_long, struct dk_cache *); void mfi_pd_scsi_cmd(struct scsi_xfer *); int mfi_pd_scsi_probe(struct scsi_link *); -struct scsi_adapter mfi_switch = { +const struct scsi_adapter mfi_switch = { mfi_scsi_cmd, NULL, NULL, NULL, mfi_scsi_ioctl }; -struct scsi_adapter mfi_pd_switch = { +const struct scsi_adapter mfi_pd_switch = { mfi_pd_scsi_cmd, NULL, mfi_pd_scsi_probe, NULL, mfi_scsi_ioctl }; diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index 89c4f0ce9c1..75aa8d22257 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.223 2020/09/22 19:32:52 krw Exp $ */ +/* $OpenBSD: mpi.c,v 1.224 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne @@ -68,7 +68,7 @@ int mpi_scsi_probe(struct scsi_link *); int mpi_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int); -struct scsi_adapter mpi_switch = { +const struct scsi_adapter mpi_switch = { mpi_scsi_cmd, NULL, mpi_scsi_probe, NULL, mpi_scsi_ioctl }; diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c index 7ceb8c86983..fb912ce284c 100644 --- a/sys/dev/ic/ncr53c9x.c +++ b/sys/dev/ic/ncr53c9x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr53c9x.c,v 1.79 2022/01/09 05:42:38 jsg Exp $ */ +/* $OpenBSD: ncr53c9x.c,v 1.80 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */ /* @@ -149,7 +149,7 @@ void ncr53c9x_scsi_cmd(struct scsi_xfer *); int ncr53c9x_scsi_probe(struct scsi_link *); void ncr53c9x_scsi_free(struct scsi_link *); -struct scsi_adapter ncr53c9x_switch = { +const struct scsi_adapter ncr53c9x_switch = { ncr53c9x_scsi_cmd, NULL, ncr53c9x_scsi_probe, ncr53c9x_scsi_free, NULL }; diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index 4240971f8e0..148b54cd1c0 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme.c,v 1.103 2021/08/31 04:21:04 dlg Exp $ */ +/* $OpenBSD: nvme.c,v 1.104 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -93,7 +93,7 @@ void nvme_scsi_free(struct scsi_link *); int nvme_hibernate_io(dev_t, daddr_t, vaddr_t, size_t, int, void *); #endif -struct scsi_adapter nvme_switch = { +const struct scsi_adapter nvme_switch = { nvme_scsi_cmd, nvme_minphys, nvme_scsi_probe, nvme_scsi_free, NULL }; diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index 79fbca989a3..ea7307f6801 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: oosiop.c,v 1.35 2022/01/09 05:42:38 jsg Exp $ */ +/* $OpenBSD: oosiop.c,v 1.36 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */ /* @@ -128,7 +128,7 @@ struct cfdriver oosiop_cd = { NULL, "oosiop", DV_DULL }; -struct scsi_adapter oosiop_switch = { +const struct scsi_adapter oosiop_switch = { oosiop_scsicmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index dac23239861..b64e14b3d0b 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osiop.c,v 1.63 2020/09/22 19:32:52 krw Exp $ */ +/* $OpenBSD: osiop.c,v 1.64 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */ /* @@ -179,7 +179,7 @@ struct cfdriver osiop_cd = { NULL, "osiop", DV_DULL }; -struct scsi_adapter osiop_switch = { +const struct scsi_adapter osiop_switch = { osiop_scsicmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c index ecaed773b23..82e71ba6c09 100644 --- a/sys/dev/ic/qla.c +++ b/sys/dev/ic/qla.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qla.c,v 1.68 2020/09/22 19:32:52 krw Exp $ */ +/* $OpenBSD: qla.c,v 1.69 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2011 David Gwynne @@ -169,7 +169,7 @@ static const struct qla_regs qla_regs_23XX = { #define qla_read_isr(_sc, _isr, _info) \ ((*(_sc)->sc_regs->read_isr)((_sc), (_isr), (_info))) -struct scsi_adapter qla_switch = { +const struct scsi_adapter qla_switch = { qla_scsi_cmd, NULL, qla_scsi_probe, NULL, NULL }; diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c index 16da5c1e481..4d7703155a5 100644 --- a/sys/dev/ic/qlw.c +++ b/sys/dev/ic/qlw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qlw.c,v 1.47 2020/09/22 19:32:52 krw Exp $ */ +/* $OpenBSD: qlw.c,v 1.48 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2011 David Gwynne @@ -174,7 +174,7 @@ qlw_queue_write(struct qlw_softc *sc, bus_size_t offset, u_int16_t value) qlw_write(sc, sc->sc_mbox_base + offset, value); } -struct scsi_adapter qlw_switch = { +const struct scsi_adapter qlw_switch = { qlw_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 533fc7fc03a..7b45e654d2a 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop.c,v 1.88 2022/01/09 05:42:42 jsg Exp $ */ +/* $OpenBSD: siop.c,v 1.89 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */ /* @@ -102,7 +102,7 @@ struct cfdriver siop_cd = { NULL, "siop", DV_DULL }; -struct scsi_adapter siop_switch = { +const struct scsi_adapter siop_switch = { siop_scsicmd, NULL, siop_scsiprobe, siop_scsifree, NULL }; diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c index d7d17feaa5a..4d21e9fa225 100644 --- a/sys/dev/ic/twe.c +++ b/sys/dev/ic/twe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: twe.c,v 1.66 2021/07/14 01:11:13 daniel Exp $ */ +/* $OpenBSD: twe.c,v 1.67 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved. @@ -64,7 +64,7 @@ struct cfdriver twe_cd = { void twe_scsi_cmd(struct scsi_xfer *); -struct scsi_adapter twe_switch = { +const struct scsi_adapter twe_switch = { twe_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c index 273f4c75d24..e0aeb2ba67a 100644 --- a/sys/dev/ic/uha.c +++ b/sys/dev/ic/uha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uha.c,v 1.41 2022/02/15 12:04:44 jsg Exp $ */ +/* $OpenBSD: uha.c,v 1.42 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */ /* * Copyright (c) 1994, 1996 Charles M. Hannum. All rights reserved. @@ -78,7 +78,7 @@ void *uha_mscp_alloc(void *); void uha_scsi_cmd(struct scsi_xfer *); int uhaprint(void *, const char *); -struct scsi_adapter uha_switch = { +const struct scsi_adapter uha_switch = { uha_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c index ef567ad6338..29942f5192a 100644 --- a/sys/dev/isa/wds.c +++ b/sys/dev/isa/wds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wds.c,v 1.58 2022/04/06 18:59:29 naddy Exp $ */ +/* $OpenBSD: wds.c,v 1.59 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */ #undef WDSDIAG @@ -166,7 +166,7 @@ int wds_ipoll(struct wds_softc *, struct wds_scb *, int); void wds_timeout(void *); int wdsprint(void *, const char *); -struct scsi_adapter wds_switch = { +const struct scsi_adapter wds_switch = { wds_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c index 4aeba9b47ff..a5c1137d14b 100644 --- a/sys/dev/pci/arc.c +++ b/sys/dev/pci/arc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc.c,v 1.122 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: arc.c,v 1.123 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2006 David Gwynne @@ -686,7 +686,7 @@ struct cfdriver arc_cd = { NULL, "arc", DV_DULL }; -struct scsi_adapter arc_switch = { +const struct scsi_adapter arc_switch = { arc_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pci/iha_pci.c b/sys/dev/pci/iha_pci.c index 85d36239f45..7c12db32282 100644 --- a/sys/dev/pci/iha_pci.c +++ b/sys/dev/pci/iha_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iha_pci.c,v 1.20 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: iha_pci.c,v 1.21 2022/04/16 19:19:59 naddy Exp $ */ /*------------------------------------------------------------------------- * * Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller. @@ -55,7 +55,7 @@ struct cfdriver iha_cd = { NULL, "iha", DV_DULL }; -struct scsi_adapter iha_switch = { +const struct scsi_adapter iha_switch = { iha_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c index d7ac758016c..afbd0e1849f 100644 --- a/sys/dev/pci/ips.c +++ b/sys/dev/pci/ips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ips.c,v 1.134 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: ips.c,v 1.135 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2006, 2007, 2009 Alexander Yurchenko @@ -493,11 +493,11 @@ struct cfdriver ips_cd = { NULL, "ips", DV_DULL }; -static struct scsi_adapter ips_switch = { +static const struct scsi_adapter ips_switch = { ips_scsi_cmd, NULL, NULL, NULL, ips_scsi_ioctl }; -static struct scsi_adapter ips_pt_switch = { +static const struct scsi_adapter ips_pt_switch = { ips_scsi_pt_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index ecfba52edc8..7aa2c664c05 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.84 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: mfii.c,v 1.85 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2012 David Gwynne @@ -382,14 +382,14 @@ void mfii_scsi_cmd_done(struct mfii_softc *, struct mfii_ccb *); int mfii_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int); int mfii_ioctl_cache(struct scsi_link *, u_long, struct dk_cache *); -struct scsi_adapter mfii_switch = { +const struct scsi_adapter mfii_switch = { mfii_scsi_cmd, NULL, NULL, NULL, mfii_scsi_ioctl }; void mfii_pd_scsi_cmd(struct scsi_xfer *); int mfii_pd_scsi_probe(struct scsi_link *); -struct scsi_adapter mfii_pd_switch = { +const struct scsi_adapter mfii_pd_switch = { mfii_pd_scsi_cmd, NULL, mfii_pd_scsi_probe, NULL, NULL, }; diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index abf59e1460e..974ceb88ba7 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpii.c,v 1.142 2022/03/11 18:00:50 mpi Exp $ */ +/* $OpenBSD: mpii.c,v 1.143 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov * Copyright (c) 2009 James Giannoules @@ -266,7 +266,7 @@ void mpii_scsi_cmd_done(struct mpii_ccb *); int mpii_scsi_probe(struct scsi_link *); int mpii_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int); -struct scsi_adapter mpii_switch = { +const struct scsi_adapter mpii_switch = { mpii_scsi_cmd, NULL, mpii_scsi_probe, NULL, mpii_scsi_ioctl }; diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c index 1029a72edcc..88f874b1a0a 100644 --- a/sys/dev/pci/qle.c +++ b/sys/dev/pci/qle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qle.c,v 1.62 2022/03/11 18:00:51 mpi Exp $ */ +/* $OpenBSD: qle.c,v 1.63 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2013, 2014 Jonathan Matthew @@ -252,7 +252,7 @@ void qle_scsi_cmd(struct scsi_xfer *); int qle_scsi_probe(struct scsi_link *); -struct scsi_adapter qle_switch = { +const struct scsi_adapter qle_switch = { qle_scsi_cmd, NULL, qle_scsi_probe, NULL, NULL }; diff --git a/sys/dev/pci/trm_pci.c b/sys/dev/pci/trm_pci.c index fa4b960aaf0..ee4e28b3d2d 100644 --- a/sys/dev/pci/trm_pci.c +++ b/sys/dev/pci/trm_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trm_pci.c,v 1.11 2022/04/06 18:59:29 naddy Exp $ +/* $OpenBSD: trm_pci.c,v 1.12 2022/04/16 19:19:59 naddy Exp $ * ------------------------------------------------------------ * O.S : OpenBSD * FILE NAME : trm_pci.c @@ -69,7 +69,7 @@ struct cfdriver trm_cd = { NULL, "trm", DV_DULL }; -struct scsi_adapter trm_switch = { +const struct scsi_adapter trm_switch = { trm_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c index bfdb63512c9..7a6efd294e3 100644 --- a/sys/dev/pci/vmwpvs.c +++ b/sys/dev/pci/vmwpvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmwpvs.c,v 1.26 2022/03/11 18:00:52 mpi Exp $ */ +/* $OpenBSD: vmwpvs.c,v 1.27 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2013 David Gwynne @@ -354,7 +354,7 @@ struct cfdriver vmwpvs_cd = { void vmwpvs_scsi_cmd(struct scsi_xfer *); -struct scsi_adapter vmwpvs_switch = { +const struct scsi_adapter vmwpvs_switch = { vmwpvs_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pv/hvs.c b/sys/dev/pv/hvs.c index 412ca52903a..812d11957ca 100644 --- a/sys/dev/pv/hvs.c +++ b/sys/dev/pv/hvs.c @@ -247,7 +247,7 @@ const struct cfattach hvs_ca = { sizeof(struct hvs_softc), hvs_match, hvs_attach }; -struct scsi_adapter hvs_switch = { +const struct scsi_adapter hvs_switch = { hvs_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pv/vioblk.c b/sys/dev/pv/vioblk.c index 9a3ccbe5170..093ce9b5a58 100644 --- a/sys/dev/pv/vioblk.c +++ b/sys/dev/pv/vioblk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioblk.c,v 1.34 2022/01/09 05:42:58 jsg Exp $ */ +/* $OpenBSD: vioblk.c,v 1.35 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch. @@ -149,7 +149,7 @@ struct cfdriver vioblk_cd = { NULL, "vioblk", DV_DULL }; -struct scsi_adapter vioblk_switch = { +const struct scsi_adapter vioblk_switch = { vioblk_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pv/vioscsi.c b/sys/dev/pv/vioscsi.c index d8d98760d80..6c4f2a17942 100644 --- a/sys/dev/pv/vioscsi.c +++ b/sys/dev/pv/vioscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioscsi.c,v 1.29 2022/01/09 05:42:58 jsg Exp $ */ +/* $OpenBSD: vioscsi.c,v 1.30 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2013 Google Inc. * @@ -80,7 +80,7 @@ struct cfdriver vioscsi_cd = { NULL, "vioscsi", DV_DULL, }; -struct scsi_adapter vioscsi_switch = { +const struct scsi_adapter vioscsi_switch = { vioscsi_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 90b8ce7dccb..63b90024ef5 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.51 2020/10/15 13:22:13 krw Exp $ */ +/* $OpenBSD: xbf.c,v 1.52 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2016, 2017 Mike Belopuhov @@ -227,7 +227,7 @@ int xbf_submit_cmd(struct scsi_xfer *); int xbf_poll_cmd(struct scsi_xfer *); void xbf_complete_cmd(struct xbf_softc *, struct xbf_ccb_queue *, int); -struct scsi_adapter xbf_switch = { +const struct scsi_adapter xbf_switch = { xbf_scsi_cmd, NULL, NULL, NULL, NULL }; diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c index e85ce163e19..13cb9101085 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.60 2021/03/27 14:36:28 kn Exp $ */ +/* $OpenBSD: sdmmc_scsi.c,v 1.61 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler @@ -92,7 +92,7 @@ void sdmmc_done_xs(struct sdmmc_ccb *); void sdmmc_stimeout(void *); void sdmmc_minphys(struct buf *, struct scsi_link *); -struct scsi_adapter sdmmc_switch = { +const struct scsi_adapter sdmmc_switch = { sdmmc_scsi_cmd, sdmmc_minphys, NULL, NULL, NULL }; diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 607989f7069..762f6ee57d5 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.424 2022/04/12 14:34:11 semarie Exp $ */ +/* $OpenBSD: softraid.c,v 1.425 2022/04/16 19:19:58 naddy Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom * Copyright (c) 2008 Chris Kuethe @@ -175,7 +175,7 @@ struct sr_hotplug_list_head sr_hotplug_callbacks; extern void (*softraid_disk_attach)(struct disk *, int); /* scsi glue */ -struct scsi_adapter sr_switch = { +const struct scsi_adapter sr_switch = { sr_scsi_cmd, NULL, sr_scsi_probe, NULL, sr_scsi_ioctl }; diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c index 68956780229..18676aaa76d 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.62 2021/11/22 10:17:14 mglocker Exp $ */ +/* $OpenBSD: umass_scsi.c,v 1.63 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ struct umass_scsi_softc { int umass_scsi_probe(struct scsi_link *); void umass_scsi_cmd(struct scsi_xfer *); -struct scsi_adapter umass_scsi_switch = { +const struct scsi_adapter umass_scsi_switch = { umass_scsi_cmd, NULL, umass_scsi_probe, NULL, NULL }; diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c index cb6b475572c..c78d197bd30 100644 --- a/sys/dev/vscsi.c +++ b/sys/dev/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.59 2022/04/06 18:59:27 naddy Exp $ */ +/* $OpenBSD: vscsi.c,v 1.60 2022/04/16 19:19:58 naddy Exp $ */ /* * Copyright (c) 2008 David Gwynne @@ -94,7 +94,7 @@ void vscsi_cmd(struct scsi_xfer *); int vscsi_probe(struct scsi_link *); void vscsi_free(struct scsi_link *); -struct scsi_adapter vscsi_switch = { +const struct scsi_adapter vscsi_switch = { vscsi_cmd, NULL, vscsi_probe, vscsi_free, NULL }; diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c index d87c826642f..df425d9d02e 100644 --- a/sys/scsi/mpath.c +++ b/sys/scsi/mpath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpath.c,v 1.55 2021/10/24 16:57:30 mpi Exp $ */ +/* $OpenBSD: mpath.c,v 1.56 2022/04/16 19:19:59 naddy Exp $ */ /* * Copyright (c) 2009 David Gwynne @@ -96,7 +96,7 @@ void mpath_failover(struct mpath_dev *); void mpath_failover_start(void *); void mpath_failover_check(struct mpath_dev *); -struct scsi_adapter mpath_switch = { +const struct scsi_adapter mpath_switch = { mpath_cmd, NULL, mpath_probe, NULL, NULL }; diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 69f2b71af7d..881a79586c3 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.200 2020/10/14 23:40:33 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.201 2022/04/16 19:19:59 naddy Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -337,7 +337,7 @@ struct scsi_inquiry_pattern { }; struct scsibus_attach_args { - struct scsi_adapter *saa_adapter; + const struct scsi_adapter *saa_adapter; void *saa_adapter_softc; struct scsi_iopool *saa_pool; u_int64_t saa_wwpn; @@ -363,7 +363,7 @@ struct scsibus_softc { struct device sc_dev; SLIST_HEAD(, scsi_link) sc_link_list; void *sb_adapter_softc; - struct scsi_adapter *sb_adapter; + const struct scsi_adapter *sb_adapter; struct scsi_iopool *sb_pool; u_int16_t sb_quirks; u_int16_t sb_flags; -- 2.20.1