Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixl_pf_iflib.c
Show First 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | case I40E_RESET_EMPR: | ||||
reset_type = "EMPR"; | reset_type = "EMPR"; | ||||
break; | break; | ||||
default: | default: | ||||
reset_type = "POR"; | reset_type = "POR"; | ||||
break; | break; | ||||
} | } | ||||
device_printf(dev, "Reset Requested! (%s)\n", reset_type); | device_printf(dev, "Reset Requested! (%s)\n", reset_type); | ||||
/* overload admin queue task to check reset progress */ | /* overload admin queue task to check reset progress */ | ||||
atomic_set_int(&pf->state, IXL_PF_STATE_ADAPTER_RESETTING); | atomic_set_int(&pf->state, IXL_PF_STATE_RESETTING); | ||||
do_task = TRUE; | do_task = TRUE; | ||||
} | } | ||||
/* | /* | ||||
* PE / PCI / ECC exceptions are all handled in the same way: | * PE / PCI / ECC exceptions are all handled in the same way: | ||||
* mask out these three causes, then request a PF reset | * mask out these three causes, then request a PF reset | ||||
*/ | */ | ||||
if (reg & I40E_PFINT_ICR0_ECC_ERR_MASK) | if (reg & I40E_PFINT_ICR0_ECC_ERR_MASK) | ||||
▲ Show 20 Lines • Show All 662 Lines • ▼ Show 20 Lines | if (hw->mac.type == I40E_MAC_X722) { | ||||
if (status) | if (status) | ||||
device_printf(dev, "i40e_aq_set_rss_lut status %s, error %s\n", | device_printf(dev, "i40e_aq_set_rss_lut status %s, error %s\n", | ||||
i40e_stat_str(hw, status), i40e_aq_str(hw, hw->aq.asq_last_status)); | i40e_stat_str(hw, status), i40e_aq_str(hw, hw->aq.asq_last_status)); | ||||
} else { | } else { | ||||
for (i = 0; i < pf->hw.func_caps.rss_table_size >> 2; i++) | for (i = 0; i < pf->hw.func_caps.rss_table_size >> 2; i++) | ||||
wr32(hw, I40E_PFQF_HLUT(i), ((u32 *)hlut_buf)[i]); | wr32(hw, I40E_PFQF_HLUT(i), ((u32 *)hlut_buf)[i]); | ||||
ixl_flush(hw); | ixl_flush(hw); | ||||
} | } | ||||
} | |||||
/* | |||||
** This routine updates vlan filters, called by init | |||||
** it scans the filter table and then updates the hw | |||||
** after a soft reset. | |||||
*/ | |||||
void | |||||
ixl_setup_vlan_filters(struct ixl_vsi *vsi) | |||||
{ | |||||
struct ixl_mac_filter *f; | |||||
int cnt = 0, flags; | |||||
if (vsi->num_vlans == 0) | |||||
return; | |||||
/* | |||||
** Scan the filter list for vlan entries, | |||||
** mark them for addition and then call | |||||
** for the AQ update. | |||||
*/ | |||||
SLIST_FOREACH(f, &vsi->ftl, next) { | |||||
if (f->flags & IXL_FILTER_VLAN) { | |||||
f->flags |= | |||||
(IXL_FILTER_ADD | | |||||
IXL_FILTER_USED); | |||||
cnt++; | |||||
} | |||||
} | |||||
if (cnt == 0) { | |||||
printf("setup vlan: no filters found!\n"); | |||||
return; | |||||
} | |||||
flags = IXL_FILTER_VLAN; | |||||
flags |= (IXL_FILTER_ADD | IXL_FILTER_USED); | |||||
ixl_add_hw_filters(vsi, flags, cnt); | |||||
} | } | ||||
/* For PF VSI only */ | /* For PF VSI only */ | ||||
int | int | ||||
ixl_enable_rings(struct ixl_vsi *vsi) | ixl_enable_rings(struct ixl_vsi *vsi) | ||||
{ | { | ||||
struct ixl_pf *pf = vsi->back; | struct ixl_pf *pf = vsi->back; | ||||
int error = 0; | int error = 0; | ||||
▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines |