net/ice: fix DCF init for E830 devices
PATCH 1/1 net/ice: fix DCF init for E830 devices
From: Bruce Richardson <[email protected]>
E830 introduces a new version of Get Link Status Data which increases the size of struct ice_aqc_get_link_status_data from 32 bytes to 56. When initializing DCF, attempt to get link status data using both formats of the command, by overriding the mac type to E830 on failure with the default setting.
--- drivers/net/ice/ice_dcf_parent.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
drivers/net/ice/ice_dcf_parent.c +13 -2
@@ -346,8 +346,19 @@ ice_dcf_init_parent_hw(struct ice_hw *hw)/* Initialize port_info struct with link information */ status =ice_aq_get_link_info (hw->port_info, true,NULL ,NULL ); -if (status) - goto err_unroll_alloc; +if (status) { +enum ice_mac_type type = hw->mac_type; + +/* DCF uses ICE_MAC_GENERIC which can be talking to either +* E810 or E830. Retry with E830 mac type to ensure correct +* data length is used for IAVF communication with PF. +*/ + hw->mac_type =ICE_MAC_E830 ; + status =ice_aq_get_link_info (hw->port_info, true,NULL ,NULL ); + hw->mac_type = type; +if (status) + goto err_unroll_alloc; + } status =ice_init_fltr_mgmt_struct (hw);if (status)
Signature · 1 line
2.34.1
Quoted 8 lines · Ian Stokes
From: Bruce Richardson <[email protected]>
E830 introduces a new version of Get Link Status Data which increases the size of struct
ice_aqc_get_link_status_datafrom 32 bytes to 56. When initializing DCF, attempt to get link status data using both formats of the command, by overriding the mac type to E830 on failure with the default setting.
Quoted 6 lines
Signed-off-by Bruce Richardson <[email protected]>Signed-off-by Ian Stokes <[email protected]>--- drivers/net/ice/ice_dcf_parent.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
Patch applied to dpdk-next-net-intel
/Bruce