Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19308
b: refs/heads/master
c: e3aa31c
h: refs/heads/master
v: v3
  • Loading branch information
Michael S. Tsirkin authored and Roland Dreier committed Jan 31, 2006
1 parent 397a9cb commit 7c4cd42
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 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: 8e9e5f4f5eb1d44ddabfd1ddea4ca4e4244a9ffb
refs/heads/master: e3aa31c517cb6fd0a3d8b23e6a7e71a6aafc2393
9 changes: 3 additions & 6 deletions trunk/drivers/infiniband/hw/mthca/mthca_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ static int mthca_cmd_post(struct mthca_dev *dev,
{
int err = 0;

if (down_interruptible(&dev->cmd.hcr_sem))
return -EINTR;
down(&dev->cmd.hcr_sem);

if (event) {
unsigned long end = jiffies + GO_BIT_TIMEOUT;
Expand Down Expand Up @@ -255,8 +254,7 @@ static int mthca_cmd_poll(struct mthca_dev *dev,
int err = 0;
unsigned long end;

if (down_interruptible(&dev->cmd.poll_sem))
return -EINTR;
down(&dev->cmd.poll_sem);

err = mthca_cmd_post(dev, in_param,
out_param ? *out_param : 0,
Expand Down Expand Up @@ -333,8 +331,7 @@ static int mthca_cmd_wait(struct mthca_dev *dev,
int err = 0;
struct mthca_cmd_context *context;

if (down_interruptible(&dev->cmd.event_sem))
return -EINTR;
down(&dev->cmd.event_sem);

spin_lock(&dev->cmd.context_lock);
BUG_ON(dev->cmd.free_head < 0);
Expand Down
14 changes: 4 additions & 10 deletions trunk/drivers/infiniband/hw/mthca/mthca_mcg.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,7 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
return PTR_ERR(mailbox);
mgm = mailbox->buf;

if (down_interruptible(&dev->mcg_table.sem)) {
err = -EINTR;
goto err_sem;
}
down(&dev->mcg_table.sem);

err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index);
if (err)
Expand Down Expand Up @@ -242,7 +239,7 @@ int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
mthca_free(&dev->mcg_table.alloc, index);
}
up(&dev->mcg_table.sem);
err_sem:

mthca_free_mailbox(dev, mailbox);
return err;
}
Expand All @@ -263,10 +260,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
return PTR_ERR(mailbox);
mgm = mailbox->buf;

if (down_interruptible(&dev->mcg_table.sem)) {
err = -EINTR;
goto err_sem;
}
down(&dev->mcg_table.sem);

err = find_mgm(dev, gid->raw, mailbox, &hash, &prev, &index);
if (err)
Expand Down Expand Up @@ -372,7 +366,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)

out:
up(&dev->mcg_table.sem);
err_sem:

mthca_free_mailbox(dev, mailbox);
return err;
}
Expand Down

0 comments on commit 7c4cd42

Please sign in to comment.