]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Fix teardown errors that happen in pci error handler
authorMohamad Haj Yahia <mohamad@mellanox.com>
Thu, 30 Jun 2016 14:34:38 +0000 (17:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 10:12:02 +0000 (06:12 -0400)
commit73a901590be6ccc789ca2544bfcb08019103fba4
tree9634c0eadc455735f435b188a30fd1aaf9bbf174
parentda1dbcc42b639e3bc18b365475ed24ad04bc2f26
net/mlx5: Fix teardown errors that happen in pci error handler

In case of internal error state we will simulate the commands status
through the return value translation function, but we need to simulate
all the teardown fw commands as successful so we will not have fw
command failure prints.
This also fix memory leaks that happen because we skip teardown stages
due to failed fw commands.

Fixes: 88d54a05851b ('net/mlx5_core: Add pci error handlers to mlx5_core driver')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c