* [PATCH 0/2] Fix kernel crash and EEH recovery issues
@ 2014-05-23 16:29 wenxiong
2014-05-23 16:29 ` [PATCH 1/2] bnx2x: Adapter not recovery from EEH error injection wenxiong
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: wenxiong @ 2014-05-23 16:29 UTC (permalink / raw)
To: netdev
The patches fix kernel crash and EEH recovery issues.
Thanks,
Wendy
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] bnx2x: Adapter not recovery from EEH error injection
2014-05-23 16:29 [PATCH 0/2] Fix kernel crash and EEH recovery issues wenxiong
@ 2014-05-23 16:29 ` wenxiong
2014-05-23 16:29 ` [PATCH 2/2] bnx2x: Fix kernel crash and data miscompare after EEH recovery wenxiong
2014-05-24 4:21 ` [PATCH 0/2] Fix kernel crash and EEH recovery issues David Miller
2 siblings, 0 replies; 4+ messages in thread
From: wenxiong @ 2014-05-23 16:29 UTC (permalink / raw)
To: netdev; +Cc: Wen Xiong
[-- Attachment #1: bnx2x_eeh_fix --]
[-- Type: text/plain, Size: 985 bytes --]
When injecting EEH error to bnx2x adapter, adapter couldn't be recovery
and caused recursive EEH errors. The patch fixes the issue.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
===================================================================
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 2014-05-22 18:42:48.000000000 -0500
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c 2014-05-22 18:44:36.757765539 -0500
@@ -13279,8 +13279,8 @@ static int bnx2x_eeh_nic_unload(struct b
netdev_reset_tc(bp->dev);
del_timer_sync(&bp->timer);
- cancel_delayed_work(&bp->sp_task);
- cancel_delayed_work(&bp->period_task);
+ cancel_delayed_work_sync(&bp->sp_task);
+ cancel_delayed_work_sync(&bp->period_task);
spin_lock_bh(&bp->stats_lock);
bp->stats_state = STATS_STATE_DISABLED;
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] bnx2x: Fix kernel crash and data miscompare after EEH recovery
2014-05-23 16:29 [PATCH 0/2] Fix kernel crash and EEH recovery issues wenxiong
2014-05-23 16:29 ` [PATCH 1/2] bnx2x: Adapter not recovery from EEH error injection wenxiong
@ 2014-05-23 16:29 ` wenxiong
2014-05-24 4:21 ` [PATCH 0/2] Fix kernel crash and EEH recovery issues David Miller
2 siblings, 0 replies; 4+ messages in thread
From: wenxiong @ 2014-05-23 16:29 UTC (permalink / raw)
To: netdev; +Cc: Milton Miller, Wen Xiong
[-- Attachment #1: bnx2x_rmb_fix --]
[-- Type: text/plain, Size: 1247 bytes --]
A rmb() is required to ensure that the CQE is not read before it
is written by the adapter DMA. PCI ordering rules will make sure
the other fields are written before the marker at the end of struct
eth_fast_path_rx_cqe but without rmb() a weakly ordered processor can
process stale data.
Without the barrier we have observed various crashes including
bnx2x_tpa_start being called on queues not stopped (resulting in message
start of bin not in stop) and NULL pointer exceptions from bnx2x_rx_int.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 2 ++
1 file changed, 2 insertions(+)
Index: b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
===================================================================
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 2014-05-23 10:34:21.000000000 -0500
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c 2014-05-23 10:35:39.277766585 -0500
@@ -906,6 +906,8 @@ static int bnx2x_rx_int(struct bnx2x_fas
bd_prod = RX_BD(bd_prod);
bd_cons = RX_BD(bd_cons);
+ rmb();
+
cqe_fp_flags = cqe_fp->type_error_flags;
cqe_fp_type = cqe_fp_flags & ETH_FAST_PATH_RX_CQE_TYPE;
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Fix kernel crash and EEH recovery issues
2014-05-23 16:29 [PATCH 0/2] Fix kernel crash and EEH recovery issues wenxiong
2014-05-23 16:29 ` [PATCH 1/2] bnx2x: Adapter not recovery from EEH error injection wenxiong
2014-05-23 16:29 ` [PATCH 2/2] bnx2x: Fix kernel crash and data miscompare after EEH recovery wenxiong
@ 2014-05-24 4:21 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-05-24 4:21 UTC (permalink / raw)
To: wenxiong; +Cc: netdev
From: wenxiong@linux.vnet.ibm.com
Date: Fri, 23 May 2014 11:29:55 -0500
> The patches fix kernel crash and EEH recovery issues.
Can you please have some courtesy and CC: the maintainers
of this driver when you submit fixes to it?
Also, all of that detailed explaination you put into patch #2
belongs also in a comment about the memory barrier in the code.
Every memory barrier should be clearly explained with a comment
especially when a non-SMP barrier is involved.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-24 4:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 16:29 [PATCH 0/2] Fix kernel crash and EEH recovery issues wenxiong
2014-05-23 16:29 ` [PATCH 1/2] bnx2x: Adapter not recovery from EEH error injection wenxiong
2014-05-23 16:29 ` [PATCH 2/2] bnx2x: Fix kernel crash and data miscompare after EEH recovery wenxiong
2014-05-24 4:21 ` [PATCH 0/2] Fix kernel crash and EEH recovery issues David Miller
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).