Skip to contentSkip to conversation

tg3: Dont dump registers if interface not ready.

PATCH In review Joe Jin 4 participants 6 messages Sep 29, 2011 – Mar 22, 2012

Subsystems (2)
lore
Share & tools
lore

Joe Jin

author
#0 lore raw

PATCH 1/1 tg3: Dont dump registers if interface not ready.

When bootup the server with BCM5704 Gigabit Ethernet get below warning:

tg3 0000:03:01.0: eth0: DMA Status error. Resetting chip.
<Registers state of device>
tg3 0000:03:01.0: eth0: 0: Host status block [00000007:00000002:(0000:0000:0000):(0000:0000)] tg3 0000:03:01.0: eth0: 0: NAPI info [00000001:00000002:(0000:0000:01ff):0000:(00c8:0000:0000:0000)] tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX
tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2
tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX

If device not ready, then would not dump registers info.

---
 drivers/net/tg3.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
drivers/net/tg3.c +9 -2
index 4a1374d..d79d344 100644
@@ -5475,10 +5475,15 @@ static void tg3_process_error(struct tg3 *tp)
 {
 	u32 val;
 	bool real_error = false;
+	bool dump = true;
 
 	if (tg3_flag(tp, ERROR_PROCESSED))
 		return;
 
+	/* If interface not ready then dont dump error */
+	if (!netif_carrier_ok(tp->dev))
+		dump = false;
+
 	/* Check Flow Attention register */
 	val = tr32(HOSTCC_FLOW_ATTN);
 	if (val & ~HOSTCC_FLOW_ATTN_MBUF_LWM) {
@@ -5492,14 +5497,16 @@ static void tg3_process_error(struct tg3 *tp)
 	}
 
 	if (tr32(RDMAC_STATUS) || tr32(WDMAC_STATUS)) {
-		netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
+		if (dump)
+			netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
 		real_error = true;
 	}
 
 	if (!real_error)
 		return;
 
-	tg3_dump_state(tp);
+	if (dump)
+		tg3_dump_state(tp);
 
 	tg3_flag_set(tp, ERROR_PROCESSED);
 	schedule_work(&tp->reset_task);
Signature · 1 line
1.7.6.2
#1 lore raw
Quoted 15 lines · Joe Jin

When bootup the server with BCM5704 Gigabit Ethernet get below warning:

tg3 0000:03:01.0: eth0: DMA Status error. Resetting chip.
<Registers state of device>
tg3 0000:03:01.0: eth0: 0: Host status block [00000007:00000002:(0000:0000:0000):(0000:0000)] tg3 0000:03:01.0: eth0: 0: NAPI info [00000001:00000002:(0000:0000:01ff):0000:(00c8:0000:0000:0000)] tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX
tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2
tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX

If device not ready, then would not dump registers info.

Quoted 8 lines
---
 drivers/net/tg3.c |   11 +++++++++--

Maybe this one should based on net-next tree too, the tg3.c is lived below ./drivers/net/ethernet/broadcom/ in that tree.

Thanks,
Xiao Jiang

Quoted 42 lines
 1 files changed, 9 insertions(+), 2 deletions(-)
drivers/net/tg3.c +9 -2
index 4a1374d..d79d344 100644
@@ -5475,10 +5475,15 @@ static void tg3_process_error(struct tg3 *tp)
 {
 	u32 val;
 	bool real_error = false;
+	bool dump = true;
 
 	if (tg3_flag(tp, ERROR_PROCESSED))
 		return;
 
+	/* If interface not ready then dont dump error */
+	if (!netif_carrier_ok(tp->dev))
+		dump = false;
+
 	/* Check Flow Attention register */
 	val = tr32(HOSTCC_FLOW_ATTN);
 	if (val & ~HOSTCC_FLOW_ATTN_MBUF_LWM) {
@@ -5492,14 +5497,16 @@ static void tg3_process_error(struct tg3 *tp)
 	}
 
 	if (tr32(RDMAC_STATUS) || tr32(WDMAC_STATUS)) {
-		netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
+		if (dump)
+			netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
 		real_error = true;
 	}
 
 	if (!real_error)
 		return;
 
-	tg3_dump_state(tp);
+	if (dump)
+		tg3_dump_state(tp);
 
 	tg3_flag_set(tp, ERROR_PROCESSED);
 	schedule_work(&tp->reset_task);
#2 lore raw
Quoted 41 lines · Xiao Jiang
Quoted 15 lines · Joe Jin

When bootup the server with BCM5704 Gigabit Ethernet get below warning:

tg3 0000:03:01.0: eth0: DMA Status error. Resetting chip.
<Registers state of device>
tg3 0000:03:01.0: eth0: 0: Host status block [00000007:00000002:(0000:0000:0000):(0000:0000)] tg3 0000:03:01.0: eth0: 0: NAPI info [00000001:00000002:(0000:0000:01ff):0000:(00c8:0000:0000:0000)] tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX
tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2
tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX

If device not ready, then would not dump registers info.

Quoted 8 lines
---
 drivers/net/tg3.c |   11 +++++++++--

Maybe this one should based on net-next tree too, the tg3.c is lived below ./drivers/net/ethernet/broadcom/ in that tree.

Thanks,
Xiao Jiang

Quoted 12 lines
 1 files changed, 9 insertions(+), 2 deletions(-)
drivers/net/tg3.c +1 -0
index 4a1374d..d79d344 100644
@@ -5475,10 +5475,15 @@ static void tg3_process_error(struct tg3 *tp)
 {
 	u32 val;
 	bool real_error = false;
+	bool dump = true;
 
Quoted 6 lines

drivers/net/tg3.c static void tg3_process_error(struct tg3 *tp) · line 5485

Quoted 6 lines
drivers/net/tg3.c +3 -0
 	if (tg3_flag(tp, ERROR_PROCESSED))
 		return;
 
+	/* If interface not ready then dont dump error */
+	if (!netif_carrier_ok(tp->dev))
+		dump = false;

Would you still experience the problem if you did the following instead of the above link check?

		if (tg3_flag(tp, INIT_COMPLETE))
			dump = false;
Quoted 25 lines
Quoted 23 lines
drivers/net/tg3.c +4 -2
 	/* Check Flow Attention register */
 	val = tr32(HOSTCC_FLOW_ATTN);
 	if (val & ~HOSTCC_FLOW_ATTN_MBUF_LWM) {
@@ -5492,14 +5497,16 @@ static void tg3_process_error(struct tg3 *tp)
 	}
 
 	if (tr32(RDMAC_STATUS) || tr32(WDMAC_STATUS)) {
-		netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
+		if (dump)
+			netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
 		real_error = true;
 	}
 
 	if (!real_error)
 		return;
 
-	tg3_dump_state(tp);
+	if (dump)
+		tg3_dump_state(tp);
 
 	tg3_flag_set(tp, ERROR_PROCESSED);
 	schedule_work(&tp->reset_task);
author
#3 lore raw
Quoted 10 lines
Quoted 4 lines

drivers/net/tg3.c static void tg3_process_error(struct tg3 *tp) · line 5485

Quoted 4 lines
drivers/net/tg3.c +3 -0
+	/* If interface not ready then dont dump error */
+	if (!netif_carrier_ok(tp->dev))
+		dump = false;

Would you still experience the problem if you did the following instead of the above link check?

		if (tg3_flag(tp, INIT_COMPLETE))
			dump = false;

I'll try it then update you.

Thanks,
Joe

author
#4 lore raw
In reply to Matt Carlson

Hi Matt,

Sorry for late response, after apply your changes, driver did not dumped registers info as well, but still hit tg3_stop_block timed out as below:

tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2 tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.1: eth1: Link is up at 1000 Mbps, full duplex tg3 0000:03:01.1: eth1: Flow control is off for TX and off for RX tg3 0000:03:01.1: eth1: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2 tg3 0000:03:01.0: eth0: Link is down
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses genfs_contexts tg3 0000:03:01.1: eth1: Link is up at 1000 Mbps, full duplex tg3 0000:03:01.1: eth1: Flow control is off for TX and off for RX tg3 0000:03:01.1: eth1: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2 tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.1: eth1: Link is up at 1000 Mbps, full duplex tg3 0000:03:01.1: eth1: Flow control is off for TX and off for RX ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Any suggestion?

Thanks,
Joe

Quoted 81 lines · Matt Carlson
Quoted 41 lines · Xiao Jiang
Quoted 15 lines · Joe Jin

When bootup the server with BCM5704 Gigabit Ethernet get below warning:

tg3 0000:03:01.0: eth0: DMA Status error. Resetting chip.
<Registers state of device>
tg3 0000:03:01.0: eth0: 0: Host status block [00000007:00000002:(0000:0000:0000):(0000:0000)] tg3 0000:03:01.0: eth0: 0: NAPI info [00000001:00000002:(0000:0000:01ff):0000:(00c8:0000:0000:0000)] tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX
tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2
tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX

If device not ready, then would not dump registers info.

Quoted 8 lines
---
 drivers/net/tg3.c |   11 +++++++++--

Maybe this one should based on net-next tree too, the tg3.c is lived below ./drivers/net/ethernet/broadcom/ in that tree.

Thanks,
Xiao Jiang

Quoted 12 lines
 1 files changed, 9 insertions(+), 2 deletions(-)
drivers/net/tg3.c +1 -0
index 4a1374d..d79d344 100644
@@ -5475,10 +5475,15 @@ static void tg3_process_error(struct tg3 *tp)
 {
 	u32 val;
 	bool real_error = false;
+	bool dump = true;
 
Quoted 6 lines

drivers/net/tg3.c static void tg3_process_error(struct tg3 *tp) · line 5485

Quoted 6 lines
drivers/net/tg3.c +3 -0
 	if (tg3_flag(tp, ERROR_PROCESSED))
 		return;
 
+	/* If interface not ready then dont dump error */
+	if (!netif_carrier_ok(tp->dev))
+		dump = false;

Would you still experience the problem if you did the following instead of the above link check?

		if (tg3_flag(tp, INIT_COMPLETE))
			dump = false;
Quoted 25 lines
Quoted 23 lines
drivers/net/tg3.c +4 -2
 	/* Check Flow Attention register */
 	val = tr32(HOSTCC_FLOW_ATTN);
 	if (val & ~HOSTCC_FLOW_ATTN_MBUF_LWM) {
@@ -5492,14 +5497,16 @@ static void tg3_process_error(struct tg3 *tp)
 	}
 
 	if (tr32(RDMAC_STATUS) || tr32(WDMAC_STATUS)) {
-		netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
+		if (dump)
+			netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
 		real_error = true;
 	}
 
 	if (!real_error)
 		return;
 
-	tg3_dump_state(tp);
+	if (dump)
+		tg3_dump_state(tp);
 
 	tg3_flag_set(tp, ERROR_PROCESSED);
 	schedule_work(&tp->reset_task);
Signature · 4 lines
Oracle <http://www.oracle.com>
Joe Jin | Software Development Senior Manager | +8610.6106.5624
ORACLE | Linux and Virtualization
No. 24 Zhongguancun Software Park, Haidian District | 100193 Beijing 
#5 lore raw

Joe Jin <[email protected]> writes:

Hi,

Quoted 5 lines

Hi Matt,

Sorry for late response, after apply your changes, driver did not dumped registers info as well, but still hit tg3_stop_block timed out as below:

...

Quoted 2 lines

Any suggestion?

I was wondering if there any progress with this patch. Is this stalled, or has it been dropped?

Cheers,

Signature · 1 line
Luis
Quoted 86 lines

Thanks,
Joe

Quoted 81 lines · Matt Carlson
Quoted 41 lines · Xiao Jiang
Quoted 15 lines · Joe Jin

When bootup the server with BCM5704 Gigabit Ethernet get below warning:

tg3 0000:03:01.0: eth0: DMA Status error. Resetting chip.
<Registers state of device>
tg3 0000:03:01.0: eth0: 0: Host status block [00000007:00000002:(0000:0000:0000):(0000:0000)] tg3 0000:03:01.0: eth0: 0: NAPI info [00000001:00000002:(0000:0000:01ff):0000:(00c8:0000:0000:0000)] tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX
tg3 0000:03:01.0: tg3_stop_block timed out, ofs=4800 enable_bit=2
tg3 0000:03:01.0: eth0: Link is down
tg3 0000:03:01.0: eth0: Link is up at 1000 Mbps, full duplex
tg3 0000:03:01.0: eth0: Flow control is on for TX and on for RX

If device not ready, then would not dump registers info.

Quoted 8 lines
---
 drivers/net/tg3.c |   11 +++++++++--

Maybe this one should based on net-next tree too, the tg3.c is lived below ./drivers/net/ethernet/broadcom/ in that tree.

Thanks,
Xiao Jiang

Quoted 12 lines
 1 files changed, 9 insertions(+), 2 deletions(-)
drivers/net/tg3.c +1 -0
index 4a1374d..d79d344 100644
@@ -5475,10 +5475,15 @@ static void tg3_process_error(struct tg3 *tp)
 {
 	u32 val;
 	bool real_error = false;
+	bool dump = true;
 
Quoted 6 lines

drivers/net/tg3.c static void tg3_process_error(struct tg3 *tp) · line 5485

Quoted 6 lines
drivers/net/tg3.c +3 -0
 	if (tg3_flag(tp, ERROR_PROCESSED))
 		return;
 
+	/* If interface not ready then dont dump error */
+	if (!netif_carrier_ok(tp->dev))
+		dump = false;

Would you still experience the problem if you did the following instead of the above link check?

		if (tg3_flag(tp, INIT_COMPLETE))
			dump = false;
Quoted 25 lines
Quoted 23 lines
drivers/net/tg3.c +4 -2
 	/* Check Flow Attention register */
 	val = tr32(HOSTCC_FLOW_ATTN);
 	if (val & ~HOSTCC_FLOW_ATTN_MBUF_LWM) {
@@ -5492,14 +5497,16 @@ static void tg3_process_error(struct tg3 *tp)
 	}
 
 	if (tr32(RDMAC_STATUS) || tr32(WDMAC_STATUS)) {
-		netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
+		if (dump)
+			netdev_err(tp->dev, "DMA Status error.  Resetting chip.\n");
 		real_error = true;
 	}
 
 	if (!real_error)
 		return;
 
-	tg3_dump_state(tp);
+	if (dump)
+		tg3_dump_state(tp);
 
 	tg3_flag_set(tp, ERROR_PROCESSED);
 	schedule_work(&tp->reset_task);