Skip to content

Commit 89ae16f

Browse files
altsergpelwell
authored andcommitted
Revert "nvme-pci: Disable Host Memory Buffer usage"
This reverts commit 4263812.
1 parent 0ff7f57 commit 89ae16f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/nvme/host/pci.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,7 +2081,6 @@ static void nvme_free_host_mem(struct nvme_dev *dev)
20812081
dev->nr_host_mem_descs = 0;
20822082
}
20832083

2084-
#if 0
20852084
static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
20862085
u32 chunk_size)
20872086
{
@@ -2150,11 +2149,9 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
21502149
dev->host_mem_descs = NULL;
21512150
return -ENOMEM;
21522151
}
2153-
#endif
21542152

21552153
static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
21562154
{
2157-
#if 0
21582155
u64 min_chunk = min_t(u64, preferred, PAGE_SIZE * MAX_ORDER_NR_PAGES);
21592156
u64 hmminds = max_t(u32, dev->ctrl.hmminds * 4096, PAGE_SIZE * 2);
21602157
u64 chunk_size;
@@ -2167,7 +2164,6 @@ static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
21672164
nvme_free_host_mem(dev);
21682165
}
21692166
}
2170-
#endif
21712167

21722168
return -ENOMEM;
21732169
}

0 commit comments

Comments
 (0)