diff options
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/cmd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/cmd.c b/drivers/net/ethernet/mellanox/mlx4/cmd.c index b1cef7a0f7ca..e36bebcab3f2 100644 --- a/drivers/net/ethernet/mellanox/mlx4/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx4/cmd.c | |||
@@ -2469,6 +2469,7 @@ err_comm_admin: | |||
2469 | kfree(priv->mfunc.master.slave_state); | 2469 | kfree(priv->mfunc.master.slave_state); |
2470 | err_comm: | 2470 | err_comm: |
2471 | iounmap(priv->mfunc.comm); | 2471 | iounmap(priv->mfunc.comm); |
2472 | priv->mfunc.comm = NULL; | ||
2472 | err_vhcr: | 2473 | err_vhcr: |
2473 | dma_free_coherent(&dev->persist->pdev->dev, PAGE_SIZE, | 2474 | dma_free_coherent(&dev->persist->pdev->dev, PAGE_SIZE, |
2474 | priv->mfunc.vhcr, | 2475 | priv->mfunc.vhcr, |
@@ -2537,6 +2538,13 @@ void mlx4_report_internal_err_comm_event(struct mlx4_dev *dev) | |||
2537 | int slave; | 2538 | int slave; |
2538 | u32 slave_read; | 2539 | u32 slave_read; |
2539 | 2540 | ||
2541 | /* If the comm channel has not yet been initialized, | ||
2542 | * skip reporting the internal error event to all | ||
2543 | * the communication channels. | ||
2544 | */ | ||
2545 | if (!priv->mfunc.comm) | ||
2546 | return; | ||
2547 | |||
2540 | /* Report an internal error event to all | 2548 | /* Report an internal error event to all |
2541 | * communication channels. | 2549 | * communication channels. |
2542 | */ | 2550 | */ |
@@ -2571,6 +2579,7 @@ void mlx4_multi_func_cleanup(struct mlx4_dev *dev) | |||
2571 | } | 2579 | } |
2572 | 2580 | ||
2573 | iounmap(priv->mfunc.comm); | 2581 | iounmap(priv->mfunc.comm); |
2582 | priv->mfunc.comm = NULL; | ||
2574 | } | 2583 | } |
2575 | 2584 | ||
2576 | void mlx4_cmd_cleanup(struct mlx4_dev *dev, int cleanup_mask) | 2585 | void mlx4_cmd_cleanup(struct mlx4_dev *dev, int cleanup_mask) |