* [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions. @ 2017-11-03 7:32 Michael Chan 2017-11-03 7:32 ` [PATCH net-next 1/2] bnxt_en: fix typo in bnxt_set_coalesce Michael Chan ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Michael Chan @ 2017-11-03 7:32 UTC (permalink / raw) To: davem; +Cc: netdev There was a typo and missing guard-rail against illegal values in the recent code clean up. All reported by Andy Gospodarek. Andy Gospodarek (1): bnxt_en: fix typo in bnxt_set_coalesce Michael Chan (1): bnxt_en: Fix IRQ coalescing regression. drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) -- 1.8.3.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 1/2] bnxt_en: fix typo in bnxt_set_coalesce 2017-11-03 7:32 [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions Michael Chan @ 2017-11-03 7:32 ` Michael Chan 2017-11-03 7:32 ` [PATCH net-next 2/2] bnxt_en: Fix IRQ coalescing regression Michael Chan 2017-11-03 12:34 ` [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions David Miller 2 siblings, 0 replies; 4+ messages in thread From: Michael Chan @ 2017-11-03 7:32 UTC (permalink / raw) To: davem; +Cc: netdev, Andy Gospodarek From: Andy Gospodarek <gospo@broadcom.com> Recent refactoring of coalesce settings contained a typo that prevents receive settings from being set properly. Fixes: 18775aa8a91f ("bnxt_en: Reorganize the coalescing parameters.") Signed-off-by: Andy Gospodarek <gospo@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> --- drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c index 5cd1a50..7ce1d4b 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; -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] bnxt_en: Fix IRQ coalescing regression. 2017-11-03 7:32 [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions Michael Chan 2017-11-03 7:32 ` [PATCH net-next 1/2] bnxt_en: fix typo in bnxt_set_coalesce Michael Chan @ 2017-11-03 7:32 ` Michael Chan 2017-11-03 12:34 ` [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions David Miller 2 siblings, 0 replies; 4+ messages in thread From: Michael Chan @ 2017-11-03 7:32 UTC (permalink / raw) To: davem; +Cc: netdev Recent IRQ coalescing clean up has removed a guard-rail for the max DMA buffer coalescing value. This is a 6-bit value and must not be 0. We already have a check for 0 but 64 is equivalent to 0 and will cause non-stop interrupts. Fix it by adding the proper check. Fixes: f8503969d27b ("bnxt_en: Refactor and simplify coalescing code.") Reported-by: Andy Gospodarek <gospo@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index c3dfaa5..4e3d569 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); -- 1.8.3.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions. 2017-11-03 7:32 [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions Michael Chan 2017-11-03 7:32 ` [PATCH net-next 1/2] bnxt_en: fix typo in bnxt_set_coalesce Michael Chan 2017-11-03 7:32 ` [PATCH net-next 2/2] bnxt_en: Fix IRQ coalescing regression Michael Chan @ 2017-11-03 12:34 ` David Miller 2 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2017-11-03 12:34 UTC (permalink / raw) To: michael.chan; +Cc: netdev From: Michael Chan <michael.chan@broadcom.com> Date: Fri, 3 Nov 2017 03:32:37 -0400 > There was a typo and missing guard-rail against illegal values in the > recent code clean up. All reported by Andy Gospodarek. Series applied, thank you. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-03 12:34 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-11-03 7:32 [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions Michael Chan 2017-11-03 7:32 ` [PATCH net-next 1/2] bnxt_en: fix typo in bnxt_set_coalesce Michael Chan 2017-11-03 7:32 ` [PATCH net-next 2/2] bnxt_en: Fix IRQ coalescing regression Michael Chan 2017-11-03 12:34 ` [PATCH net-next 0/2] bnxt_en: Fix IRQ coalescing regressions David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).