From: Qi Zhang Date: Tue, 15 Dec 2020 03:29:46 +0000 (+0800) Subject: net/ice/base: add condition to copy module info into memory X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ff1d3f523ae7af4da3450201bc2b3a763845b2f7;p=dpdk.git net/ice/base: add condition to copy module info into memory There is added condition,to copy information about used module into memory Signed-off-by: Szymon T Cudzilo Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c index b217ae6d41..ca764b2566 100644 --- a/drivers/net/ice/base/ice_common.c +++ b/drivers/net/ice/base/ice_common.c @@ -2652,6 +2652,11 @@ enum ice_status ice_update_link_info(struct ice_port_info *pi) status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_TOPO_CAP, pcaps, NULL); + if (status == ICE_SUCCESS) + ice_memcpy(li->module_type, &pcaps->module_type, + sizeof(li->module_type), + ICE_NONDMA_TO_NONDMA); + ice_free(hw, pcaps); }