Lines Matching refs:ec

9396 static void tg3_coal_tx_init(struct tg3 *tp, struct ethtool_coalesce *ec)  in tg3_coal_tx_init()  argument
9401 tw32(HOSTCC_TXCOL_TICKS, ec->tx_coalesce_usecs); in tg3_coal_tx_init()
9402 tw32(HOSTCC_TXMAX_FRAMES, ec->tx_max_coalesced_frames); in tg3_coal_tx_init()
9403 tw32(HOSTCC_TXCOAL_MAXF_INT, ec->tx_max_coalesced_frames_irq); in tg3_coal_tx_init()
9413 tw32(reg, ec->tx_coalesce_usecs); in tg3_coal_tx_init()
9415 tw32(reg, ec->tx_max_coalesced_frames); in tg3_coal_tx_init()
9417 tw32(reg, ec->tx_max_coalesced_frames_irq); in tg3_coal_tx_init()
9428 static void tg3_coal_rx_init(struct tg3 *tp, struct ethtool_coalesce *ec) in tg3_coal_rx_init() argument
9434 tw32(HOSTCC_RXCOL_TICKS, ec->rx_coalesce_usecs); in tg3_coal_rx_init()
9435 tw32(HOSTCC_RXMAX_FRAMES, ec->rx_max_coalesced_frames); in tg3_coal_rx_init()
9436 tw32(HOSTCC_RXCOAL_MAXF_INT, ec->rx_max_coalesced_frames_irq); in tg3_coal_rx_init()
9448 tw32(reg, ec->rx_coalesce_usecs); in tg3_coal_rx_init()
9450 tw32(reg, ec->rx_max_coalesced_frames); in tg3_coal_rx_init()
9452 tw32(reg, ec->rx_max_coalesced_frames_irq); in tg3_coal_rx_init()
9462 static void __tg3_set_coalesce(struct tg3 *tp, struct ethtool_coalesce *ec) in __tg3_set_coalesce() argument
9464 tg3_coal_tx_init(tp, ec); in __tg3_set_coalesce()
9465 tg3_coal_rx_init(tp, ec); in __tg3_set_coalesce()
9468 u32 val = ec->stats_block_coalesce_usecs; in __tg3_set_coalesce()
9470 tw32(HOSTCC_RXCOAL_TICK_INT, ec->rx_coalesce_usecs_irq); in __tg3_set_coalesce()
9471 tw32(HOSTCC_TXCOAL_TICK_INT, ec->tx_coalesce_usecs_irq); in __tg3_set_coalesce()
13997 static int tg3_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) in tg3_get_coalesce() argument
14001 memcpy(ec, &tp->coal, sizeof(*ec)); in tg3_get_coalesce()
14005 static int tg3_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec) in tg3_set_coalesce() argument
14018 if ((ec->rx_coalesce_usecs > MAX_RXCOL_TICKS) || in tg3_set_coalesce()
14019 (ec->tx_coalesce_usecs > MAX_TXCOL_TICKS) || in tg3_set_coalesce()
14020 (ec->rx_max_coalesced_frames > MAX_RXMAX_FRAMES) || in tg3_set_coalesce()
14021 (ec->tx_max_coalesced_frames > MAX_TXMAX_FRAMES) || in tg3_set_coalesce()
14022 (ec->rx_coalesce_usecs_irq > max_rxcoal_tick_int) || in tg3_set_coalesce()
14023 (ec->tx_coalesce_usecs_irq > max_txcoal_tick_int) || in tg3_set_coalesce()
14024 (ec->rx_max_coalesced_frames_irq > MAX_RXCOAL_MAXF_INT) || in tg3_set_coalesce()
14025 (ec->tx_max_coalesced_frames_irq > MAX_TXCOAL_MAXF_INT) || in tg3_set_coalesce()
14026 (ec->stats_block_coalesce_usecs > max_stat_coal_ticks) || in tg3_set_coalesce()
14027 (ec->stats_block_coalesce_usecs < min_stat_coal_ticks)) in tg3_set_coalesce()
14031 if ((ec->rx_coalesce_usecs == 0) && in tg3_set_coalesce()
14032 (ec->rx_max_coalesced_frames == 0)) in tg3_set_coalesce()
14036 if ((ec->tx_coalesce_usecs == 0) && in tg3_set_coalesce()
14037 (ec->tx_max_coalesced_frames == 0)) in tg3_set_coalesce()
14041 tp->coal.rx_coalesce_usecs = ec->rx_coalesce_usecs; in tg3_set_coalesce()
14042 tp->coal.tx_coalesce_usecs = ec->tx_coalesce_usecs; in tg3_set_coalesce()
14043 tp->coal.rx_max_coalesced_frames = ec->rx_max_coalesced_frames; in tg3_set_coalesce()
14044 tp->coal.tx_max_coalesced_frames = ec->tx_max_coalesced_frames; in tg3_set_coalesce()
14045 tp->coal.rx_coalesce_usecs_irq = ec->rx_coalesce_usecs_irq; in tg3_set_coalesce()
14046 tp->coal.tx_coalesce_usecs_irq = ec->tx_coalesce_usecs_irq; in tg3_set_coalesce()
14047 tp->coal.rx_max_coalesced_frames_irq = ec->rx_max_coalesced_frames_irq; in tg3_set_coalesce()
14048 tp->coal.tx_max_coalesced_frames_irq = ec->tx_max_coalesced_frames_irq; in tg3_set_coalesce()
14049 tp->coal.stats_block_coalesce_usecs = ec->stats_block_coalesce_usecs; in tg3_set_coalesce()
17552 struct ethtool_coalesce *ec = &tp->coal; in tg3_init_coal() local
17554 memset(ec, 0, sizeof(*ec)); in tg3_init_coal()
17555 ec->cmd = ETHTOOL_GCOALESCE; in tg3_init_coal()
17556 ec->rx_coalesce_usecs = LOW_RXCOL_TICKS; in tg3_init_coal()
17557 ec->tx_coalesce_usecs = LOW_TXCOL_TICKS; in tg3_init_coal()
17558 ec->rx_max_coalesced_frames = LOW_RXMAX_FRAMES; in tg3_init_coal()
17559 ec->tx_max_coalesced_frames = LOW_TXMAX_FRAMES; in tg3_init_coal()
17560 ec->rx_coalesce_usecs_irq = DEFAULT_RXCOAL_TICK_INT; in tg3_init_coal()
17561 ec->tx_coalesce_usecs_irq = DEFAULT_TXCOAL_TICK_INT; in tg3_init_coal()
17562 ec->rx_max_coalesced_frames_irq = DEFAULT_RXCOAL_MAXF_INT; in tg3_init_coal()
17563 ec->tx_max_coalesced_frames_irq = DEFAULT_TXCOAL_MAXF_INT; in tg3_init_coal()
17564 ec->stats_block_coalesce_usecs = DEFAULT_STAT_COAL_TICKS; in tg3_init_coal()
17568 ec->rx_coalesce_usecs = LOW_RXCOL_TICKS_CLRTCKS; in tg3_init_coal()
17569 ec->rx_coalesce_usecs_irq = DEFAULT_RXCOAL_TICK_INT_CLRTCKS; in tg3_init_coal()
17570 ec->tx_coalesce_usecs = LOW_TXCOL_TICKS_CLRTCKS; in tg3_init_coal()
17571 ec->tx_coalesce_usecs_irq = DEFAULT_TXCOAL_TICK_INT_CLRTCKS; in tg3_init_coal()
17575 ec->rx_coalesce_usecs_irq = 0; in tg3_init_coal()
17576 ec->tx_coalesce_usecs_irq = 0; in tg3_init_coal()
17577 ec->stats_block_coalesce_usecs = 0; in tg3_init_coal()