From: "Dmitry Kravkov" <dmitry@broadcom.com>
To: ariele@broadcom.com, eilong@broadcom.com, davem@davemloft.net,
netdev@vger.kernel.org
Cc: "Yaniv Rosner" <yanivr@broadcom.com>,
"Barak Witkowski" <barak@broadcom.com>,
"Dmitry Kravkov" <dmitry@broadcom.com>
Subject: [PATCH net 2/7] bnx2x: Fix link down in 57712 following LFA
Date: Wed, 31 Oct 2012 17:46:53 +0200 [thread overview]
Message-ID: <1351698418-10005-3-git-send-email-dmitry@broadcom.com> (raw)
In-Reply-To: <1351698418-10005-1-git-send-email-dmitry@broadcom.com>
From: Yaniv Rosner <yanivr@broadcom.com>
In case of link flap avoidance between PXE boot and bnx2x, set the appropriate
PHY DEVAD even if LFA kicks in.
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Barak Witkowski <barak@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 23 +++++++++++++++++----
1 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 290e12a..f2436ea 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -3295,6 +3295,21 @@ static void bnx2x_serdes_deassert(struct bnx2x *bp, u8 port)
DEFAULT_PHY_DEV_ADDR);
}
+static void bnx2x_xgxs_specific_func(struct bnx2x_phy *phy,
+ struct link_params *params,
+ u32 action)
+{
+ struct bnx2x *bp = params->bp;
+ switch (action) {
+ case PHY_INIT:
+ /* Set correct devad */
+ REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_ST + params->port*0x18, 0);
+ REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_DEVAD + params->port*0x18,
+ phy->def_md_devad);
+ break;
+ }
+}
+
static void bnx2x_xgxs_deassert(struct link_params *params)
{
struct bnx2x *bp = params->bp;
@@ -3309,10 +3324,8 @@ static void bnx2x_xgxs_deassert(struct link_params *params)
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_CLEAR, val);
udelay(500);
REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_3_SET, val);
-
- REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_ST + port*0x18, 0);
- REG_WR(bp, NIG_REG_XGXS0_CTRL_MD_DEVAD + port*0x18,
- params->phy[INT_PHY].def_md_devad);
+ bnx2x_xgxs_specific_func(¶ms->phy[INT_PHY], params,
+ PHY_INIT);
}
static void bnx2x_calc_ieee_aneg_adv(struct bnx2x_phy *phy,
@@ -10999,7 +11012,7 @@ static struct bnx2x_phy phy_xgxs = {
.format_fw_ver = (format_fw_ver_t)NULL,
.hw_reset = (hw_reset_t)NULL,
.set_link_led = (set_link_led_t)NULL,
- .phy_specific_func = (phy_specific_func_t)NULL
+ .phy_specific_func = (phy_specific_func_t)bnx2x_xgxs_specific_func
};
static struct bnx2x_phy phy_warpcore = {
.type = PORT_HW_CFG_XGXS_EXT_PHY_TYPE_DIRECT,
--
1.7.7.2
next prev parent reply other threads:[~2012-10-31 15:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 15:46 [PATCH net 0/7] bnx2x: fixes Dmitry Kravkov
2012-10-31 15:46 ` [PATCH net 1/7] bnx2x: Fix 57810 1G-KR link against certain switches Dmitry Kravkov
2012-10-31 15:46 ` Dmitry Kravkov [this message]
2012-10-31 15:46 ` [PATCH net 3/7] bnx2x: Restore global registers back to default Dmitry Kravkov
2012-10-31 15:46 ` [PATCH net 4/7] bnx2x: Fix potential incorrect link speed provision Dmitry Kravkov
2012-10-31 15:46 ` [PATCH net 5/7] bnx2x: Fix unrecognized SFP+ module after driver is loaded Dmitry Kravkov
2012-10-31 15:46 ` [PATCH net 6/7] bnx2x: Fix no link on 577xx 10G-baseT Dmitry Kravkov
2012-10-31 15:46 ` [PATCH net 7/7] bnx2x: Disable FCoE for 57840 since not yet supported by FW Dmitry Kravkov
2012-11-01 15:33 ` [PATCH net 0/7] bnx2x: fixes David Miller
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=1351698418-10005-3-git-send-email-dmitry@broadcom.com \
--to=dmitry@broadcom.com \
--cc=ariele@broadcom.com \
--cc=barak@broadcom.com \
--cc=davem@davemloft.net \
--cc=eilong@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=yanivr@broadcom.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 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).