From: Zhu Yanjun <zyjzyj2000@gmail.com>
To: netdev@vger.kernel.org, w@1wt.eu, zyjzyj2000@gmail.com
Cc: Zhu Yanjun <Yanjun.Zhu@windriver.com>,
Bruce Allan <bruce.w.allan@intel.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [PATCH 3/5] e1000e: do not toggle LANPHYPC value bit when PHY reset is blocked
Date: Tue, 16 Dec 2014 18:28:18 +0800 [thread overview]
Message-ID: <1418725700-31465-4-git-send-email-Yanjun.Zhu@windriver.com> (raw)
In-Reply-To: <1418725700-31465-1-git-send-email-Yanjun.Zhu@windriver.com>
2.6.x kernels require a similar logic change as commit 6cc7aae
[e1000e: do not toggle LANPHYPC value bit when PHY reset is blocked]
introduces for newer kernels.
When PHY reset is intentionally blocked on 82577/8/9, do not toggle the
LANPHYPC value bit (essentially performing a hard power reset of the
device) otherwise the PHY can be put into an unknown state.
Cleanup whitespace in the same function.
[yanjun.zhu: whitespace remains unchanged]
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Zhu Yanjun <Yanjun.Zhu@windriver.com>
---
drivers/net/e1000e/ich8lan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index c4b2d15..8c7e4aa 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -280,7 +280,8 @@ static s32 e1000_init_phy_params_pchlan(struct e1000_hw *hw)
phy->ops.write_phy_reg_locked = e1000_write_phy_reg_hv_locked;
phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT;
- if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID)) {
+ if (!(er32(FWSM) & E1000_ICH_FWSM_FW_VALID) &&
+ !e1000_check_reset_block(hw)) {
/*Set Phy Config Counter to 50msec */
ctrl = er32(FEXTNVM3);
ctrl &= ~E1000_FEXTNVM3_PHY_CFG_COUNTER_MASK;
--
1.9.1
next prev parent reply other threads:[~2014-12-16 10:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 10:28 [PATCH V2 0/5] e1000e: fix nic not boot after rebooting Zhu Yanjun
2014-12-16 10:28 ` [PATCH 1/5] e1000e: reset MAC-PHY interconnect on 82577/82578 Zhu Yanjun
2014-12-16 10:48 ` David Laight
2014-12-16 12:12 ` Jeff Kirsher
2014-12-16 12:17 ` Willy Tarreau
2014-12-16 10:28 ` [PATCH 2/5] e1000e: workaround EEPROM configuration change on 82579 on kernel 2.6.x Zhu Yanjun
2014-12-16 10:28 ` Zhu Yanjun [this message]
2014-12-16 10:28 ` [PATCH 4/5] e1000e: update workaround for 82579 intermittently disabled during S0->Sx Zhu Yanjun
2014-12-16 10:28 ` [PATCH 5/5] e1000e: cleanup use of check_reset_block function pointer Zhu Yanjun
2015-05-14 17:10 ` [PATCH V2 0/5] e1000e: fix nic not boot after rebooting Willy Tarreau
-- strict thread matches above, loose matches on Subject: below --
2014-12-15 8:39 [PATCH " Zhu Yanjun
2014-12-15 8:39 ` [PATCH 3/5] e1000e: do not toggle LANPHYPC value bit when PHY reset is blocked Zhu Yanjun
2014-12-15 12:01 ` Sergei Shtylyov
2014-12-15 12:16 ` Willy Tarreau
2014-12-15 13:21 ` Zhu, Yanjun
2014-12-15 13:33 ` Willy Tarreau
2014-12-16 2:08 ` yzhu1
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=1418725700-31465-4-git-send-email-Yanjun.Zhu@windriver.com \
--to=zyjzyj2000@gmail.com \
--cc=Yanjun.Zhu@windriver.com \
--cc=bruce.w.allan@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=w@1wt.eu \
/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).