mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
bhyve nvme: Add NQN value
Add a NVMe Qualified Name (NQN) to the Controller Data structure using the "first format" (i.e., "... used by any organization that owns a domain name" Section 7.9 NVM-Express 1.4c 2021.06.28 Ratified). This avoids a Linux kernel warning about a missing or invalid NQN. (cherry picked from commit 32557d16e2c3c24c04eccfafd895e1514dc65b35)
This commit is contained in:
parent
63a7e799b3
commit
4bd4942ea7
1 changed files with 8 additions and 1 deletions
|
|
@ -514,6 +514,7 @@ static void
|
|||
pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
|
||||
{
|
||||
struct nvme_controller_data *cd = &sc->ctrldata;
|
||||
int ret;
|
||||
|
||||
cd->vid = 0xFB5D;
|
||||
cd->ssvid = 0x0000;
|
||||
|
|
@ -583,6 +584,13 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc)
|
|||
NVME_CTRLR_DATA_FNA_FORMAT_ALL_SHIFT;
|
||||
|
||||
cd->vwc = NVME_CTRLR_DATA_VWC_ALL_NO << NVME_CTRLR_DATA_VWC_ALL_SHIFT;
|
||||
|
||||
ret = snprintf(cd->subnqn, sizeof(cd->subnqn),
|
||||
"nqn.2013-12.org.freebsd:bhyve-%s-%u-%u-%u",
|
||||
get_config_value("name"), sc->nsc_pi->pi_bus,
|
||||
sc->nsc_pi->pi_slot, sc->nsc_pi->pi_func);
|
||||
if ((ret < 0) || ((unsigned)ret > sizeof(cd->subnqn)))
|
||||
EPRINTLN("%s: error setting subnqn (%d)", __func__, ret);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -3309,7 +3317,6 @@ pci_nvme_init(struct pci_devinst *pi, nvlist_t *nvl)
|
|||
pci_nvme_aen_init(sc);
|
||||
|
||||
pci_nvme_reset(sc);
|
||||
|
||||
done:
|
||||
return (error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue