diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index d4a3dac21dcf..6b6530ffdf19 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.3" |
61 | #define DRV_MODULE_RELDATE "Dec 16, 2008" | 61 | #define DRV_MODULE_RELDATE "March 17, 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) { |
@@ -5835,9 +5843,6 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) | |||
5835 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { | 5843 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { |
5836 | msix_ent[i].entry = i; | 5844 | msix_ent[i].entry = i; |
5837 | msix_ent[i].vector = 0; | 5845 | msix_ent[i].vector = 0; |
5838 | |||
5839 | snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); | ||
5840 | bp->irq_tbl[i].handler = bnx2_msi_1shot; | ||
5841 | } | 5846 | } |
5842 | 5847 | ||
5843 | rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); | 5848 | rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); |
@@ -5846,8 +5851,11 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) | |||
5846 | 5851 | ||
5847 | bp->irq_nvecs = msix_vecs; | 5852 | bp->irq_nvecs = msix_vecs; |
5848 | bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; | 5853 | bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; |
5849 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) | 5854 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { |
5850 | bp->irq_tbl[i].vector = msix_ent[i].vector; | 5855 | bp->irq_tbl[i].vector = msix_ent[i].vector; |
5856 | snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); | ||
5857 | bp->irq_tbl[i].handler = bnx2_msi_1shot; | ||
5858 | } | ||
5851 | } | 5859 | } |
5852 | 5860 | ||
5853 | static void | 5861 | static void |