projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mlx4_core: Support creation of FMRs with pages smaller than 4K
[cascardo/linux.git]
/
drivers
/
net
/
mlx4
/
mr.c
diff --git
a/drivers/net/mlx4/mr.c
b/drivers/net/mlx4/mr.c
index
cb46446
..
03a9abc
100644
(file)
--- a/
drivers/net/mlx4/mr.c
+++ b/
drivers/net/mlx4/mr.c
@@
-551,7
+551,7
@@
int mlx4_fmr_alloc(struct mlx4_dev *dev, u32 pd, u32 access, int max_pages,
u64 mtt_seg;
int err = -ENOMEM;
- if (page_shift <
12
|| page_shift >= 32)
+ if (page_shift <
(ffs(dev->caps.page_size_cap) - 1)
|| page_shift >= 32)
return -EINVAL;
/* All MTTs must fit in the same page */