From: Joe Jin Date: Thu, 15 Dec 2011 01:31:36 +0000 (+0800) Subject: mlx4_en: Fix QP number calculation according to module param X-Git-Tag: v2.6.39-400.9.0~826^2~15 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c2a561fc65a3781fad45e64ef823e69c118581f0;p=users%2Fjedix%2Flinux-maple.git mlx4_en: Fix QP number calculation according to module param commit 999bb4b3831abd6ad53023a0b8e5d304875927dd Author: Alexander Guller Date: Sun Oct 9 05:29:26 2011 +0000 mlx4_en: Fix QP number calculation according to module param Number of bits taken from mac table index in QP calculation should be based on log_num_mac parameter. Signed-off-by: Alexander Guller Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/mlx4/en_port.c b/drivers/net/mlx4/en_port.c index 5ada5b469112..8824309bb625 100644 --- a/drivers/net/mlx4/en_port.c +++ b/drivers/net/mlx4/en_port.c @@ -128,7 +128,7 @@ int mlx4_SET_PORT_qpn_calc(struct mlx4_dev *dev, u8 port, u32 base_qpn, memset(context, 0, sizeof *context); context->base_qpn = cpu_to_be32(base_qpn); - context->n_mac = 0x2; + context->n_mac = dev->caps.log_num_macs; context->promisc = cpu_to_be32(promisc << SET_PORT_PROMISC_SHIFT | base_qpn); context->mcast = cpu_to_be32(m_promisc << SET_PORT_MC_PROMISC_SHIFT |