Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixl_pf_iflib.c
Show First 20 Lines • Show All 346 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
**********************************************************************/ | **********************************************************************/ | ||||
int | int | ||||
ixl_setup_interface(device_t dev, struct ixl_pf *pf) | ixl_setup_interface(device_t dev, struct ixl_pf *pf) | ||||
{ | { | ||||
struct ixl_vsi *vsi = &pf->vsi; | struct ixl_vsi *vsi = &pf->vsi; | ||||
if_ctx_t ctx = vsi->ctx; | if_ctx_t ctx = vsi->ctx; | ||||
struct i40e_hw *hw = &pf->hw; | struct i40e_hw *hw = &pf->hw; | ||||
struct ifnet *ifp = iflib_get_ifp(ctx); | if_t ifp = iflib_get_ifp(ctx); | ||||
struct i40e_aq_get_phy_abilities_resp abilities; | struct i40e_aq_get_phy_abilities_resp abilities; | ||||
enum i40e_status_code aq_error = 0; | enum i40e_status_code aq_error = 0; | ||||
INIT_DBG_DEV(dev, "begin"); | INIT_DBG_DEV(dev, "begin"); | ||||
vsi->shared->isc_max_frame_size = | vsi->shared->isc_max_frame_size = | ||||
ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN | if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN | ||||
+ ETHER_VLAN_ENCAP_LEN; | + ETHER_VLAN_ENCAP_LEN; | ||||
if (IXL_PF_IN_RECOVERY_MODE(pf)) | if (IXL_PF_IN_RECOVERY_MODE(pf)) | ||||
goto only_auto; | goto only_auto; | ||||
aq_error = i40e_aq_get_phy_capabilities(hw, | aq_error = i40e_aq_get_phy_capabilities(hw, | ||||
FALSE, TRUE, &abilities, NULL); | FALSE, TRUE, &abilities, NULL); | ||||
/* May need delay to detect fiber correctly */ | /* May need delay to detect fiber correctly */ | ||||
▲ Show 20 Lines • Show All 737 Lines • Show Last 20 Lines |