diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/nfit.c | 11 | ||||
-rw-r--r-- | drivers/acpi/utils.c | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c index ac6ddcc080d4..1f0e06065ae6 100644 --- a/drivers/acpi/nfit.c +++ b/drivers/acpi/nfit.c | |||
@@ -1131,11 +1131,11 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc, | |||
1131 | 1131 | ||
1132 | /* | 1132 | /* |
1133 | * Until standardization materializes we need to consider up to 3 | 1133 | * Until standardization materializes we need to consider up to 3 |
1134 | * different command sets. Note, that checking for zero functions | 1134 | * different command sets. Note, that checking for function0 (bit0) |
1135 | * tells us if any commands might be reachable through this uuid. | 1135 | * tells us if any commands are reachable through this uuid. |
1136 | */ | 1136 | */ |
1137 | for (i = NVDIMM_FAMILY_INTEL; i <= NVDIMM_FAMILY_HPE2; i++) | 1137 | for (i = NVDIMM_FAMILY_INTEL; i <= NVDIMM_FAMILY_HPE2; i++) |
1138 | if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 0)) | 1138 | if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1)) |
1139 | break; | 1139 | break; |
1140 | 1140 | ||
1141 | /* limit the supported commands to those that are publicly documented */ | 1141 | /* limit the supported commands to those that are publicly documented */ |
@@ -1151,9 +1151,10 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc, | |||
1151 | if (disable_vendor_specific) | 1151 | if (disable_vendor_specific) |
1152 | dsm_mask &= ~(1 << 8); | 1152 | dsm_mask &= ~(1 << 8); |
1153 | } else { | 1153 | } else { |
1154 | dev_err(dev, "unknown dimm command family\n"); | 1154 | dev_dbg(dev, "unknown dimm command family\n"); |
1155 | nfit_mem->family = -1; | 1155 | nfit_mem->family = -1; |
1156 | return force_enable_dimms ? 0 : -ENODEV; | 1156 | /* DSMs are optional, continue loading the driver... */ |
1157 | return 0; | ||
1157 | } | 1158 | } |
1158 | 1159 | ||
1159 | uuid = to_nfit_uuid(nfit_mem->family); | 1160 | uuid = to_nfit_uuid(nfit_mem->family); |
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index b4de130f2d57..22c09952e177 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c | |||
@@ -680,6 +680,9 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs) | |||
680 | u64 mask = 0; | 680 | u64 mask = 0; |
681 | union acpi_object *obj; | 681 | union acpi_object *obj; |
682 | 682 | ||
683 | if (funcs == 0) | ||
684 | return false; | ||
685 | |||
683 | obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL); | 686 | obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL); |
684 | if (!obj) | 687 | if (!obj) |
685 | return false; | 688 | return false; |
@@ -692,9 +695,6 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs) | |||
692 | mask |= (((u64)obj->buffer.pointer[i]) << (i * 8)); | 695 | mask |= (((u64)obj->buffer.pointer[i]) << (i * 8)); |
693 | ACPI_FREE(obj); | 696 | ACPI_FREE(obj); |
694 | 697 | ||
695 | if (funcs == 0) | ||
696 | return true; | ||
697 | |||
698 | /* | 698 | /* |
699 | * Bit 0 indicates whether there's support for any functions other than | 699 | * Bit 0 indicates whether there's support for any functions other than |
700 | * function 0 for the specified UUID and revision. | 700 | * function 0 for the specified UUID and revision. |