summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-01-25 21:40:36 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-01-25 21:40:36 +0000
commit10152ae6d1da1a3cb87035d35c259039a51e8bdc (patch)
tree2c4974a7a5799b205bb7f4bcc1704a62b3f15030 /sys
parentc0b3a16151ddd2c44caf6adf75e3683d8f2628ad (diff)
Ensure scsi_minphys() is always called on the physio() path.
Will allow simplification of individual driver *minphys() functions. ok jmatthew@ as part of larger diff
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/cd.c4
-rw-r--r--sys/scsi/sd.c4
-rw-r--r--sys/scsi/st.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 9c570781f32..63c792c0a20 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.240 2019/12/06 15:13:07 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.241 2020/01/25 21:40:34 krw Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -694,6 +694,8 @@ cdminphys(struct buf *bp)
}
(*sc->sc_link->adapter->scsi_minphys)(bp, sc->sc_link);
+ if (sc->sc_link->adapter->scsi_minphys != scsi_minphys)
+ scsi_minphys(bp, sc->sc_link);
device_unref(&sc->sc_dev);
}
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 09eb0d0d22b..53316de093f 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.306 2019/12/08 16:38:45 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.307 2020/01/25 21:40:35 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -833,6 +833,8 @@ sdminphys(struct buf *bp)
}
(*link->adapter->scsi_minphys)(bp, link);
+ if (link->adapter->scsi_minphys != scsi_minphys)
+ scsi_minphys(bp, link);
device_unref(&sc->sc_dev);
}
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 30aafd4f2b5..c5589361b5c 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.172 2019/12/05 18:42:14 krw Exp $ */
+/* $OpenBSD: st.c,v 1.173 2020/01/25 21:40:35 krw Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
@@ -1007,6 +1007,8 @@ stminphys(struct buf *bp)
return;
(*st->sc_link->adapter->scsi_minphys)(bp, st->sc_link);
+ if (st->sc_link->adapter->scsi_minphys != scsi_minphys)
+ scsi_minphys(bp, st->sc_link);
device_unref(&st->sc_dev);
}