From: Wenzhuo Lu <wenzhuo.lu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 05/36] e1000/base: redundant PHY power down for i210
Date: Fri, 16 Oct 2015 10:50:51 +0800 [thread overview]
Message-ID: <1444963882-30931-6-git-send-email-wenzhuo.lu@intel.com> (raw)
In-Reply-To: <1444963882-30931-1-git-send-email-wenzhuo.lu@intel.com>
The wrong bit is being used in PHYREG16 for PHY power down. In addition,
the use of PHYREG 16 is unnecessary if bit 11 of PHYREG 0 is used.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_phy.c | 15 ---------------
drivers/net/e1000/base/e1000_phy.h | 1 -
2 files changed, 16 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index 7620ecf..6bbb379 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -3498,16 +3498,10 @@ STATIC s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
void e1000_power_up_phy_copper(struct e1000_hw *hw)
{
u16 mii_reg = 0;
- u16 power_reg = 0;
/* The PHY will retain its settings across a power down/up cycle */
hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
mii_reg &= ~MII_CR_POWER_DOWN;
- if (hw->phy.type == e1000_phy_i210) {
- hw->phy.ops.read_reg(hw, GS40G_COPPER_SPEC, &power_reg);
- power_reg &= ~GS40G_CS_POWER_DOWN;
- hw->phy.ops.write_reg(hw, GS40G_COPPER_SPEC, power_reg);
- }
hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
}
@@ -3522,17 +3516,10 @@ void e1000_power_up_phy_copper(struct e1000_hw *hw)
void e1000_power_down_phy_copper(struct e1000_hw *hw)
{
u16 mii_reg = 0;
- u16 power_reg = 0;
/* The PHY will retain its settings across a power down/up cycle */
hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
mii_reg |= MII_CR_POWER_DOWN;
- /* i210 Phy requires an additional bit for power up/down */
- if (hw->phy.type == e1000_phy_i210) {
- hw->phy.ops.read_reg(hw, GS40G_COPPER_SPEC, &power_reg);
- power_reg |= GS40G_CS_POWER_DOWN;
- hw->phy.ops.write_reg(hw, GS40G_COPPER_SPEC, power_reg);
- }
hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
msec_delay(1);
}
@@ -3563,7 +3550,6 @@ STATIC s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data,
if (ret_val)
return ret_val;
}
-
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
@@ -3673,7 +3659,6 @@ STATIC s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data,
if (ret_val)
return ret_val;
}
-
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index b30b36e..2b78af0 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -143,7 +143,6 @@ bool e1000_is_mphy_ready(struct e1000_hw *hw);
#define GS40G_MAC_LB 0x4140
#define GS40G_MAC_SPEED_1G 0X0006
#define GS40G_COPPER_SPEC 0x0010
-#define GS40G_CS_POWER_DOWN 0x0002
/* BM/HV Specific Registers */
#define BM_PORT_CTRL_PAGE 769
--
1.9.3
next prev parent reply other threads:[~2015-10-16 2:51 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 ` [dpdk-dev] [PATCH v2 14/35] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
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 ` Wenzhuo Lu [this message]
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=1444963882-30931-6-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).