net/mlx4_core: Fix slave id computation for single port VF
authorMatan Barak <matanb@mellanox.com>
Sun, 4 May 2014 14:07:23 +0000 (17:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 May 2014 19:48:21 +0000 (15:48 -0400)
commit0254bc8205195c96b47abe33c67f8ccd2f2dad69
treedb60ab06d01c7e08a73dea7da80dedd5a5a9d171
parent531d9014d5c870fdf493e626c4b4e448273cb616
net/mlx4_core: Fix slave id computation for single port VF

The code that deals with computing the slave id based on a given GID
gave wrong results when the number of single port VFs wasn't the
same for port 1 vs. port 2 and the relevant VF is single ported on
port 2. As a result, incoming CM MADs were dispatched to the wrong VF.
Fixed that and added documentation to clarify the computation steps.

Fixes: 449fc48 ('net/mlx4: Adapt code for N-Port VF')
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/port.c