diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_cmd.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_cmd.c b/drivers/infiniband/hw/mthca/mthca_cmd.c index cc758a2d2bc6..f6a8ac026557 100644 --- a/drivers/infiniband/hw/mthca/mthca_cmd.c +++ b/drivers/infiniband/hw/mthca/mthca_cmd.c | |||
@@ -605,7 +605,7 @@ static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm, | |||
605 | err = -EINVAL; | 605 | err = -EINVAL; |
606 | goto out; | 606 | goto out; |
607 | } | 607 | } |
608 | for (i = 0; i < mthca_icm_size(&iter) / (1 << lg); ++i, ++nent) { | 608 | for (i = 0; i < mthca_icm_size(&iter) / (1 << lg); ++i) { |
609 | if (virt != -1) { | 609 | if (virt != -1) { |
610 | pages[nent * 2] = cpu_to_be64(virt); | 610 | pages[nent * 2] = cpu_to_be64(virt); |
611 | virt += 1 << lg; | 611 | virt += 1 << lg; |
@@ -616,7 +616,7 @@ static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm, | |||
616 | ts += 1 << (lg - 10); | 616 | ts += 1 << (lg - 10); |
617 | ++tc; | 617 | ++tc; |
618 | 618 | ||
619 | if (nent == MTHCA_MAILBOX_SIZE / 16) { | 619 | if (++nent == MTHCA_MAILBOX_SIZE / 16) { |
620 | err = mthca_cmd(dev, mailbox->dma, nent, 0, op, | 620 | err = mthca_cmd(dev, mailbox->dma, nent, 0, op, |
621 | CMD_TIME_CLASS_B, status); | 621 | CMD_TIME_CLASS_B, status); |
622 | if (err || *status) | 622 | if (err || *status) |