Skip to content

Commit c1909e7

Browse files
altsergpopcornmix
authored andcommitted
Revert "nvme-pci: Disable Host Memory Buffer usage"
This reverts commit 4263812.
1 parent 56f0acf commit c1909e7

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
@@ -2111,7 +2111,6 @@ static void nvme_free_host_mem(struct nvme_dev *dev)
21112111
dev->nr_host_mem_descs = 0;
21122112
}
21132113

2114-
#if 0
21152114
static int nvme_alloc_host_mem_single(struct nvme_dev *dev, u64 size)
21162115
{
21172116
dev->hmb_sgt = dma_alloc_noncontiguous(dev->dev, size,
@@ -2198,11 +2197,9 @@ static int nvme_alloc_host_mem_multi(struct nvme_dev *dev, u64 preferred,
21982197
dev->host_mem_descs = NULL;
21992198
return -ENOMEM;
22002199
}
2201-
#endif
22022200

22032201
static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
22042202
{
2205-
#if 0
22062203
unsigned long dma_merge_boundary = dma_get_merge_boundary(dev->dev);
22072204
u64 min_chunk = min_t(u64, preferred, PAGE_SIZE * MAX_ORDER_NR_PAGES);
22082205
u64 hmminds = max_t(u32, dev->ctrl.hmminds * 4096, PAGE_SIZE * 2);
@@ -2225,7 +2222,6 @@ static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
22252222
nvme_free_host_mem(dev);
22262223
}
22272224
}
2228-
#endif
22292225

22302226
return -ENOMEM;
22312227
}

0 commit comments

Comments
 (0)