From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D1044A0350; Mon, 22 Jun 2020 09:06:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 13AA81C1E4; Mon, 22 Jun 2020 09:05:27 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 3306C1C1CC for ; Mon, 22 Jun 2020 09:05:23 +0200 (CEST) IronPort-SDR: rapUBJ2+yFMzkii3t8/Uyab7ZcQQAgKpqi/wl5R1LOWlTrFKH3GqAG62T4kxeb4iXte2PyhXv6 8iKEjB8oDUkQ== X-IronPort-AV: E=McAfee;i="6000,8403,9659"; a="141944699" X-IronPort-AV: E=Sophos;i="5.75,266,1589266800"; d="scan'208";a="141944699" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2020 00:05:22 -0700 IronPort-SDR: cAr2Imjeg6q/Uj+1OJ9u0+UzFHTb+RhqH7oYfbISw8ClvTauuBqmpOMFZwjtx3hlxGjEtFQE74 nufOoh4Cjrqw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,266,1589266800"; d="scan'208";a="384408773" Received: from dpdk.sh.intel.com ([10.239.255.83]) by fmsmga001.fm.intel.com with ESMTP; 22 Jun 2020 00:05:21 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Jeff Guo , Zhao1 Wei , Guinan Sun , Todd Fujinaka , Sasha Neftin Date: Mon, 22 Jun 2020 06:45:30 +0000 Message-Id: <20200622064634.70941-7-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200622064634.70941-1-guinanx.sun@intel.com> References: <20200622064634.70941-1-guinanx.sun@intel.com> Subject: [dpdk-dev] [PATCH 06/70] net/e1000/base: modify MAC initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fix mac initialization for i225 and i211 devices. Fix parens to match the rest of the MAC checks. Signed-off-by: Todd Fujinaka Signed-off-by: Sasha Neftin Signed-off-by: Guinan Sun --- drivers/net/e1000/base/e1000_82575.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c index 35a6ba502..4d7ef0ea2 100644 --- a/drivers/net/e1000/base/e1000_82575.c +++ b/drivers/net/e1000/base/e1000_82575.c @@ -433,7 +433,7 @@ STATIC s32 e1000_init_mac_params_82575(struct e1000_hw *hw) else mac->ops.reset_hw = e1000_reset_hw_82575; /* hw initialization */ - if ((mac->type == e1000_i210) || (mac->type == e1000_i211)) + if (mac->type == e1000_i210 || mac->type == e1000_i211) mac->ops.init_hw = e1000_init_hw_i210; else #ifndef NO_I225_SUPPORT @@ -441,7 +441,7 @@ STATIC s32 e1000_init_mac_params_82575(struct e1000_hw *hw) mac->ops.init_hw = e1000_init_hw_i225; else #endif /* NO_I225_SUPPORT */ - mac->ops.init_hw = e1000_init_hw_82575; + mac->ops.init_hw = e1000_init_hw_82575; /* link setup */ mac->ops.setup_link = e1000_setup_link_generic; /* physical interface link setup */ @@ -492,11 +492,17 @@ STATIC s32 e1000_init_mac_params_82575(struct e1000_hw *hw) /* acquire SW_FW sync */ mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_82575; mac->ops.release_swfw_sync = e1000_release_swfw_sync_82575; - if (mac->type >= e1000_i210) { + if (mac->type == e1000_i210 || mac->type == e1000_i211) { mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_i210; mac->ops.release_swfw_sync = e1000_release_swfw_sync_i210; } +#ifndef NO_I225_SUPPORT + if (mac->type >= e1000_i225) { + mac->ops.acquire_swfw_sync = e1000_acquire_swfw_sync_i225; + mac->ops.release_swfw_sync = e1000_release_swfw_sync_i225; + } +#endif /* NO_I225_SUPPORT */ /* set lan id for port to determine which phy lock to use */ hw->mac.ops.set_lan_id(hw); -- 2.17.1