aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_file_ops.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_file_ops.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_file_ops.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index 1272aaf2a785..931802b55cc5 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -396,7 +396,8 @@ static int ipath_tid_update(struct ipath_portdata *pd, struct file *fp,
396 "TID %u, vaddr %lx, physaddr %llx pgp %p\n", 396 "TID %u, vaddr %lx, physaddr %llx pgp %p\n",
397 tid, vaddr, (unsigned long long) physaddr, 397 tid, vaddr, (unsigned long long) physaddr,
398 pagep[i]); 398 pagep[i]);
399 dd->ipath_f_put_tid(dd, &tidbase[tid], 1, physaddr); 399 dd->ipath_f_put_tid(dd, &tidbase[tid], RCVHQ_RCV_TYPE_EXPECTED,
400 physaddr);
400 /* 401 /*
401 * don't check this tid in ipath_portshadow, since we 402 * don't check this tid in ipath_portshadow, since we
402 * just filled it in; start with the next one. 403 * just filled it in; start with the next one.
@@ -422,7 +423,8 @@ static int ipath_tid_update(struct ipath_portdata *pd, struct file *fp,
422 if (dd->ipath_pageshadow[porttid + tid]) { 423 if (dd->ipath_pageshadow[porttid + tid]) {
423 ipath_cdbg(VERBOSE, "Freeing TID %u\n", 424 ipath_cdbg(VERBOSE, "Freeing TID %u\n",
424 tid); 425 tid);
425 dd->ipath_f_put_tid(dd, &tidbase[tid], 1, 426 dd->ipath_f_put_tid(dd, &tidbase[tid],
427 RCVHQ_RCV_TYPE_EXPECTED,
426 dd->ipath_tidinvalid); 428 dd->ipath_tidinvalid);
427 pci_unmap_page(dd->pcidev, 429 pci_unmap_page(dd->pcidev,
428 dd->ipath_physshadow[porttid + tid], 430 dd->ipath_physshadow[porttid + tid],
@@ -538,7 +540,8 @@ static int ipath_tid_free(struct ipath_portdata *pd, unsigned subport,
538 if (dd->ipath_pageshadow[porttid + tid]) { 540 if (dd->ipath_pageshadow[porttid + tid]) {
539 ipath_cdbg(VERBOSE, "PID %u freeing TID %u\n", 541 ipath_cdbg(VERBOSE, "PID %u freeing TID %u\n",
540 pd->port_pid, tid); 542 pd->port_pid, tid);
541 dd->ipath_f_put_tid(dd, &tidbase[tid], 1, 543 dd->ipath_f_put_tid(dd, &tidbase[tid],
544 RCVHQ_RCV_TYPE_EXPECTED,
542 dd->ipath_tidinvalid); 545 dd->ipath_tidinvalid);
543 pci_unmap_page(dd->pcidev, 546 pci_unmap_page(dd->pcidev,
544 dd->ipath_physshadow[porttid + tid], 547 dd->ipath_physshadow[porttid + tid],
@@ -921,7 +924,8 @@ static int ipath_create_user_egr(struct ipath_portdata *pd)
921 (u64 __iomem *) 924 (u64 __iomem *)
922 ((char __iomem *) 925 ((char __iomem *)
923 dd->ipath_kregbase + 926 dd->ipath_kregbase +
924 dd->ipath_rcvegrbase), 0, pa); 927 dd->ipath_rcvegrbase),
928 RCVHQ_RCV_TYPE_EAGER, pa);
925 pa += egrsize; 929 pa += egrsize;
926 } 930 }
927 cond_resched(); /* don't hog the cpu */ 931 cond_resched(); /* don't hog the cpu */