Thread (14 messages) flat view 14 messages, 3 authors, 2016-02-17

Re: [PATCH net 4/6] net/mlx4_core: Do not BUG_ON during reset when PCI is offline

From: Or Gerlitz <hidden>
Date: 2016-02-17 09:57:18

On 2/16/2016 8:30 PM, Sergei Shtylyov wrote:
quoted
--- a/drivers/net/ethernet/mellanox/mlx4/catas.c
+++ b/drivers/net/ethernet/mellanox/mlx4/catas.c
@@ -182,10 +182,17 @@ void mlx4_enter_error_state(struct 
mlx4_dev_persistent *persist)
          err = mlx4_reset_slave(dev);
      else
          err = mlx4_reset_master(dev);
-    BUG_ON(err != 0);
+
+    if (!err)
+        mlx4_err(dev, "device was reset successfully\n");
+    else
+        /* EEH could have disabled the PCI channel during reset. That's
+         * recoverable and the PCI error flow will handle it.
+         */
+        if (!pci_channel_offline(dev->persist->pdev))
+            BUG_ON(1);
   I'm afraid this needs {}. 
Hey, don't be afraid just for that, stay cool... we can add that here if 
it helps, as for the blank line not deletedby this patch on which you 
commented later, will not remove it as part of a patch which is a strict 
fix.

Or.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help