aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_cmd.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-01-30 19:45:11 -0500
committerRoland Dreier <rolandd@cisco.com>2006-01-30 19:45:11 -0500
commitfd9cfdd11be3b37b5c919b64b43990f14a1587bd (patch)
tree6d36c5927fcf17c98bfc38dccbde90925279c544 /drivers/infiniband/hw/mthca/mthca_cmd.c
parente3aa31c517cb6fd0a3d8b23e6a7e71a6aafc2393 (diff)
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,
199{ 199{
200 int err = 0; 200 int err = 0;
201 201
202 down(&dev->cmd.hcr_sem); 202 mutex_lock(&dev->cmd.hcr_mutex);
203 203
204 if (event) { 204 if (event) {
205 unsigned long end = jiffies + GO_BIT_TIMEOUT; 205 unsigned long end = jiffies + GO_BIT_TIMEOUT;
@@ -237,7 +237,7 @@ static int mthca_cmd_post(struct mthca_dev *dev,
237 op), dev->hcr + 6 * 4); 237 op), dev->hcr + 6 * 4);
238 238
239out: 239out:
240 up(&dev->cmd.hcr_sem); 240 mutex_unlock(&dev->cmd.hcr_mutex);
241 return err; 241 return err;
242} 242}
243 243
@@ -435,7 +435,7 @@ static int mthca_cmd_imm(struct mthca_dev *dev,
435 435
436int mthca_cmd_init(struct mthca_dev *dev) 436int mthca_cmd_init(struct mthca_dev *dev)
437{ 437{
438 sema_init(&dev->cmd.hcr_sem, 1); 438 mutex_init(&dev->cmd.hcr_mutex);
439 sema_init(&dev->cmd.poll_sem, 1); 439 sema_init(&dev->cmd.poll_sem, 1);
440 dev->cmd.use_events = 0; 440 dev->cmd.use_events = 0;
441 441