aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 49e0e51a9df..8466d351a70 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1,6 +1,6 @@
1/* bnx2.c: Broadcom NX2 network driver. 1/* bnx2.c: Broadcom NX2 network driver.
2 * 2 *
3 * Copyright (c) 2004-2008 Broadcom Corporation 3 * Copyright (c) 2004-2009 Broadcom Corporation
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -57,8 +57,8 @@
57 57
58#define DRV_MODULE_NAME "bnx2" 58#define DRV_MODULE_NAME "bnx2"
59#define PFX DRV_MODULE_NAME ": " 59#define PFX DRV_MODULE_NAME ": "
60#define DRV_MODULE_VERSION "1.9.0" 60#define DRV_MODULE_VERSION "1.9.2"
61#define DRV_MODULE_RELDATE "Dec 16, 2008" 61#define DRV_MODULE_RELDATE "Feb 11, 2009"
62 62
63#define RUN_AT(x) (jiffies + (x)) 63#define RUN_AT(x) (jiffies + (x))
64 64
@@ -2920,18 +2920,8 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
2920 2920
2921 rx_hdr = (struct l2_fhdr *) skb->data; 2921 rx_hdr = (struct l2_fhdr *) skb->data;
2922 len = rx_hdr->l2_fhdr_pkt_len; 2922 len = rx_hdr->l2_fhdr_pkt_len;
2923 status = rx_hdr->l2_fhdr_status;
2923 2924
2924 if ((status = rx_hdr->l2_fhdr_status) &
2925 (L2_FHDR_ERRORS_BAD_CRC |
2926 L2_FHDR_ERRORS_PHY_DECODE |
2927 L2_FHDR_ERRORS_ALIGNMENT |
2928 L2_FHDR_ERRORS_TOO_SHORT |
2929 L2_FHDR_ERRORS_GIANT_FRAME)) {
2930
2931 bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons,
2932 sw_ring_prod);
2933 goto next_rx;
2934 }
2935 hdr_len = 0; 2925 hdr_len = 0;
2936 if (status & L2_FHDR_STATUS_SPLIT) { 2926 if (status & L2_FHDR_STATUS_SPLIT) {
2937 hdr_len = rx_hdr->l2_fhdr_ip_xsum; 2927 hdr_len = rx_hdr->l2_fhdr_ip_xsum;
@@ -2941,6 +2931,24 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
2941 pg_ring_used = 1; 2931 pg_ring_used = 1;
2942 } 2932 }
2943 2933
2934 if (unlikely(status & (L2_FHDR_ERRORS_BAD_CRC |
2935 L2_FHDR_ERRORS_PHY_DECODE |
2936 L2_FHDR_ERRORS_ALIGNMENT |
2937 L2_FHDR_ERRORS_TOO_SHORT |
2938 L2_FHDR_ERRORS_GIANT_FRAME))) {
2939
2940 bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons,
2941 sw_ring_prod);
2942 if (pg_ring_used) {
2943 int pages;
2944
2945 pages = PAGE_ALIGN(len - hdr_len) >> PAGE_SHIFT;
2946
2947 bnx2_reuse_rx_skb_pages(bp, rxr, NULL, pages);
2948 }
2949 goto next_rx;
2950 }
2951
2944 len -= 4; 2952 len -= 4;
2945 2953
2946 if (len <= bp->rx_copy_thresh) { 2954 if (len <= bp->rx_copy_thresh) {