summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_mcg.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-01-30 16:45:11 -0800
committerRoland Dreier <rolandd@cisco.com>2006-01-30 16:45:11 -0800
commitfd9cfdd11be3b37b5c919b64b43990f14a1587bd (patch)
tree6d36c5927fcf17c98bfc38dccbde90925279c544 /drivers/infiniband/hw/mthca/mthca_mcg.c
parente3aa31c517cb6fd0a3d8b23e6a7e71a6aafc2393 (diff)
downloadop-kernel-dev-fd9cfdd11be3b37b5c919b64b43990f14a1587bd.zip
op-kernel-dev-fd9cfdd11be3b37b5c919b64b43990f14a1587bd.tar.gz
IB/mthca: Semaphore to mutex conversions
Convert semaphores to mutexes in mthca. Leave firmware command interface poll_sem and event_sem as semaphores. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_mcg.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mcg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c
index 55ff5e5..321f11e 100644
--- a/drivers/infiniband/hw/mthca/mthca_mcg.c
+++ b/drivers/infiniband/hw/mthca/mthca_mcg.c
@@ -154,7 +154,7 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
return PTR_ERR(mailbox);
mgm = mailbox->buf;
- down(&dev->mcg_table.sem);
+ mutex_lock(&dev->mcg_table.mutex);
err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index);
if (err)
@@ -238,7 +238,7 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
BUG_ON(index < dev->limits.num_mgms);
mthca_free(&dev->mcg_table.alloc, index);
}
- up(&dev->mcg_table.sem);
+ mutex_unlock(&dev->mcg_table.mutex);
mthca_free_mailbox(dev, mailbox);
return err;
@@ -260,7 +260,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
return PTR_ERR(mailbox);
mgm = mailbox->buf;
- down(&dev->mcg_table.sem);
+ mutex_lock(&dev->mcg_table.mutex);
err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index);
if (err)
@@ -365,7 +365,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
}
out:
- up(&dev->mcg_table.sem);
+ mutex_unlock(&dev->mcg_table.mutex);
mthca_free_mailbox(dev, mailbox);
return err;
@@ -383,7 +383,7 @@ int __devinit mthca_init_mcg_table(struct mthca_dev *dev)
if (err)
return err;
- init_MUTEX(&dev->mcg_table.sem);
+ mutex_init(&dev->mcg_table.mutex);
return 0;
}
OpenPOWER on IntegriCloud