aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_iba6110.c
diff options
context:
space:
mode:
authorJoan Eslinger <joan.eslinger@qlogic.com>2007-06-18 17:24:39 -0400
committerRoland Dreier <rolandd@cisco.com>2007-07-09 23:12:26 -0400
commitf716cdfe57f217966f41a7add190d6f5b9fd0769 (patch)
treefbcbdbddbbcea403d52ee641d2a63b74ce1e9f2f /drivers/infiniband/hw/ipath/ipath_iba6110.c
parent1dd6a1be1416be48cafda9e63a614f26f0428d10 (diff)
IB/ipath: Change use of constants for TID type to defined values
Define pkt rcvd 'type' in a way consistent with HW spec and chips. The hardware considers received packets of type 0 to be expected, and type 1 to be eager. The driver was calling the ipath_f_put_tid functions using a variable called 'type' set to 0 for eager and to 1 for expected packets. Worse, the iba6110 and iba6120 drivers used those values inconsistently. This was quite confusing. Now everything is consistent with the hardware. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_iba6110.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_iba6110.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6110.c b/drivers/infiniband/hw/ipath/ipath_iba6110.c
index 04799852ec7e..d8ac9f18bf49 100644
--- a/drivers/infiniband/hw/ipath/ipath_iba6110.c
+++ b/drivers/infiniband/hw/ipath/ipath_iba6110.c
@@ -1408,7 +1408,7 @@ static void ipath_ht_quiet_serdes(struct ipath_devdata *dd)
1408 * ipath_pe_put_tid - write a TID in chip 1408 * ipath_pe_put_tid - write a TID in chip
1409 * @dd: the infinipath device 1409 * @dd: the infinipath device
1410 * @tidptr: pointer to the expected TID (in chip) to udpate 1410 * @tidptr: pointer to the expected TID (in chip) to udpate
1411 * @tidtype: 0 for eager, 1 for expected 1411 * @tidtype: RCVHQ_RCV_TYPE_EAGER (1) for eager, RCVHQ_RCV_TYPE_EXPECTED (0) for expected
1412 * @pa: physical address of in memory buffer; ipath_tidinvalid if freeing 1412 * @pa: physical address of in memory buffer; ipath_tidinvalid if freeing
1413 * 1413 *
1414 * This exists as a separate routine to allow for special locking etc. 1414 * This exists as a separate routine to allow for special locking etc.
@@ -1429,7 +1429,7 @@ static void ipath_ht_put_tid(struct ipath_devdata *dd,
1429 "40 bits, using only 40!!!\n", pa); 1429 "40 bits, using only 40!!!\n", pa);
1430 pa &= INFINIPATH_RT_ADDR_MASK; 1430 pa &= INFINIPATH_RT_ADDR_MASK;
1431 } 1431 }
1432 if (type == 0) 1432 if (type == RCVHQ_RCV_TYPE_EAGER)
1433 pa |= dd->ipath_tidtemplate; 1433 pa |= dd->ipath_tidtemplate;
1434 else { 1434 else {
1435 /* in words (fixed, full page). */ 1435 /* in words (fixed, full page). */
@@ -1469,7 +1469,8 @@ static void ipath_ht_clear_tids(struct ipath_devdata *dd, unsigned port)
1469 port * dd->ipath_rcvtidcnt * 1469 port * dd->ipath_rcvtidcnt *
1470 sizeof(*tidbase)); 1470 sizeof(*tidbase));
1471 for (i = 0; i < dd->ipath_rcvtidcnt; i++) 1471 for (i = 0; i < dd->ipath_rcvtidcnt; i++)
1472 ipath_ht_put_tid(dd, &tidbase[i], 1, dd->ipath_tidinvalid); 1472 ipath_ht_put_tid(dd, &tidbase[i], RCVHQ_RCV_TYPE_EXPECTED,
1473 dd->ipath_tidinvalid);
1473 1474
1474 tidbase = (u64 __iomem *) ((char __iomem *)(dd->ipath_kregbase) + 1475 tidbase = (u64 __iomem *) ((char __iomem *)(dd->ipath_kregbase) +
1475 dd->ipath_rcvegrbase + 1476 dd->ipath_rcvegrbase +
@@ -1477,7 +1478,8 @@ static void ipath_ht_clear_tids(struct ipath_devdata *dd, unsigned port)
1477 sizeof(*tidbase)); 1478 sizeof(*tidbase));
1478 1479
1479 for (i = 0; i < dd->ipath_rcvegrcnt; i++) 1480 for (i = 0; i < dd->ipath_rcvegrcnt; i++)
1480 ipath_ht_put_tid(dd, &tidbase[i], 0, dd->ipath_tidinvalid); 1481 ipath_ht_put_tid(dd, &tidbase[i], RCVHQ_RCV_TYPE_EAGER,
1482 dd->ipath_tidinvalid);
1481} 1483}
1482 1484
1483/** 1485/**