aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/btt.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-04-22 12:26:05 -0700
committerDan Williams <dan.j.williams@intel.com>2016-04-22 12:26:05 -0700
commit9dec4892ca9afd6aad3c9c9e6c17480ecbd04440 (patch)
tree2959023f5940526e9062630e83dccc23386ff890 /drivers/nvdimm/btt.c
parentlibnvdimm, nfit: Use ACPI_SIG_NFIT instead of hard coded string (diff)
downloadlinux-dev-9dec4892ca9afd6aad3c9c9e6c17480ecbd04440.tar.xz
linux-dev-9dec4892ca9afd6aad3c9c9e6c17480ecbd04440.zip
libnvdimm, btt: add btt startup debug
Report the reason for btt probe failures when debug is enabled. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/btt.c')
-rw-r--r--drivers/nvdimm/btt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index f068b6513cd2..af09d6c26709 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1388,11 +1388,15 @@ int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns)
struct btt *btt;
size_t rawsize;
- if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize)
+ if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) {
+ dev_dbg(&nd_btt->dev, "incomplete btt configuration\n");
return -ENODEV;
+ }
rawsize = nvdimm_namespace_capacity(ndns) - SZ_4K;
if (rawsize < ARENA_MIN_SIZE) {
+ dev_dbg(&nd_btt->dev, "%s must be at least %ld bytes\n",
+ dev_name(&ndns->dev), ARENA_MIN_SIZE + SZ_4K);
return -ENXIO;
}
nd_region = to_nd_region(nd_btt->dev.parent);