net/mlx4_core: Looking for promiscuous entries on the correct port
commit60d31c1475f20b6966f7efbd646b1123d0fba5b1
authorAviad Yehezkel <aviadye@mellanox.com>
Wed, 5 Sep 2012 22:50:50 +0000 (5 22:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Sep 2012 16:55:59 +0000 (7 12:55 -0400)
tree6507278dfe5d7285fce23dbbcefd9e242c9df638
parent7fb40f87c4195ec1728527f30bc744c47a45b366
net/mlx4_core: Looking for promiscuous entries on the correct port

The search for promisc entries was always done on the first port,
While the addition is done on the correct port.
This lead to resource leackage of promisc entries on the second
port and brought to a state where we could no longer enter to
promiscuous mode after enough iterations of "ifconfig promisc"
on the second port.
Fix that by using the correct port when searching.

Reported-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Signed-off-by: Aviad Yehezkel <aviadye@mellanox.com>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mcg.c