summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_cmd.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_cmd.c
parente3aa31c517cb6fd0a3d8b23e6a7e71a6aafc2393 (diff)
downloadtalos-obmc-linux-fd9cfdd11be3b37b5c919b64b43990f14a1587bd.tar.gz
talos-obmc-linux-fd9cfdd11be3b37b5c919b64b43990f14a1587bd.zip
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_cmd.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c
index 69128fe60c53..f9b9b93dc501 100644
--- a/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -199,7 +199,7 @@ static int mthca_cmd_post(struct mthca_dev *dev,
{
int err = 0;
- down(&dev->cmd.hcr_sem);
+ mutex_lock(&dev->cmd.hcr_mutex);
if (event) {
unsigned long end = jiffies + GO_BIT_TIMEOUT;
@@ -237,7 +237,7 @@ static int mthca_cmd_post(struct mthca_dev *dev,
op), dev->hcr + 6 * 4);
out:
- up(&dev->cmd.hcr_sem);
+ mutex_unlock(&dev->cmd.hcr_mutex);
return err;
}
@@ -435,7 +435,7 @@ static int mthca_cmd_imm(struct mthca_dev *dev,
int mthca_cmd_init(struct mthca_dev *dev)
{
- sema_init(&dev->cmd.hcr_sem, 1);
+ mutex_init(&dev->cmd.hcr_mutex);
sema_init(&dev->cmd.poll_sem, 1);
dev->cmd.use_events = 0;
OpenPOWER on IntegriCloud