aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2x.h2
-rw-r--r--drivers/net/bnx2x_main.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h
index 8678457849f9..85a737c5c23f 100644
--- a/drivers/net/bnx2x.h
+++ b/drivers/net/bnx2x.h
@@ -902,6 +902,8 @@ struct bnx2x {
902 u16 rx_quick_cons_trip; 902 u16 rx_quick_cons_trip;
903 u16 rx_ticks_int; 903 u16 rx_ticks_int;
904 u16 rx_ticks; 904 u16 rx_ticks;
905/* Maximal coalescing timeout in us */
906#define BNX2X_MAX_COALESCE_TOUT (0xf0*12)
905 907
906 u32 lin_cnt; 908 u32 lin_cnt;
907 909
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index 5737b7519005..6c67be679764 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -9069,12 +9069,12 @@ static int bnx2x_set_coalesce(struct net_device *dev,
9069 struct bnx2x *bp = netdev_priv(dev); 9069 struct bnx2x *bp = netdev_priv(dev);
9070 9070
9071 bp->rx_ticks = (u16) coal->rx_coalesce_usecs; 9071 bp->rx_ticks = (u16) coal->rx_coalesce_usecs;
9072 if (bp->rx_ticks > 3000) 9072 if (bp->rx_ticks > BNX2X_MAX_COALESCE_TOUT)
9073 bp->rx_ticks = 3000; 9073 bp->rx_ticks = BNX2X_MAX_COALESCE_TOUT;
9074 9074
9075 bp->tx_ticks = (u16) coal->tx_coalesce_usecs; 9075 bp->tx_ticks = (u16) coal->tx_coalesce_usecs;
9076 if (bp->tx_ticks > 0x3000) 9076 if (bp->tx_ticks > BNX2X_MAX_COALESCE_TOUT)
9077 bp->tx_ticks = 0x3000; 9077 bp->tx_ticks = BNX2X_MAX_COALESCE_TOUT;
9078 9078
9079 if (netif_running(dev)) 9079 if (netif_running(dev))
9080 bnx2x_update_coalesce(bp); 9080 bnx2x_update_coalesce(bp);