tg3: update rx_jumbo_pending ring param only when jumbo frames are enabled
authorIvan Vecera <ivecera@redhat.com>
Thu, 17 Apr 2014 12:51:08 +0000 (14:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 23:01:59 +0000 (16:01 -0700)
commitc7dedf9d07e1471acec49947f3aacd77ea379bdf
treed7ebae4e8c2c93070d1d27d25d9bb08cdc21ca68
parent7dca1b9e80e5742b8edfd747dbee9fee5995c3cf
tg3: update rx_jumbo_pending ring param only when jumbo frames are enabled

The patch fixes a problem with dropped jumbo frames after usage of
'ethtool -G ... rx'.

Scenario:
1. ip link set eth0 up
2. ethtool -G eth0 rx N # <- This zeroes rx-jumbo
3. ip link set mtu 9000 dev eth0

The ethtool command set rx_jumbo_pending to zero so any received jumbo
packets are dropped and you need to use 'ethtool -G eth0 rx-jumbo N'
to workaround the issue.
The patch changes the logic so rx_jumbo_pending value is changed only if
jumbo frames are enabled (MTU > 1500).

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Acked-by: Michael Chan <mchan@broadcom.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