Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpr/mpr.c
Show First 20 Lines • Show All 1,381 Lines • ▼ Show 20 Lines | mpr_get_tunables(struct mpr_softc *sc) | ||||
*/ | */ | ||||
TUNABLE_INT_FETCH("hw.mpr.debug_level", &sc->mpr_debug); | TUNABLE_INT_FETCH("hw.mpr.debug_level", &sc->mpr_debug); | ||||
TUNABLE_INT_FETCH("hw.mpr.disable_msix", &sc->disable_msix); | TUNABLE_INT_FETCH("hw.mpr.disable_msix", &sc->disable_msix); | ||||
TUNABLE_INT_FETCH("hw.mpr.disable_msi", &sc->disable_msi); | TUNABLE_INT_FETCH("hw.mpr.disable_msi", &sc->disable_msi); | ||||
TUNABLE_INT_FETCH("hw.mpr.max_chains", &sc->max_chains); | TUNABLE_INT_FETCH("hw.mpr.max_chains", &sc->max_chains); | ||||
TUNABLE_INT_FETCH("hw.mpr.max_io_pages", &sc->max_io_pages); | TUNABLE_INT_FETCH("hw.mpr.max_io_pages", &sc->max_io_pages); | ||||
TUNABLE_INT_FETCH("hw.mpr.enable_ssu", &sc->enable_ssu); | TUNABLE_INT_FETCH("hw.mpr.enable_ssu", &sc->enable_ssu); | ||||
TUNABLE_INT_FETCH("hw.mpr.spinup_wait_time", &sc->spinup_wait_time); | TUNABLE_INT_FETCH("hw.mpr.spinup_wait_time", &sc->spinup_wait_time); | ||||
TUNABLE_INT_FETCH("hw.mpr.use_phy_num", &sc->use_phynum); | |||||
/* Grab the unit-instance variables */ | /* Grab the unit-instance variables */ | ||||
snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.debug_level", | snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.debug_level", | ||||
device_get_unit(sc->mpr_dev)); | device_get_unit(sc->mpr_dev)); | ||||
TUNABLE_INT_FETCH(tmpstr, &sc->mpr_debug); | TUNABLE_INT_FETCH(tmpstr, &sc->mpr_debug); | ||||
snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.disable_msix", | snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.disable_msix", | ||||
device_get_unit(sc->mpr_dev)); | device_get_unit(sc->mpr_dev)); | ||||
Show All 18 Lines | mpr_get_tunables(struct mpr_softc *sc) | ||||
snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.enable_ssu", | snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.enable_ssu", | ||||
device_get_unit(sc->mpr_dev)); | device_get_unit(sc->mpr_dev)); | ||||
TUNABLE_INT_FETCH(tmpstr, &sc->enable_ssu); | TUNABLE_INT_FETCH(tmpstr, &sc->enable_ssu); | ||||
snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.spinup_wait_time", | snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.spinup_wait_time", | ||||
device_get_unit(sc->mpr_dev)); | device_get_unit(sc->mpr_dev)); | ||||
TUNABLE_INT_FETCH(tmpstr, &sc->spinup_wait_time); | TUNABLE_INT_FETCH(tmpstr, &sc->spinup_wait_time); | ||||
snprintf(tmpstr, sizeof(tmpstr), "dev.mpr.%d.use_phy_num", | |||||
device_get_unit(sc->mpr_dev)); | |||||
TUNABLE_INT_FETCH(tmpstr, &sc->use_phynum); | |||||
} | } | ||||
static void | static void | ||||
mpr_setup_sysctl(struct mpr_softc *sc) | mpr_setup_sysctl(struct mpr_softc *sc) | ||||
{ | { | ||||
struct sysctl_ctx_list *sysctl_ctx = NULL; | struct sysctl_ctx_list *sysctl_ctx = NULL; | ||||
struct sysctl_oid *sysctl_tree = NULL; | struct sysctl_oid *sysctl_tree = NULL; | ||||
char tmpstr[80], tmpstr2[80]; | char tmpstr[80], tmpstr2[80]; | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | mpr_setup_sysctl(struct mpr_softc *sc) | ||||
SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), | SYSCTL_ADD_UQUAD(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), | ||||
OID_AUTO, "chain_alloc_fail", CTLFLAG_RD, | OID_AUTO, "chain_alloc_fail", CTLFLAG_RD, | ||||
&sc->chain_alloc_fail, "chain allocation failures"); | &sc->chain_alloc_fail, "chain allocation failures"); | ||||
SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), | SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), | ||||
OID_AUTO, "spinup_wait_time", CTLFLAG_RD, | OID_AUTO, "spinup_wait_time", CTLFLAG_RD, | ||||
&sc->spinup_wait_time, DEFAULT_SPINUP_WAIT, "seconds to wait for " | &sc->spinup_wait_time, DEFAULT_SPINUP_WAIT, "seconds to wait for " | ||||
"spinup after SATA ID error"); | "spinup after SATA ID error"); | ||||
SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), | |||||
OID_AUTO, "use_phy_num", CTLFLAG_RD, &sc->use_phynum, 0, | |||||
"use the phy number for enumation"); | |||||
smh: typo: enumeration | |||||
} | } | ||||
int | int | ||||
mpr_attach(struct mpr_softc *sc) | mpr_attach(struct mpr_softc *sc) | ||||
{ | { | ||||
int error; | int error; | ||||
mpr_get_tunables(sc); | mpr_get_tunables(sc); | ||||
▲ Show 20 Lines • Show All 1,309 Lines • Show Last 20 Lines |
typo: enumeration