|
@@ -1680,7 +1680,7 @@ static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
|
|
u32 chunk_size;
|
|
u32 chunk_size;
|
|
|
|
|
|
/* start big and work our way down */
|
|
/* start big and work our way down */
|
|
- for (chunk_size = min_t(u64, preferred, PAGE_SIZE << MAX_ORDER);
|
|
|
|
|
|
+ for (chunk_size = min_t(u64, preferred, PAGE_SIZE * MAX_ORDER_NR_PAGES);
|
|
chunk_size >= PAGE_SIZE * 2;
|
|
chunk_size >= PAGE_SIZE * 2;
|
|
chunk_size /= 2) {
|
|
chunk_size /= 2) {
|
|
if (!__nvme_alloc_host_mem(dev, preferred, chunk_size)) {
|
|
if (!__nvme_alloc_host_mem(dev, preferred, chunk_size)) {
|