diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c index ee561c569d5f..aa6c70a6a36f 100644 --- a/drivers/infiniband/hw/mthca/mthca_mr.c +++ b/drivers/infiniband/hw/mthca/mthca_mr.c | |||
@@ -297,7 +297,8 @@ out: | |||
297 | 297 | ||
298 | int mthca_write_mtt_size(struct mthca_dev *dev) | 298 | int mthca_write_mtt_size(struct mthca_dev *dev) |
299 | { | 299 | { |
300 | if (dev->mr_table.fmr_mtt_buddy != &dev->mr_table.mtt_buddy) | 300 | if (dev->mr_table.fmr_mtt_buddy != &dev->mr_table.mtt_buddy || |
301 | !(dev->mthca_flags & MTHCA_FLAG_FMR)) | ||
301 | /* | 302 | /* |
302 | * Be friendly to WRITE_MTT command | 303 | * Be friendly to WRITE_MTT command |
303 | * and leave two empty slots for the | 304 | * and leave two empty slots for the |
@@ -355,7 +356,8 @@ int mthca_write_mtt(struct mthca_dev *dev, struct mthca_mtt *mtt, | |||
355 | int size = mthca_write_mtt_size(dev); | 356 | int size = mthca_write_mtt_size(dev); |
356 | int chunk; | 357 | int chunk; |
357 | 358 | ||
358 | if (dev->mr_table.fmr_mtt_buddy != &dev->mr_table.mtt_buddy) | 359 | if (dev->mr_table.fmr_mtt_buddy != &dev->mr_table.mtt_buddy || |
360 | !(dev->mthca_flags & MTHCA_FLAG_FMR)) | ||
359 | return __mthca_write_mtt(dev, mtt, start_index, buffer_list, list_len); | 361 | return __mthca_write_mtt(dev, mtt, start_index, buffer_list, list_len); |
360 | 362 | ||
361 | while (list_len > 0) { | 363 | while (list_len > 0) { |