]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4_core: Fix advertisement of wrong PF context behaviour
authorOr Gerlitz <ogerlitz@mellanox.com>
Thu, 10 Jan 2013 15:18:35 +0000 (15:18 +0000)
committerRoland Dreier <roland@purestorage.com>
Tue, 5 Feb 2013 17:35:41 +0000 (09:35 -0800)
commit45387b6fba17af2131bff91866cf2b4d0c5f324a
treee4a07067d609f6ce7c3684803c2cc88de6a10f4b
parent770407bf7f28b6a32c409067a0c6f94c462ff018
mlx4_core: Fix advertisement of wrong PF context behaviour

Commit 2dbd8c844e96 ("mlx4: 64-byte CQE/EQE support") introduced a
regression where older guest VF drivers failed to load even when
64-byte EQEs/CQEs are disabled, since the PF wrongly advertises the
new context behaviour anyway.  The failure looks like:

    mlx4_core 0000:00:07.0: Unknown pf context behaviour
    mlx4_core 0000:00:07.0: Failed to obtain slave caps
    mlx4_core: probe of 0000:00:07.0 failed with error -38

Fix this by basing this advertisement on dev->caps.flags, which is the
operational capabilities used by the QUERY_FUNC_CAP command wrapper
(dev_cap->flags holds the firmware capabilities).

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/net/ethernet/mellanox/mlx4/main.c