mlx4_en: fix allocation of device tx_cq
authorKleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Fri, 22 Feb 2013 14:58:02 +0000 (14:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Feb 2013 13:38:41 +0000 (05:38 -0800)
commit1707248f45ca2be86156c9ee2bf3dc34a9d55c8a
tree9d39512d0162550da5e93ab242ca9d5707a02dc0
parent46983ccad157df0e6dfa910b5255de6ddee35f04
mlx4_en: fix allocation of device tx_cq

[ Upstream commit 427a96252d8eee7b9bbafce15bd37fa3387ede55 ]

The memory to hold the network device tx_cq is not being allocated with
the correct size in mlx4_en_init_netdev(). It should use MAX_TX_RINGS
instead of MAX_RX_RINGS. This can cause problems if the number of tx
rings being used is greater than MAX_RX_RINGS.

Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Acked-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c