Skip to content

Commit 67c14cc

Browse files
nirdotandavem330
authored andcommitted
mlxsw: pci: Return error on PCI reset timeout
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 <nird@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d2f372b commit 67c14cc

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/mellanox/mlxsw

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mellanox/mlxsw/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,10 +1367,10 @@ static int mlxsw_pci_sw_reset(struct mlxsw_pci *mlxsw_pci,
13671367
u32 val = mlxsw_pci_read32(mlxsw_pci, FW_READY);
13681368

13691369
if ((val & MLXSW_PCI_FW_READY_MASK) == MLXSW_PCI_FW_READY_MAGIC)
1370-
break;
1370+
return 0;
13711371
cond_resched();
13721372
} while (time_before(jiffies, end));
1373-
return 0;
1373+
return -EBUSY;
13741374
}
13751375

13761376
static int mlxsw_pci_alloc_irq_vectors(struct mlxsw_pci *mlxsw_pci)

0 commit comments

Comments
 (0)