This constifies the SCSI adapter entry points (struct scsi_adapter).
It reaches into some archs I don't have...

ok?

M  sys/arch/luna88k/dev/mb89352.c
M  sys/arch/luna88k/dev/mb89352var.h
M  sys/arch/luna88k/dev/spc.c
M  sys/arch/sparc64/dev/vdsk.c
M  sys/dev/ata/atascsi.c
M  sys/dev/atapiscsi/atapiscsi.c
M  sys/dev/ic/aac.c
M  sys/dev/ic/adv.c
M  sys/dev/ic/adw.c
M  sys/dev/ic/aic6360.c
M  sys/dev/ic/aic79xx_openbsd.c
M  sys/dev/ic/aic7xxx_openbsd.c
M  sys/dev/ic/ami.c
M  sys/dev/ic/cac.c
M  sys/dev/ic/ciss.c
M  sys/dev/ic/gdt_common.c
M  sys/dev/ic/mfi.c
M  sys/dev/ic/mpi.c
M  sys/dev/ic/ncr53c9x.c
M  sys/dev/ic/nvme.c
M  sys/dev/ic/oosiop.c
M  sys/dev/ic/osiop.c
M  sys/dev/ic/qla.c
M  sys/dev/ic/qlw.c
M  sys/dev/ic/siop.c
M  sys/dev/ic/twe.c
M  sys/dev/ic/uha.c
M  sys/dev/isa/wds.c
M  sys/dev/pci/arc.c
M  sys/dev/pci/iha_pci.c
M  sys/dev/pci/ips.c
M  sys/dev/pci/mfii.c
M  sys/dev/pci/mpii.c
M  sys/dev/pci/qle.c
M  sys/dev/pci/trm_pci.c
M  sys/dev/pci/vmwpvs.c
M  sys/dev/pv/hvs.c
M  sys/dev/pv/vioblk.c
M  sys/dev/pv/vioscsi.c
M  sys/dev/pv/xbf.c
M  sys/dev/sdmmc/sdmmc_scsi.c
M  sys/dev/softraid.c
M  sys/dev/usb/umass_scsi.c
M  sys/dev/vscsi.c
M  sys/scsi/mpath.c
M  sys/scsi/scsiconf.h

diff 0dbbfe957ecc14f6850205ad3b966d242dbc9b06 
e79b7c31603b0e0aea1909e2874ee6cfb95925f8
blob - 450ebece88b74eef5c577c13d0553f041cddd5dc
blob + 77f9a760254025a3c99124b3d1134bc62ddafb9e
--- sys/arch/luna88k/dev/mb89352.c
+++ sys/arch/luna88k/dev/mb89352.c
@@ -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  "));
blob - 0df2bc6358fd58265c14c9630c76b955f446e97d
blob + 9dae1aba0a773754f7ae6abcc8a2ce6c19138c81
--- sys/arch/luna88k/dev/mb89352var.h
+++ sys/arch/luna88k/dev/mb89352var.h
@@ -203,7 +203,7 @@ extern int spc_debug; /* SPC_SHOWSTART|SPC_SHOWMISC|SP
 #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 *);
blob - 91113f2ee10328c10059bb45920218fd965ffcac
blob + c19244983341f7a75ccd28844766cc117a9b9eb7
--- sys/arch/luna88k/dev/spc.c
+++ sys/arch/luna88k/dev/spc.c
@@ -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
 };
 
blob - 8c3c41b06799e36244b4223db776e99ffccf7ed8
blob + 509cca15b3034c1f375ff48cc378df3e5c623134
--- sys/arch/sparc64/dev/vdsk.c
+++ sys/arch/sparc64/dev/vdsk.c
@@ -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
 };
 
blob - 19f61480e83314afe9d58d24b52e1b1d7e64ea93
blob + f338ff373175501361455ce4e38d9fa006d9b403
--- sys/dev/ata/atascsi.c
+++ sys/dev/ata/atascsi.c
@@ -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
 };
 
blob - 622d1687499d2a455a0b95fccc24e3c64739a029
blob + 743369f1edaad1f7c7fbcd3464073f0517ff2e55
--- sys/dev/atapiscsi/atapiscsi.c
+++ sys/dev/atapiscsi/atapiscsi.c
@@ -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
 };
 
blob - fe91366547e96750c389547cd0e9eec188efec4a
blob + 7805cba76f42c4468062ff97efcdcc12ec8f6c56
--- sys/dev/ic/aac.c
+++ sys/dev/ic/aac.c
@@ -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
 };
 
blob - 3ee97dfee35ce2429e09a887a953c2b7fe966c5a
blob + 0233d7c24eaf996027a4c7297496a1b806bf800e
--- sys/dev/ic/adv.c
+++ sys/dev/ic/adv.c
@@ -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
 };
 
blob - 60dfe556e10dcec2ee9a35e11b1c5ed72dcc5416
blob + dbf7e632768d4821ed24def1ead1359416248251
--- sys/dev/ic/adw.c
+++ sys/dev/ic/adw.c
@@ -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
 };
 
blob - 50da35ee95ba04e4bc2f327f736319f3373ee85c
blob + ae201f8308be530bb528a70f0b954cd3f8f57082
--- sys/dev/ic/aic6360.c
+++ sys/dev/ic/aic6360.c
@@ -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
 };
 
blob - 0601dcaa6801e6e5b6dc7b90bf376ad4c3a51937
blob + 22174f908b51e81a6ce8c496e5cb7a20bd04f59a
--- sys/dev/ic/aic79xx_openbsd.c
+++ sys/dev/ic/aic79xx_openbsd.c
@@ -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
 };
 
blob - 7c855474b87b11221adccbffbc2277ad0839fffa
blob + c0fc71e50cb4816dd85195a320b5eabb71ace883
--- sys/dev/ic/aic7xxx_openbsd.c
+++ sys/dev/ic/aic7xxx_openbsd.c
@@ -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
 };
 
blob - c1b6374dc414db7900ef6707c075d22af1d212cf
blob + 64c687917d332240ddb84058096aca8ac579b36d
--- sys/dev/ic/ami.c
+++ sys/dev/ic/ami.c
@@ -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
 };
 
blob - 8d19018d6738ca98c55c30b467a9cc89b214d6fc
blob + 2e8e23b106b668e7eb4b383d1305530c63797a29
--- sys/dev/ic/cac.c
+++ sys/dev/ic/cac.c
@@ -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
 };
 
blob - c3dbed0f225e9fbca7810410b629a392771d0583
blob + 9dbe3fe9ee2d3991662dcec6bf299249ccdaa22a
--- sys/dev/ic/ciss.c
+++ sys/dev/ic/ciss.c
@@ -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
 };
 
blob - c19ee86ecb0c36b1bd846fcab90016beca2e391c
blob + 568dd2cd157b4ace6f5e50d8cd3aa26a08b02955
--- sys/dev/ic/gdt_common.c
+++ sys/dev/ic/gdt_common.c
@@ -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
 };
 
blob - ca75c17e6c14399cdb7c7fbe6fd9270f534cea07
blob + 827a139c72379eb1fb0052bf3654bb076dbe0543
--- sys/dev/ic/mfi.c
+++ sys/dev/ic/mfi.c
@@ -62,11 +62,11 @@ int mfi_ioctl_cache(struct scsi_link *, u_long,  struc
 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
 };
 
blob - 89c4f0ce9c198d4dd30627eecf86985088bc8275
blob + ba9e3cee9cf55c6fe9d64e6b324f8912bff52ee6
--- sys/dev/ic/mpi.c
+++ sys/dev/ic/mpi.c
@@ -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
 };
 
blob - 7ceb8c86983ddd5d2295047efabbc826bf16374e
blob + ce13a8cd37841cfa5db53ecf0bc6802885f2e5a2
--- sys/dev/ic/ncr53c9x.c
+++ sys/dev/ic/ncr53c9x.c
@@ -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
 };
blob - 4240971f8e00439daaeb0b91d8aff0c13c28f618
blob + cb5b844be64fe30862931f6d192ff3c19ed399b1
--- sys/dev/ic/nvme.c
+++ sys/dev/ic/nvme.c
@@ -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
 };
 
blob - 79fbca989a3354dfe75da2b0f1a63079bc41500a
blob + 02ee4151d0967e1dff43d9b330112bb7f19cc81c
--- sys/dev/ic/oosiop.c
+++ sys/dev/ic/oosiop.c
@@ -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
 };
 
blob - dac23239861504f8a9633decb38a35a0756b31c8
blob + f6ca53e3847f150a3b2a81b464679ff636fe8685
--- sys/dev/ic/osiop.c
+++ sys/dev/ic/osiop.c
@@ -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
 };
 
blob - ecaed773b230d8a7912dc5b88ceae65834b3f641
blob + b7f3263cfe515fe513be78e3bfe23307d5ee86bc
--- sys/dev/ic/qla.c
+++ sys/dev/ic/qla.c
@@ -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
 };
 
blob - 16da5c1e48148de146772563b77293f2ae088d93
blob + 55a50d726d2d6e0b43366f6679c3e2dcf4a48dd8
--- sys/dev/ic/qlw.c
+++ sys/dev/ic/qlw.c
@@ -174,7 +174,7 @@ qlw_queue_write(struct qlw_softc *sc, bus_size_t offse
        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
 };
 
blob - 533fc7fc03abf506935a3a409948d1e002d1561b
blob + 8038afd464e0f0595cc89809bc5be84a33747930
--- sys/dev/ic/siop.c
+++ sys/dev/ic/siop.c
@@ -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
 };
 
blob - d7d17feaa5a2eb847d7cbc8cce2e07edebe41e2a
blob + 48385164f437b200bd21d229d27478f9f048f0a7
--- sys/dev/ic/twe.c
+++ sys/dev/ic/twe.c
@@ -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
 };
 
blob - 273f4c75d2418f1b122d4d9776d3ad150cd37e94
blob + 787cb1de96498cd107a21317f2a499f674a0120f
--- sys/dev/ic/uha.c
+++ sys/dev/ic/uha.c
@@ -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
 };
 
blob - ef567ad63389d4aef4fd3a7af3618c6c6237dadd
blob + 618ceed1af3fe9daa66f64c18151e3fb86f34336
--- sys/dev/isa/wds.c
+++ sys/dev/isa/wds.c
@@ -166,7 +166,7 @@ int wds_ipoll(struct wds_softc *, struct wds_scb *, in
 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
 };
 
blob - 4aeba9b47ffb011b353163fc8c1c19d800e12f1b
blob + 9ffccbc327195e26da91129421ba70421e913ea1
--- sys/dev/pci/arc.c
+++ sys/dev/pci/arc.c
@@ -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
 };
 
blob - 85d36239f453328d6e5e2e355b8a728a6c6904b9
blob + 3ee952356073a08e9c13547b73f3beb5c6bed9a7
--- sys/dev/pci/iha_pci.c
+++ sys/dev/pci/iha_pci.c
@@ -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
 };
 
blob - d7ac758016c72366a36dc45495d0852b21110947
blob + a56f162653df4e0d7cbaa786f3ac42a357a6d040
--- sys/dev/pci/ips.c
+++ sys/dev/pci/ips.c
@@ -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
 };
 
blob - ecfba52edc8c727f38ec9016171065755b0c7db0
blob + faeda917aa907f35ef4bd39cd8ea93c457fb9802
--- sys/dev/pci/mfii.c
+++ sys/dev/pci/mfii.c
@@ -382,14 +382,14 @@ void              mfii_scsi_cmd_done(struct mfii_softc *, 
struct m
 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,
 };
 
blob - abf59e1460e3386c4671086dcc4306bdba7f2706
blob + cb6007c492fedcc6571bb1f50202448cee388ce8
--- sys/dev/pci/mpii.c
+++ sys/dev/pci/mpii.c
@@ -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
 };
 
blob - 1029a72edcc2a458e0021fef0aeb356a7aff946a
blob + f5834525b5ac9ecd9a88a4c94a093b727cc65b31
--- sys/dev/pci/qle.c
+++ sys/dev/pci/qle.c
@@ -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
 };
 
blob - fa4b960aaf07112d70b5a4b09ffb15a98feccfd4
blob + 63b49117118f2876be2eca46811a3474cf95ba15
--- sys/dev/pci/trm_pci.c
+++ sys/dev/pci/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
 };
 
blob - bfdb63512c9516117b7c29fb2d8020df35c6894f
blob + b664b9303028a6cbeef30b286c4cb8981856e7e1
--- sys/dev/pci/vmwpvs.c
+++ sys/dev/pci/vmwpvs.c
@@ -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
 };
 
blob - 412ca52903af826b5d8caa493ad829c6ae4b885d
blob + 812d11957ca51e5d727a58828015f61bc1518818
--- sys/dev/pv/hvs.c
+++ 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
 };
 
blob - 9a3ccbe5170de8b35cec7c63b952aa39067e2b8d
blob + 6908b709f5fdfe4943fedc83bfe97469bd29a277
--- sys/dev/pv/vioblk.c
+++ sys/dev/pv/vioblk.c
@@ -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
 };
 
blob - d8d98760d80103d67d203896a57249f90efeac96
blob + 0819f7bc12d0b5f98fb5d2ff4f4513a3f7aef4da
--- sys/dev/pv/vioscsi.c
+++ sys/dev/pv/vioscsi.c
@@ -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
 };
 
blob - 90b8ce7dccb567078f9d59412fe7267ae3624ac2
blob + a2a41d9b8267127cb4f883e10308854eac345432
--- sys/dev/pv/xbf.c
+++ sys/dev/pv/xbf.c
@@ -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
 };
 
blob - e85ce163e19ba74f3c908a417e08260ee6f9639c
blob + 5b3aed316ae26c92ecbb6c838695c5c3589910c2
--- sys/dev/sdmmc/sdmmc_scsi.c
+++ sys/dev/sdmmc/sdmmc_scsi.c
@@ -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
 };
 
blob - 735a61e078e34f25e5444f5fbce4bcdf2e22feae
blob + ef4e1163c961188cf5749abfccbe34d3f6bc8f7e
--- sys/dev/softraid.c
+++ sys/dev/softraid.c
@@ -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
 };
 
blob - 68956780229679c84899547a1cffa31e63bf2c35
blob + 2bac626856a817658229d7932a20c5ff0801ad17
--- sys/dev/usb/umass_scsi.c
+++ sys/dev/usb/umass_scsi.c
@@ -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
 };
 
blob - cb6b475572cac4e7bebe87250441013e765c0d4c
blob + 30a9b3d862d9a55df97ebc842e5d37e4246b5c88
--- sys/dev/vscsi.c
+++ sys/dev/vscsi.c
@@ -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
 };
 
blob - d87c826642f6849b4c917c8cb0d6b083c356ae16
blob + 23fdcd2ead485c7629428c5d3600063f2493c5b1
--- sys/scsi/mpath.c
+++ sys/scsi/mpath.c
@@ -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
 };
 
blob - 69f2b71af7d7528e96a06db948046e0db81d3555
blob + 3413d97a40b745bd1b2c15482c37c4ff2a925130
--- sys/scsi/scsiconf.h
+++ sys/scsi/scsiconf.h
@@ -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;

-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to