aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mthca/mthca_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/mthca/mthca_cmd.c')
-rw-r--r--sys/dev/mthca/mthca_cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/mthca/mthca_cmd.c b/sys/dev/mthca/mthca_cmd.c
index adb76bc9edbd..b4c0dc2f6f1d 100644
--- a/sys/dev/mthca/mthca_cmd.c
+++ b/sys/dev/mthca/mthca_cmd.c
@@ -852,9 +852,11 @@ int mthca_QUERY_FW(struct mthca_dev *dev)
* Round up number of system pages needed in case
* MTHCA_ICM_PAGE_SIZE < PAGE_SIZE.
*/
+#if MTHCA_ICM_PAGE_SIZE < PAGE_SIZE
dev->fw.arbel.fw_pages =
ALIGN(dev->fw.arbel.fw_pages, PAGE_SIZE / MTHCA_ICM_PAGE_SIZE) >>
(PAGE_SHIFT - MTHCA_ICM_PAGE_SHIFT);
+#endif
mthca_dbg(dev, "Clear int @ %llx, EQ arm @ %llx, EQ set CI @ %llx\n",
(unsigned long long) dev->fw.arbel.clr_int_base,
@@ -1588,8 +1590,10 @@ int mthca_SET_ICM_SIZE(struct mthca_dev *dev, u64 icm_size, u64 *aux_pages)
* Round up number of system pages needed in case
* MTHCA_ICM_PAGE_SIZE < PAGE_SIZE.
*/
+#if MTHCA_ICM_PAGE_SIZE < PAGE_SIZE
*aux_pages = ALIGN(*aux_pages, PAGE_SIZE / MTHCA_ICM_PAGE_SIZE) >>
(PAGE_SHIFT - MTHCA_ICM_PAGE_SHIFT);
+#endif
return 0;
}