]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Tue, 6 Jan 2015 12:59:52 +0000 (13:59 +0100)
commitae45dd08b4655300f5f119248a6f51aed7df53f6
treef01985194017f4e20a1b95ebd8042033fd595273
parent555533176833d396f82cdcc131e9188286a74b0d
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: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/broadcom/tg3.c