| @@ -1823,6 +1823,7 @@ static void populate_shutdown_status(struct nfit_mem *nfit_mem) · 1822 unmodified lines |
| 1823 | 1823 | static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc, |
| 1824 | 1824 | struct nfit_mem *nfit_mem, u32 device_handle) |
| 1825 | 1825 | { |
| 1826 | + struct nvdimm_bus_descriptor *nd_desc = &acpi_desc->nd_desc; |
| 1826 | 1827 | struct acpi_device *adev, *adev_dimm; |
| 1827 | 1828 | struct device *dev = acpi_desc->dev; |
| 1828 | 1829 | unsigned long dsm_mask, label_mask; |
| @@ -1834,6 +1835,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc, · 5 unmodified lines |
| 1834 | 1835 | /* nfit test assumes 1:1 relationship between commands and dsms */ |
| 1835 | 1836 | nfit_mem->dsm_mask = acpi_desc->dimm_cmd_force_en; |
| 1836 | 1837 | nfit_mem->family = NVDIMM_FAMILY_INTEL; |
| 1838 | + set_bit(NVDIMM_FAMILY_INTEL, &nd_desc->dimm_family_mask); |
| 1837 | 1839 | |
| 1838 | 1840 | if (dcr->valid_fields & ACPI_NFIT_CONTROL_MFG_INFO_VALID) |
| 1839 | 1841 | sprintf(nfit_mem->id, "%04x-%02x-%04x-%08x", |
| @@ -1886,10 +1888,13 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc, · 46 unmodified lines |
| 1886 | 1888 | * Note, that checking for function0 (bit0) tells us if any commands |
| 1887 | 1889 | * are reachable through this GUID. |
| 1888 | 1890 | */ |
| 1891 | + clear_bit(NVDIMM_FAMILY_INTEL, &nd_desc->dimm_family_mask); |
| 1889 | 1892 | for (i = 0; i <= NVDIMM_FAMILY_MAX; i++) |
| 1890 | | − if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1)) |
| 1893 | + if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1)) { |
| 1894 | + set_bit(i, &nd_desc->dimm_family_mask); |
| 1891 | 1895 | if (family < 0 || i == default_dsm_family) |
| 1892 | 1896 | family = i; |
| 1897 | + } |
| 1893 | 1898 | |
| 1894 | 1899 | /* limit the supported commands to those that are publicly documented */ |
| 1895 | 1900 | nfit_mem->family = family; |
| @@ -2153,6 +2158,9 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc) · 257 unmodified lines |
| 2153 | 2158 | |
| 2154 | 2159 | nd_desc->cmd_mask = acpi_desc->bus_cmd_force_en; |
| 2155 | 2160 | nd_desc->bus_dsm_mask = acpi_desc->bus_nfit_cmd_force_en; |
| 2161 | + set_bit(ND_CMD_CALL, &nd_desc->cmd_mask); |
| 2162 | + set_bit(NVDIMM_BUS_FAMILY_NFIT, &nd_desc->bus_family_mask); |
| 2163 | + |
| 2156 | 2164 | adev = to_acpi_dev(acpi_desc); |
| 2157 | 2165 | if (!adev) |
| 2158 | 2166 | return; |
| @@ -2160,7 +2168,6 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc) · 1 unmodified line |
| 2160 | 2168 | for (i = ND_CMD_ARS_CAP; i <= ND_CMD_CLEAR_ERROR; i++) |
| 2161 | 2169 | if (acpi_check_dsm(adev->handle, guid, 1, 1ULL << i)) |
| 2162 | 2170 | set_bit(i, &nd_desc->cmd_mask); |
| 2163 | | − set_bit(ND_CMD_CALL, &nd_desc->cmd_mask); |
| 2164 | 2171 | |
| 2165 | 2172 | dsm_mask = |
| 2166 | 2173 | (1 << ND_CMD_ARS_CAP) | |