Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7ac3d31 authored by Nir Dotan's avatar Nir Dotan Committed by Greg Kroah-Hartman
Browse files

mlxsw: pci: Return error on PCI reset timeout



[ Upstream commit 67c14cc9b35055264fc0efed00159a7de1819f1b ]

Return an appropriate error in the case when the driver timeouts on waiting
for firmware to go out of PCI reset.

Fixes: 233fa44b ("mlxsw: pci: Implement reset done check")
Signed-off-by: default avatarNir Dotan <nird@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 0aafea5d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)