Skip to content

Commit a8f8ec3

Browse files
altsergpopcornmix
authored andcommitted
Revert "nvme-pci: Disable Host Memory Buffer usage"
This reverts commit 4263812.
1 parent 13e0988 commit a8f8ec3

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/nvme/host/pci.c

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

2096-
#if 0
20972096
static int nvme_alloc_host_mem_single(struct nvme_dev *dev, u64 size)
20982097
{
20992098
dev->hmb_sgt = dma_alloc_noncontiguous(dev->dev, size,
@@ -2180,11 +2179,9 @@ static int nvme_alloc_host_mem_multi(struct nvme_dev *dev, u64 preferred,
21802179
dev->host_mem_descs = NULL;
21812180
return -ENOMEM;
21822181
}
2183-
#endif
21842182

21852183
static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
21862184
{
2187-
#if 0
21882185
unsigned long dma_merge_boundary = dma_get_merge_boundary(dev->dev);
21892186
u64 min_chunk = min_t(u64, preferred, PAGE_SIZE * MAX_ORDER_NR_PAGES);
21902187
u64 hmminds = max_t(u32, dev->ctrl.hmminds * 4096, PAGE_SIZE * 2);
@@ -2207,7 +2204,6 @@ static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
22072204
nvme_free_host_mem(dev);
22082205
}
22092206
}
2210-
#endif
22112207

22122208
return -ENOMEM;
22132209
}

0 commit comments

Comments
 (0)