Skip to content

Commit 1cda382

Browse files
altsergxiaoleiwang123456
authored andcommitted
Revert "nvme-pci: Disable Host Memory Buffer usage"
commit 89ae16f28908fb26fa3f03a6d7d21457be2ebb35 from https://github.com/raspberrypi/linux.git rpi-6.12.y This reverts commit 4263812f0e010a193c6654f75eda49220066bd57. Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
1 parent a5612b2 commit 1cda382

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
@@ -2106,7 +2106,6 @@ static void nvme_free_host_mem(struct nvme_dev *dev)
21062106
dev->nr_host_mem_descs = 0;
21072107
}
21082108

2109-
#if 0
21102109
static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
21112110
u32 chunk_size)
21122111
{
@@ -2175,11 +2174,9 @@ static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
21752174
dev->host_mem_descs = NULL;
21762175
return -ENOMEM;
21772176
}
2178-
#endif
21792177

21802178
static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
21812179
{
2182-
#if 0
21832180
u64 min_chunk = min_t(u64, preferred, PAGE_SIZE * MAX_ORDER_NR_PAGES);
21842181
u64 hmminds = max_t(u32, dev->ctrl.hmminds * 4096, PAGE_SIZE * 2);
21852182
u64 chunk_size;
@@ -2192,7 +2189,6 @@ static int nvme_alloc_host_mem(struct nvme_dev *dev, u64 min, u64 preferred)
21922189
nvme_free_host_mem(dev);
21932190
}
21942191
}
2195-
#endif
21962192

21972193
return -ENOMEM;
21982194
}

0 commit comments

Comments
 (0)