diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index c3dfaa5151aaaa1f86cd3a42aee104702eaab460..4e3d569bf32e89ccc458afbe35ee8eb6c2cc4e2d 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -4548,9 +4548,13 @@ static void bnxt_hwrm_set_coal_params(struct bnxt_coal *hw_coal, val = clamp_t(u16, hw_coal->coal_bufs, 1, max); req->num_cmpl_aggr_int = cpu_to_le16(val); + + /* This is a 6-bit value and must not be 0, or we'll get non stop IRQ */ + val = min_t(u16, val, 63); req->num_cmpl_dma_aggr = cpu_to_le16(val); - val = clamp_t(u16, hw_coal->coal_bufs_irq, 1, max); + /* This is a 6-bit value and must not be 0, or we'll get non stop IRQ */ + val = clamp_t(u16, hw_coal->coal_bufs_irq, 1, 63); req->num_cmpl_dma_aggr_during_int = cpu_to_le16(val); tmr = BNXT_USEC_TO_COAL_TIMER(hw_coal->coal_ticks); diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 5cd1a501c62b03412bf8410024c17f6e44044eb9..7ce1d4b7e67de7a3be3229295d1bf06877585c03 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c @@ -84,7 +84,7 @@ static int bnxt_set_coalesce(struct net_device *dev, hw_coal->coal_ticks_irq = coal->rx_coalesce_usecs_irq; hw_coal->coal_bufs_irq = coal->rx_max_coalesced_frames_irq * mult; - hw_coal = &bp->rx_coal; + hw_coal = &bp->tx_coal; mult = hw_coal->bufs_per_record; hw_coal->coal_ticks = coal->tx_coalesce_usecs; hw_coal->coal_bufs = coal->tx_max_coalesced_frames * mult;