]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_core: Work properly with EQ numbers > 256 in SRIOV
authorYishai Hadas <yishaih@mellanox.com>
Tue, 5 May 2015 14:07:12 +0000 (17:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 May 2015 23:39:12 +0000 (19:39 -0400)
commit17d38882f991758b3d3d63b0e1876e5352e4b832
tree525962c2f147a22285a41dcc9edaeb6fe63398e4
parentbe5234575f5c2c6d76c3e8eb6bacba8af3a561f4
net/mlx4_core: Work properly with EQ numbers > 256 in SRIOV

The Firmware uses dynamic EQs allocation based on number of VFs and
max EQs that can be allocated. As a result, VF can have EQ numbers
that are larger than 256.

According to the firmware spec, the max value is limited to be 1024
(10 bits), adapt the relevant code accordingly. This bug was impossible
to hit prior to commit 967a00d4e0f2 ("net/mlx4_core: Flexible (asymmetric)
allocation of EQs and MSI-X vectors for PF/VFs") which actually enables
large number of EQs for VFs.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c