nvme/rdma: retrieve CAP during ctrlr_construct
Fill in the cached copy of CAP in the generic NVMe controller to match the PCIe transport. This is not really early enough, since CAP is used during the reset process to determine the reset timeout, but that will have to be fixed separately by rearranging some of the transport callbacks. Change-Id: Ia8e20dbb8f21c2871afb9e00db56d0730e597331 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
4544a8b2ee
commit
be54ddb05c
@ -1188,6 +1188,7 @@ struct spdk_nvme_ctrlr *nvme_rdma_ctrlr_construct(enum spdk_nvme_transport_type
|
||||
{
|
||||
struct nvme_rdma_ctrlr *rctrlr;
|
||||
struct spdk_nvme_discover_info *info;
|
||||
union spdk_nvme_cap_register cap;
|
||||
int rc;
|
||||
|
||||
if (!devhandle) {
|
||||
@ -1217,6 +1218,14 @@ struct spdk_nvme_ctrlr *nvme_rdma_ctrlr_construct(enum spdk_nvme_transport_type
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (nvme_ctrlr_get_cap(&rctrlr->ctrlr, &cap)) {
|
||||
SPDK_ERRLOG("get_cap() failed\n");
|
||||
nvme_ctrlr_destruct(&rctrlr->ctrlr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
rctrlr->ctrlr.cap = cap;
|
||||
|
||||
SPDK_TRACELOG(SPDK_TRACE_DEBUG, "succesully initialized the nvmf ctrlr\n");
|
||||
return &rctrlr->ctrlr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user