Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm fix from Dan Williams:
"This contains a regression fix for a problem that was introduced in
v4.7-rc6.

In 4.7-rc1 we introduced auto-probing for the ACPI DSM (device-
specific-method) format that the platform firmware implements for
nvdimm devices. We initially fixed a regression in probing the QEMU
DSM implementation by making acpi_check_dsm() tolerant of the way QEMU
reports the "0 DSMs supported" condition.

However, that broke HPE platforms since that tolerance caused the
driver to mistakenly match the 1-zero-byte response those platforms
give to "unknown" commands. Instead, we simply make the driver
tolerant of not finding any supported DSMs. This has been tested to
work with both QEMU and HPE platforms.

This commit has appeared in a -next release with no reported issues"

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
nfit: make DIMM DSMs optional

+9 -8
+6 -5
drivers/acpi/nfit.c
··· 1131 1131 1132 1132 /* 1133 1133 * Until standardization materializes we need to consider up to 3 1134 - * different command sets. Note, that checking for zero functions 1135 - * tells us if any commands might be reachable through this uuid. 1134 + * different command sets. Note, that checking for function0 (bit0) 1135 + * tells us if any commands are reachable through this uuid. 1136 1136 */ 1137 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 1139 break; 1140 1140 1141 1141 /* limit the supported commands to those that are publicly documented */ ··· 1151 1151 if (disable_vendor_specific) 1152 1152 dsm_mask &= ~(1 << 8); 1153 1153 } else { 1154 - dev_err(dev, "unknown dimm command family\n"); 1154 + dev_dbg(dev, "unknown dimm command family\n"); 1155 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 1160 uuid = to_nfit_uuid(nfit_mem->family);
+3 -3
drivers/acpi/utils.c
··· 680 680 u64 mask = 0; 681 681 union acpi_object *obj; 682 682 683 + if (funcs == 0) 684 + return false; 685 + 683 686 obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL); 684 687 if (!obj) 685 688 return false; ··· 694 691 for (i = 0; i < obj->buffer.length && i < 8; i++) 695 692 mask |= (((u64)obj->buffer.pointer[i]) << (i * 8)); 696 693 ACPI_FREE(obj); 697 - 698 - if (funcs == 0) 699 - return true; 700 694 701 695 /* 702 696 * Bit 0 indicates whether there's support for any functions other than