Skip to content

Commit

Permalink
mlxsw: pci: Return error on PCI reset timeout
Browse files Browse the repository at this point in the history
Return an appropriate error in the case when the driver timeouts on waiting
for firmware to go out of PCI reset.

Fixes: 233fa44 ("mlxsw: pci: Implement reset done check")
Signed-off-by: Nir Dotan <[email protected]>
Acked-by: Jiri Pirko <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
nirdotan authored and davem330 committed Jan 18, 2019
1 parent d2f372b commit 67c14cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlxsw/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,10 +1367,10 @@ static int mlxsw_pci_sw_reset(struct mlxsw_pci *mlxsw_pci,
u32 val = mlxsw_pci_read32(mlxsw_pci, FW_READY);

if ((val & MLXSW_PCI_FW_READY_MASK) == MLXSW_PCI_FW_READY_MAGIC)
break;
return 0;
cond_resched();
} while (time_before(jiffies, end));
return 0;
return -EBUSY;
}

static int mlxsw_pci_alloc_irq_vectors(struct mlxsw_pci *mlxsw_pci)
Expand Down

0 comments on commit 67c14cc

Please sign in to comment.