aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2007-10-03 15:47:00 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-10 00:03:02 -0400
commit3ac8c70f74ca67111c570f4ba828cc4b6fc229f4 (patch)
treed8e99d579fc2c7cead30215c68d5c006badc7abd /drivers/infiniband
parentbda94e32b39c0e60d43b34a175363601b6f12ca4 (diff)
IB/ipath: Minor fix to ordering of freeing and zeroing of tid pages.
Fixed to be the same as everywhere else. copy and then zero the page * in the array first, and then pass the copy to the VM routines. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index 016e7c4e366b..5de3243a47c3 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -538,6 +538,9 @@ static int ipath_tid_free(struct ipath_portdata *pd, unsigned subport,
538 continue; 538 continue;
539 cnt++; 539 cnt++;
540 if (dd->ipath_pageshadow[porttid + tid]) { 540 if (dd->ipath_pageshadow[porttid + tid]) {
541 struct page *p;
542 p = dd->ipath_pageshadow[porttid + tid];
543 dd->ipath_pageshadow[porttid + tid] = NULL;
541 ipath_cdbg(VERBOSE, "PID %u freeing TID %u\n", 544 ipath_cdbg(VERBOSE, "PID %u freeing TID %u\n",
542 pd->port_pid, tid); 545 pd->port_pid, tid);
543 dd->ipath_f_put_tid(dd, &tidbase[tid], 546 dd->ipath_f_put_tid(dd, &tidbase[tid],
@@ -546,9 +549,7 @@ static int ipath_tid_free(struct ipath_portdata *pd, unsigned subport,
546 pci_unmap_page(dd->pcidev, 549 pci_unmap_page(dd->pcidev,
547 dd->ipath_physshadow[porttid + tid], 550 dd->ipath_physshadow[porttid + tid],
548 PAGE_SIZE, PCI_DMA_FROMDEVICE); 551 PAGE_SIZE, PCI_DMA_FROMDEVICE);
549 ipath_release_user_pages( 552 ipath_release_user_pages(&p, 1);
550 &dd->ipath_pageshadow[porttid + tid], 1);
551 dd->ipath_pageshadow[porttid + tid] = NULL;
552 ipath_stats.sps_pageunlocks++; 553 ipath_stats.sps_pageunlocks++;
553 } else 554 } else
554 ipath_dbg("Unused tid %u, ignoring\n", tid); 555 ipath_dbg("Unused tid %u, ignoring\n", tid);