diff options
| author | Bruce Allan <[email protected]> | 2019-11-08 14:23:18 +0000 |
|---|---|---|
| committer | Jeff Kirsher <[email protected]> | 2019-11-22 21:06:34 +0000 |
| commit | 9164f761c99493a947dcbf3889a157943b46e738 (patch) | |
| tree | 59b53c080896ccf7976f8023989ee565642301d1 /drivers/net/ethernet/intel/ice/ice_common.c | |
| parent | ice: Store number of functions for the device (diff) | |
| download | kernel-9164f761c99493a947dcbf3889a157943b46e738.tar.gz kernel-9164f761c99493a947dcbf3889a157943b46e738.zip | |
ice: Correct capabilities reporting of max TCs
Firmware always returns 8 as the max number of supported TCs. However on
devices with more than 4 ports, the maximum number of TCs per port is
limited to 4. Check and, if necessary, correct the reporting of
capabilities for devices with more than 4 ports.
Signed-off-by: Bruce Allan <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_common.c')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_common.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index e92eaec19c83..fb1d930470c7 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c @@ -1783,6 +1783,18 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count, break; } } + + /* Re-calculate capabilities that are dependent on the number of + * physical ports; i.e. some features are not supported or function + * differently on devices with more than 4 ports. + */ + if (hw->dev_caps.num_funcs > 4) { + /* Max 4 TCs per port */ + caps->maxtc = 4; + ice_debug(hw, ICE_DBG_INIT, + "%s: maxtc = %d (based on #ports)\n", prefix, + caps->maxtc); + } } /** |
