]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.drivers/bnx2x-Endianness-issues.patch
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / bnx2x-Endianness-issues.patch
1 From 68d5948436c2f782ebb5ddf25a6588ee452e8c30 Mon Sep 17 00:00:00 2001
2 From: Eilon Greenstein <eilong@broadcom.com>
3 Date: Wed, 14 Jan 2009 21:27:36 -0800
4 Subject: bnx2x: Endianness issues
5 Acked-by: Karsten Keil <kkeil@novell.com>
6 Reference: bnc#472500
7
8 Adding missing le_to_cpu and disabling wrong HW endianity flag (the
9 two complete each other)
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 | 11 ++++++-----
15 1 files changed, 6 insertions(+), 5 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 @@ -1439,7 +1439,7 @@ static int bnx2x_rx_int(struct bnx2x_fas
22 DP(NETIF_MSG_RX_STATUS, "CQE type %x err %x status %x"
23 " queue %x vlan %x len %u\n", CQE_TYPE(cqe_fp_flags),
24 cqe_fp_flags, cqe->fast_path_cqe.status_flags,
25 - cqe->fast_path_cqe.rss_hash_result,
26 + le32_to_cpu(cqe->fast_path_cqe.rss_hash_result),
27 le16_to_cpu(cqe->fast_path_cqe.vlan_tag),
28 le16_to_cpu(cqe->fast_path_cqe.pkt_len));
29
30 @@ -2824,8 +2824,10 @@ static void bnx2x_attn_int_deasserted(st
31 static void bnx2x_attn_int(struct bnx2x *bp)
32 {
33 /* read local copy of bits */
34 - u32 attn_bits = bp->def_status_blk->atten_status_block.attn_bits;
35 - u32 attn_ack = bp->def_status_blk->atten_status_block.attn_bits_ack;
36 + u32 attn_bits = le32_to_cpu(bp->def_status_blk->atten_status_block.
37 + attn_bits);
38 + u32 attn_ack = le32_to_cpu(bp->def_status_blk->atten_status_block.
39 + attn_bits_ack);
40 u32 attn_state = bp->attn_state;
41
42 /* look for changed bits */
43 @@ -2873,7 +2875,7 @@ static void bnx2x_sp_task(struct work_st
44 if (status & 0x2)
45 bp->stats_pending = 0;
46
47 - bnx2x_ack_sb(bp, DEF_SB_ID, ATTENTION_ID, bp->def_att_idx,
48 + bnx2x_ack_sb(bp, DEF_SB_ID, ATTENTION_ID, le16_to_cpu(bp->def_att_idx),
49 IGU_INT_NOP, 1);
50 bnx2x_ack_sb(bp, DEF_SB_ID, USTORM_ID, le16_to_cpu(bp->def_u_idx),
51 IGU_INT_NOP, 1);
52 @@ -5164,7 +5166,6 @@ static int bnx2x_init_common(struct bnx2
53 REG_WR(bp, PXP2_REG_RQ_SRC_ENDIAN_M, 1);
54 REG_WR(bp, PXP2_REG_RQ_CDU_ENDIAN_M, 1);
55 REG_WR(bp, PXP2_REG_RQ_DBG_ENDIAN_M, 1);
56 - REG_WR(bp, PXP2_REG_RQ_HC_ENDIAN_M, 1);
57
58 /* REG_WR(bp, PXP2_REG_RD_PBF_SWAP_MODE, 1); */
59 REG_WR(bp, PXP2_REG_RD_QM_SWAP_MODE, 1);