diff options
author | Tom Rini | 2019-10-08 18:43:37 -0400 |
---|---|---|
committer | Tom Rini | 2019-10-08 18:43:37 -0400 |
commit | 8679be295682878177097557867929caa8e26b98 (patch) | |
tree | 3e4ac7c3ca2b9ddef6177a0bfdf4f81de7d194fd /drivers/nvme | |
parent | ca88313dcd02b686851d7bc76fe941935fa014bc (diff) | |
parent | 3b728f8728fa7c596d30ecd27ebb64d37a54a12e (diff) |
Merge tag 'efi-2020-01-rc1' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-01-rc1
The major corrections in this pull request are:
Fixes for the SetVariable() boot service.
Device path node for NVMe drives.
Disable CONFIG_CMD_NVEDIT by default.
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/nvme.c | 13 | ||||
-rw-r--r-- | drivers/nvme/nvme.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index 47f101e2808..ee6b581d9e1 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -621,6 +621,18 @@ static int nvme_get_info_from_identify(struct nvme_dev *dev) return 0; } +int nvme_get_namespace_id(struct udevice *udev, u32 *ns_id, u8 *eui64) +{ + struct nvme_ns *ns = dev_get_priv(udev); + + if (ns_id) + *ns_id = ns->ns_id; + if (eui64) + memcpy(eui64, ns->eui64, sizeof(ns->eui64)); + + return 0; +} + int nvme_scan_namespace(void) { struct uclass *uc; @@ -657,6 +669,7 @@ static int nvme_blk_probe(struct udevice *udev) if (nvme_identify(ndev, ns->ns_id, 0, (dma_addr_t)(long)id)) return -EIO; + memcpy(&ns->eui64, &id->eui64, sizeof(id->eui64)); flbas = id->flbas & NVME_NS_FLBAS_LBA_MASK; ns->flbas = flbas; ns->lba_shift = id->lbaf[flbas].ds; diff --git a/drivers/nvme/nvme.h b/drivers/nvme/nvme.h index 922f7abfe85..0e8cb221a7a 100644 --- a/drivers/nvme/nvme.h +++ b/drivers/nvme/nvme.h @@ -637,6 +637,7 @@ struct nvme_ns { struct list_head list; struct nvme_dev *dev; unsigned ns_id; + u8 eui64[8]; int devnum; int lba_shift; u8 flbas; |