Skip to content

Commit 739c596

Browse files
committed
Merge branch 'bnxt_en-next'
Michael Chan says: ==================== bnxt_en: Fix IRQ coalescing regressions. There was a typo and missing guard-rail against illegal values in the recent code clean up. All reported by Andy Gospodarek. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 8f918d3 + b153cbc commit 739c596

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4548,9 +4548,13 @@ static void bnxt_hwrm_set_coal_params(struct bnxt_coal *hw_coal,
45484548

45494549
val = clamp_t(u16, hw_coal->coal_bufs, 1, max);
45504550
req->num_cmpl_aggr_int = cpu_to_le16(val);
4551+
4552+
/* This is a 6-bit value and must not be 0, or we'll get non stop IRQ */
4553+
val = min_t(u16, val, 63);
45514554
req->num_cmpl_dma_aggr = cpu_to_le16(val);
45524555

4553-
val = clamp_t(u16, hw_coal->coal_bufs_irq, 1, max);
4556+
/* This is a 6-bit value and must not be 0, or we'll get non stop IRQ */
4557+
val = clamp_t(u16, hw_coal->coal_bufs_irq, 1, 63);
45544558
req->num_cmpl_dma_aggr_during_int = cpu_to_le16(val);
45554559

45564560
tmr = BNXT_USEC_TO_COAL_TIMER(hw_coal->coal_ticks);

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static int bnxt_set_coalesce(struct net_device *dev,
8484
hw_coal->coal_ticks_irq = coal->rx_coalesce_usecs_irq;
8585
hw_coal->coal_bufs_irq = coal->rx_max_coalesced_frames_irq * mult;
8686

87-
hw_coal = &bp->rx_coal;
87+
hw_coal = &bp->tx_coal;
8888
mult = hw_coal->bufs_per_record;
8989
hw_coal->coal_ticks = coal->tx_coalesce_usecs;
9090
hw_coal->coal_bufs = coal->tx_max_coalesced_frames * mult;

0 commit comments

Comments
 (0)