Commit 79504d70 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

bnx2x: correct LPI pass-through configuration

Commit c8c60d88

an incorrect logic which enabled a buffer overflow when accessing
an array during LPI pass-through configuration.
This patch fixes this issue by removing that logic altogether.
Signed-off-by: default avatarYuval Mintz <>
Signed-off-by: default avatarYaniv Rosner <>
Signed-off-by: default avatarEilon Greenstein <>
Signed-off-by: default avatarDavid S. Miller <>
parent 260762c7
...@@ -4057,18 +4057,12 @@ static void bnx2x_warpcore_set_10G_XFI(struct bnx2x_phy *phy, ...@@ -4057,18 +4057,12 @@ static void bnx2x_warpcore_set_10G_XFI(struct bnx2x_phy *phy,
MDIO_WC_REG_DIGITAL4_MISC3, val | 0x8080); MDIO_WC_REG_DIGITAL4_MISC3, val | 0x8080);
/* Enable LPI pass through */ /* Enable LPI pass through */
if ((params->eee_mode & EEE_MODE_ADV_LPI) && DP(NETIF_MSG_LINK, "Configure WC for LPI pass through\n");
(phy->flags & FLAGS_EEE_10GBT) && bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
bnx2x_eee_calc_timer(params)) && 0x7c);
(params->req_duplex[bnx2x_phy_selection(params)] == DUPLEX_FULL)) { bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD,
DP(NETIF_MSG_LINK, "Configure WC for LPI pass through\n"); MDIO_WC_REG_DIGITAL4_MISC5, 0xc000);
bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD,
/* 10G XFI Full Duplex */ /* 10G XFI Full Duplex */
bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD, bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment