From ff1d3f523ae7af4da3450201bc2b3a763845b2f7 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Tue, 15 Dec 2020 11:29:46 +0800 Subject: [PATCH] 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 --- drivers/net/ice/base/ice_common.c | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- 2.20.1