From b458850b65671c38b1867fa943cfcbdd1bb8c4d5 Mon Sep 17 00:00:00 2001 From: Christopher Croy Date: Mon, 19 Jan 2026 23:35:43 +0000 Subject: [PATCH] AMD SFH HID - Do not log EOPNOTSUPP error during sfh_init_work The AMD Sensor Fusion Hub device driver generates an error during init on boot for devices that don't support it: 'amd_sfh_hid_client_init failed err -95' Code 95 is EOPNOTSUPP, i.e. operation not supported. That code within this context should not be logged as an error message (there is already a warning message), which is the change being made here. This bug was already fixed in the kernel years ago shortly after it was was introduced. However, the fix eventually got washed out (presumably unintentionally). Here is when the fix was originally implemented in the kernel: https://github.com/torvalds/linux/commit/e51d8d3ea3d773334d2c047c8d1623dba66f592a Signed-off-by: Christopher Croy --- ...ent_init_log_no_error_for_EOPNOTSUPP.patch | 33 +++++++++++++++++++ patches-sonic/series | 3 ++ 2 files changed, 36 insertions(+) create mode 100644 patches-sonic/0001-amd_sfh_hid_client_init_log_no_error_for_EOPNOTSUPP.patch diff --git a/patches-sonic/0001-amd_sfh_hid_client_init_log_no_error_for_EOPNOTSUPP.patch b/patches-sonic/0001-amd_sfh_hid_client_init_log_no_error_for_EOPNOTSUPP.patch new file mode 100644 index 000000000..379797e2c --- /dev/null +++ b/patches-sonic/0001-amd_sfh_hid_client_init_log_no_error_for_EOPNOTSUPP.patch @@ -0,0 +1,33 @@ +From: Christopher Croy +Date: Mon, 19 Jan 2026 12:00:00 -0000 +Subject: [PATCH] AMD SFH: Do nog log error in the case of EOPNOTSUPP for sfh_init_work + +This was originally fixed in https://github.com/torvalds/linux/commit/e51d8d3ea3d773334d2c047c8d1623dba66f592a +From the commit linked above: + "HID: amd_sfh: Don't show client init failed as error when discovery fails + When sensor discovery fails, this means that the system doesn't have + any sensors connected and a user should only be notified at most one time. + A message is already displayed at WARN level of "failed to discover, + sensors not enabled". It's pointless to show that the client init failed + at ERR level for the same condition. + + Check the return code and don't display this message in those conditions." + +The fix was washed out here: https://github.com/torvalds/linux/commit/2105e8e00da4673266e217653292fef6acefde03 + +This patch re-introduces the fix. + +diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +index 01234567..89abcdef +--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c ++++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +@@ -352,7 +352,8 @@ + rc = amd_sfh_hid_client_init(mp2); + if (rc) { + amd_sfh_clear_intr(mp2); +- dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc); ++ if (rc != -EOPNOTSUPP) ++ dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc); + return; + } + diff --git a/patches-sonic/series b/patches-sonic/series index bd5992a7e..db4530686 100644 --- a/patches-sonic/series +++ b/patches-sonic/series @@ -193,6 +193,9 @@ cisco-npu-disable-other-bars.patch #0028-Create-miniaturised-diafgw-partition-for-128MB-flash.patch #0029-pcie-if-hotplug-enabled-do-immediate-reset-on-panic.patch +# amd sfh hid +0001-amd_sfh_hid_client_init_log_no_error_for_EOPNOTSUPP.patch + # Security patch #0001-Change-the-system.map-file-permission-only-readable-.patch