nvme: return specific value of register when the device hot removed.
This patch set the controller as removed in pcie level when the register return specific value (0xffffffff), we also return the real value to the upper level (nvme bdev), which will help the upper level do the work of hotplug. Change-Id: Ifad45c760cccbce522506ffbf86495318a6b393b Signed-off-by: Cunyin Chang <cunyin.chang@intel.com> Reviewed-on: https://review.gerrithub.io/391327 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
d8022e1357
commit
2966839dd9
@ -1764,7 +1764,7 @@ union spdk_nvme_csts_register spdk_nvme_ctrlr_get_regs_csts(struct spdk_nvme_ctr
|
||||
union spdk_nvme_csts_register csts;
|
||||
|
||||
if (nvme_ctrlr_get_csts(ctrlr, &csts)) {
|
||||
csts.raw = 0;
|
||||
csts.raw = 0xFFFFFFFFu;
|
||||
}
|
||||
return csts;
|
||||
}
|
||||
@ -1779,7 +1779,7 @@ union spdk_nvme_vs_register spdk_nvme_ctrlr_get_regs_vs(struct spdk_nvme_ctrlr *
|
||||
union spdk_nvme_vs_register vs;
|
||||
|
||||
if (nvme_ctrlr_get_vs(ctrlr, &vs)) {
|
||||
vs.raw = 0;
|
||||
vs.raw = 0xFFFFFFFFu;
|
||||
}
|
||||
return vs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user