Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154055
b: refs/heads/master
c: e727f5c
h: refs/heads/master
i:
  154053: bc74064
  154051: 5fb88f7
  154047: 8b2685f
v: v3
  • Loading branch information
Roland Dreier committed Jun 23, 2009
1 parent 5c21b5c commit 9442858
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 716abb1fdf3274ac81dc404f3659cc05d8cdf606
refs/heads/master: e727f5cde90d5a8b92a1ffa49c636a3790301469
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/core/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ static struct notifier_block nb = {
.notifier_call = netevent_callback
};

static int __init addr_init(void)
static int addr_init(void)
{
addr_wq = create_singlethread_workqueue("ib_addr");
if (!addr_wq)
Expand All @@ -524,7 +524,7 @@ static int __init addr_init(void)
return 0;
}

static void __exit addr_cleanup(void)
static void addr_cleanup(void)
{
unregister_netevent_notifier(&nb);
destroy_workqueue(addr_wq);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,7 @@ static void cma_remove_one(struct ib_device *device)
kfree(cma_dev);
}

static int __init cma_init(void)
static int cma_init(void)
{
int ret, low, high, remaining;

Expand Down Expand Up @@ -2990,7 +2990,7 @@ static int __init cma_init(void)
return ret;
}

static void __exit cma_cleanup(void)
static void cma_cleanup(void)
{
ib_unregister_client(&cma_client);
unregister_netdevice_notifier(&cma_nb);
Expand Down
14 changes: 10 additions & 4 deletions trunk/drivers/net/mlx4/mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,14 @@ static int mlx4_write_mtt_chunk(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
if (!mtts)
return -ENOMEM;

dma_sync_single_for_cpu(&dev->pdev->dev, dma_handle,
npages * sizeof (u64), DMA_TO_DEVICE);

for (i = 0; i < npages; ++i)
mtts[i] = cpu_to_be64(page_list[i] | MLX4_MTT_FLAG_PRESENT);

dma_sync_single_for_cpu(&dev->pdev->dev, dma_handle,
npages * sizeof (u64), DMA_TO_DEVICE);
dma_sync_single_for_device(&dev->pdev->dev, dma_handle,
npages * sizeof (u64), DMA_TO_DEVICE);

return 0;
}
Expand Down Expand Up @@ -547,11 +550,14 @@ int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr, u64 *page_list
/* Make sure MPT status is visible before writing MTT entries */
wmb();

dma_sync_single_for_cpu(&dev->pdev->dev, fmr->dma_handle,
npages * sizeof(u64), DMA_TO_DEVICE);

for (i = 0; i < npages; ++i)
fmr->mtts[i] = cpu_to_be64(page_list[i] | MLX4_MTT_FLAG_PRESENT);

dma_sync_single_for_cpu(&dev->pdev->dev, fmr->dma_handle,
npages * sizeof(u64), DMA_TO_DEVICE);
dma_sync_single_for_device(&dev->pdev->dev, fmr->dma_handle,
npages * sizeof(u64), DMA_TO_DEVICE);

fmr->mpt->key = cpu_to_be32(key);
fmr->mpt->lkey = cpu_to_be32(key);
Expand Down

0 comments on commit 9442858

Please sign in to comment.