Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/if_ixl.c
Show First 20 Lines • Show All 764 Lines • ▼ Show 20 Lines | ixl_if_attach_post(if_ctx_t ctx) | ||||
ixl_set_initial_advertised_speeds(pf); | ixl_set_initial_advertised_speeds(pf); | ||||
/* Initialize statistics & add sysctls */ | /* Initialize statistics & add sysctls */ | ||||
ixl_add_device_sysctls(pf); | ixl_add_device_sysctls(pf); | ||||
ixl_pf_reset_stats(pf); | ixl_pf_reset_stats(pf); | ||||
ixl_update_stats_counters(pf); | ixl_update_stats_counters(pf); | ||||
ixl_add_hw_stats(pf); | ixl_add_hw_stats(pf); | ||||
/* | |||||
* Driver may have been reloaded. Ensure that the link state | |||||
* is consistent with current settings. | |||||
*/ | |||||
ixl_set_link(pf, (pf->state & IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) != 0); | |||||
hw->phy.get_link_info = true; | hw->phy.get_link_info = true; | ||||
i40e_get_link_status(hw, &pf->link_up); | i40e_get_link_status(hw, &pf->link_up); | ||||
ixl_update_link_status(pf); | ixl_update_link_status(pf); | ||||
#ifdef PCI_IOV | #ifdef PCI_IOV | ||||
ixl_initialize_sriov(pf); | ixl_initialize_sriov(pf); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | ixl_if_init(if_ctx_t ctx) | ||||
iflib_set_mac(ctx, hw->mac.addr); | iflib_set_mac(ctx, hw->mac.addr); | ||||
/* Prepare the VSI: rings, hmc contexts, etc... */ | /* Prepare the VSI: rings, hmc contexts, etc... */ | ||||
if (ixl_initialize_vsi(vsi)) { | if (ixl_initialize_vsi(vsi)) { | ||||
device_printf(dev, "initialize vsi failed!!\n"); | device_printf(dev, "initialize vsi failed!!\n"); | ||||
return; | return; | ||||
} | } | ||||
ixl_set_link(pf, true); | |||||
/* Reconfigure multicast filters in HW */ | /* Reconfigure multicast filters in HW */ | ||||
ixl_if_multi_set(ctx); | ixl_if_multi_set(ctx); | ||||
/* Set up RSS */ | /* Set up RSS */ | ||||
ixl_config_rss(pf); | ixl_config_rss(pf); | ||||
/* Set up MSI-X routing and the ITR settings */ | /* Set up MSI-X routing and the ITR settings */ | ||||
if (vsi->shared->isc_intr == IFLIB_INTR_MSIX) { | if (vsi->shared->isc_intr == IFLIB_INTR_MSIX) { | ||||
Show All 26 Lines | #ifdef IXL_IW | ||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
void | void | ||||
ixl_if_stop(if_ctx_t ctx) | ixl_if_stop(if_ctx_t ctx) | ||||
{ | { | ||||
struct ixl_pf *pf = iflib_get_softc(ctx); | struct ixl_pf *pf = iflib_get_softc(ctx); | ||||
struct ifnet *ifp = iflib_get_ifp(ctx); | |||||
struct ixl_vsi *vsi = &pf->vsi; | struct ixl_vsi *vsi = &pf->vsi; | ||||
INIT_DEBUGOUT("ixl_if_stop: begin\n"); | INIT_DEBUGOUT("ixl_if_stop: begin\n"); | ||||
if (IXL_PF_IN_RECOVERY_MODE(pf)) | if (IXL_PF_IN_RECOVERY_MODE(pf)) | ||||
return; | return; | ||||
// TODO: This may need to be reworked | // TODO: This may need to be reworked | ||||
#ifdef IXL_IW | #ifdef IXL_IW | ||||
/* Stop iWARP device */ | /* Stop iWARP device */ | ||||
if (ixl_enable_iwarp && pf->iw_enabled) | if (ixl_enable_iwarp && pf->iw_enabled) | ||||
ixl_iw_pf_stop(pf); | ixl_iw_pf_stop(pf); | ||||
#endif | #endif | ||||
ixl_disable_rings_intr(vsi); | ixl_disable_rings_intr(vsi); | ||||
ixl_disable_rings(pf, vsi, &pf->qtag); | ixl_disable_rings(pf, vsi, &pf->qtag); | ||||
/* | |||||
* Don't set link state if only reconfiguring | |||||
* e.g. on MTU change. | |||||
*/ | |||||
if ((if_getflags(ifp) & IFF_UP) == 0 && | |||||
(atomic_load_acq_32(&pf->state) & | |||||
IXL_PF_STATE_LINK_ACTIVE_ON_DOWN) == 0) | |||||
ixl_set_link(pf, false); | |||||
} | } | ||||
static int | static int | ||||
ixl_if_msix_intr_assign(if_ctx_t ctx, int msix) | ixl_if_msix_intr_assign(if_ctx_t ctx, int msix) | ||||
{ | { | ||||
struct ixl_pf *pf = iflib_get_softc(ctx); | struct ixl_pf *pf = iflib_get_softc(ctx); | ||||
struct ixl_vsi *vsi = &pf->vsi; | struct ixl_vsi *vsi = &pf->vsi; | ||||
struct ixl_rx_queue *rx_que = vsi->rx_queues; | struct ixl_rx_queue *rx_que = vsi->rx_queues; | ||||
▲ Show 20 Lines • Show All 851 Lines • Show Last 20 Lines |