Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mps/mps.c
Show First 20 Lines • Show All 1,335 Lines • ▼ Show 20 Lines | mps_init_queues(struct mps_softc *sc) | ||||
return (0); | return (0); | ||||
} | } | ||||
/* Get the driver parameter tunables. Lowest priority are the driver defaults. | /* Get the driver parameter tunables. Lowest priority are the driver defaults. | ||||
* Next are the global settings, if they exist. Highest are the per-unit | * Next are the global settings, if they exist. Highest are the per-unit | ||||
* settings, if they exist. | * settings, if they exist. | ||||
*/ | */ | ||||
static void | void | ||||
mps_get_tunables(struct mps_softc *sc) | mps_get_tunables(struct mps_softc *sc) | ||||
{ | { | ||||
char tmpstr[80]; | char tmpstr[80]; | ||||
/* XXX default to some debugging for now */ | /* XXX default to some debugging for now */ | ||||
sc->mps_debug = MPS_INFO|MPS_FAULT; | sc->mps_debug = MPS_INFO|MPS_FAULT; | ||||
sc->disable_msix = 0; | sc->disable_msix = 0; | ||||
sc->disable_msi = 0; | sc->disable_msi = 0; | ||||
▲ Show 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), | ||||
OID_AUTO, "use_phy_num", CTLFLAG_RD, &sc->use_phynum, 0, | OID_AUTO, "use_phy_num", CTLFLAG_RD, &sc->use_phynum, 0, | ||||
"Use the phy number for enumeration"); | "Use the phy number for enumeration"); | ||||
} | } | ||||
int | int | ||||
mps_attach(struct mps_softc *sc) | mps_attach(struct mps_softc *sc) | ||||
{ | { | ||||
int error; | int error; | ||||
mps_get_tunables(sc); | |||||
MPS_FUNCTRACE(sc); | MPS_FUNCTRACE(sc); | ||||
mtx_init(&sc->mps_mtx, "MPT2SAS lock", NULL, MTX_DEF); | mtx_init(&sc->mps_mtx, "MPT2SAS lock", NULL, MTX_DEF); | ||||
callout_init_mtx(&sc->periodic, &sc->mps_mtx, 0); | callout_init_mtx(&sc->periodic, &sc->mps_mtx, 0); | ||||
callout_init_mtx(&sc->device_check_callout, &sc->mps_mtx, 0); | callout_init_mtx(&sc->device_check_callout, &sc->mps_mtx, 0); | ||||
TAILQ_INIT(&sc->event_list); | TAILQ_INIT(&sc->event_list); | ||||
timevalclear(&sc->lastfail); | timevalclear(&sc->lastfail); | ||||
▲ Show 20 Lines • Show All 1,200 Lines • Show Last 20 Lines |