aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cq.c4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mr.c6
-rw-r--r--drivers/infiniband/hw/mthca/mthca_pd.c3
3 files changed, 0 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c
index 16a851b341f..78d9cc119f3 100644
--- a/drivers/infiniband/hw/mthca/mthca_cq.c
+++ b/drivers/infiniband/hw/mthca/mthca_cq.c
@@ -696,8 +696,6 @@ int mthca_init_cq(struct mthca_dev *dev, int nent,
696 u8 status; 696 u8 status;
697 int i; 697 int i;
698 698
699 might_sleep();
700
701 cq->ibcq.cqe = nent - 1; 699 cq->ibcq.cqe = nent - 1;
702 cq->is_kernel = !ctx; 700 cq->is_kernel = !ctx;
703 701
@@ -827,8 +825,6 @@ void mthca_free_cq(struct mthca_dev *dev,
827 int err; 825 int err;
828 u8 status; 826 u8 status;
829 827
830 might_sleep();
831
832 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL); 828 mailbox = mthca_alloc_mailbox(dev, GFP_KERNEL);
833 if (IS_ERR(mailbox)) { 829 if (IS_ERR(mailbox)) {
834 mthca_warn(dev, "No memory for mailbox to free CQ.\n"); 830 mthca_warn(dev, "No memory for mailbox to free CQ.\n");
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
index e995e2aa016..551320fdc9c 100644
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -340,8 +340,6 @@ int mthca_mr_alloc(struct mthca_dev *dev, u32 pd, int buffer_size_shift,
340 int err; 340 int err;
341 u8 status; 341 u8 status;
342 342
343 might_sleep();
344
345 WARN_ON(buffer_size_shift >= 32); 343 WARN_ON(buffer_size_shift >= 32);
346 344
347 key = mthca_alloc(&dev->mr_table.mpt_alloc); 345 key = mthca_alloc(&dev->mr_table.mpt_alloc);
@@ -467,8 +465,6 @@ void mthca_free_mr(struct mthca_dev *dev, struct mthca_mr *mr)
467 int err; 465 int err;
468 u8 status; 466 u8 status;
469 467
470 might_sleep();
471
472 err = mthca_HW2SW_MPT(dev, NULL, 468 err = mthca_HW2SW_MPT(dev, NULL,
473 key_to_hw_index(dev, mr->ibmr.lkey) & 469 key_to_hw_index(dev, mr->ibmr.lkey) &
474 (dev->limits.num_mpts - 1), 470 (dev->limits.num_mpts - 1),
@@ -495,8 +491,6 @@ int mthca_fmr_alloc(struct mthca_dev *dev, u32 pd,
495 int err = -ENOMEM; 491 int err = -ENOMEM;
496 int i; 492 int i;
497 493
498 might_sleep();
499
500 if (mr->attr.page_size < 12 || mr->attr.page_size >= 32) 494 if (mr->attr.page_size < 12 || mr->attr.page_size >= 32)
501 return -EINVAL; 495 return -EINVAL;
502 496
diff --git a/drivers/infiniband/hw/mthca/mthca_pd.c b/drivers/infiniband/hw/mthca/mthca_pd.c
index 3dbf06a6e6f..105fc5faadd 100644
--- a/drivers/infiniband/hw/mthca/mthca_pd.c
+++ b/drivers/infiniband/hw/mthca/mthca_pd.c
@@ -43,8 +43,6 @@ int mthca_pd_alloc(struct mthca_dev *dev, int privileged, struct mthca_pd *pd)
43{ 43{
44 int err = 0; 44 int err = 0;
45 45
46 might_sleep();
47
48 pd->privileged = privileged; 46 pd->privileged = privileged;
49 47
50 atomic_set(&pd->sqp_count, 0); 48 atomic_set(&pd->sqp_count, 0);
@@ -66,7 +64,6 @@ int mthca_pd_alloc(struct mthca_dev *dev, int privileged, struct mthca_pd *pd)
66 64
67void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd) 65void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd)
68{ 66{
69 might_sleep();
70 if (pd->privileged) 67 if (pd->privileged)
71 mthca_free_mr(dev, &pd->ntmr); 68 mthca_free_mr(dev, &pd->ntmr);
72 mthca_free(&dev->pd_table.alloc, pd->pd_num); 69 mthca_free(&dev->pd_table.alloc, pd->pd_num);