net/mlx5: Wait for firmware to enable CRS before pci_restore_state
authorMoshe Shemesh <moshe@nvidia.com>
Wed, 26 Oct 2022 13:51:40 +0000 (14:51 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Oct 2022 18:06:35 +0000 (11:06 -0700)
commit212b4d7251c169f87fa734e79bdec8dd413be5cf
tree7d901526a170663ea881acfa8a3f548abce13f56
parent888be6b279b7257b5f6e4c9527675bff0a335596
net/mlx5: Wait for firmware to enable CRS before pci_restore_state

After firmware reset driver should verify firmware already enabled CRS
and became responsive to pci config cycles before restoring pci state.
Fix that by waiting till device_id is readable through PCI again.

Fixes: eabe8e5e88f5 ("net/mlx5: Handle sync reset now event")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20221026135153.154807-3-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c