public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libnvdimm, btt: add btt startup debug
@ 2016-04-15  2:40 Dan Williams
  2016-04-15  7:10 ` Johannes Thumshirn
  2016-04-15 17:00 ` Verma, Vishal L
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Williams @ 2016-04-15  2:40 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: linux-kernel

Report the reason for btt probe failures when debug is enabled.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/nvdimm/btt.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index cc9fafed9362..68a7c3c1eed9 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1383,11 +1383,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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libnvdimm, btt: add btt startup debug
  2016-04-15  2:40 [PATCH] libnvdimm, btt: add btt startup debug Dan Williams
@ 2016-04-15  7:10 ` Johannes Thumshirn
  2016-04-15 17:00 ` Verma, Vishal L
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Thumshirn @ 2016-04-15  7:10 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Dan Williams, linux-kernel

On Donnerstag, 14. April 2016 19:40:42 CEST Dan Williams wrote:
> Report the reason for btt probe failures when debug is enabled.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Looks good to me,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>


-- 
Johannes Thumshirn                                                                                Storage
jthumshirn@suse.de                                                             +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libnvdimm, btt: add btt startup debug
  2016-04-15  2:40 [PATCH] libnvdimm, btt: add btt startup debug Dan Williams
  2016-04-15  7:10 ` Johannes Thumshirn
@ 2016-04-15 17:00 ` Verma, Vishal L
  1 sibling, 0 replies; 3+ messages in thread
From: Verma, Vishal L @ 2016-04-15 17:00 UTC (permalink / raw)
  To: Williams, Dan J, linux-nvdimm@lists.01.org; +Cc: linux-kernel@vger.kernel.org

On Thu, 2016-04-14 at 19:40 -0700, Dan Williams wrote:
> Report the reason for btt probe failures when debug is enabled.
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  drivers/nvdimm/btt.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Reveiwed-by: Vishal Verma <Vishal.l.verma@intel.com>

> 
> diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
> index cc9fafed9362..68a7c3c1eed9 100644
> --- a/drivers/nvdimm/btt.c
> +++ b/drivers/nvdimm/btt.c
> @@ -1383,11 +1383,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);
> 
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-15 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15  2:40 [PATCH] libnvdimm, btt: add btt startup debug Dan Williams
2016-04-15  7:10 ` Johannes Thumshirn
2016-04-15 17:00 ` Verma, Vishal L

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox