diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2009-03-09 06:59:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-10 07:43:58 -0400 |
commit | d4a4aba61731ce6d102a6a93e22b8fa26511c9d5 (patch) | |
tree | 27c4daff87e1097b9b634513cca5e76c3918269b /drivers/net/qlge | |
parent | 74c50b4bae225b8e5aff9a1ceca256ba46c665c6 (diff) |
qlge: bugfix: Fix endian issue related to rx buffers.
This was introduced in an earlier net-next patch.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 189584684aae..b91b700a081b 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -2526,6 +2526,7 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring) | |||
2526 | qdev->doorbell_area + (DB_PAGE_SIZE * (128 + rx_ring->cq_id)); | 2526 | qdev->doorbell_area + (DB_PAGE_SIZE * (128 + rx_ring->cq_id)); |
2527 | int err = 0; | 2527 | int err = 0; |
2528 | u16 bq_len; | 2528 | u16 bq_len; |
2529 | u64 tmp; | ||
2529 | 2530 | ||
2530 | /* Set up the shadow registers for this ring. */ | 2531 | /* Set up the shadow registers for this ring. */ |
2531 | rx_ring->prod_idx_sh_reg = shadow_reg; | 2532 | rx_ring->prod_idx_sh_reg = shadow_reg; |
@@ -2571,7 +2572,8 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring) | |||
2571 | FLAGS_LI; /* Load irq delay values */ | 2572 | FLAGS_LI; /* Load irq delay values */ |
2572 | if (rx_ring->lbq_len) { | 2573 | if (rx_ring->lbq_len) { |
2573 | cqicb->flags |= FLAGS_LL; /* Load lbq values */ | 2574 | cqicb->flags |= FLAGS_LL; /* Load lbq values */ |
2574 | *((u64 *) rx_ring->lbq_base_indirect) = rx_ring->lbq_base_dma; | 2575 | tmp = (u64)rx_ring->lbq_base_dma;; |
2576 | *((__le64 *) rx_ring->lbq_base_indirect) = cpu_to_le64(tmp); | ||
2575 | cqicb->lbq_addr = | 2577 | cqicb->lbq_addr = |
2576 | cpu_to_le64(rx_ring->lbq_base_indirect_dma); | 2578 | cpu_to_le64(rx_ring->lbq_base_indirect_dma); |
2577 | bq_len = (rx_ring->lbq_buf_size == 65536) ? 0 : | 2579 | bq_len = (rx_ring->lbq_buf_size == 65536) ? 0 : |
@@ -2587,11 +2589,12 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring) | |||
2587 | } | 2589 | } |
2588 | if (rx_ring->sbq_len) { | 2590 | if (rx_ring->sbq_len) { |
2589 | cqicb->flags |= FLAGS_LS; /* Load sbq values */ | 2591 | cqicb->flags |= FLAGS_LS; /* Load sbq values */ |
2590 | *((u64 *) rx_ring->sbq_base_indirect) = rx_ring->sbq_base_dma; | 2592 | tmp = (u64)rx_ring->sbq_base_dma;; |
2593 | *((__le64 *) rx_ring->sbq_base_indirect) = cpu_to_le64(tmp); | ||
2591 | cqicb->sbq_addr = | 2594 | cqicb->sbq_addr = |
2592 | cpu_to_le64(rx_ring->sbq_base_indirect_dma); | 2595 | cpu_to_le64(rx_ring->sbq_base_indirect_dma); |
2593 | cqicb->sbq_buf_size = | 2596 | cqicb->sbq_buf_size = |
2594 | cpu_to_le16(((rx_ring->sbq_buf_size / 2) + 8) & 0xfffffff8); | 2597 | cpu_to_le16((u16)(rx_ring->sbq_buf_size/2)); |
2595 | bq_len = (rx_ring->sbq_len == 65536) ? 0 : | 2598 | bq_len = (rx_ring->sbq_len == 65536) ? 0 : |
2596 | (u16) rx_ring->sbq_len; | 2599 | (u16) rx_ring->sbq_len; |
2597 | cqicb->sbq_len = cpu_to_le16(bq_len); | 2600 | cqicb->sbq_len = cpu_to_le16(bq_len); |