All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] libnvdimm, nfit: fix for 4.5-rc7
@ 2016-03-05  1:07 ` Williams, Dan J
  0 siblings, 0 replies; 3+ messages in thread
From: Williams, Dan J @ 2016-03-05  1:07 UTC (permalink / raw
  To: torvalds@linux-foundation.org, akpm@linux-foundation.org
  Cc: linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org,
	linux-acpi@vger.kernel.org

Hi Linus, please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

...to receive one straggling fix for NVDIMM support.

The KVM/QEMU enabling for NVDIMMs has recently reached the point where
it is able to accept some ACPI _DSM requests from a guest VM.  However
they immediately found that the 4.5-rc kernel is unusable because the
kernel's 'nfit' driver fails to load upon seeing a valid "not
supported" response from the virtual BIOS for an address range scrub
command.

It is not mandatory that a platform implement address range scrubbing,
so this fix from Vishal properly treats the "not supported" response as
"skip scrubbing and continue loading the driver".

The following changes since commit fc77dbd34c5c99bce46d40a2491937c3bcbd10af:

  Linux 4.5-rc6 (2016-02-28 08:41:20 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

for you to fetch changes up to 6e2452dff4441e3dc24d415c8b2cda8a3ba52116:

  nfit: Continue init even if ARS commands are unimplemented (2016-03-04 16:46:13 -0800)

----------------------------------------------------------------
Vishal Verma (1):
      nfit: Continue init even if ARS commands are unimplemented

 drivers/acpi/nfit.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

commit 6e2452dff4441e3dc24d415c8b2cda8a3ba52116
Author: Vishal Verma <vishal.l.verma@intel.com>
Date:   Thu Mar 3 15:39:41 2016 -0700

    nfit: Continue init even if ARS commands are unimplemented
    
    If firmware doesn't implement any of the ARS commands, take that to
    mean that ARS is unsupported, and continue to initialize regions without
    bad block lists. We cannot make the assumption that ARS commands will be
    unconditionally supported on all NVDIMMs.
    
    Reported-by: Haozhong Zhang <haozhong.zhang@intel.com>
    Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
    Acked-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
    Tested-by: Haozhong Zhang <haozhong.zhang@intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index fb53db187854..35947ac87644 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -1590,14 +1590,21 @@ static int acpi_nfit_find_poison(struct acpi_nfit_desc *acpi_desc,
 	start = ndr_desc->res->start;
 	len = ndr_desc->res->end - ndr_desc->res->start + 1;
 
+	/*
+	 * If ARS is unimplemented, unsupported, or if the 'Persistent Memory
+	 * Scrub' flag in extended status is not set, skip this but continue
+	 * initialization
+	 */
 	rc = ars_get_cap(nd_desc, ars_cap, start, len);
+	if (rc == -ENOTTY) {
+		dev_dbg(acpi_desc->dev,
+			"Address Range Scrub is not implemented, won't create an error list\n");
+		rc = 0;
+		goto out;
+	}
 	if (rc)
 		goto out;
 
-	/*
-	 * If ARS is unsupported, or if the 'Persistent Memory Scrub' flag in
-	 * extended status is not set, skip this but continue initialization
-	 */
 	if ((ars_cap->status & 0xffff) ||
 		!(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) {
 		dev_warn(acpi_desc->dev,

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

* [GIT PULL] libnvdimm, nfit: fix for 4.5-rc7
@ 2016-03-05  1:07 ` Williams, Dan J
  0 siblings, 0 replies; 3+ messages in thread
From: Williams, Dan J @ 2016-03-05  1:07 UTC (permalink / raw
  To: torvalds@linux-foundation.org, akpm@linux-foundation.org
  Cc: linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org,
	linux-acpi@vger.kernel.org

Hi Linus, please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

...to receive one straggling fix for NVDIMM support.

The KVM/QEMU enabling for NVDIMMs has recently reached the point where
it is able to accept some ACPI _DSM requests from a guest VM.  However
they immediately found that the 4.5-rc kernel is unusable because the
kernel's 'nfit' driver fails to load upon seeing a valid "not
supported" response from the virtual BIOS for an address range scrub
command.

It is not mandatory that a platform implement address range scrubbing,
so this fix from Vishal properly treats the "not supported" response as
"skip scrubbing and continue loading the driver".

The following changes since commit fc77dbd34c5c99bce46d40a2491937c3bcbd10af:

  Linux 4.5-rc6 (2016-02-28 08:41:20 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

for you to fetch changes up to 6e2452dff4441e3dc24d415c8b2cda8a3ba52116:

  nfit: Continue init even if ARS commands are unimplemented (2016-03-04 16:46:13 -0800)

----------------------------------------------------------------
Vishal Verma (1):
      nfit: Continue init even if ARS commands are unimplemented

 drivers/acpi/nfit.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

commit 6e2452dff4441e3dc24d415c8b2cda8a3ba52116
Author: Vishal Verma <vishal.l.verma@intel.com>
Date:   Thu Mar 3 15:39:41 2016 -0700

    nfit: Continue init even if ARS commands are unimplemented
    
    If firmware doesn't implement any of the ARS commands, take that to
    mean that ARS is unsupported, and continue to initialize regions without
    bad block lists. We cannot make the assumption that ARS commands will be
    unconditionally supported on all NVDIMMs.
    
    Reported-by: Haozhong Zhang <haozhong.zhang@intel.com>
    Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
    Acked-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
    Tested-by: Haozhong Zhang <haozhong.zhang@intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index fb53db187854..35947ac87644 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -1590,14 +1590,21 @@ static int acpi_nfit_find_poison(struct acpi_nfit_desc *acpi_desc,
 	start = ndr_desc->res->start;
 	len = ndr_desc->res->end - ndr_desc->res->start + 1;
 
+	/*
+	 * If ARS is unimplemented, unsupported, or if the 'Persistent Memory
+	 * Scrub' flag in extended status is not set, skip this but continue
+	 * initialization
+	 */
 	rc = ars_get_cap(nd_desc, ars_cap, start, len);
+	if (rc == -ENOTTY) {
+		dev_dbg(acpi_desc->dev,
+			"Address Range Scrub is not implemented, won't create an error list\n");
+		rc = 0;
+		goto out;
+	}
 	if (rc)
 		goto out;
 
-	/*
-	 * If ARS is unsupported, or if the 'Persistent Memory Scrub' flag in
-	 * extended status is not set, skip this but continue initialization
-	 */
 	if ((ars_cap->status & 0xffff) ||
 		!(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) {
 		dev_warn(acpi_desc->dev,

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

* [GIT PULL] libnvdimm, nfit: fix for 4.5-rc7
@ 2016-03-05  1:07 ` Williams, Dan J
  0 siblings, 0 replies; 3+ messages in thread
From: Williams, Dan J @ 2016-03-05  1:07 UTC (permalink / raw
  To: torvalds@linux-foundation.org, akpm@linux-foundation.org
  Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-nvdimm@lists.01.org

Hi Linus, please pull from:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

...to receive one straggling fix for NVDIMM support.

The KVM/QEMU enabling for NVDIMMs has recently reached the point where
it is able to accept some ACPI _DSM requests from a guest VM.  However
they immediately found that the 4.5-rc kernel is unusable because the
kernel's 'nfit' driver fails to load upon seeing a valid "not
supported" response from the virtual BIOS for an address range scrub
command.

It is not mandatory that a platform implement address range scrubbing,
so this fix from Vishal properly treats the "not supported" response as
"skip scrubbing and continue loading the driver".

The following changes since commit fc77dbd34c5c99bce46d40a2491937c3bcbd10af:

  Linux 4.5-rc6 (2016-02-28 08:41:20 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

for you to fetch changes up to 6e2452dff4441e3dc24d415c8b2cda8a3ba52116:

  nfit: Continue init even if ARS commands are unimplemented (2016-03-04 16:46:13 -0800)

----------------------------------------------------------------
Vishal Verma (1):
      nfit: Continue init even if ARS commands are unimplemented

 drivers/acpi/nfit.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

commit 6e2452dff4441e3dc24d415c8b2cda8a3ba52116
Author: Vishal Verma <vishal.l.verma@intel.com>
Date:   Thu Mar 3 15:39:41 2016 -0700

    nfit: Continue init even if ARS commands are unimplemented
    
    If firmware doesn't implement any of the ARS commands, take that to
    mean that ARS is unsupported, and continue to initialize regions without
    bad block lists. We cannot make the assumption that ARS commands will be
    unconditionally supported on all NVDIMMs.
    
    Reported-by: Haozhong Zhang <haozhong.zhang@intel.com>
    Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
    Acked-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
    Tested-by: Haozhong Zhang <haozhong.zhang@intel.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index fb53db187854..35947ac87644 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -1590,14 +1590,21 @@ static int acpi_nfit_find_poison(struct acpi_nfit_desc *acpi_desc,
 	start = ndr_desc->res->start;
 	len = ndr_desc->res->end - ndr_desc->res->start + 1;
 
+	/*
+	 * If ARS is unimplemented, unsupported, or if the 'Persistent Memory
+	 * Scrub' flag in extended status is not set, skip this but continue
+	 * initialization
+	 */
 	rc = ars_get_cap(nd_desc, ars_cap, start, len);
+	if (rc == -ENOTTY) {
+		dev_dbg(acpi_desc->dev,
+			"Address Range Scrub is not implemented, won't create an error list\n");
+		rc = 0;
+		goto out;
+	}
 	if (rc)
 		goto out;
 
-	/*
-	 * If ARS is unsupported, or if the 'Persistent Memory Scrub' flag in
-	 * extended status is not set, skip this but continue initialization
-	 */
 	if ((ars_cap->status & 0xffff) ||
 		!(ars_cap->status >> 16 & ND_ARS_PERSISTENT)) {
 		dev_warn(acpi_desc->dev,
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

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

end of thread, other threads:[~2016-03-05  1:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-05  1:07 [GIT PULL] libnvdimm, nfit: fix for 4.5-rc7 Williams, Dan J
2016-03-05  1:07 ` Williams, Dan J
2016-03-05  1:07 ` Williams, Dan J

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.