diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-04-22 15:26:05 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-04-22 15:26:05 -0400 |
commit | 9dec4892ca9afd6aad3c9c9e6c17480ecbd04440 (patch) | |
tree | 2959023f5940526e9062630e83dccc23386ff890 | |
parent | 8259542348d93da6a04eed979047b1fd1ca72abe (diff) |
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>
-rw-r--r-- | drivers/nvdimm/btt.c | 6 |
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) | |||
1388 | struct btt *btt; | 1388 | struct btt *btt; |
1389 | size_t rawsize; | 1389 | size_t rawsize; |
1390 | 1390 | ||
1391 | if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) | 1391 | if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) { |
1392 | dev_dbg(&nd_btt->dev, "incomplete btt configuration\n"); | ||
1392 | return -ENODEV; | 1393 | return -ENODEV; |
1394 | } | ||
1393 | 1395 | ||
1394 | rawsize = nvdimm_namespace_capacity(ndns) - SZ_4K; | 1396 | rawsize = nvdimm_namespace_capacity(ndns) - SZ_4K; |
1395 | if (rawsize < ARENA_MIN_SIZE) { | 1397 | if (rawsize < ARENA_MIN_SIZE) { |
1398 | dev_dbg(&nd_btt->dev, "%s must be at least %ld bytes\n", | ||
1399 | dev_name(&ndns->dev), ARENA_MIN_SIZE + SZ_4K); | ||
1396 | return -ENXIO; | 1400 | return -ENXIO; |
1397 | } | 1401 | } |
1398 | nd_region = to_nd_region(nd_btt->dev.parent); | 1402 | nd_region = to_nd_region(nd_btt->dev.parent); |