diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-02-05 16:29:31 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2020-02-05 16:29:31 +0000 |
commit | 2bd78861daf04f2a8a138592f716ee616c54cb44 (patch) | |
tree | 1ee27bd5a5d19fecc05c1cffd83b894f58bf7044 | |
parent | 9b9477743c82bfd5aa1afc14395edd7cbfacbaec (diff) |
Nuke unnecessary abstraction 'scsi_minphys()' which just calls
'minphys()'. Just use & check for NULL instead, since 'minphys()' is
always called on the code path ([cd|sd|st]minphys) that calls
physio().
-rw-r--r-- | sys/arch/luna88k/dev/spc.c | 4 | ||||
-rw-r--r-- | sys/arch/sgi/hpc/wdsc.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/vdsk.c | 4 | ||||
-rw-r--r-- | sys/dev/ata/atascsi.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/aac.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/aic6250.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/aic6360.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/ncr53c9x.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/nvme.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/osiop.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/qla.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/qlw.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/ips.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/mfii.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/mpii.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/qle.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/vmwpvs.c | 4 | ||||
-rw-r--r-- | sys/dev/pv/hvs.c | 2 | ||||
-rw-r--r-- | sys/dev/pv/vioblk.c | 4 | ||||
-rw-r--r-- | sys/dev/pv/vioscsi.c | 4 | ||||
-rw-r--r-- | sys/dev/pv/xbf.c | 4 | ||||
-rw-r--r-- | sys/dev/vscsi.c | 4 | ||||
-rw-r--r-- | sys/scsi/cd.c | 11 | ||||
-rw-r--r-- | sys/scsi/mpath.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsiconf.c | 12 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 3 | ||||
-rw-r--r-- | sys/scsi/sd.c | 9 | ||||
-rw-r--r-- | sys/scsi/sdvar.h | 4 | ||||
-rw-r--r-- | sys/scsi/st.c | 9 |
29 files changed, 66 insertions, 77 deletions
diff --git a/sys/arch/luna88k/dev/spc.c b/sys/arch/luna88k/dev/spc.c index 679d388c4b3..30978779150 100644 --- a/sys/arch/luna88k/dev/spc.c +++ b/sys/arch/luna88k/dev/spc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spc.c,v 1.10 2020/01/23 07:52:59 krw Exp $ */ +/* $OpenBSD: spc.c,v 1.11 2020/02/05 16:29:29 krw Exp $ */ /* $NetBSD: spc.c,v 1.4 2003/07/05 19:00:17 tsutsui Exp $ */ /*- @@ -60,7 +60,7 @@ struct cfdriver spc_cd = { }; struct scsi_adapter spc_switch = { - spc_scsi_cmd, scsi_minphys, NULL, NULL, NULL + spc_scsi_cmd, NULL, NULL, NULL, NULL }; /* bus space tag for spc */ diff --git a/sys/arch/sgi/hpc/wdsc.c b/sys/arch/sgi/hpc/wdsc.c index 6cff31db176..385f7073a7f 100644 --- a/sys/arch/sgi/hpc/wdsc.c +++ b/sys/arch/sgi/hpc/wdsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdsc.c,v 1.6 2020/01/23 07:52:59 krw Exp $ */ +/* $OpenBSD: wdsc.c,v 1.7 2020/02/05 16:29:29 krw Exp $ */ /* $NetBSD: wdsc.c,v 1.32 2011/07/01 18:53:47 dyoung Exp $ */ /* @@ -85,7 +85,7 @@ void wdsc_dmastop(struct wd33c93_softc *); void wdsc_reset(struct wd33c93_softc *); struct scsi_adapter wdsc_switch = { - wd33c93_scsi_cmd, scsi_minphys, NULL, NULL, NULL + wd33c93_scsi_cmd, NULL, NULL, NULL, NULL }; /* diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c index 99c1608414d..b3262729d30 100644 --- a/sys/arch/sparc64/dev/vdsk.c +++ b/sys/arch/sparc64/dev/vdsk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vdsk.c,v 1.51 2020/01/26 04:23:55 tedu Exp $ */ +/* $OpenBSD: vdsk.c,v 1.52 2020/02/05 16:29:29 krw Exp $ */ /* * Copyright (c) 2009, 2011 Mark Kettenis * @@ -344,7 +344,7 @@ vdsk_attach(struct device *parent, struct device *self, void *aux) scsi_iopool_init(&sc->sc_iopool, sc, vdsk_io_get, vdsk_io_put); sc->sc_switch.scsi_cmd = vdsk_scsi_cmd; - sc->sc_switch.dev_minphys = scsi_minphys; + sc->sc_switch.dev_minphys = NULL; sc->sc_switch.dev_probe = vdsk_dev_probe; sc->sc_switch.dev_free = vdsk_dev_free; diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index d5d0435a1ee..645c81249f2 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.132 2020/01/26 00:53:31 krw Exp $ */ +/* $OpenBSD: atascsi.c,v 1.133 2020/02/05 16:29:29 krw Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -96,7 +96,7 @@ void atascsi_free(struct scsi_link *); /* template */ struct scsi_adapter atascsi_switch = { - atascsi_cmd, scsi_minphys, atascsi_probe, atascsi_free, NULL + atascsi_cmd, NULL, atascsi_probe, atascsi_free, NULL }; void ata_swapcopy(void *, void *, size_t); diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c index 6ec520de0a2..08b4d94cfca 100644 --- a/sys/dev/ic/aac.c +++ b/sys/dev/ic/aac.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aac.c,v 1.73 2020/01/23 07:52:59 krw Exp $ */ +/* $OpenBSD: aac.c,v 1.74 2020/02/05 16:29:29 krw Exp $ */ /*- * Copyright (c) 2000 Michael Smith @@ -130,7 +130,7 @@ struct cfdriver aac_cd = { }; struct scsi_adapter aac_switch = { - aac_scsi_cmd, scsi_minphys, NULL, NULL, NULL + aac_scsi_cmd, NULL, NULL, NULL, NULL }; /* Falcon/PPC interface */ diff --git a/sys/dev/ic/aic6250.c b/sys/dev/ic/aic6250.c index 144cc371d36..5853b47714c 100644 --- a/sys/dev/ic/aic6250.c +++ b/sys/dev/ic/aic6250.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6250.c,v 1.6 2020/01/23 07:52:59 krw Exp $ */ +/* $OpenBSD: aic6250.c,v 1.7 2020/02/05 16:29:29 krw Exp $ */ /* * Copyright (c) 2010, 2013 Miodrag Vallat. @@ -167,7 +167,7 @@ struct cfdriver oaic_cd = { }; struct scsi_adapter aic6250_switch = { - aic6250_scsi_cmd, scsi_minphys, NULL, NULL, NULL + aic6250_scsi_cmd, NULL, NULL, NULL, NULL }; /* diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c index d818d5775c3..b04ba119cc4 100644 --- a/sys/dev/ic/aic6360.c +++ b/sys/dev/ic/aic6360.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aic6360.c,v 1.30 2020/01/23 07:52:59 krw Exp $ */ +/* $OpenBSD: aic6360.c,v 1.31 2020/02/05 16:29:29 krw Exp $ */ /* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */ #ifdef DDB @@ -185,7 +185,7 @@ struct cfdriver aic_cd = { }; struct scsi_adapter aic_switch = { - aic_scsi_cmd, scsi_minphys, NULL, NULL, NULL + aic_scsi_cmd, NULL, NULL, NULL, NULL }; /* diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c index 924b669148f..8bbaf42cf52 100644 --- a/sys/dev/ic/ncr53c9x.c +++ b/sys/dev/ic/ncr53c9x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr53c9x.c,v 1.66 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: ncr53c9x.c,v 1.67 2020/02/05 16:29:29 krw Exp $ */ /* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */ /* @@ -150,7 +150,7 @@ int ncr53c9x_scsi_probe(struct scsi_link *); void ncr53c9x_scsi_free(struct scsi_link *); struct scsi_adapter ncr53c9x_adapter = { - ncr53c9x_scsi_cmd, scsi_minphys, ncr53c9x_scsi_probe, + 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 4fbe81185f8..a44c3e5df8f 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme.c,v 1.64 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: nvme.c,v 1.65 2020/02/05 16:29:29 krw Exp $ */ /* * Copyright (c) 2014 David Gwynne <dlg@openbsd.org> @@ -98,7 +98,7 @@ int nvme_hibernate_io(dev_t, daddr_t, vaddr_t, size_t, int, void *); #endif struct scsi_adapter nvme_switch = { - nvme_scsi_cmd, scsi_minphys, nvme_scsi_probe, nvme_scsi_free, NULL + nvme_scsi_cmd, NULL, nvme_scsi_probe, nvme_scsi_free, NULL }; void nvme_scsi_io(struct scsi_xfer *, int); diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index 5d6ea62d86f..9622de0debd 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osiop.c,v 1.53 2020/01/25 21:48:42 krw Exp $ */ +/* $OpenBSD: osiop.c,v 1.54 2020/02/05 16:29:29 krw Exp $ */ /* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */ /* @@ -344,9 +344,6 @@ osiop_attach(sc) config_found(&sc->sc_dev, &saa, scsiprint); } -/* - * default minphys routine for osiop based controllers - */ void osiop_minphys(struct buf *bp, struct scsi_link *sl) { diff --git a/sys/dev/ic/qla.c b/sys/dev/ic/qla.c index 82cd75729bf..b11e6c1cace 100644 --- a/sys/dev/ic/qla.c +++ b/sys/dev/ic/qla.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qla.c,v 1.59 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: qla.c,v 1.60 2020/02/05 16:29:29 krw Exp $ */ /* * Copyright (c) 2011 David Gwynne <dlg@openbsd.org> @@ -170,7 +170,7 @@ static const struct qla_regs qla_regs_23XX = { ((*(_sc)->sc_regs->read_isr)((_sc), (_isr), (_info))) struct scsi_adapter qla_switch = { - qla_scsi_cmd, scsi_minphys, qla_scsi_probe, NULL, NULL + qla_scsi_cmd, NULL, qla_scsi_probe, NULL, NULL }; int diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c index 42ebc3b587e..8c1304f5acd 100644 --- a/sys/dev/ic/qlw.c +++ b/sys/dev/ic/qlw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qlw.c,v 1.33 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: qlw.c,v 1.34 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2011 David Gwynne <dlg@openbsd.org> @@ -164,7 +164,7 @@ qlw_queue_write(struct qlw_softc *sc, bus_size_t offset, u_int16_t value) } struct scsi_adapter qlw_switch = { - qlw_scsi_cmd, scsi_minphys, qlw_scsi_probe, NULL, NULL + qlw_scsi_cmd, NULL, qlw_scsi_probe, NULL, NULL }; int diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c index b06dd4ebb65..f3f48d08512 100644 --- a/sys/dev/pci/ips.c +++ b/sys/dev/pci/ips.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ips.c,v 1.114 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: ips.c,v 1.115 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org> @@ -498,11 +498,11 @@ struct cfdriver ips_cd = { }; static struct scsi_adapter ips_scsi_adapter = { - ips_scsi_cmd, scsi_minphys, NULL, NULL, ips_scsi_ioctl + ips_scsi_cmd, NULL, NULL, NULL, ips_scsi_ioctl }; static struct scsi_adapter ips_scsi_pt_adapter = { - ips_scsi_pt_cmd, scsi_minphys, NULL, NULL, NULL + ips_scsi_pt_cmd, NULL, NULL, NULL, NULL }; static const struct pci_matchid ips_ids[] = { diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c index 9aada52b7ce..95b98ce35dd 100644 --- a/sys/dev/pci/mfii.c +++ b/sys/dev/pci/mfii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mfii.c,v 1.66 2020/01/25 05:38:02 jmatthew Exp $ */ +/* $OpenBSD: mfii.c,v 1.67 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2012 David Gwynne <dlg@openbsd.org> @@ -385,14 +385,14 @@ 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 = { - mfii_scsi_cmd, scsi_minphys, NULL, NULL, mfii_scsi_ioctl + 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 = { - mfii_pd_scsi_cmd, scsi_minphys, mfii_pd_scsi_probe, NULL, NULL, + mfii_pd_scsi_cmd, NULL, mfii_pd_scsi_probe, NULL, NULL, }; #define DEVNAME(_sc) ((_sc)->sc_dev.dv_xname) diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index 5fc5aa1f10b..f5c5cf6303f 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpii.c,v 1.127 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: mpii.c,v 1.128 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov * Copyright (c) 2009 James Giannoules @@ -269,7 +269,7 @@ int mpii_scsi_probe(struct scsi_link *); int mpii_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int); struct scsi_adapter mpii_switch = { - mpii_scsi_cmd, scsi_minphys, mpii_scsi_probe, NULL, mpii_scsi_ioctl + mpii_scsi_cmd, NULL, mpii_scsi_probe, NULL, mpii_scsi_ioctl }; struct mpii_dmamem * diff --git a/sys/dev/pci/qle.c b/sys/dev/pci/qle.c index 8e2ca42add0..5787f45c423 100644 --- a/sys/dev/pci/qle.c +++ b/sys/dev/pci/qle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qle.c,v 1.50 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: qle.c,v 1.51 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org> @@ -255,7 +255,7 @@ int qle_scsi_probe(struct scsi_link *); struct scsi_adapter qle_switch = { - qle_scsi_cmd, scsi_minphys, qle_scsi_probe, NULL, NULL + qle_scsi_cmd, NULL, qle_scsi_probe, NULL, NULL }; u_int32_t qle_read(struct qle_softc *, int); diff --git a/sys/dev/pci/vmwpvs.c b/sys/dev/pci/vmwpvs.c index 28a07d93756..d607282dd65 100644 --- a/sys/dev/pci/vmwpvs.c +++ b/sys/dev/pci/vmwpvs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmwpvs.c,v 1.15 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: vmwpvs.c,v 1.16 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -356,7 +356,7 @@ struct cfdriver vmwpvs_cd = { void vmwpvs_scsi_cmd(struct scsi_xfer *); struct scsi_adapter vmwpvs_switch = { - vmwpvs_scsi_cmd, scsi_minphys, NULL, NULL, NULL + vmwpvs_scsi_cmd, NULL, NULL, NULL, NULL }; #define dwordsof(s) (sizeof(s) / sizeof(u_int32_t)) diff --git a/sys/dev/pv/hvs.c b/sys/dev/pv/hvs.c index 958149b7b53..3c6b16feedb 100644 --- a/sys/dev/pv/hvs.c +++ b/sys/dev/pv/hvs.c @@ -306,7 +306,7 @@ hvs_attach(struct device *parent, struct device *self, void *aux) task_set(&sc->sc_probetask, hvs_scsi_probe, sc); sc->sc_switch.scsi_cmd = hvs_scsi_cmd; - sc->sc_switch.dev_minphys = scsi_minphys; + sc->sc_switch.dev_minphys = NULL; sc->sc_link.adapter = &sc->sc_switch; sc->sc_link.adapter_softc = self; diff --git a/sys/dev/pv/vioblk.c b/sys/dev/pv/vioblk.c index c7caec68fb8..f2dcec31299 100644 --- a/sys/dev/pv/vioblk.c +++ b/sys/dev/pv/vioblk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioblk.c,v 1.14 2020/01/26 00:53:31 krw Exp $ */ +/* $OpenBSD: vioblk.c,v 1.15 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch. @@ -227,7 +227,7 @@ vioblk_attach(struct device *parent, struct device *self, void *aux) sc->sc_queued = 0; sc->sc_switch.scsi_cmd = vioblk_scsi_cmd; - sc->sc_switch.dev_minphys = scsi_minphys; + sc->sc_switch.dev_minphys = NULL; sc->sc_switch.dev_probe = vioblk_dev_probe; sc->sc_switch.dev_free = vioblk_dev_free; diff --git a/sys/dev/pv/vioscsi.c b/sys/dev/pv/vioscsi.c index b3e743ce183..8ca01304841 100644 --- a/sys/dev/pv/vioscsi.c +++ b/sys/dev/pv/vioscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioscsi.c,v 1.14 2020/01/23 07:53:00 krw Exp $ */ +/* $OpenBSD: vioscsi.c,v 1.15 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2013 Google Inc. * @@ -86,7 +86,7 @@ struct cfdriver vioscsi_cd = { }; struct scsi_adapter vioscsi_switch = { - vioscsi_scsi_cmd, scsi_minphys, NULL, NULL, NULL + vioscsi_scsi_cmd, NULL, NULL, NULL, NULL }; const char *const vioscsi_vq_names[] = { diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 0c1950ff2cf..0e737cde7a3 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.34 2020/01/26 00:53:31 krw Exp $ */ +/* $OpenBSD: xbf.c,v 1.35 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2016, 2017 Mike Belopuhov @@ -299,7 +299,7 @@ xbf_attach(struct device *parent, struct device *self, void *aux) } sc->sc_switch.scsi_cmd = xbf_scsi_cmd; - sc->sc_switch.dev_minphys = scsi_minphys; + sc->sc_switch.dev_minphys = NULL; sc->sc_switch.dev_probe = xbf_dev_probe; sc->sc_link.adapter = &sc->sc_switch; diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c index 048b50c3eac..7a85d6fef66 100644 --- a/sys/dev/vscsi.c +++ b/sys/dev/vscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vscsi.c,v 1.46 2020/01/23 07:52:59 krw Exp $ */ +/* $OpenBSD: vscsi.c,v 1.47 2020/02/05 16:29:29 krw Exp $ */ /* * Copyright (c) 2008 David Gwynne <dlg@openbsd.org> @@ -96,7 +96,7 @@ int vscsi_probe(struct scsi_link *); void vscsi_free(struct scsi_link *); struct scsi_adapter vscsi_switch = { - vscsi_cmd, scsi_minphys, vscsi_probe, vscsi_free, NULL + vscsi_cmd, NULL, vscsi_probe, vscsi_free, NULL }; int vscsi_i2t(struct vscsi_softc *, struct vscsi_ioc_i2t *); diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 89693528e69..e594ff5cf48 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.243 2020/01/27 07:41:02 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.244 2020/02/05 16:29:30 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -98,7 +98,7 @@ struct cd_softc { struct disk sc_dk; int sc_flags; -#define CDF_ANCIENT 0x10 /* disk is ancient; for minphys */ +#define CDF_ANCIENT 0x10 /* disk is ancient; for cdminphys */ #define CDF_DYING 0x40 /* dying, when deactivated */ #define CDF_WAITING 0x100 struct scsi_link *sc_link; /* contains targ, lun, etc. */ @@ -695,9 +695,10 @@ cdminphys(struct buf *bp) bp->b_bcount = max; } - (*link->adapter->dev_minphys)(bp, link); - if (link->adapter->dev_minphys != scsi_minphys) - scsi_minphys(bp, link); + if (link->adapter->dev_minphys != NULL) + (*link->adapter->dev_minphys)(bp, link); + + minphys(bp); device_unref(&sc->sc_dev); } diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c index 4c21573db5f..ee64295d2be 100644 --- a/sys/scsi/mpath.c +++ b/sys/scsi/mpath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpath.c,v 1.45 2020/01/26 00:53:31 krw Exp $ */ +/* $OpenBSD: mpath.c,v 1.46 2020/02/05 16:29:30 krw Exp $ */ /* * Copyright (c) 2009 David Gwynne <dlg@openbsd.org> @@ -98,7 +98,7 @@ void mpath_failover_start(void *); void mpath_failover_check(struct mpath_dev *); struct scsi_adapter mpath_switch = { - mpath_cmd, scsi_minphys, mpath_probe, NULL, NULL + mpath_cmd, NULL, mpath_probe, NULL, NULL }; void mpath_xs_stuffup(struct scsi_xfer *); diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 8c75eeb62e6..1c368b93c65 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.222 2019/12/08 13:05:12 krw Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.223 2020/02/05 16:29:30 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -1340,16 +1340,6 @@ scsi_devid_wwn(struct scsi_link *link) return 0; } -/* - * The 'scsi_minphys' member of struct scsi_adapter for drivers which don't - * need any specific routine. - */ -void -scsi_minphys(struct buf *bp, struct scsi_link *sl) -{ - minphys(bp); -} - struct devid * devid_alloc(u_int8_t type, u_int8_t flags, u_int8_t len, u_int8_t *id) { diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index cc5243dc115..dfa4e86bc92 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.183 2020/01/26 00:53:31 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.184 2020/02/05 16:29:30 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -498,7 +498,6 @@ int scsi_do_ioctl(struct scsi_link *, u_long, caddr_t, int); void sc_print_addr(struct scsi_link *); int scsi_report_luns(struct scsi_link *, int, struct scsi_report_luns_data *, u_int32_t, int, int); -void scsi_minphys(struct buf *, struct scsi_link *); int scsi_interpret_sense(struct scsi_xfer *); void scsi_print_sense(struct scsi_xfer *); diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 507c97d9913..50423394115 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.308 2020/01/26 00:53:31 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.309 2020/02/05 16:29:30 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -832,9 +832,10 @@ sdminphys(struct buf *bp) bp->b_bcount = max; } - (*link->adapter->dev_minphys)(bp, link); - if (link->adapter->dev_minphys != scsi_minphys) - scsi_minphys(bp, link); + if (link->adapter->dev_minphys != NULL) + (*link->adapter->dev_minphys)(bp, link); + + minphys(bp); device_unref(&sc->sc_dev); } diff --git a/sys/scsi/sdvar.h b/sys/scsi/sdvar.h index 635bee43989..f35fb2f3a3f 100644 --- a/sys/scsi/sdvar.h +++ b/sys/scsi/sdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sdvar.h,v 1.45 2019/11/08 16:13:28 krw Exp $ */ +/* $OpenBSD: sdvar.h,v 1.46 2020/02/05 16:29:30 krw Exp $ */ /* $NetBSD: sdvar.h,v 1.7 1998/08/17 00:49:03 mycroft Exp $ */ /*- @@ -57,7 +57,7 @@ struct sd_softc { struct bufq sc_bufq; int flags; -#define SDF_ANCIENT 0x10 /* disk is ancient; for minphys */ +#define SDF_ANCIENT 0x10 /* disk is ancient; for sdminphys */ #define SDF_DIRTY 0x20 /* disk is dirty; needs cache flush */ #define SDF_DYING 0x40 /* dying, when deactivated */ #define SDF_WAITING 0x80 diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 027a31fb262..81138969d5f 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.175 2020/01/27 07:41:02 krw Exp $ */ +/* $OpenBSD: st.c,v 1.176 2020/02/05 16:29:30 krw Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -1008,9 +1008,10 @@ stminphys(struct buf *bp) return; link = sc->sc_link; - (*link->adapter->dev_minphys)(bp, link); - if (link->adapter->dev_minphys != scsi_minphys) - scsi_minphys(bp, link); + if (link->adapter->dev_minphys != NULL) + (*link->adapter->dev_minphys)(bp, link); + + minphys(bp); device_unref(&sc->sc_dev); } |