diff options
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_common.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_common.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index 71d032cc5fa7..661beea6af79 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c | |||
@@ -45,6 +45,9 @@ static enum ice_status ice_set_mac_type(struct ice_hw *hw) | |||
45 | /** | 45 | /** |
46 | * ice_clear_pf_cfg - Clear PF configuration | 46 | * ice_clear_pf_cfg - Clear PF configuration |
47 | * @hw: pointer to the hardware structure | 47 | * @hw: pointer to the hardware structure |
48 | * | ||
49 | * Clears any existing PF configuration (VSIs, VSI lists, switch rules, port | ||
50 | * configuration, flow director filters, etc.). | ||
48 | */ | 51 | */ |
49 | enum ice_status ice_clear_pf_cfg(struct ice_hw *hw) | 52 | enum ice_status ice_clear_pf_cfg(struct ice_hw *hw) |
50 | { | 53 | { |
@@ -1483,7 +1486,7 @@ enum ice_status ice_get_link_status(struct ice_port_info *pi, bool *link_up) | |||
1483 | struct ice_phy_info *phy_info; | 1486 | struct ice_phy_info *phy_info; |
1484 | enum ice_status status = 0; | 1487 | enum ice_status status = 0; |
1485 | 1488 | ||
1486 | if (!pi) | 1489 | if (!pi || !link_up) |
1487 | return ICE_ERR_PARAM; | 1490 | return ICE_ERR_PARAM; |
1488 | 1491 | ||
1489 | phy_info = &pi->phy; | 1492 | phy_info = &pi->phy; |
@@ -1619,20 +1622,23 @@ __ice_aq_get_set_rss_lut(struct ice_hw *hw, u16 vsi_id, u8 lut_type, u8 *lut, | |||
1619 | } | 1622 | } |
1620 | 1623 | ||
1621 | /* LUT size is only valid for Global and PF table types */ | 1624 | /* LUT size is only valid for Global and PF table types */ |
1622 | if (lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128) { | 1625 | switch (lut_size) { |
1623 | flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128_FLAG << | 1626 | case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_128: |
1624 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & | 1627 | break; |
1625 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; | 1628 | case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512: |
1626 | } else if (lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512) { | ||
1627 | flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG << | 1629 | flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_512_FLAG << |
1628 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & | 1630 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & |
1629 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; | 1631 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; |
1630 | } else if ((lut_size == ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K) && | 1632 | break; |
1631 | (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF)) { | 1633 | case ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K: |
1632 | flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG << | 1634 | if (lut_type == ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF) { |
1633 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & | 1635 | flags |= (ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_2K_FLAG << |
1634 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; | 1636 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_S) & |
1635 | } else { | 1637 | ICE_AQC_GSET_RSS_LUT_TABLE_SIZE_M; |
1638 | break; | ||
1639 | } | ||
1640 | /* fall-through */ | ||
1641 | default: | ||
1636 | status = ICE_ERR_PARAM; | 1642 | status = ICE_ERR_PARAM; |
1637 | goto ice_aq_get_set_rss_lut_exit; | 1643 | goto ice_aq_get_set_rss_lut_exit; |
1638 | } | 1644 | } |