diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index d4a3dac21dcf..6500b7c4739f 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 | ||
@@ -2910,18 +2910,8 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) | |||
2910 | 2910 | ||
2911 | rx_hdr = (struct l2_fhdr *) skb->data; | 2911 | rx_hdr = (struct l2_fhdr *) skb->data; |
2912 | len = rx_hdr->l2_fhdr_pkt_len; | 2912 | len = rx_hdr->l2_fhdr_pkt_len; |
2913 | status = rx_hdr->l2_fhdr_status; | ||
2913 | 2914 | ||
2914 | if ((status = rx_hdr->l2_fhdr_status) & | ||
2915 | (L2_FHDR_ERRORS_BAD_CRC | | ||
2916 | L2_FHDR_ERRORS_PHY_DECODE | | ||
2917 | L2_FHDR_ERRORS_ALIGNMENT | | ||
2918 | L2_FHDR_ERRORS_TOO_SHORT | | ||
2919 | L2_FHDR_ERRORS_GIANT_FRAME)) { | ||
2920 | |||
2921 | bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons, | ||
2922 | sw_ring_prod); | ||
2923 | goto next_rx; | ||
2924 | } | ||
2925 | hdr_len = 0; | 2915 | hdr_len = 0; |
2926 | if (status & L2_FHDR_STATUS_SPLIT) { | 2916 | if (status & L2_FHDR_STATUS_SPLIT) { |
2927 | hdr_len = rx_hdr->l2_fhdr_ip_xsum; | 2917 | hdr_len = rx_hdr->l2_fhdr_ip_xsum; |
@@ -2931,6 +2921,24 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) | |||
2931 | pg_ring_used = 1; | 2921 | pg_ring_used = 1; |
2932 | } | 2922 | } |
2933 | 2923 | ||
2924 | if (unlikely(status & (L2_FHDR_ERRORS_BAD_CRC | | ||
2925 | L2_FHDR_ERRORS_PHY_DECODE | | ||
2926 | L2_FHDR_ERRORS_ALIGNMENT | | ||
2927 | L2_FHDR_ERRORS_TOO_SHORT | | ||
2928 | L2_FHDR_ERRORS_GIANT_FRAME))) { | ||
2929 | |||
2930 | bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons, | ||
2931 | sw_ring_prod); | ||
2932 | if (pg_ring_used) { | ||
2933 | int pages; | ||
2934 | |||
2935 | pages = PAGE_ALIGN(len - hdr_len) >> PAGE_SHIFT; | ||
2936 | |||
2937 | bnx2_reuse_rx_skb_pages(bp, rxr, NULL, pages); | ||
2938 | } | ||
2939 | goto next_rx; | ||
2940 | } | ||
2941 | |||
2934 | len -= 4; | 2942 | len -= 4; |
2935 | 2943 | ||
2936 | if (len <= bp->rx_copy_thresh) { | 2944 | if (len <= bp->rx_copy_thresh) { |