diff options
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_file_ops.c | 12 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba6110.c | 10 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba6120.c | 14 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_init_chip.c | 3 |
4 files changed, 24 insertions, 15 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 */ |
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 | /** |
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6120.c b/drivers/infiniband/hw/ipath/ipath_iba6120.c index 207323a5b52b..b931057bb3e8 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba6120.c +++ b/drivers/infiniband/hw/ipath/ipath_iba6120.c | |||
@@ -1104,7 +1104,7 @@ bail: | |||
1104 | * ipath_pe_put_tid - write a TID in chip | 1104 | * ipath_pe_put_tid - write a TID in chip |
1105 | * @dd: the infinipath device | 1105 | * @dd: the infinipath device |
1106 | * @tidptr: pointer to the expected TID (in chip) to udpate | 1106 | * @tidptr: pointer to the expected TID (in chip) to udpate |
1107 | * @tidtype: 0 for eager, 1 for expected | 1107 | * @tidtype: RCVHQ_RCV_TYPE_EAGER (1) for eager, RCVHQ_RCV_TYPE_EXPECTED (0) for expected |
1108 | * @pa: physical address of in memory buffer; ipath_tidinvalid if freeing | 1108 | * @pa: physical address of in memory buffer; ipath_tidinvalid if freeing |
1109 | * | 1109 | * |
1110 | * This exists as a separate routine to allow for special locking etc. | 1110 | * This exists as a separate routine to allow for special locking etc. |
@@ -1130,7 +1130,7 @@ static void ipath_pe_put_tid(struct ipath_devdata *dd, u64 __iomem *tidptr, | |||
1130 | "BUG: Physical page address 0x%lx " | 1130 | "BUG: Physical page address 0x%lx " |
1131 | "has bits set in 31-29\n", pa); | 1131 | "has bits set in 31-29\n", pa); |
1132 | 1132 | ||
1133 | if (type == 0) | 1133 | if (type == RCVHQ_RCV_TYPE_EAGER) |
1134 | pa |= dd->ipath_tidtemplate; | 1134 | pa |= dd->ipath_tidtemplate; |
1135 | else /* for now, always full 4KB page */ | 1135 | else /* for now, always full 4KB page */ |
1136 | pa |= 2 << 29; | 1136 | pa |= 2 << 29; |
@@ -1154,7 +1154,7 @@ static void ipath_pe_put_tid(struct ipath_devdata *dd, u64 __iomem *tidptr, | |||
1154 | * ipath_pe_put_tid_2 - write a TID in chip, Revision 2 or higher | 1154 | * ipath_pe_put_tid_2 - write a TID in chip, Revision 2 or higher |
1155 | * @dd: the infinipath device | 1155 | * @dd: the infinipath device |
1156 | * @tidptr: pointer to the expected TID (in chip) to udpate | 1156 | * @tidptr: pointer to the expected TID (in chip) to udpate |
1157 | * @tidtype: 0 for eager, 1 for expected | 1157 | * @tidtype: RCVHQ_RCV_TYPE_EAGER (1) for eager, RCVHQ_RCV_TYPE_EXPECTED (0) for expected |
1158 | * @pa: physical address of in memory buffer; ipath_tidinvalid if freeing | 1158 | * @pa: physical address of in memory buffer; ipath_tidinvalid if freeing |
1159 | * | 1159 | * |
1160 | * This exists as a separate routine to allow for selection of the | 1160 | * This exists as a separate routine to allow for selection of the |
@@ -1179,7 +1179,7 @@ static void ipath_pe_put_tid_2(struct ipath_devdata *dd, u64 __iomem *tidptr, | |||
1179 | "BUG: Physical page address 0x%lx " | 1179 | "BUG: Physical page address 0x%lx " |
1180 | "has bits set in 31-29\n", pa); | 1180 | "has bits set in 31-29\n", pa); |
1181 | 1181 | ||
1182 | if (type == 0) | 1182 | if (type == RCVHQ_RCV_TYPE_EAGER) |
1183 | pa |= dd->ipath_tidtemplate; | 1183 | pa |= dd->ipath_tidtemplate; |
1184 | else /* for now, always full 4KB page */ | 1184 | else /* for now, always full 4KB page */ |
1185 | pa |= 2 << 29; | 1185 | pa |= 2 << 29; |
@@ -1218,7 +1218,8 @@ static void ipath_pe_clear_tids(struct ipath_devdata *dd, unsigned port) | |||
1218 | port * dd->ipath_rcvtidcnt * sizeof(*tidbase)); | 1218 | port * dd->ipath_rcvtidcnt * sizeof(*tidbase)); |
1219 | 1219 | ||
1220 | for (i = 0; i < dd->ipath_rcvtidcnt; i++) | 1220 | for (i = 0; i < dd->ipath_rcvtidcnt; i++) |
1221 | ipath_pe_put_tid(dd, &tidbase[i], 0, tidinv); | 1221 | ipath_pe_put_tid(dd, &tidbase[i], RCVHQ_RCV_TYPE_EXPECTED, |
1222 | tidinv); | ||
1222 | 1223 | ||
1223 | tidbase = (u64 __iomem *) | 1224 | tidbase = (u64 __iomem *) |
1224 | ((char __iomem *)(dd->ipath_kregbase) + | 1225 | ((char __iomem *)(dd->ipath_kregbase) + |
@@ -1226,7 +1227,8 @@ static void ipath_pe_clear_tids(struct ipath_devdata *dd, unsigned port) | |||
1226 | port * dd->ipath_rcvegrcnt * sizeof(*tidbase)); | 1227 | port * dd->ipath_rcvegrcnt * sizeof(*tidbase)); |
1227 | 1228 | ||
1228 | for (i = 0; i < dd->ipath_rcvegrcnt; i++) | 1229 | for (i = 0; i < dd->ipath_rcvegrcnt; i++) |
1229 | ipath_pe_put_tid(dd, &tidbase[i], 1, tidinv); | 1230 | ipath_pe_put_tid(dd, &tidbase[i], RCVHQ_RCV_TYPE_EAGER, |
1231 | tidinv); | ||
1230 | } | 1232 | } |
1231 | 1233 | ||
1232 | /** | 1234 | /** |
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index bdfda6221744..9f611553ffb3 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c | |||
@@ -133,7 +133,8 @@ static int create_port0_egr(struct ipath_devdata *dd) | |||
133 | dd->ipath_ibmaxlen, PCI_DMA_FROMDEVICE); | 133 | dd->ipath_ibmaxlen, PCI_DMA_FROMDEVICE); |
134 | dd->ipath_f_put_tid(dd, e + (u64 __iomem *) | 134 | dd->ipath_f_put_tid(dd, e + (u64 __iomem *) |
135 | ((char __iomem *) dd->ipath_kregbase + | 135 | ((char __iomem *) dd->ipath_kregbase + |
136 | dd->ipath_rcvegrbase), 0, | 136 | dd->ipath_rcvegrbase), |
137 | RCVHQ_RCV_TYPE_EAGER, | ||
137 | dd->ipath_port0_skbinfo[e].phys); | 138 | dd->ipath_port0_skbinfo[e].phys); |
138 | } | 139 | } |
139 | 140 | ||