From aee6598748335794dc25d7c4f16f0d4801f6b584 Mon Sep 17 00:00:00 2001 From: Toshi Kani Date: Tue, 16 Aug 2016 13:08:40 -0600 Subject: libnvdimm: Fix nvdimm_probe error on NVDIMM-N 'ndctl list --buses --dimms' does not list any NVDIMM-Ns since they are considered as idle. ndctl checks if any driver is attached to nmem device. nvdimm_probe() always fails in nvdimm_init_nsarea() since NVDIMM-Ns do not implement optinal ND_CMD_GET_CONFIG_DATA command. Change nvdimm_probe() to accept the case that the CONFIG_DATA command is not implemented for NVDIMM-Ns. The driver attaches without ndd, which keeps it no-op to the device. Reported-by: Brian Boylston Signed-off-by: Toshi Kani Cc: Dan Williams Tested-by: Johannes Thumshirn Acked-by: Johannes Thumshirn Signed-off-by: Dan Williams --- drivers/nvdimm/nd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/nvdimm/nd.h') diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index 8024a0ef86d3..38d6f039234e 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -191,6 +191,7 @@ void nvdimm_exit(void); void nd_region_exit(void); struct nvdimm; struct nvdimm_drvdata *to_ndd(struct nd_mapping *nd_mapping); +int nvdimm_check_config_data(struct device *dev); int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd); int nvdimm_init_config_data(struct nvdimm_drvdata *ndd); int nvdimm_set_config_data(struct nvdimm_drvdata *ndd, size_t offset, -- cgit v1.2.1