All of lore.kernel.org
 help / color / mirror / Atom feed
From: xiong <xiong@qca.qualcomm.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Cc: <qca-linux-team@qualcomm.com>, <nic-devel@qualcomm.com>,
	xiong <xiong@qca.qualcomm.com>
Subject: [PATCH 03/10] atl1c: clear WoL status when reset pcie
Date: Sat, 28 Apr 2012 09:58:38 +0800	[thread overview]
Message-ID: <1335578325-21326-4-git-send-email-xiong@qca.qualcomm.com> (raw)
In-Reply-To: <1335578325-21326-1-git-send-email-xiong@qca.qualcomm.com>

WoL status is read-clear and should be cleared when in S0
status.
putting it in atl1c_reset_pcie is more suitable than
in atl1c_get_permanent_address.

Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
---
 drivers/net/ethernet/atheros/atl1c/atl1c_hw.c   |    5 -----
 drivers/net/ethernet/atheros/atl1c/atl1c_main.c |    3 +++
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
index 209c179..49f433e 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
@@ -73,7 +73,6 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)
 	u32 otp_ctrl_data;
 	u32 twsi_ctrl_data;
 	u32 ltssm_ctrl_data;
-	u32 wol_data;
 	u8  eth_addr[ETH_ALEN];
 	u16 phy_data;
 	bool raise_vol = false;
@@ -114,10 +113,6 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)
 		ltssm_ctrl_data &= ~LTSSM_ID_EN_WRO;
 		AT_WRITE_REG(hw, REG_LTSSM_ID_CTRL, ltssm_ctrl_data);
 
-		/* clear any WOL settings */
-		AT_WRITE_REG(hw, REG_WOL_CTRL, 0);
-		AT_READ_REG(hw, REG_WOL_CTRL, &wol_data);
-
 
 		AT_READ_REG(hw, REG_TWSI_CTRL, &twsi_ctrl_data);
 		twsi_ctrl_data |= TWSI_CTRL_SW_LDSTART;
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 50df437..6552913 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -133,6 +133,9 @@ static void atl1c_reset_pcie(struct atl1c_hw *hw, u32 flag)
 	 */
 	pci_enable_wake(pdev, PCI_D3hot, 0);
 	pci_enable_wake(pdev, PCI_D3cold, 0);
+	/* wol sts read-clear */
+	AT_READ_REG(hw, REG_WOL_CTRL, &data);
+	AT_WRITE_REG(hw, REG_WOL_CTRL, 0);
 
 	/*
 	 * Mask some pcie error bits
-- 
1.7.7


  parent reply	other threads:[~2012-04-28  2:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-28  1:58 [PATCH 00/10] atl1c: update hardware settings - v4 xiong
2012-04-28  1:58 ` [PATCH 01/10] atl1c: add workaround for issue of bit INTX-disable for MSI interrupt xiong
2012-04-28  2:05   ` Luis R. Rodriguez
2012-04-28  9:53     ` Huang, Xiong
2012-04-28 17:21       ` Luis R. Rodriguez
2012-04-28  1:58 ` [PATCH 02/10] atl1c: add PHY link event(up/down) patch xiong
2012-04-28 17:24   ` Florian Fainelli
2012-04-29 10:07     ` Huang, Xiong
2012-04-29 12:25     ` 答复: " Huang, Xiong
2012-04-29 12:25       ` Huang, Xiong
2012-04-28  1:58 ` xiong [this message]
2012-04-28  1:58 ` [PATCH 04/10] atl1c: remove code of closing register writable attribution xiong
2012-04-28  1:58 ` [PATCH 05/10] atl1c: refine mac address related code xiong
2012-04-28  1:58 ` [PATCH 06/10] atl1c: enlarge L1 response waiting timer xiong
2012-04-28  1:58 ` [PATCH 07/10] atl1c: cancel task when interface closed xiong
2012-04-28  1:58 ` [PATCH 08/10] atl1c: do MAC-reset when PHY link down xiong
2012-04-28  1:58 ` [PATCH 09/10] atl1c: Disable L0S when no cable link xiong
2012-04-28  1:58 ` [PATCH 10/10] atl1c: remove PHY polling from atl1c_change_mtu xiong
2012-04-30 17:35 ` [PATCH 00/10] atl1c: update hardware settings - v4 David Miller
2012-05-01  1:08   ` Huang, Xiong
2012-05-01  1:38 xiong
2012-05-01  1:38 ` [PATCH 03/10] atl1c: clear WoL status when reset pcie xiong

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=1335578325-21326-4-git-send-email-xiong@qca.qualcomm.com \
    --to=xiong@qca.qualcomm.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic-devel@qualcomm.com \
    --cc=qca-linux-team@qualcomm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.