Adapter not recovery from EEH error injection
cover Adapter not recovery from EEH error injection
Re-send the patches with new maintainers for bnx2x device driver.
Thanks,
Wendy
PATCH RESEND 1/2 bnx2x: Adapter not recovery from EEH error injection
When injecting EEH error to bnx2x adapter, adapter couldn't be recovery and caused recursive EEH errors. The patch fixes the issue.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +2 -2
@@ -13279,8 +13279,8 @@ static int bnx2x_eeh_nic_unload(struct bnetdev_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 ;
PATCH RESEND 2/2 bnx2x: Fix kernel crash and data miscompare after EEH recovery
In reply to [email protected]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.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +12 -0
@@ -906,6 +906,18 @@ static int bnx2x_rx_int(struct bnx2x_fas bd_prod =RX_BD (bd_prod); bd_cons =RX_BD (bd_cons); +/* 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. +*/ +rmb (); + cqe_fp_flags = cqe_fp->type_error_flags; cqe_fp_type = cqe_fp_flags Ð_FAST_PATH_RX_CQE_TYPE ;
RE: [PATCH RESEND 2/2] bnx2x: Fix kernel crash and data miscompare after EEH recovery
Hi Wen
Quoted 34 lines
-----Original Message-----
From: [email protected] [mailto:netdev- [email protected]] On Behalf Of [email protected]
Sent: Tuesday, May 27, 2014 10:11 PM
To: David Miller
Cc: Ariel Elior; netdev; Milton Miller; Wen Xiong
Subject: [PATCH RESEND 2/2] bnx2x: Fix kernel crash and data miscompare after EEH recoveryA
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 structeth_fast_path_rx_cqebut withoutrmb()a weakly ordered processor can process stale data.Without the barrier we have observed various crashes including
bnx2x_tpa_startbeing called on queues not stopped (resulting in message start of bin not in stop) and NULL pointer exceptions frombnx2x_rx_int.Signed-off-by Milton Miller <[email protected]>Signed-off-by Wen Xiong <[email protected]>--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)Index:
b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
===================================================================
---a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c2014-05-23 10:34:21.000000000 -0500
+++b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c2014-05-27 13:51:12.067764759 -0500drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +0
-0@@ -906,6 +906,18 @@ static int bnx2x_rx_int(struct bnx2x_fas bd_prod =RX_BD (bd_prod); bd_cons =RX_BD (bd_cons);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c static int bnx2x_rx_int(struct bnx2x_fas · line 918
Quoted 10 lines
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +10
-0+/* 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. +*/
Can you please drop third sentence from the comment or rephrase it in more generic way like:
Without the barrier TPA state-machine might enter inconsistent state and kernel stack might be provided with incorrect packet description - these lead to various kernel crashes.
Thanks
Dmitry
Quoted 9 lines
(quoted diff) +2
-2+ rmb(); + cqe_fp_flags = cqe_fp->type_error_flags; cqe_fp_type = cqe_fp_flags & ETH_FAST_PATH_RX_CQE_TYPE; -- --
Quoted 3 lines
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at
http://vger.kernel.org/majordomo-info.html
________________________________
This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.