]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tg3: fix ring init when there are more TX than RX channels
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Tue, 25 Nov 2014 16:21:11 +0000 (14:21 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Dec 2014 17:34:27 +0000 (09:34 -0800)
commitdfe35fa73e531c9ce88d2fbdb5bd5716e9c190e6
tree4afcd04472f93591375b0813d9b82e576d87ebe7
parent1ea1f339310488810be0440e188024d466bbcccf
tg3: fix ring init when there are more TX than RX channels

[ Upstream commit a620a6bc1c94c22d6c312892be1e0ae171523125 ]

If TX channels are set to 4 and RX channels are set to less than 4,
using ethtool -L, the driver will try to initialize more RX channels
than it has allocated, causing an oops.

This fix only initializes the RX ring if it has been allocated.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/tg3.c