aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_rc.c
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@pathscale.com>2006-07-01 07:36:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-01 12:56:02 -0400
commit27b678dd04a636f2c351816f4b3042c8815d4e9d (patch)
tree08b409db5d54bab50e1616b1bf65479b0751de5b /drivers/infiniband/hw/ipath/ipath_rc.c
parent357b552ff3d82a2e6b97c63c6394f748cb217cf8 (diff)
[PATCH] IB/ipath: namespace cleanup: replace ips with ipath
Remove ips namespace from infinipath drivers. This renames ips_common.h to ipath_common.h. Definitions, data structures, etc. that were not used by kernel modules have moved to user-only headers. All names including ips have been renamed to ipath. Some names have had an ipath prefix added. Signed-off-by: Christian Bell <christian.bell@qlogic.com> Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Cc: "Michael S. Tsirkin" <mst@mellanox.co.il> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_rc.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_rc.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c
index 8568dd0538cf..774d1615ce2f 100644
--- a/drivers/infiniband/hw/ipath/ipath_rc.c
+++ b/drivers/infiniband/hw/ipath/ipath_rc.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#include "ipath_verbs.h" 34#include "ipath_verbs.h"
35#include "ips_common.h" 35#include "ipath_common.h"
36 36
37/* cut down ridiculously long IB macro names */ 37/* cut down ridiculously long IB macro names */
38#define OP(x) IB_OPCODE_RC_##x 38#define OP(x) IB_OPCODE_RC_##x
@@ -49,7 +49,7 @@ static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe)
49 struct ipath_ibdev *dev; 49 struct ipath_ibdev *dev;
50 u32 len; 50 u32 len;
51 51
52 len = ((qp->s_psn - wqe->psn) & IPS_PSN_MASK) * 52 len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) *
53 ib_mtu_enum_to_int(qp->path_mtu); 53 ib_mtu_enum_to_int(qp->path_mtu);
54 qp->s_sge.sge = wqe->sg_list[0]; 54 qp->s_sge.sge = wqe->sg_list[0];
55 qp->s_sge.sg_list = wqe->sg_list + 1; 55 qp->s_sge.sg_list = wqe->sg_list + 1;
@@ -159,9 +159,9 @@ u32 ipath_make_rc_ack(struct ipath_qp *qp,
159 qp->s_ack_state = OP(RDMA_READ_RESPONSE_LAST); 159 qp->s_ack_state = OP(RDMA_READ_RESPONSE_LAST);
160 bth0 = OP(ACKNOWLEDGE) << 24; 160 bth0 = OP(ACKNOWLEDGE) << 24;
161 if (qp->s_nak_state) 161 if (qp->s_nak_state)
162 ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPS_MSN_MASK) | 162 ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) |
163 (qp->s_nak_state << 163 (qp->s_nak_state <<
164 IPS_AETH_CREDIT_SHIFT)); 164 IPATH_AETH_CREDIT_SHIFT));
165 else 165 else
166 ohdr->u.aeth = ipath_compute_aeth(qp); 166 ohdr->u.aeth = ipath_compute_aeth(qp);
167 hwords++; 167 hwords++;
@@ -361,7 +361,7 @@ int ipath_make_rc_req(struct ipath_qp *qp,
361 if (qp->s_tail >= qp->s_size) 361 if (qp->s_tail >= qp->s_size)
362 qp->s_tail = 0; 362 qp->s_tail = 0;
363 } 363 }
364 bth2 |= qp->s_psn++ & IPS_PSN_MASK; 364 bth2 |= qp->s_psn++ & IPATH_PSN_MASK;
365 if ((int)(qp->s_psn - qp->s_next_psn) > 0) 365 if ((int)(qp->s_psn - qp->s_next_psn) > 0)
366 qp->s_next_psn = qp->s_psn; 366 qp->s_next_psn = qp->s_psn;
367 /* 367 /*
@@ -387,7 +387,7 @@ int ipath_make_rc_req(struct ipath_qp *qp,
387 qp->s_state = OP(SEND_MIDDLE); 387 qp->s_state = OP(SEND_MIDDLE);
388 /* FALLTHROUGH */ 388 /* FALLTHROUGH */
389 case OP(SEND_MIDDLE): 389 case OP(SEND_MIDDLE):
390 bth2 = qp->s_psn++ & IPS_PSN_MASK; 390 bth2 = qp->s_psn++ & IPATH_PSN_MASK;
391 if ((int)(qp->s_psn - qp->s_next_psn) > 0) 391 if ((int)(qp->s_psn - qp->s_next_psn) > 0)
392 qp->s_next_psn = qp->s_psn; 392 qp->s_next_psn = qp->s_psn;
393 ss = &qp->s_sge; 393 ss = &qp->s_sge;
@@ -429,7 +429,7 @@ int ipath_make_rc_req(struct ipath_qp *qp,
429 qp->s_state = OP(RDMA_WRITE_MIDDLE); 429 qp->s_state = OP(RDMA_WRITE_MIDDLE);
430 /* FALLTHROUGH */ 430 /* FALLTHROUGH */
431 case OP(RDMA_WRITE_MIDDLE): 431 case OP(RDMA_WRITE_MIDDLE):
432 bth2 = qp->s_psn++ & IPS_PSN_MASK; 432 bth2 = qp->s_psn++ & IPATH_PSN_MASK;
433 if ((int)(qp->s_psn - qp->s_next_psn) > 0) 433 if ((int)(qp->s_psn - qp->s_next_psn) > 0)
434 qp->s_next_psn = qp->s_psn; 434 qp->s_next_psn = qp->s_psn;
435 ss = &qp->s_sge; 435 ss = &qp->s_sge;
@@ -466,7 +466,7 @@ int ipath_make_rc_req(struct ipath_qp *qp,
466 * See ipath_restart_rc(). 466 * See ipath_restart_rc().
467 */ 467 */
468 ipath_init_restart(qp, wqe); 468 ipath_init_restart(qp, wqe);
469 len = ((qp->s_psn - wqe->psn) & IPS_PSN_MASK) * pmtu; 469 len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) * pmtu;
470 ohdr->u.rc.reth.vaddr = 470 ohdr->u.rc.reth.vaddr =
471 cpu_to_be64(wqe->wr.wr.rdma.remote_addr + len); 471 cpu_to_be64(wqe->wr.wr.rdma.remote_addr + len);
472 ohdr->u.rc.reth.rkey = 472 ohdr->u.rc.reth.rkey =
@@ -474,7 +474,7 @@ int ipath_make_rc_req(struct ipath_qp *qp,
474 ohdr->u.rc.reth.length = cpu_to_be32(qp->s_len); 474 ohdr->u.rc.reth.length = cpu_to_be32(qp->s_len);
475 qp->s_state = OP(RDMA_READ_REQUEST); 475 qp->s_state = OP(RDMA_READ_REQUEST);
476 hwords += sizeof(ohdr->u.rc.reth) / 4; 476 hwords += sizeof(ohdr->u.rc.reth) / 4;
477 bth2 = qp->s_psn++ & IPS_PSN_MASK; 477 bth2 = qp->s_psn++ & IPATH_PSN_MASK;
478 if ((int)(qp->s_psn - qp->s_next_psn) > 0) 478 if ((int)(qp->s_psn - qp->s_next_psn) > 0)
479 qp->s_next_psn = qp->s_psn; 479 qp->s_next_psn = qp->s_psn;
480 ss = NULL; 480 ss = NULL;
@@ -529,7 +529,7 @@ static void send_rc_ack(struct ipath_qp *qp)
529 529
530 /* Construct the header. */ 530 /* Construct the header. */
531 ohdr = &hdr.u.oth; 531 ohdr = &hdr.u.oth;
532 lrh0 = IPS_LRH_BTH; 532 lrh0 = IPATH_LRH_BTH;
533 /* header size in 32-bit words LRH+BTH+AETH = (8+12+4)/4. */ 533 /* header size in 32-bit words LRH+BTH+AETH = (8+12+4)/4. */
534 hwords = 6; 534 hwords = 6;
535 if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { 535 if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) {
@@ -537,14 +537,14 @@ static void send_rc_ack(struct ipath_qp *qp)
537 &qp->remote_ah_attr.grh, 537 &qp->remote_ah_attr.grh,
538 hwords, 0); 538 hwords, 0);
539 ohdr = &hdr.u.l.oth; 539 ohdr = &hdr.u.l.oth;
540 lrh0 = IPS_LRH_GRH; 540 lrh0 = IPATH_LRH_GRH;
541 } 541 }
542 /* read pkey_index w/o lock (its atomic) */ 542 /* read pkey_index w/o lock (its atomic) */
543 bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); 543 bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index);
544 if (qp->r_nak_state) 544 if (qp->r_nak_state)
545 ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPS_MSN_MASK) | 545 ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) |
546 (qp->r_nak_state << 546 (qp->r_nak_state <<
547 IPS_AETH_CREDIT_SHIFT)); 547 IPATH_AETH_CREDIT_SHIFT));
548 else 548 else
549 ohdr->u.aeth = ipath_compute_aeth(qp); 549 ohdr->u.aeth = ipath_compute_aeth(qp);
550 if (qp->r_ack_state >= OP(COMPARE_SWAP)) { 550 if (qp->r_ack_state >= OP(COMPARE_SWAP)) {
@@ -560,7 +560,7 @@ static void send_rc_ack(struct ipath_qp *qp)
560 hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd)); 560 hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd));
561 ohdr->bth[0] = cpu_to_be32(bth0); 561 ohdr->bth[0] = cpu_to_be32(bth0);
562 ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); 562 ohdr->bth[1] = cpu_to_be32(qp->remote_qpn);
563 ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPS_PSN_MASK); 563 ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPATH_PSN_MASK);
564 564
565 /* 565 /*
566 * If we can send the ACK, clear the ACK state. 566 * If we can send the ACK, clear the ACK state.
@@ -890,8 +890,8 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode)
890 reset_psn(qp, psn); 890 reset_psn(qp, psn);
891 891
892 qp->s_rnr_timeout = 892 qp->s_rnr_timeout =
893 ib_ipath_rnr_table[(aeth >> IPS_AETH_CREDIT_SHIFT) & 893 ib_ipath_rnr_table[(aeth >> IPATH_AETH_CREDIT_SHIFT) &
894 IPS_AETH_CREDIT_MASK]; 894 IPATH_AETH_CREDIT_MASK];
895 ipath_insert_rnr_queue(qp); 895 ipath_insert_rnr_queue(qp);
896 goto bail; 896 goto bail;
897 897
@@ -899,8 +899,8 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode)
899 /* The last valid PSN seen is the previous request's. */ 899 /* The last valid PSN seen is the previous request's. */
900 if (qp->s_last != qp->s_tail) 900 if (qp->s_last != qp->s_tail)
901 qp->s_last_psn = wqe->psn - 1; 901 qp->s_last_psn = wqe->psn - 1;
902 switch ((aeth >> IPS_AETH_CREDIT_SHIFT) & 902 switch ((aeth >> IPATH_AETH_CREDIT_SHIFT) &
903 IPS_AETH_CREDIT_MASK) { 903 IPATH_AETH_CREDIT_MASK) {
904 case 0: /* PSN sequence error */ 904 case 0: /* PSN sequence error */
905 dev->n_seq_naks++; 905 dev->n_seq_naks++;
906 /* 906 /*
@@ -1268,7 +1268,7 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev,
1268 * Check for the PSN of the last atomic operation 1268 * Check for the PSN of the last atomic operation
1269 * performed and resend the result if found. 1269 * performed and resend the result if found.
1270 */ 1270 */
1271 if ((psn & IPS_PSN_MASK) != qp->r_atomic_psn) 1271 if ((psn & IPATH_PSN_MASK) != qp->r_atomic_psn)
1272 goto done; 1272 goto done;
1273 break; 1273 break;
1274 } 1274 }
@@ -1638,7 +1638,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1638 *(u64 *) qp->r_sge.sge.vaddr = sdata; 1638 *(u64 *) qp->r_sge.sge.vaddr = sdata;
1639 spin_unlock_irq(&dev->pending_lock); 1639 spin_unlock_irq(&dev->pending_lock);
1640 qp->r_msn++; 1640 qp->r_msn++;
1641 qp->r_atomic_psn = psn & IPS_PSN_MASK; 1641 qp->r_atomic_psn = psn & IPATH_PSN_MASK;
1642 psn |= 1 << 31; 1642 psn |= 1 << 31;
1643 break; 1643 break;
1644 } 1644 }