Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cxgbe/t4_vf.c
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | get_params__pre_init(struct adapter *sc) | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
get_params__post_init(struct adapter *sc) | get_params__post_init(struct adapter *sc) | ||||
{ | { | ||||
int rc; | int rc; | ||||
uint32_t param, val; | |||||
rc = -t4vf_get_sge_params(sc); | rc = -t4vf_get_sge_params(sc); | ||||
if (rc != 0) { | if (rc != 0) { | ||||
device_printf(sc->dev, | device_printf(sc->dev, | ||||
"unable to retrieve adapter SGE parameters: %d\n", rc); | "unable to retrieve adapter SGE parameters: %d\n", rc); | ||||
return (rc); | return (rc); | ||||
} | } | ||||
Show All 34 Lines | if (sc->params.vfres.pmask == 0) { | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
if (sc->params.vfres.nvi == 0) { | if (sc->params.vfres.nvi == 0) { | ||||
device_printf(sc->dev, | device_printf(sc->dev, | ||||
"no virtual interfaces configured/usable!\n"); | "no virtual interfaces configured/usable!\n"); | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
sc->params.portvec = sc->params.vfres.pmask; | sc->params.portvec = sc->params.vfres.pmask; | ||||
param = FW_PARAM_PFVF(MAX_PKTS_PER_ETH_TX_PKTS_WR); | |||||
rc = -t4vf_query_params(sc, 1, ¶m, &val); | |||||
if (rc == 0) | |||||
sc->params.max_pkts_per_eth_tx_pkts_wr = val; | |||||
else | |||||
sc->params.max_pkts_per_eth_tx_pkts_wr = 14; | |||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
set_params__post_init(struct adapter *sc) | set_params__post_init(struct adapter *sc) | ||||
{ | { | ||||
uint32_t param, val; | uint32_t param, val; | ||||
▲ Show 20 Lines • Show All 684 Lines • Show Last 20 Lines |