View Issue Details

IDProjectCategoryView StatusLast Update
0007942CentOS-7kernelpublic2015-04-07 19:54
Reportermklonowski 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinux x86_64OSCentOSOS Version7
Product Version7.0-1406 
Target VersionFixed in Version 
Summary0007942: Problem with driver bnx2x
DescriptionI have Centos7 installed on HP bl460c Gen9. Machine has two interfaces:
06:00.0 Ethernet controller: Broadcom Corporation BCM57840 NetXtreme II 10/20-Gigabit Ethernet (rev 11)
06:00.1 Ethernet controller: Broadcom Corporation BCM57840 NetXtreme II 10/20-Gigabit Ethernet (rev 11)

On kernel 3.10.0-123.9.3.el7 first of them doesn't work (link down) when second works great:
eno49: flags=6147<UP,BROADCAST,SLAVE,MULTICAST> mtu 1500
eno50: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500

[ 70.102848] bnx2x 0000:06:00.0 eno49: NIC Link is Up, 1000 Mbps full duplex, Flow control: none
[ 70.157877] bnx2x 0000:06:00.0 eno49: NIC Link is Down

# ethtool eno49
Settings for eno49:
        Supported ports: [ FIBRE ]
        Supported link modes: 1000baseT/Full
                                10000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Advertised link modes: 1000baseT/Full
                                10000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Speed: Unknown!
        Duplex: Unknown! (255)
        Port: FIBRE
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: g
        Current message level: 0x00000000 (0)

        Link detected: no

Upgrading the kernel to kernel-ml-3.17.4-1.el7.elrepo.x86_64 resolved this problem.
Related info:
https://lists.launchpad.net/kernel-packages/msg80453.html
http://patchwork.ozlabs.org/patch/358990/

Please patch the stock kernel.
TagsNo tags attached.
abrt_hash
URL

Activities

toracat

toracat

2014-11-28 02:07

manager   ~0021827

We can apply the patch to the centosplus kernel.

However the distro kernel cannot be modified. This bug has to be reported upstream at http://bugzilla.redhat.com so that the fix gets inherited to CentOS.
mklonowski

mklonowski

2014-11-28 09:45

reporter   ~0021829

Thanks for your answer. Can you give me a hint?
Can I report a bug on bugzilla, if I am not a Red Hat Customer?
Shuld I report a bug when I have not tested this on RHEL?
tigalch

tigalch

2014-11-28 20:56

manager   ~0021831

Yes, you can report bugs to RH even if you're not a RH customer. I would just go ahead and post it at RH. You could also please cross reference the CentOS bug at RH bugzilla and vice versa. https://bugzilla.redhat.com
toracat

toracat

2014-11-29 22:35

manager  

bug7942plus.patch (2,396 bytes)
centosplus patch bug #7942

commit dad91ee478c7f39e04a33272732147b8c274bb58
Author: Yaniv Rosner <yaniv.rosner@qlogic.com>
Date:   Thu Jun 12 07:55:29 2014 +0300

    bnx2x: Fix link for KR with swapped polarity lane
    
    This avoids clearing the RX polarity setting in KR mode when polarity lane
    is swapped, as otherwise this will result in failed link.
    
    Signed-off-by: Yaniv Rosner <yaniv.rosner@qlogic.com>
    Signed-off-by: Yuval Mintz <yuval.mintz@qlogic.com>
    Signed-off-by: Ariel Elior <ariel.elior@qlogic.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

    Applied-by: Akemi Yagi <toracat@centos.org>

--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -3703,7 +3703,8 @@ static void bnx2x_warpcore_restart_AN_KR
 static void bnx2x_warpcore_enable_AN_KR(struct bnx2x_phy *phy,
 					struct link_params *params,
 					struct link_vars *vars) {
-	u16 lane, i, cl72_ctrl, an_adv = 0;
+	u16 lane, i, cl72_ctrl, an_adv = 0, val;
+	u32 wc_lane_config;
 	struct bnx2x *bp = params->bp;
 	static struct bnx2x_reg_set reg_set[] = {
 		{MDIO_WC_DEVAD, MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X2, 0x7},
@@ -3822,16 +3823,27 @@ static void bnx2x_warpcore_enable_AN_KR(
 		/* Enable Auto-Detect to support 1G over CL37 as well */
 		bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
 				 MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1, 0x10);
-
+		wc_lane_config = REG_RD(bp, params->shmem_base +
+					offsetof(struct shmem_region, dev_info.
+					shared_hw_config.wc_lane_config));
+		bnx2x_cl45_read(bp, phy, MDIO_WC_DEVAD,
+				MDIO_WC_REG_RX0_PCI_CTRL + (lane << 4), &val);
 		/* Force cl48 sync_status LOW to avoid getting stuck in CL73
 		 * parallel-detect loop when CL73 and CL37 are enabled.
 		 */
-		CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK,
-				  MDIO_AER_BLOCK_AER_REG, 0);
-		bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
-				 MDIO_WC_REG_RXB_ANA_RX_CONTROL_PCI, 0x0800);
-		bnx2x_set_aer_mmd(params, phy);
+		val |= 1 << 11;
 
+		/* Restore Polarity settings in case it was run over by
+ 		 * previous link owner
+ 		 */
+		if (wc_lane_config &
+		    (SHARED_HW_CFG_RX_LANE0_POL_FLIP_ENABLED << lane))
+			val |= 3 << 2;
+		else
+			val &= ~(3 << 2);
+		bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
+				MDIO_WC_REG_RX0_PCI_CTRL + (lane << 4),
+				val);
 		bnx2x_disable_kr2(params, vars, phy);
 	}
 
bug7942plus.patch (2,396 bytes)
toracat

toracat

2014-11-29 22:35

manager   ~0021833

plus kernel patch uploaded.
mklonowski

mklonowski

2014-12-01 09:24

reporter   ~0021835

Thanks again. I reported problem on RHEL bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1169283
toracat

toracat

2014-12-04 16:46

manager   ~0021857

A new package kmod-bnx2x has just been released. Maybe it's worth checking to see if this fixes the issue.

https://rhn.redhat.com/errata/RHEA-2014-1958.html
mklonowski

mklonowski

2014-12-05 07:44

reporter   ~0021861

Thanks for the info. Installation of this package kmod-bnx2x, fixes the issue.

Installed packages:
kernel-3.10.0-123.9.3.el7.x86_64
kmod-bnx2x-1.710.51-3.el7_0.x86_64

Two NICs are running:
eno49: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
eno50: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
toracat

toracat

2014-12-05 08:26

manager   ~0021862

That is good news. What is the status of the bugzilla you filed upstream?
mklonowski

mklonowski

2014-12-05 09:44

reporter   ~0021865

The state of upstream ticket is still "new", but they assigned it to someone.
toracat

toracat

2014-12-12 16:15

manager   ~0021922

kernel-plus-3.10.0-123.13.1.el7.centos.plus.x86_64.rpm has the patch from this bug report.
mklonowski

mklonowski

2014-12-15 07:16

reporter   ~0021950

I have installed 3.10.0-123.13.1.el7.centos.plus.x86_64 and both of NICs works :)
toracat

toracat

2014-12-15 07:30

manager   ~0021951

Thanks for reporting back.
toracat

toracat

2015-04-07 19:54

manager   ~0022702

The patch is in the distro kernel, so has been removed from the plus kernel.

Issue History

Date Modified Username Field Change
2014-11-27 14:09 mklonowski New Issue
2014-11-28 02:07 toracat Note Added: 0021827
2014-11-28 02:08 toracat Status new => assigned
2014-11-28 09:45 mklonowski Note Added: 0021829
2014-11-28 20:56 tigalch Note Added: 0021831
2014-11-29 22:35 toracat File Added: bug7942plus.patch
2014-11-29 22:35 toracat Note Added: 0021833
2014-12-01 09:24 mklonowski Note Added: 0021835
2014-12-04 16:46 toracat Note Added: 0021857
2014-12-05 07:44 mklonowski Note Added: 0021861
2014-12-05 08:26 toracat Note Added: 0021862
2014-12-05 09:44 mklonowski Note Added: 0021865
2014-12-12 16:15 toracat Note Added: 0021922
2014-12-15 07:16 mklonowski Note Added: 0021950
2014-12-15 07:30 toracat Note Added: 0021951
2015-04-07 19:54 toracat Note Added: 0022702
2015-04-07 19:54 toracat Status assigned => resolved
2015-04-07 19:54 toracat Resolution open => fixed