]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From af2464011f0954785687071b298f066f6cbb1c84 Mon Sep 17 00:00:00 2001 |
2 | From: Eilon Greenstein <eilong@broadcom.com> | |
3 | Date: Wed, 14 Jan 2009 06:43:59 +0000 | |
4 | Subject: bnx2x: Wrong HDR offset in CAM | |
5 | Acked-by: Karsten Keil <kkeil@novell.com> | |
6 | Reference: bnc#472500 | |
7 | ||
8 | Has a negative side effect when sending MAC update with no content (as done in | |
9 | the self-test) | |
10 | ||
11 | Signed-off-by: Eilon Greenstein <eilong@broadcom.com> | |
12 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
13 | --- | |
14 | drivers/net/bnx2x_main.c | 9 ++++++--- | |
15 | 1 files changed, 6 insertions(+), 3 deletions(-) | |
16 | ||
17 | Index: linux-2.6.27-bnx2x_2/drivers/net/bnx2x_main.c | |
18 | =================================================================== | |
19 | --- linux-2.6.27-bnx2x_2.orig/drivers/net/bnx2x_main.c | |
20 | +++ linux-2.6.27-bnx2x_2/drivers/net/bnx2x_main.c | |
21 | @@ -6147,7 +6147,7 @@ static void bnx2x_set_mac_addr_e1(struct | |
22 | * multicast 64-127:port0 128-191:port1 | |
23 | */ | |
24 | config->hdr.length_6b = 2; | |
25 | - config->hdr.offset = port ? 31 : 0; | |
26 | + config->hdr.offset = port ? 32 : 0; | |
27 | config->hdr.client_id = BP_CL_ID(bp); | |
28 | config->hdr.reserved1 = 0; | |
29 | ||
30 | @@ -8914,7 +8914,10 @@ static int bnx2x_test_intr(struct bnx2x | |
31 | return -ENODEV; | |
32 | ||
33 | config->hdr.length_6b = 0; | |
34 | - config->hdr.offset = 0; | |
35 | + if (CHIP_IS_E1(bp)) | |
36 | + config->hdr.offset = (BP_PORT(bp) ? 32 : 0); | |
37 | + else | |
38 | + config->hdr.offset = BP_FUNC(bp); | |
39 | config->hdr.client_id = BP_CL_ID(bp); | |
40 | config->hdr.reserved1 = 0; | |
41 | ||
42 | @@ -9867,7 +9870,7 @@ static void bnx2x_set_rx_mode(struct net | |
43 | for (; i < old; i++) { | |
44 | if (CAM_IS_INVALID(config-> | |
45 | config_table[i])) { | |
46 | - i--; /* already invalidated */ | |
47 | + /* already invalidated */ | |
48 | break; | |
49 | } | |
50 | /* invalidate */ |