summaryrefslogtreecommitdiffstats
path: root/sys/dev/mps/mps.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mps/mps.c')
-rw-r--r--sys/dev/mps/mps.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c
index 2cdc39d..7b98426 100644
--- a/sys/dev/mps/mps.c
+++ b/sys/dev/mps/mps.c
@@ -1350,6 +1350,7 @@ mps_get_tunables(struct mps_softc *sc)
sc->disable_msix = 0;
sc->disable_msi = 0;
sc->max_chains = MPS_CHAIN_FRAMES;
+ sc->max_io_pages = MPS_MAXIO_PAGES;
sc->enable_ssu = MPS_SSU_ENABLE_SSD_DISABLE_HDD;
sc->spinup_wait_time = DEFAULT_SPINUP_WAIT;
@@ -1360,6 +1361,7 @@ mps_get_tunables(struct mps_softc *sc)
TUNABLE_INT_FETCH("hw.mps.disable_msix", &sc->disable_msix);
TUNABLE_INT_FETCH("hw.mps.disable_msi", &sc->disable_msi);
TUNABLE_INT_FETCH("hw.mps.max_chains", &sc->max_chains);
+ TUNABLE_INT_FETCH("hw.mps.max_io_pages", &sc->max_io_pages);
TUNABLE_INT_FETCH("hw.mps.enable_ssu", &sc->enable_ssu);
TUNABLE_INT_FETCH("hw.mps.spinup_wait_time", &sc->spinup_wait_time);
@@ -1380,6 +1382,10 @@ mps_get_tunables(struct mps_softc *sc)
device_get_unit(sc->mps_dev));
TUNABLE_INT_FETCH(tmpstr, &sc->max_chains);
+ snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.max_io_pages",
+ device_get_unit(sc->mps_dev));
+ TUNABLE_INT_FETCH(tmpstr, &sc->max_io_pages);
+
bzero(sc->exclude_ids, sizeof(sc->exclude_ids));
snprintf(tmpstr, sizeof(tmpstr), "dev.mps.%d.exclude_ids",
device_get_unit(sc->mps_dev));
@@ -1465,6 +1471,11 @@ mps_setup_sysctl(struct mps_softc *sc)
&sc->max_chains, 0,"maximum chain frames that will be allocated");
SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
+ OID_AUTO, "max_io_pages", CTLFLAG_RD,
+ &sc->max_io_pages, 0,"maximum pages to allow per I/O (if <1 use "
+ "IOCFacts)");
+
+ SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree),
OID_AUTO, "enable_ssu", CTLFLAG_RW, &sc->enable_ssu, 0,
"enable SSU to SATA SSD/HDD at shutdown");
OpenPOWER on IntegriCloud