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)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 9 Jun 2014 12:28:57 +0000 (13:28 +0100)
commita5ab05f2e2a48a6b7e5efe12cbe07523a06fa963
tree648909d2e2d92a1e17de6a0567852ddd957eeff5
parentd41eb74e53d94aba656ffda647d106808e636cd6
tg3: update rx_jumbo_pending ring param only when jumbo frames are enabled

commit ba67b510035141bd89b40bf65efa0a79834311ca upstream.

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: Ben Hutchings <ben@decadent.org.uk>
drivers/net/ethernet/broadcom/tg3.c