summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMoni Shoua <monis@mellanox.co.il>2014-01-21 12:19:37 +0400
committerDavid S. Miller <davem@davemloft.net>2014-01-22 11:14:27 +0400
commit6cd28f044b47aeeba91807d97d6f3ea5a048e88d (patch)
treeac1638c8a8ce9f10c13ce00a45d1ba8eec092b0c /drivers/net
parenta6b74e01f072fbfec57090c3230915ef55a9068b (diff)
downloadlinux-6cd28f044b47aeeba91807d97d6f3ea5a048e88d.tar.xz
net/mlx4_core: Remove unnecessary validation for port number
This is a fix to a regression introduced by commit: "982290a net/mlx4_core: Check port number for validity before accessing data" IPoIB could not attach to multicast group and we get this in dmesg: [144214.145008] ib0: failed to attach to multicast group, ret = -22 [144214.145016] ib0: couldn't attach QP to multicast group ff12:401b:ffff:0000:0000:0000:ffff:ffff [144214.145019] ib0: multicast join failed for ff12:401b:ffff:0000:0000:0000:ffff:ffff, status -22 The cause to the problem is because port is extracted from gid[5]. Which is only valid for Ethernet. Removed this validation in mlx4_qp_attach_common(), which is accessed from both Ethernet and IB flows. Error flow for bad port value in Ethernet is already exists in that function. Signed-off-by: Moni Shoua <monis@mellanox.co.il> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/mcg.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index bfe65f7be91c..aefb74f56344 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -943,9 +943,6 @@ int mlx4_qp_attach_common(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
u8 port = gid[5];
u8 new_entry = 0;
- if (port < 1 || port > dev->caps.num_ports)
- return -EINVAL;
-
mailbox = mlx4_alloc_cmd_mailbox(dev);
if (IS_ERR(mailbox))
return PTR_ERR(mailbox);