ACPI/nfit: Adjust annotation for why return 0 if fail to find NFIT at start
authorOcean He <hehy1@lenovo.com>
Tue, 7 Aug 2018 06:15:31 +0000 (02:15 -0400)
committerDan Williams <dan.j.williams@intel.com>
Mon, 10 Dec 2018 23:41:50 +0000 (15:41 -0800)
Add detailed explanation for why it's ok to return 0 if we fail to find
an NFIT at startup. Refer to chapter 9.20.2 NVDIMM Root Device in ACPI
6.2 spec.

Signed-off-by: Ocean He <hehy1@lenovo.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit/core.c

index 5912d30..59dd07c 100644 (file)
@@ -3474,7 +3474,13 @@ static int acpi_nfit_add(struct acpi_device *adev)
 
        status = acpi_get_table(ACPI_SIG_NFIT, 0, &tbl);
        if (ACPI_FAILURE(status)) {
-               /* This is ok, we could have an nvdimm hotplugged later */
+               /* The NVDIMM root device allows OS to trigger enumeration of
+                * NVDIMMs through NFIT at boot time and re-enumeration at
+                * root level via the _FIT method during runtime.
+                * This is ok to return 0 here, we could have an nvdimm
+                * hotplugged later and evaluate _FIT method which returns
+                * data in the format of a series of NFIT Structures.
+                */
                dev_dbg(dev, "failed to find NFIT at startup\n");
                return 0;
        }