aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-01-09 06:31:50 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-11 03:07:34 -0500
commit97345524392dcbe0157ce2a9d9a589e2022b1c15 (patch)
treeeb160931c550381f640e57195e3d80adcfbbc498 /drivers
parentba7cd3ba97f81564be3e4a4ee8ee17726aa853d7 (diff)
qlge: Get rid of split addresses in hardware control blocks.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/qlge/qlge.h24
-rw-r--r--drivers/net/qlge/qlge_dbg.c48
-rw-r--r--drivers/net/qlge/qlge_main.c26
3 files changed, 32 insertions, 66 deletions
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
index 4cb3647bb1b0..969700232265 100644
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -961,8 +961,7 @@ struct ib_mac_iocb_rsp {
961#define IB_MAC_IOCB_RSP_DS 0x40 /* data is in small buffer */ 961#define IB_MAC_IOCB_RSP_DS 0x40 /* data is in small buffer */
962#define IB_MAC_IOCB_RSP_DL 0x80 /* data is in large buffer */ 962#define IB_MAC_IOCB_RSP_DL 0x80 /* data is in large buffer */
963 __le32 data_len; /* */ 963 __le32 data_len; /* */
964 __le32 data_addr_lo; /* */ 964 __le64 data_addr; /* */
965 __le32 data_addr_hi; /* */
966 __le32 rss; /* */ 965 __le32 rss; /* */
967 __le16 vlan_id; /* 12 bits */ 966 __le16 vlan_id; /* 12 bits */
968#define IB_MAC_IOCB_RSP_C 0x1000 /* VLAN CFI bit */ 967#define IB_MAC_IOCB_RSP_C 0x1000 /* VLAN CFI bit */
@@ -976,8 +975,7 @@ struct ib_mac_iocb_rsp {
976#define IB_MAC_IOCB_RSP_HS 0x40 975#define IB_MAC_IOCB_RSP_HS 0x40
977#define IB_MAC_IOCB_RSP_HL 0x80 976#define IB_MAC_IOCB_RSP_HL 0x80
978 __le32 hdr_len; /* */ 977 __le32 hdr_len; /* */
979 __le32 hdr_addr_lo; /* */ 978 __le64 hdr_addr; /* */
980 __le32 hdr_addr_hi; /* */
981} __attribute((packed)); 979} __attribute((packed));
982 980
983struct ib_ae_iocb_rsp { 981struct ib_ae_iocb_rsp {
@@ -1042,10 +1040,8 @@ struct wqicb {
1042 __le16 cq_id_rss; 1040 __le16 cq_id_rss;
1043#define Q_CQ_ID_RSS_RV 0x8000 1041#define Q_CQ_ID_RSS_RV 0x8000
1044 __le16 rid; 1042 __le16 rid;
1045 __le32 addr_lo; 1043 __le64 addr;
1046 __le32 addr_hi; 1044 __le64 cnsmr_idx_addr;
1047 __le32 cnsmr_idx_addr_lo;
1048 __le32 cnsmr_idx_addr_hi;
1049} __attribute((packed)); 1045} __attribute((packed));
1050 1046
1051/* 1047/*
@@ -1070,18 +1066,14 @@ struct cqicb {
1070#define LEN_CPP_64 0x0002 1066#define LEN_CPP_64 0x0002
1071#define LEN_CPP_128 0x0003 1067#define LEN_CPP_128 0x0003
1072 __le16 rid; 1068 __le16 rid;
1073 __le32 addr_lo; 1069 __le64 addr;
1074 __le32 addr_hi; 1070 __le64 prod_idx_addr;
1075 __le32 prod_idx_addr_lo;
1076 __le32 prod_idx_addr_hi;
1077 __le16 pkt_delay; 1071 __le16 pkt_delay;
1078 __le16 irq_delay; 1072 __le16 irq_delay;
1079 __le32 lbq_addr_lo; 1073 __le64 lbq_addr;
1080 __le32 lbq_addr_hi;
1081 __le16 lbq_buf_size; 1074 __le16 lbq_buf_size;
1082 __le16 lbq_len; /* entry count */ 1075 __le16 lbq_len; /* entry count */
1083 __le32 sbq_addr_lo; 1076 __le64 sbq_addr;
1084 __le32 sbq_addr_hi;
1085 __le16 sbq_buf_size; 1077 __le16 sbq_buf_size;
1086 __le16 sbq_len; /* entry count */ 1078 __le16 sbq_len; /* entry count */
1087} __attribute((packed)); 1079} __attribute((packed));
diff --git a/drivers/net/qlge/qlge_dbg.c b/drivers/net/qlge/qlge_dbg.c
index e705ea5b975a..379b895ed6e6 100644
--- a/drivers/net/qlge/qlge_dbg.c
+++ b/drivers/net/qlge/qlge_dbg.c
@@ -435,14 +435,10 @@ void ql_dump_wqicb(struct wqicb *wqicb)
435 printk(KERN_ERR PFX "wqicb->cq_id_rss = %d.\n", 435 printk(KERN_ERR PFX "wqicb->cq_id_rss = %d.\n",
436 le16_to_cpu(wqicb->cq_id_rss)); 436 le16_to_cpu(wqicb->cq_id_rss));
437 printk(KERN_ERR PFX "wqicb->rid = 0x%x.\n", le16_to_cpu(wqicb->rid)); 437 printk(KERN_ERR PFX "wqicb->rid = 0x%x.\n", le16_to_cpu(wqicb->rid));
438 printk(KERN_ERR PFX "wqicb->wq_addr_lo = 0x%.08x.\n", 438 printk(KERN_ERR PFX "wqicb->wq_addr = 0x%llx.\n",
439 le32_to_cpu(wqicb->addr_lo)); 439 (unsigned long long) le64_to_cpu(wqicb->addr));
440 printk(KERN_ERR PFX "wqicb->wq_addr_hi = 0x%.08x.\n", 440 printk(KERN_ERR PFX "wqicb->wq_cnsmr_idx_addr = 0x%llx.\n",
441 le32_to_cpu(wqicb->addr_hi)); 441 (unsigned long long) le64_to_cpu(wqicb->cnsmr_idx_addr));
442 printk(KERN_ERR PFX "wqicb->wq_cnsmr_idx_addr_lo = 0x%.08x.\n",
443 le32_to_cpu(wqicb->cnsmr_idx_addr_lo));
444 printk(KERN_ERR PFX "wqicb->wq_cnsmr_idx_addr_hi = 0x%.08x.\n",
445 le32_to_cpu(wqicb->cnsmr_idx_addr_hi));
446} 442}
447 443
448void ql_dump_tx_ring(struct tx_ring *tx_ring) 444void ql_dump_tx_ring(struct tx_ring *tx_ring)
@@ -511,30 +507,22 @@ void ql_dump_cqicb(struct cqicb *cqicb)
511 printk(KERN_ERR PFX "cqicb->msix_vect = %d.\n", cqicb->msix_vect); 507 printk(KERN_ERR PFX "cqicb->msix_vect = %d.\n", cqicb->msix_vect);
512 printk(KERN_ERR PFX "cqicb->flags = %x.\n", cqicb->flags); 508 printk(KERN_ERR PFX "cqicb->flags = %x.\n", cqicb->flags);
513 printk(KERN_ERR PFX "cqicb->len = %d.\n", le16_to_cpu(cqicb->len)); 509 printk(KERN_ERR PFX "cqicb->len = %d.\n", le16_to_cpu(cqicb->len));
514 printk(KERN_ERR PFX "cqicb->addr_lo = %x.\n", 510 printk(KERN_ERR PFX "cqicb->addr = 0x%llx.\n",
515 le32_to_cpu(cqicb->addr_lo)); 511 (unsigned long long) le64_to_cpu(cqicb->addr));
516 printk(KERN_ERR PFX "cqicb->addr_hi = %x.\n", 512 printk(KERN_ERR PFX "cqicb->prod_idx_addr = 0x%llx.\n",
517 le32_to_cpu(cqicb->addr_hi)); 513 (unsigned long long) le64_to_cpu(cqicb->prod_idx_addr));
518 printk(KERN_ERR PFX "cqicb->prod_idx_addr_lo = %x.\n",
519 le32_to_cpu(cqicb->prod_idx_addr_lo));
520 printk(KERN_ERR PFX "cqicb->prod_idx_addr_hi = %x.\n",
521 le32_to_cpu(cqicb->prod_idx_addr_hi));
522 printk(KERN_ERR PFX "cqicb->pkt_delay = 0x%.04x.\n", 514 printk(KERN_ERR PFX "cqicb->pkt_delay = 0x%.04x.\n",
523 le16_to_cpu(cqicb->pkt_delay)); 515 le16_to_cpu(cqicb->pkt_delay));
524 printk(KERN_ERR PFX "cqicb->irq_delay = 0x%.04x.\n", 516 printk(KERN_ERR PFX "cqicb->irq_delay = 0x%.04x.\n",
525 le16_to_cpu(cqicb->irq_delay)); 517 le16_to_cpu(cqicb->irq_delay));
526 printk(KERN_ERR PFX "cqicb->lbq_addr_lo = %x.\n", 518 printk(KERN_ERR PFX "cqicb->lbq_addr = 0x%llx.\n",
527 le32_to_cpu(cqicb->lbq_addr_lo)); 519 (unsigned long long) le64_to_cpu(cqicb->lbq_addr));
528 printk(KERN_ERR PFX "cqicb->lbq_addr_hi = %x.\n",
529 le32_to_cpu(cqicb->lbq_addr_hi));
530 printk(KERN_ERR PFX "cqicb->lbq_buf_size = 0x%.04x.\n", 520 printk(KERN_ERR PFX "cqicb->lbq_buf_size = 0x%.04x.\n",
531 le16_to_cpu(cqicb->lbq_buf_size)); 521 le16_to_cpu(cqicb->lbq_buf_size));
532 printk(KERN_ERR PFX "cqicb->lbq_len = 0x%.04x.\n", 522 printk(KERN_ERR PFX "cqicb->lbq_len = 0x%.04x.\n",
533 le16_to_cpu(cqicb->lbq_len)); 523 le16_to_cpu(cqicb->lbq_len));
534 printk(KERN_ERR PFX "cqicb->sbq_addr_lo = %x.\n", 524 printk(KERN_ERR PFX "cqicb->sbq_addr = 0x%llx.\n",
535 le32_to_cpu(cqicb->sbq_addr_lo)); 525 (unsigned long long) le64_to_cpu(cqicb->sbq_addr));
536 printk(KERN_ERR PFX "cqicb->sbq_addr_hi = %x.\n",
537 le32_to_cpu(cqicb->sbq_addr_hi));
538 printk(KERN_ERR PFX "cqicb->sbq_buf_size = 0x%.04x.\n", 526 printk(KERN_ERR PFX "cqicb->sbq_buf_size = 0x%.04x.\n",
539 le16_to_cpu(cqicb->sbq_buf_size)); 527 le16_to_cpu(cqicb->sbq_buf_size));
540 printk(KERN_ERR PFX "cqicb->sbq_len = 0x%.04x.\n", 528 printk(KERN_ERR PFX "cqicb->sbq_len = 0x%.04x.\n",
@@ -811,10 +799,8 @@ void ql_dump_ib_mac_rsp(struct ib_mac_iocb_rsp *ib_mac_rsp)
811 799
812 printk(KERN_ERR PFX "data_len = %d\n", 800 printk(KERN_ERR PFX "data_len = %d\n",
813 le32_to_cpu(ib_mac_rsp->data_len)); 801 le32_to_cpu(ib_mac_rsp->data_len));
814 printk(KERN_ERR PFX "data_addr_hi = 0x%x\n", 802 printk(KERN_ERR PFX "data_addr = 0x%llx\n",
815 le32_to_cpu(ib_mac_rsp->data_addr_hi)); 803 (unsigned long long) le64_to_cpu(ib_mac_rsp->data_addr));
816 printk(KERN_ERR PFX "data_addr_lo = 0x%x\n",
817 le32_to_cpu(ib_mac_rsp->data_addr_lo));
818 if (ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_RSS_MASK) 804 if (ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_RSS_MASK)
819 printk(KERN_ERR PFX "rss = %x\n", 805 printk(KERN_ERR PFX "rss = %x\n",
820 le32_to_cpu(ib_mac_rsp->rss)); 806 le32_to_cpu(ib_mac_rsp->rss));
@@ -830,10 +816,8 @@ void ql_dump_ib_mac_rsp(struct ib_mac_iocb_rsp *ib_mac_rsp)
830 if (ib_mac_rsp->flags4 & IB_MAC_IOCB_RSP_HV) { 816 if (ib_mac_rsp->flags4 & IB_MAC_IOCB_RSP_HV) {
831 printk(KERN_ERR PFX "hdr length = %d.\n", 817 printk(KERN_ERR PFX "hdr length = %d.\n",
832 le32_to_cpu(ib_mac_rsp->hdr_len)); 818 le32_to_cpu(ib_mac_rsp->hdr_len));
833 printk(KERN_ERR PFX "hdr addr_hi = 0x%x.\n", 819 printk(KERN_ERR PFX "hdr addr = 0x%llx.\n",
834 le32_to_cpu(ib_mac_rsp->hdr_addr_hi)); 820 (unsigned long long) le64_to_cpu(ib_mac_rsp->hdr_addr));
835 printk(KERN_ERR PFX "hdr addr_lo = 0x%x.\n",
836 le32_to_cpu(ib_mac_rsp->hdr_addr_lo));
837 } 821 }
838} 822}
839#endif 823#endif
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 78df7d11cef1..33bbdcefe0a0 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -2467,12 +2467,9 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
2467 bq_len = (rx_ring->cq_len == 65536) ? 0 : (u16) rx_ring->cq_len; 2467 bq_len = (rx_ring->cq_len == 65536) ? 0 : (u16) rx_ring->cq_len;
2468 cqicb->len = cpu_to_le16(bq_len | LEN_V | LEN_CPP_CONT); 2468 cqicb->len = cpu_to_le16(bq_len | LEN_V | LEN_CPP_CONT);
2469 2469
2470 cqicb->addr_lo = cpu_to_le32(rx_ring->cq_base_dma); 2470 cqicb->addr = cpu_to_le64(rx_ring->cq_base_dma);
2471 cqicb->addr_hi = cpu_to_le32((u64) rx_ring->cq_base_dma >> 32);
2472 2471
2473 cqicb->prod_idx_addr_lo = cpu_to_le32(rx_ring->prod_idx_sh_reg_dma); 2472 cqicb->prod_idx_addr = cpu_to_le64(rx_ring->prod_idx_sh_reg_dma);
2474 cqicb->prod_idx_addr_hi =
2475 cpu_to_le32((u64) rx_ring->prod_idx_sh_reg_dma >> 32);
2476 2473
2477 /* 2474 /*
2478 * Set up the control block load flags. 2475 * Set up the control block load flags.
@@ -2483,10 +2480,8 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
2483 if (rx_ring->lbq_len) { 2480 if (rx_ring->lbq_len) {
2484 cqicb->flags |= FLAGS_LL; /* Load lbq values */ 2481 cqicb->flags |= FLAGS_LL; /* Load lbq values */
2485 *((u64 *) rx_ring->lbq_base_indirect) = rx_ring->lbq_base_dma; 2482 *((u64 *) rx_ring->lbq_base_indirect) = rx_ring->lbq_base_dma;
2486 cqicb->lbq_addr_lo = 2483 cqicb->lbq_addr =
2487 cpu_to_le32(rx_ring->lbq_base_indirect_dma); 2484 cpu_to_le64(rx_ring->lbq_base_indirect_dma);
2488 cqicb->lbq_addr_hi =
2489 cpu_to_le32((u64) rx_ring->lbq_base_indirect_dma >> 32);
2490 bq_len = (rx_ring->lbq_buf_size == 65536) ? 0 : 2485 bq_len = (rx_ring->lbq_buf_size == 65536) ? 0 :
2491 (u16) rx_ring->lbq_buf_size; 2486 (u16) rx_ring->lbq_buf_size;
2492 cqicb->lbq_buf_size = cpu_to_le16(bq_len); 2487 cqicb->lbq_buf_size = cpu_to_le16(bq_len);
@@ -2501,10 +2496,8 @@ static int ql_start_rx_ring(struct ql_adapter *qdev, struct rx_ring *rx_ring)
2501 if (rx_ring->sbq_len) { 2496 if (rx_ring->sbq_len) {
2502 cqicb->flags |= FLAGS_LS; /* Load sbq values */ 2497 cqicb->flags |= FLAGS_LS; /* Load sbq values */
2503 *((u64 *) rx_ring->sbq_base_indirect) = rx_ring->sbq_base_dma; 2498 *((u64 *) rx_ring->sbq_base_indirect) = rx_ring->sbq_base_dma;
2504 cqicb->sbq_addr_lo = 2499 cqicb->sbq_addr =
2505 cpu_to_le32(rx_ring->sbq_base_indirect_dma); 2500 cpu_to_le64(rx_ring->sbq_base_indirect_dma);
2506 cqicb->sbq_addr_hi =
2507 cpu_to_le32((u64) rx_ring->sbq_base_indirect_dma >> 32);
2508 cqicb->sbq_buf_size = 2501 cqicb->sbq_buf_size =
2509 cpu_to_le16(((rx_ring->sbq_buf_size / 2) + 8) & 0xfffffff8); 2502 cpu_to_le16(((rx_ring->sbq_buf_size / 2) + 8) & 0xfffffff8);
2510 bq_len = (rx_ring->sbq_len == 65536) ? 0 : 2503 bq_len = (rx_ring->sbq_len == 65536) ? 0 :
@@ -2611,12 +2604,9 @@ static int ql_start_tx_ring(struct ql_adapter *qdev, struct tx_ring *tx_ring)
2611 Q_FLAGS_LB | Q_FLAGS_LI | Q_FLAGS_LO); 2604 Q_FLAGS_LB | Q_FLAGS_LI | Q_FLAGS_LO);
2612 wqicb->cq_id_rss = cpu_to_le16(tx_ring->cq_id); 2605 wqicb->cq_id_rss = cpu_to_le16(tx_ring->cq_id);
2613 wqicb->rid = 0; 2606 wqicb->rid = 0;
2614 wqicb->addr_lo = cpu_to_le32(tx_ring->wq_base_dma); 2607 wqicb->addr = cpu_to_le64(tx_ring->wq_base_dma);
2615 wqicb->addr_hi = cpu_to_le32((u64) tx_ring->wq_base_dma >> 32);
2616 2608
2617 wqicb->cnsmr_idx_addr_lo = cpu_to_le32(tx_ring->cnsmr_idx_sh_reg_dma); 2609 wqicb->cnsmr_idx_addr = cpu_to_le64(tx_ring->cnsmr_idx_sh_reg_dma);
2618 wqicb->cnsmr_idx_addr_hi =
2619 cpu_to_le32((u64) tx_ring->cnsmr_idx_sh_reg_dma >> 32);
2620 2610
2621 ql_init_tx_ring(qdev, tx_ring); 2611 ql_init_tx_ring(qdev, tx_ring);
2622 2612