mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
Merge tag 'u-boot-nvme-fixes-20260521' of https://source.denx.de/u-boot/custodians/u-boot-ufs
- Add myself as Maintainer of NVMe - fix command ID wraparound handling - apple: Check memalign return value - Staticize and constify driver ops - Fix PRP list pointer arithmetic for chained transfers
This commit is contained in:
@@ -1506,6 +1506,7 @@ T: git https://source.denx.de/u-boot/custodians/u-boot-nios.git
|
||||
F: arch/nios2/
|
||||
|
||||
NVMe
|
||||
M: Neil Armstrong <neil.armstrong@linaro.org>
|
||||
M: Bin Meng <bmeng.cn@gmail.com>
|
||||
S: Maintained
|
||||
F: drivers/nvme/
|
||||
|
||||
@@ -44,7 +44,7 @@ UCLASS_DRIVER(nvme) = {
|
||||
.id = UCLASS_NVME,
|
||||
};
|
||||
|
||||
struct bootdev_ops nvme_bootdev_ops = {
|
||||
static const struct bootdev_ops nvme_bootdev_ops = {
|
||||
};
|
||||
|
||||
static const struct udevice_id nvme_bootdev_ids[] = {
|
||||
|
||||
@@ -94,7 +94,7 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
|
||||
*(prp_pool + i) = cpu_to_le64((ulong)prp_pool +
|
||||
page_size);
|
||||
i = 0;
|
||||
prp_pool += page_size;
|
||||
prp_pool = (u64 *)((uintptr_t)prp_pool + page_size);
|
||||
}
|
||||
*(prp_pool + i++) = cpu_to_le64(dma_addr);
|
||||
dma_addr += page_size;
|
||||
@@ -112,7 +112,10 @@ static __le16 nvme_get_cmd_id(void)
|
||||
{
|
||||
static unsigned short cmdid;
|
||||
|
||||
return cpu_to_le16((cmdid < USHRT_MAX) ? cmdid++ : 0);
|
||||
if (cmdid >= USHRT_MAX)
|
||||
cmdid = 0;
|
||||
|
||||
return cpu_to_le16(cmdid++);
|
||||
}
|
||||
|
||||
static u16 nvme_read_completion_status(struct nvme_queue *nvmeq, u16 index)
|
||||
|
||||
@@ -88,6 +88,9 @@ static int apple_nvme_setup_queue(struct nvme_queue *nvmeq)
|
||||
}
|
||||
|
||||
priv->tcbs[nvmeq->qid] = (void *)memalign(4096, ANS_NVMMU_TCB_SIZE);
|
||||
if (!priv->tcbs[nvmeq->qid])
|
||||
return -ENOMEM;
|
||||
|
||||
memset((void *)priv->tcbs[nvmeq->qid], 0, ANS_NVMMU_TCB_SIZE);
|
||||
|
||||
switch (nvmeq->qid) {
|
||||
|
||||
Reference in New Issue
Block a user