diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2011-05-04 23:50:33 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-05 10:44:34 -0700 |
commit | b3b83c3f3c640b239f1f1dfc49c0ecafbc074fdb (patch) | |
tree | 46efa0dc1b979290770004f9ea6c89089685490b /drivers/net/bnx2x/bnx2x_ethtool.c | |
parent | 426b92415074d6d268c7aac4561efecd3785d0b1 (diff) | |
download | linux-b3b83c3f3c640b239f1f1dfc49c0ecafbc074fdb.tar.gz linux-b3b83c3f3c640b239f1f1dfc49c0ecafbc074fdb.tar.bz2 linux-b3b83c3f3c640b239f1f1dfc49c0ecafbc074fdb.zip |
bnx2x: improve memory handling, low memory recovery flows
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_ethtool.c')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_ethtool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/bnx2x/bnx2x_ethtool.c b/drivers/net/bnx2x/bnx2x_ethtool.c index 4f42c314986c..7556fde23294 100644 --- a/drivers/net/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/bnx2x/bnx2x_ethtool.c @@ -1220,7 +1220,8 @@ static int bnx2x_set_ringparam(struct net_device *dev, } if ((ering->rx_pending > MAX_RX_AVAIL) || - (ering->rx_pending < MIN_RX_AVAIL) || + (ering->rx_pending < (bp->disable_tpa ? MIN_RX_SIZE_NONTPA : + MIN_RX_SIZE_TPA)) || (ering->tx_pending > MAX_TX_AVAIL) || (ering->tx_pending <= MAX_SKB_FRAGS + 4)) return -EINVAL; |