Skip to contentSkip to conversation

bnx2: Update version to 1.9.2 and copyright.

PATCH Applied Michael Chan 2 participants 6 messages Feb 11, 2009 – Feb 13, 2009 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 3/4 bnx2: Fix jumbo frames error handling.

If errors are reported on a frame descriptor, we need to account for the buffer pages that may have been used for this error packet and recycle them. Otherwise, we may get the wrong pages for the next packet.

---
 drivers/net/bnx2.c |   30 +++++++++++++++++++-----------
 1 files changed, 19 insertions(+), 11 deletions(-)
drivers/net/bnx2.c +19 -11
index 49e0e51..903d13b 100644
@@ -2920,18 +2920,8 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
 
 		rx_hdr = (struct l2_fhdr *) skb->data;
 		len = rx_hdr->l2_fhdr_pkt_len;
+		status = rx_hdr->l2_fhdr_status;
 
-		if ((status = rx_hdr->l2_fhdr_status) &
-			(L2_FHDR_ERRORS_BAD_CRC |
-			L2_FHDR_ERRORS_PHY_DECODE |
-			L2_FHDR_ERRORS_ALIGNMENT |
-			L2_FHDR_ERRORS_TOO_SHORT |
-			L2_FHDR_ERRORS_GIANT_FRAME)) {
-
-			bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons,
-					  sw_ring_prod);
-			goto next_rx;
-		}
 		hdr_len = 0;
 		if (status & L2_FHDR_STATUS_SPLIT) {
 			hdr_len = rx_hdr->l2_fhdr_ip_xsum;
@@ -2941,6 +2931,24 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
 			pg_ring_used = 1;
 		}
 
+		if (unlikely(status & (L2_FHDR_ERRORS_BAD_CRC |
+				       L2_FHDR_ERRORS_PHY_DECODE |
+				       L2_FHDR_ERRORS_ALIGNMENT |
+				       L2_FHDR_ERRORS_TOO_SHORT |
+				       L2_FHDR_ERRORS_GIANT_FRAME))) {
+
+			bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons,
+					  sw_ring_prod);
+			if (pg_ring_used) {
+				int pages;
+
+				pages = PAGE_ALIGN(len - hdr_len) >> PAGE_SHIFT;
+
+				bnx2_reuse_rx_skb_pages(bp, rxr, NULL, pages);
+			}
+			goto next_rx;
+		}
+
 		len -= 4;
 
 		if (len <= bp->rx_copy_thresh) {
Signature · 1 line
1.5.6.GIT
maintainer Applied
#2 lore raw

Re: [PATCH 3/4] bnx2: Fix jumbo frames error handling.

From: "Michael Chan" <[email protected]>
Date: Wed, 11 Feb 2009 15:52:17 -0800

Quoted 8 lines

If errors are reported on a frame descriptor, we need to account for the buffer pages that may have been used for this error packet and recycle them. Otherwise, we may get the wrong pages for the next packet.

Applied.

#3 lore raw

PATCH 4/4 bnx2: Update version to 1.9.2 and copyright.

In reply to a message not in the archive
---
 drivers/net/bnx2.c |    6 +++---
 drivers/net/bnx2.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/bnx2.c +3 -3
index 903d13b..8466d35 100644
@@ -1,6 +1,6 @@
 /* bnx2.c: Broadcom NX2 network driver.
  *
- * Copyright (c) 2004-2008 Broadcom Corporation
+ * Copyright (c) 2004-2009 Broadcom Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -57,8 +57,8 @@
 
 #define DRV_MODULE_NAME		"bnx2"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"1.9.0"
-#define DRV_MODULE_RELDATE	"Dec 16, 2008"
+#define DRV_MODULE_VERSION	"1.9.2"
+#define DRV_MODULE_RELDATE	"Feb 11, 2009"
 
 #define RUN_AT(x) (jiffies + (x))
 
drivers/net/bnx2.h +1 -1
index 900641a..704cbbc 100644
@@ -1,6 +1,6 @@
 /* bnx2.h: Broadcom NX2 network driver.
  *
- * Copyright (c) 2004-2007 Broadcom Corporation
+ * Copyright (c) 2004-2009 Broadcom Corporation
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
Signature · 1 line
1.5.6.GIT
maintainer
#5 lore raw

Re: [PATCH 1/4] bnx2: Update 5706/5708 firmware.

In reply to a message not in the archive

From: "Michael Chan" <[email protected]>
Date: Wed, 11 Feb 2009 15:52:15 -0800

Quoted 6 lines

New firmware fixes a data corruption issue when receiving and placing jumbo frames into host buffers. In some cases, the buffer descriptor is not updated correctly and this will lead to the driver linking the wrong number of pages into the SKB.

I was hesistent to add this and the other firmware update to net-2.6, but memory corruption is a very serious issue so applied.

A message that is not in the archive (sent off-list or not yet received): [email protected]

maintainer Applied
#7 lore raw

Re: [PATCH 2/4] bnx2: Update 5709 firmware.

From: "Michael Chan" <[email protected]>
Date: Wed, 11 Feb 2009 15:52:16 -0800

Quoted 6 lines

New firmware fixes a data corruption issue when receiving and placing jumbo frames into host buffers. In some cases, the buffer descriptor is not updated correctly and this will lead to the driver linking the wrong number of pages into the SKB.

Applied.