All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/6] bnxt_en: Misc. bug fixes.
@ 2019-04-26  2:31 Michael Chan
  2019-04-26  2:31 ` [PATCH net 1/6] bnxt_en: Improve multicast address setup logic Michael Chan
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Michael Chan @ 2019-04-26  2:31 UTC (permalink / raw)
  To: davem; +Cc: netdev

6 miscellaneous bug fixes covering several issues in error code paths,
a setup issue for statistics DMA, and an improvement for setting up
multicast address filters.

Please queue these for stable as well.
Patch #5 (bnxt_en: Fix statistics context reservation logic) is for the
most recent 5.0 stable only.  Thanks.

Michael Chan (5):
  bnxt_en: Improve multicast address setup logic.
  bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error
    conditions.
  bnxt_en: Pass correct extended TX port statistics size to firmware.
  bnxt_en: Fix statistics context reservation logic.
  bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt().

Vasundhara Volam (1):
  bnxt_en: Free short FW command HWRM memory in error path in
    bnxt_init_one()

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 53 +++++++++++++++++++------------
 1 file changed, 32 insertions(+), 21 deletions(-)

-- 
2.5.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH net 1/6] bnxt_en: Improve multicast address setup logic.
  2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
@ 2019-04-26  2:31 ` Michael Chan
  2019-04-26  2:31 ` [PATCH net 2/6] bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one() Michael Chan
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Chan @ 2019-04-26  2:31 UTC (permalink / raw)
  To: davem; +Cc: netdev

The driver builds a list of multicast addresses and sends it to the
firmware when the driver's ndo_set_rx_mode() is called.  In rare
cases, the firmware can fail this call if internal resources to
add multicast addresses are exhausted.  In that case, we should
try the call again by setting the ALL_MCAST flag which is more
guaranteed to succeed.

Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 4c586ba..42fd273 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -8961,8 +8961,15 @@ static int bnxt_cfg_rx_mode(struct bnxt *bp)
 
 skip_uc:
 	rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, 0);
+	if (rc && vnic->mc_list_count) {
+		netdev_info(bp->dev, "Failed setting MC filters rc: %d, turning on ALL_MCAST mode\n",
+			    rc);
+		vnic->rx_mask |= CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST;
+		vnic->mc_list_count = 0;
+		rc = bnxt_hwrm_cfa_l2_set_rx_mask(bp, 0);
+	}
 	if (rc)
-		netdev_err(bp->dev, "HWRM cfa l2 rx mask failure rc: %x\n",
+		netdev_err(bp->dev, "HWRM cfa l2 rx mask failure rc: %d\n",
 			   rc);
 
 	return rc;
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 2/6] bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one()
  2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
  2019-04-26  2:31 ` [PATCH net 1/6] bnxt_en: Improve multicast address setup logic Michael Chan
@ 2019-04-26  2:31 ` Michael Chan
  2019-04-26  2:31 ` [PATCH net 3/6] bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error conditions Michael Chan
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Chan @ 2019-04-26  2:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, Vasundhara Volam

From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>

In the bnxt_init_one() error path, short FW command request memory
is not freed. This patch fixes it.

Fixes: e605db801bde ("bnxt_en: Support for Short Firmware Message")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 42fd273..5d02f59 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -10692,6 +10692,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	bnxt_clear_int_mode(bp);
 
 init_err_pci_clean:
+	bnxt_free_hwrm_short_cmd_req(bp);
 	bnxt_free_hwrm_resources(bp);
 	bnxt_free_ctx_mem(bp);
 	kfree(bp->ctx);
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 3/6] bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error conditions.
  2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
  2019-04-26  2:31 ` [PATCH net 1/6] bnxt_en: Improve multicast address setup logic Michael Chan
  2019-04-26  2:31 ` [PATCH net 2/6] bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one() Michael Chan
@ 2019-04-26  2:31 ` Michael Chan
  2019-04-26  2:31 ` [PATCH net 4/6] bnxt_en: Pass correct extended TX port statistics size to firmware Michael Chan
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Chan @ 2019-04-26  2:31 UTC (permalink / raw)
  To: davem; +Cc: netdev

If we encounter errors during open and proceed to clean up,
bnxt_hwrm_ring_free() may crash if the rings we try to free have never
been allocated.  bnxt_cp_ring_for_rx() or bnxt_cp_ring_for_tx()
may reference pointers that have not been allocated.

Fix it by checking for valid fw_ring_id first before calling
bnxt_cp_ring_for_rx() or bnxt_cp_ring_for_tx().

Fixes: 2c61d2117ecb ("bnxt_en: Add helper functions to get firmware CP ring ID.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 5d02f59..b03669f 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -5135,10 +5135,10 @@ static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path)
 	for (i = 0; i < bp->tx_nr_rings; i++) {
 		struct bnxt_tx_ring_info *txr = &bp->tx_ring[i];
 		struct bnxt_ring_struct *ring = &txr->tx_ring_struct;
-		u32 cmpl_ring_id;
 
-		cmpl_ring_id = bnxt_cp_ring_for_tx(bp, txr);
 		if (ring->fw_ring_id != INVALID_HW_RING_ID) {
+			u32 cmpl_ring_id = bnxt_cp_ring_for_tx(bp, txr);
+
 			hwrm_ring_free_send_msg(bp, ring,
 						RING_FREE_REQ_RING_TYPE_TX,
 						close_path ? cmpl_ring_id :
@@ -5151,10 +5151,10 @@ static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path)
 		struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i];
 		struct bnxt_ring_struct *ring = &rxr->rx_ring_struct;
 		u32 grp_idx = rxr->bnapi->index;
-		u32 cmpl_ring_id;
 
-		cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr);
 		if (ring->fw_ring_id != INVALID_HW_RING_ID) {
+			u32 cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr);
+
 			hwrm_ring_free_send_msg(bp, ring,
 						RING_FREE_REQ_RING_TYPE_RX,
 						close_path ? cmpl_ring_id :
@@ -5173,10 +5173,10 @@ static void bnxt_hwrm_ring_free(struct bnxt *bp, bool close_path)
 		struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i];
 		struct bnxt_ring_struct *ring = &rxr->rx_agg_ring_struct;
 		u32 grp_idx = rxr->bnapi->index;
-		u32 cmpl_ring_id;
 
-		cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr);
 		if (ring->fw_ring_id != INVALID_HW_RING_ID) {
+			u32 cmpl_ring_id = bnxt_cp_ring_for_rx(bp, rxr);
+
 			hwrm_ring_free_send_msg(bp, ring, type,
 						close_path ? cmpl_ring_id :
 						INVALID_HW_RING_ID);
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 4/6] bnxt_en: Pass correct extended TX port statistics size to firmware.
  2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
                   ` (2 preceding siblings ...)
  2019-04-26  2:31 ` [PATCH net 3/6] bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error conditions Michael Chan
@ 2019-04-26  2:31 ` Michael Chan
  2019-04-26  2:31 ` [PATCH net 5/6] bnxt_en: Fix statistics context reservation logic Michael Chan
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Chan @ 2019-04-26  2:31 UTC (permalink / raw)
  To: davem; +Cc: netdev

If driver determines that extended TX port statistics are not supported
or allocation of the data structure fails, make sure to pass 0 TX stats
size to firmware to disable it.  The firmware returned TX stats size should
also be set to 0 for consistency.  This will prevent
bnxt_get_ethtool_stats() from accessing the NULL TX stats pointer in
case there is mismatch between firmware and driver.

Fixes: 36e53349b60b ("bnxt_en: Add additional extended port statistics.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index b03669f..a9172b2 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -6753,6 +6753,7 @@ static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp)
 	struct hwrm_queue_pri2cos_qcfg_input req2 = {0};
 	struct hwrm_port_qstats_ext_input req = {0};
 	struct bnxt_pf_info *pf = &bp->pf;
+	u32 tx_stat_size;
 	int rc;
 
 	if (!(bp->flags & BNXT_FLAG_PORT_STATS_EXT))
@@ -6762,13 +6763,16 @@ static int bnxt_hwrm_port_qstats_ext(struct bnxt *bp)
 	req.port_id = cpu_to_le16(pf->port_id);
 	req.rx_stat_size = cpu_to_le16(sizeof(struct rx_port_stats_ext));
 	req.rx_stat_host_addr = cpu_to_le64(bp->hw_rx_port_stats_ext_map);
-	req.tx_stat_size = cpu_to_le16(sizeof(struct tx_port_stats_ext));
+	tx_stat_size = bp->hw_tx_port_stats_ext ?
+		       sizeof(*bp->hw_tx_port_stats_ext) : 0;
+	req.tx_stat_size = cpu_to_le16(tx_stat_size);
 	req.tx_stat_host_addr = cpu_to_le64(bp->hw_tx_port_stats_ext_map);
 	mutex_lock(&bp->hwrm_cmd_lock);
 	rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
 	if (!rc) {
 		bp->fw_rx_stats_ext_size = le16_to_cpu(resp->rx_stat_size) / 8;
-		bp->fw_tx_stats_ext_size = le16_to_cpu(resp->tx_stat_size) / 8;
+		bp->fw_tx_stats_ext_size = tx_stat_size ?
+			le16_to_cpu(resp->tx_stat_size) / 8 : 0;
 	} else {
 		bp->fw_rx_stats_ext_size = 0;
 		bp->fw_tx_stats_ext_size = 0;
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 5/6] bnxt_en: Fix statistics context reservation logic.
  2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
                   ` (3 preceding siblings ...)
  2019-04-26  2:31 ` [PATCH net 4/6] bnxt_en: Pass correct extended TX port statistics size to firmware Michael Chan
@ 2019-04-26  2:31 ` Michael Chan
  2019-04-26  2:31 ` [PATCH net 6/6] bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt() Michael Chan
  2019-04-27 21:01 ` [PATCH net 0/6] bnxt_en: Misc. bug fixes David Miller
  6 siblings, 0 replies; 9+ messages in thread
From: Michael Chan @ 2019-04-26  2:31 UTC (permalink / raw)
  To: davem; +Cc: netdev

In an earlier commit that fixes the number of stats contexts to
reserve for the RDMA driver, we added a function parameter to pass in
the number of stats contexts to all the relevant functions.  The passed
in parameter should have been used to set the enables field of the
firmware message.

Fixes: 780baad44f0f ("bnxt_en: Reserve 1 stat_ctx for RDMA driver.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index a9172b2..b6cb7b8 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -5315,17 +5315,16 @@ __bnxt_hwrm_reserve_pf_rings(struct bnxt *bp, struct hwrm_func_cfg_input *req,
 	req->num_tx_rings = cpu_to_le16(tx_rings);
 	if (BNXT_NEW_RM(bp)) {
 		enables |= rx_rings ? FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS : 0;
+		enables |= stats ? FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
 		if (bp->flags & BNXT_FLAG_CHIP_P5) {
 			enables |= cp_rings ? FUNC_CFG_REQ_ENABLES_NUM_MSIX : 0;
 			enables |= tx_rings + ring_grps ?
-				   FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
-				   FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
+				   FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
 			enables |= rx_rings ?
 				FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
 		} else {
 			enables |= cp_rings ?
-				   FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
-				   FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
+				   FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
 			enables |= ring_grps ?
 				   FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS |
 				   FUNC_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
@@ -5365,14 +5364,13 @@ __bnxt_hwrm_reserve_vf_rings(struct bnxt *bp,
 	enables |= tx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_TX_RINGS : 0;
 	enables |= rx_rings ? FUNC_VF_CFG_REQ_ENABLES_NUM_RX_RINGS |
 			      FUNC_VF_CFG_REQ_ENABLES_NUM_RSSCOS_CTXS : 0;
+	enables |= stats ? FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
 	if (bp->flags & BNXT_FLAG_CHIP_P5) {
 		enables |= tx_rings + ring_grps ?
-			   FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
-			   FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
+			   FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
 	} else {
 		enables |= cp_rings ?
-			   FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS |
-			   FUNC_VF_CFG_REQ_ENABLES_NUM_STAT_CTXS : 0;
+			   FUNC_VF_CFG_REQ_ENABLES_NUM_CMPL_RINGS : 0;
 		enables |= ring_grps ?
 			   FUNC_VF_CFG_REQ_ENABLES_NUM_HW_RING_GRPS : 0;
 	}
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH net 6/6] bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt().
  2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
                   ` (4 preceding siblings ...)
  2019-04-26  2:31 ` [PATCH net 5/6] bnxt_en: Fix statistics context reservation logic Michael Chan
@ 2019-04-26  2:31 ` Michael Chan
  2019-04-26 13:06   ` Nathan Chancellor
  2019-04-27 21:01 ` [PATCH net 0/6] bnxt_en: Misc. bug fixes David Miller
  6 siblings, 1 reply; 9+ messages in thread
From: Michael Chan @ 2019-04-26  2:31 UTC (permalink / raw)
  To: davem; +Cc: netdev, Nathan Chancellor

In bnxt_rx_pkt(), if the driver encounters BD errors, it will recycle
the buffers and jump to the end where the uninitailized variable "len"
is referenced.  Fix it by adding a new jump label that will skip
the length update.  This is the most correct fix since the length
may not be valid when we get this type of error.

Fixes: 6a8788f25625 ("bnxt_en: add support for software dynamic interrupt moderation")
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index b6cb7b8..52ade13 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1625,7 +1625,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
 			netdev_warn(bp->dev, "RX buffer error %x\n", rx_err);
 			bnxt_sched_reset(bp, rxr);
 		}
-		goto next_rx;
+		goto next_rx_no_len;
 	}
 
 	len = le32_to_cpu(rxcmp->rx_cmp_len_flags_type) >> RX_CMP_LEN_SHIFT;
@@ -1706,12 +1706,13 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
 	rc = 1;
 
 next_rx:
-	rxr->rx_prod = NEXT_RX(prod);
-	rxr->rx_next_cons = NEXT_RX(cons);
-
 	cpr->rx_packets += 1;
 	cpr->rx_bytes += len;
 
+next_rx_no_len:
+	rxr->rx_prod = NEXT_RX(prod);
+	rxr->rx_next_cons = NEXT_RX(cons);
+
 next_rx_no_prod_no_len:
 	*raw_cons = tmp_raw_cons;
 
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH net 6/6] bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt().
  2019-04-26  2:31 ` [PATCH net 6/6] bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt() Michael Chan
@ 2019-04-26 13:06   ` Nathan Chancellor
  0 siblings, 0 replies; 9+ messages in thread
From: Nathan Chancellor @ 2019-04-26 13:06 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev

On Thu, Apr 25, 2019 at 10:31:55PM -0400, Michael Chan wrote:
> In bnxt_rx_pkt(), if the driver encounters BD errors, it will recycle
> the buffers and jump to the end where the uninitailized variable "len"
> is referenced.  Fix it by adding a new jump label that will skip
> the length update.  This is the most correct fix since the length
> may not be valid when we get this type of error.
> 
> Fixes: 6a8788f25625 ("bnxt_en: add support for software dynamic interrupt moderation")
> Reported-by: Nathan Chancellor <natechancellor@gmail.com>
> Cc: Nathan Chancellor <natechancellor@gmail.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>

This indeed fixes the warning, thank you!

Link: https://github.com/ClangBuiltLinux/linux/issues/398
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index b6cb7b8..52ade13 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -1625,7 +1625,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
>  			netdev_warn(bp->dev, "RX buffer error %x\n", rx_err);
>  			bnxt_sched_reset(bp, rxr);
>  		}
> -		goto next_rx;
> +		goto next_rx_no_len;
>  	}
>  
>  	len = le32_to_cpu(rxcmp->rx_cmp_len_flags_type) >> RX_CMP_LEN_SHIFT;
> @@ -1706,12 +1706,13 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
>  	rc = 1;
>  
>  next_rx:
> -	rxr->rx_prod = NEXT_RX(prod);
> -	rxr->rx_next_cons = NEXT_RX(cons);
> -
>  	cpr->rx_packets += 1;
>  	cpr->rx_bytes += len;
>  
> +next_rx_no_len:
> +	rxr->rx_prod = NEXT_RX(prod);
> +	rxr->rx_next_cons = NEXT_RX(cons);
> +
>  next_rx_no_prod_no_len:
>  	*raw_cons = tmp_raw_cons;
>  
> -- 
> 2.5.1
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH net 0/6] bnxt_en: Misc. bug fixes.
  2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
                   ` (5 preceding siblings ...)
  2019-04-26  2:31 ` [PATCH net 6/6] bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt() Michael Chan
@ 2019-04-27 21:01 ` David Miller
  6 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2019-04-27 21:01 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Thu, 25 Apr 2019 22:31:49 -0400

> 6 miscellaneous bug fixes covering several issues in error code paths,
> a setup issue for statistics DMA, and an improvement for setting up
> multicast address filters.
> 
> Please queue these for stable as well.
> Patch #5 (bnxt_en: Fix statistics context reservation logic) is for the
> most recent 5.0 stable only.  Thanks.

Series applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-04-27 21:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-26  2:31 [PATCH net 0/6] bnxt_en: Misc. bug fixes Michael Chan
2019-04-26  2:31 ` [PATCH net 1/6] bnxt_en: Improve multicast address setup logic Michael Chan
2019-04-26  2:31 ` [PATCH net 2/6] bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one() Michael Chan
2019-04-26  2:31 ` [PATCH net 3/6] bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error conditions Michael Chan
2019-04-26  2:31 ` [PATCH net 4/6] bnxt_en: Pass correct extended TX port statistics size to firmware Michael Chan
2019-04-26  2:31 ` [PATCH net 5/6] bnxt_en: Fix statistics context reservation logic Michael Chan
2019-04-26  2:31 ` [PATCH net 6/6] bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt() Michael Chan
2019-04-26 13:06   ` Nathan Chancellor
2019-04-27 21:01 ` [PATCH net 0/6] bnxt_en: Misc. bug fixes David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.