mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 20:30:53 +07:00
i40e: fix 'Unknown bps' in dmesg for 2.5Gb/5Gb speeds
This patch fixes 'NIC Link is Up, Unknown bps' message in dmesg for 2.5Gb/5Gb speeds. This problem is fixed by adding constants for VIRTCHNL_LINK_SPEED_2_5GB and VIRTCHNL_LINK_SPEED_5GB cases in the i40e_virtchnl_link_speed() function. Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
e0f0be7dee
commit
4ae4916b56
@ -350,6 +350,10 @@ i40e_virtchnl_link_speed(enum i40e_aq_link_speed link_speed)
|
||||
return VIRTCHNL_LINK_SPEED_100MB;
|
||||
case I40E_LINK_SPEED_1GB:
|
||||
return VIRTCHNL_LINK_SPEED_1GB;
|
||||
case I40E_LINK_SPEED_2_5GB:
|
||||
return VIRTCHNL_LINK_SPEED_2_5GB;
|
||||
case I40E_LINK_SPEED_5GB:
|
||||
return VIRTCHNL_LINK_SPEED_5GB;
|
||||
case I40E_LINK_SPEED_10GB:
|
||||
return VIRTCHNL_LINK_SPEED_10GB;
|
||||
case I40E_LINK_SPEED_40GB:
|
||||
|
@ -61,12 +61,14 @@ enum virtchnl_status_code {
|
||||
#define VIRTCHNL_ERR_PARAM VIRTCHNL_STATUS_ERR_PARAM
|
||||
#define VIRTCHNL_STATUS_NOT_SUPPORTED VIRTCHNL_STATUS_ERR_NOT_SUPPORTED
|
||||
|
||||
#define VIRTCHNL_LINK_SPEED_2_5GB_SHIFT 0x0
|
||||
#define VIRTCHNL_LINK_SPEED_100MB_SHIFT 0x1
|
||||
#define VIRTCHNL_LINK_SPEED_1000MB_SHIFT 0x2
|
||||
#define VIRTCHNL_LINK_SPEED_10GB_SHIFT 0x3
|
||||
#define VIRTCHNL_LINK_SPEED_40GB_SHIFT 0x4
|
||||
#define VIRTCHNL_LINK_SPEED_20GB_SHIFT 0x5
|
||||
#define VIRTCHNL_LINK_SPEED_25GB_SHIFT 0x6
|
||||
#define VIRTCHNL_LINK_SPEED_5GB_SHIFT 0x7
|
||||
|
||||
enum virtchnl_link_speed {
|
||||
VIRTCHNL_LINK_SPEED_UNKNOWN = 0,
|
||||
@ -76,6 +78,8 @@ enum virtchnl_link_speed {
|
||||
VIRTCHNL_LINK_SPEED_40GB = BIT(VIRTCHNL_LINK_SPEED_40GB_SHIFT),
|
||||
VIRTCHNL_LINK_SPEED_20GB = BIT(VIRTCHNL_LINK_SPEED_20GB_SHIFT),
|
||||
VIRTCHNL_LINK_SPEED_25GB = BIT(VIRTCHNL_LINK_SPEED_25GB_SHIFT),
|
||||
VIRTCHNL_LINK_SPEED_2_5GB = BIT(VIRTCHNL_LINK_SPEED_2_5GB_SHIFT),
|
||||
VIRTCHNL_LINK_SPEED_5GB = BIT(VIRTCHNL_LINK_SPEED_5GB_SHIFT),
|
||||
};
|
||||
|
||||
/* for hsplit_0 field of Rx HMC context */
|
||||
|
Loading…
Reference in New Issue
Block a user