public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfit: Don't check _STA on NVDIMM devices
@ 2015-07-22 20:17 Linda Knippers
  2015-07-25 15:53 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Linda Knippers @ 2015-07-22 20:17 UTC (permalink / raw)
  To: dan.j.williams, rjw, lenb; +Cc: linux-nvdimm, linux-acpi


The _STA only applies to the root device, not the individual NVDIMMS,
so don't check here. NVDIMM device state flags are checked elsewhere.

Signed-off-by: Linda Knippers <linda.knippers@hp.com>
---
 drivers/acpi/nfit.c | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index 628a42c..eec3e8f 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -764,9 +764,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 	struct acpi_device *adev, *adev_dimm;
 	struct device *dev = acpi_desc->dev;
 	const u8 *uuid = to_nfit_uuid(NFIT_DEV_DIMM);
-	unsigned long long sta;
-	int i, rc = -ENODEV;
-	acpi_status status;
+	int i;
 
 	nfit_mem->dsm_mask = acpi_desc->dimm_dsm_force_en;
 	adev = to_acpi_dev(acpi_desc);
@@ -781,25 +779,11 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 		return force_enable_dimms ? 0 : -ENODEV;
 	}
 
-	status = acpi_evaluate_integer(adev_dimm->handle, "_STA", NULL, &sta);
-	if (status == AE_NOT_FOUND) {
-		dev_dbg(dev, "%s missing _STA, assuming enabled...\n",
-				dev_name(&adev_dimm->dev));
-		rc = 0;
-	} else if (ACPI_FAILURE(status))
-		dev_err(dev, "%s failed to retrieve_STA, disabling...\n",
-				dev_name(&adev_dimm->dev));
-	else if ((sta & ACPI_STA_DEVICE_ENABLED) == 0)
-		dev_info(dev, "%s disabled by firmware\n",
-				dev_name(&adev_dimm->dev));
-	else
-		rc = 0;
-
 	for (i = ND_CMD_SMART; i <= ND_CMD_VENDOR; i++)
 		if (acpi_check_dsm(adev_dimm->handle, uuid, 1, 1ULL << i))
 			set_bit(i, &nfit_mem->dsm_mask);
 
-	return force_enable_dimms ? 0 : rc;
+	return 0;
 }
 
 static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc)
-- 
1.8.3.1


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

* Re: [PATCH] nfit: Don't check _STA on NVDIMM devices
  2015-07-22 20:17 [PATCH] nfit: Don't check _STA on NVDIMM devices Linda Knippers
@ 2015-07-25 15:53 ` Dan Williams
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2015-07-25 15:53 UTC (permalink / raw)
  To: Linda Knippers; +Cc: Rafael J. Wysocki, Len Brown, linux-nvdimm, Linux ACPI

On Wed, Jul 22, 2015 at 1:17 PM, Linda Knippers <linda.knippers@hp.com> wrote:
>
> The _STA only applies to the root device, not the individual NVDIMMS,
> so don't check here. NVDIMM device state flags are checked elsewhere.
>
> Signed-off-by: Linda Knippers <linda.knippers@hp.com>

Applied and pushed out to 'libnvdimm-pending'

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

end of thread, other threads:[~2015-07-25 15:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 20:17 [PATCH] nfit: Don't check _STA on NVDIMM devices Linda Knippers
2015-07-25 15:53 ` Dan Williams

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