Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/bhyve/pci_nvme.c
Show First 20 Lines • Show All 536 Lines • ▼ Show 20 Lines | pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) | ||||
cd->mdts = NVME_MDTS; /* max data transfer size (2^mdts * CAP.MPSMIN) */ | cd->mdts = NVME_MDTS; /* max data transfer size (2^mdts * CAP.MPSMIN) */ | ||||
cd->ver = NVME_REV(1,4); | cd->ver = NVME_REV(1,4); | ||||
cd->cntrltype = NVME_CNTRLTYPE_IO; | cd->cntrltype = NVME_CNTRLTYPE_IO; | ||||
cd->oacs = 1 << NVME_CTRLR_DATA_OACS_FORMAT_SHIFT; | cd->oacs = 1 << NVME_CTRLR_DATA_OACS_FORMAT_SHIFT; | ||||
cd->oaes = NVMEB(NVME_CTRLR_DATA_OAES_NS_ATTR); | cd->oaes = NVMEB(NVME_CTRLR_DATA_OAES_NS_ATTR); | ||||
cd->acl = 2; | cd->acl = 3; | ||||
cd->aerl = 4; | cd->aerl = 3; | ||||
chuck: The wording in the specification is:
> It is recommended that implementations support a… | |||||
Done Inline ActionsYes, a value higher than 4 is totally OK as specification says. but the value of 5 is a little un-normal. I don't know why we pick up this value at first. as 4 is the value that other controllers do as far as my observation. wanpengqian_gmail.com: Yes, a value higher than 4 is totally OK as specification says. but the value of 5 is a little… | |||||
Not Done Inline ActionsThere isn't a limit on the number of concurrent aborts in the implementation. So one arbitrary value is as good as another, but I'd suggest removing the comment. chuck: There isn't a limit on the number of concurrent aborts in the implementation. So one arbitrary… | |||||
Done Inline ActionsYou are right, currently the Abort Command is not processed by the controller. I'd like the value to be more normal as real nvme controllers use the specification recommended value. I will remove the comment later. wanpengqian_gmail.com: You are right, currently the Abort Command is not processed by the controller. I'd like the… | |||||
/* Advertise 1, Read-only firmware slot */ | /* Advertise 1, Read-only firmware slot */ | ||||
cd->frmw = NVMEB(NVME_CTRLR_DATA_FRMW_SLOT1_RO) | | cd->frmw = NVMEB(NVME_CTRLR_DATA_FRMW_SLOT1_RO) | | ||||
(1 << NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT); | (1 << NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT); | ||||
cd->lpa = 0; /* TODO: support some simple things like SMART */ | cd->lpa = 0; /* TODO: support some simple things like SMART */ | ||||
cd->elpe = 0; /* max error log page entries */ | cd->elpe = 0; /* max error log page entries */ | ||||
/* | /* | ||||
* Report a single power state (zero-based value) | * Report a single power state (zero-based value) | ||||
▲ Show 20 Lines • Show All 2,821 Lines • Show Last 20 Lines |
The wording in the specification is:
Supporting 5 (aerl = 4) would meet their recommendation, wouldn't you agree?