diff options
author | 2020-02-20 16:26:01 +0000 | |
---|---|---|
committer | 2020-02-20 16:26:01 +0000 | |
commit | 7f649021ad0a20c1622ce64217e84ab0f923ff79 (patch) | |
tree | a54033e48f692bcff850b80125206e241d85bcc7 | |
parent | dwiic(4): tsleep(9) -> tsleep_nsec(9); ok claudio@ (diff) | |
download | wireguard-openbsd-7f649021ad0a20c1622ce64217e84ab0f923ff79.tar.xz wireguard-openbsd-7f649021ad0a20c1622ce64217e84ab0f923ff79.zip |
Relax the grip the dead hand of QBUS (a.k.a. MAXPHYS) has on the
throat of physio().
Allows individual devices to eventually be modified to support larger
physio() (a.k.a. 'raw') i/o's if they prove capable of them.
No immediate functional change.
Tested for many weeks by and ok robert@.
-rw-r--r-- | sys/dev/sdmmc/sdmmc_scsi.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_physio.c | 3 | ||||
-rw-r--r-- | sys/scsi/cd.c | 6 | ||||
-rw-r--r-- | sys/scsi/sd.c | 6 | ||||
-rw-r--r-- | sys/scsi/st.c | 6 |
5 files changed, 13 insertions, 12 deletions
diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c index 702ae51cdae..3a45a35cfda 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.45 2020/02/12 14:08:56 krw Exp $ */ +/* $OpenBSD: sdmmc_scsi.c,v 1.46 2020/02/20 16:26:01 krw Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -556,6 +556,8 @@ sdmmc_minphys(struct buf *bp, struct scsi_link *sl) if (sc->sc_max_xfer != 0 && bp->b_bcount > sf->csd.sector_size * sc->sc_max_xfer) bp->b_bcount = sf->csd.sector_size * sc->sc_max_xfer; + else + minphys(bp); } #ifdef HIBERNATE diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 9549fc4bbaf..b2d561c6afe 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_physio.c,v 1.46 2020/01/26 23:06:39 krw Exp $ */ +/* $OpenBSD: kern_physio.c,v 1.47 2020/02/20 16:26:01 krw Exp $ */ /* $NetBSD: kern_physio.c,v 1.28 1997/05/19 10:43:28 pk Exp $ */ /*- @@ -129,7 +129,6 @@ physio(void (*strategy)(struct buf *), dev_t dev, int flags, (*minphys)(bp); todo = bp->b_bcount; KASSERTMSG(todo >= 0, "minphys broken"); - KASSERTMSG(todo <= MAXPHYS, "minphys broken"); /* * [lock the part of the user address space involved diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index e594ff5cf48..4dbe81ef6c9 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.244 2020/02/05 16:29:30 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.245 2020/02/20 16:26:01 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -697,8 +697,8 @@ cdminphys(struct buf *bp) if (link->adapter->dev_minphys != NULL) (*link->adapter->dev_minphys)(bp, link); - - minphys(bp); + else + minphys(bp); device_unref(&sc->sc_dev); } diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 50423394115..c2f22b1371a 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.309 2020/02/05 16:29:30 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.310 2020/02/20 16:26:02 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -834,8 +834,8 @@ sdminphys(struct buf *bp) if (link->adapter->dev_minphys != NULL) (*link->adapter->dev_minphys)(bp, link); - - minphys(bp); + else + minphys(bp); device_unref(&sc->sc_dev); } diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 81138969d5f..96e3232e25e 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.176 2020/02/05 16:29:30 krw Exp $ */ +/* $OpenBSD: st.c,v 1.177 2020/02/20 16:26:02 krw Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -1010,8 +1010,8 @@ stminphys(struct buf *bp) if (link->adapter->dev_minphys != NULL) (*link->adapter->dev_minphys)(bp, link); - - minphys(bp); + else + minphys(bp); device_unref(&sc->sc_dev); } |