From: Wenzhuo Lu <wenzhuo.lu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 14/35] e1000/base: add EEARBC_I210 for i210
Date: Thu, 15 Oct 2015 10:03:27 +0800 [thread overview]
Message-ID: <1444874628-5453-15-git-send-email-wenzhuo.lu@intel.com> (raw)
In-Reply-To: <1444874628-5453-1-git-send-email-wenzhuo.lu@intel.com>
EEARBC has changed on i210. It means EEARBC has a different address on
i210 than on other NICs. So, add a new entity named EEARBC_I210 to the
register list and make sure the right one is being used on i210.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_i210.c | 17 ++++++++++-------
drivers/net/e1000/base/e1000_regs.h | 1 +
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 842e9d4..fedf88e 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -925,7 +925,7 @@ s32 e1000_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 data)
STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
{
s32 ret_val;
- u32 wuc, mdicnfg, ctrl_ext, reg_val;
+ u32 wuc, mdicnfg, ctrl, ctrl_ext, reg_val;
u16 nvm_word, phy_word, pci_word, tmp_nvm;
int i;
@@ -942,9 +942,9 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
nvm_word = E1000_INVM_DEFAULT_AL;
tmp_nvm = nvm_word | E1000_INVM_PLL_WO_VAL;
for (i = 0; i < E1000_MAX_PLL_TRIES; i++) {
- /* check current state */
- hw->phy.ops.read_reg(hw, (E1000_PHY_PLL_FREQ_PAGE |
- E1000_PHY_PLL_FREQ_REG), &phy_word);
+ /* check current state directly from internal PHY */
+ e1000_read_phy_reg_gs40g(hw, (E1000_PHY_PLL_FREQ_PAGE |
+ E1000_PHY_PLL_FREQ_REG), &phy_word);
if ((phy_word & E1000_PHY_PLL_UNCONF)
!= E1000_PHY_PLL_UNCONF) {
ret_val = E1000_SUCCESS;
@@ -952,14 +952,17 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
} else {
ret_val = -E1000_ERR_PHY;
}
- hw->phy.ops.reset(hw);
+ /* directly reset the internal PHY */
+ ctrl = E1000_READ_REG(hw, E1000_CTRL);
+ E1000_WRITE_REG(hw, E1000_CTRL, ctrl|E1000_CTRL_PHY_RST);
+
ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
ctrl_ext |= (E1000_CTRL_EXT_PHYPDEN | E1000_CTRL_EXT_SDLPE);
E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
E1000_WRITE_REG(hw, E1000_WUC, 0);
reg_val = (E1000_INVM_AUTOLOAD << 4) | (tmp_nvm << 16);
- E1000_WRITE_REG(hw, E1000_EEARBC, reg_val);
+ E1000_WRITE_REG(hw, E1000_EEARBC_I210, reg_val);
e1000_read_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
pci_word |= E1000_PCI_PMCSR_D3;
@@ -968,7 +971,7 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
pci_word &= ~E1000_PCI_PMCSR_D3;
e1000_write_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
reg_val = (E1000_INVM_AUTOLOAD << 4) | (nvm_word << 16);
- E1000_WRITE_REG(hw, E1000_EEARBC, reg_val);
+ E1000_WRITE_REG(hw, E1000_EEARBC_I210, reg_val);
/* restore WUC register */
E1000_WRITE_REG(hw, E1000_WUC, wuc);
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 8999b5b..b9fcdea 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -110,6 +110,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PBECCSTS 0x0100C /* Packet Buffer ECC Status - RW */
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
+#define E1000_EEARBC_I210 0x12024 /* EEPROM Auto Read Bus Control */
#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
#define E1000_EEWR 0x0102C /* EEPROM Write Register - RW */
#define E1000_FLSWCTL 0x01030 /* FLASH control register */
--
1.9.3
next prev parent reply other threads:[~2015-10-15 2:04 UTC|newest]
Thread overview: 118+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 01/34] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 02/34] e1000/base: add new devices Wenzhuo Lu
2015-10-14 16:00 ` Stephen Hemminger
2015-10-14 6:34 ` [dpdk-dev] [PATCH 03/34] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 04/34] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 05/34] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 06/34] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 07/34] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 08/34] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 09/34] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 10/34] e1000/base: change invariant return to not use variables Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 11/34] e1000/base: add return value handler when check manage mode Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 12/34] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 13/34] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 14/34] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 15/34] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 16/34] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 17/34] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 18/34] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 19/34] e1000/base: add return value for resume workaround Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 20/34] e1000/base: fix link detect flow Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 21/34] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 22/34] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 23/34] e1000/base: K1 flow fixes Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 24/34] e1000/base: remove FIXME comment Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 25/34] e1000/base: set correct value of beacon duration Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 26/34] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 27/34] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 28/34] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 29/34] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 30/34] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 31/34] e1000/base: move the print to the right position Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 32/34] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 33/34] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 34/34] e1000/base: some minor change Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-15 8:30 ` Mcnamara, John
2015-10-15 8:37 ` Lu, Wenzhuo
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 02/35] e1000/base: add new devices Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 03/35] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 04/35] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 05/35] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 06/35] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 07/35] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 08/35] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 09/35] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 10/35] e1000/base: change invariant return to not use variables Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 11/35] e1000/base: add return value handler when check manage mode Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 12/35] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 13/35] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
2015-10-15 2:03 ` Wenzhuo Lu [this message]
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 15/35] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 16/35] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 17/35] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 18/35] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 19/35] e1000/base: add return value for resume workaround Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 20/35] e1000/base: fix link detect flow Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 21/35] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 22/35] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 23/35] e1000/base: K1 flow fixes Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 24/35] e1000/base: remove FIXME comment Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 25/35] e1000/base: set correct value of beacon duration Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 26/35] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 27/35] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 28/35] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 29/35] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 30/35] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 31/35] e1000/base: move the print to the right position Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 32/35] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 33/35] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 34/35] e1000/base: some minor change Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 35/35] e1000: add new devices Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 01/36] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 02/36] e1000/base: add new devices Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 03/36] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 04/36] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 05/36] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 06/36] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 07/36] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 08/36] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 09/36] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 10/36] e1000/base: change invariant return to not use variables Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 11/36] e1000/base: add return value handler when check manage mode Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 12/36] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 13/36] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 14/36] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 15/36] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 16/36] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 17/36] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 18/36] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 19/36] e1000/base: add return value for resume workaround Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 20/36] e1000/base: fix link detect flow Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 21/36] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 22/36] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 23/36] e1000/base: K1 flow fixes Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 24/36] e1000/base: remove FIXME comment Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 25/36] e1000/base: set correct value of beacon duration Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 26/36] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 27/36] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 28/36] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 29/36] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 30/36] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 31/36] e1000/base: move the print to the right position Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 32/36] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 33/36] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 34/36] e1000/base: some minor change Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 35/36] e1000: add new devices Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 36/36] doc: update release notes for e1000 base code update Wenzhuo Lu
2015-10-27 15:32 ` Thomas Monjalon
2015-10-28 2:33 ` Lu, Wenzhuo
2015-10-27 15:34 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Thomas Monjalon
2015-10-28 1:58 ` Lu, Wenzhuo
2015-10-19 16:03 ` [dpdk-dev] [PATCH 00/34] update e1000 base driver Thomas Monjalon
2015-10-20 0:59 ` Lu, Wenzhuo
2015-10-21 10:21 ` Glynn, Michael J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444874628-5453-15-git-send-email-wenzhuo.lu@intel.com \
--to=wenzhuo.lu@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).