From 4fecb16271a75c036d9a08f8ef72253d4d095974 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 20 Aug 2024 11:28:03 +0200 Subject: [PATCH] fix initial pin ID to not match an existing pin (RHEL-55261) Resolves: RHEL-55261 --- synce4l-initpinid.patch | 24 ++++++++++++++++++++++++ synce4l.spec | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 synce4l-initpinid.patch diff --git a/synce4l-initpinid.patch b/synce4l-initpinid.patch new file mode 100644 index 0000000..ed50ea0 --- /dev/null +++ b/synce4l-initpinid.patch @@ -0,0 +1,24 @@ +commit b61dd54c1015692785a1766b15f7f5914f68df70 +Author: Miroslav Lichvar +Date: Wed Aug 7 14:14:32 2024 +0200 + + Initialize pin ID to -1 + + When creating the pin structure, initialize the pin ID to -1 to avoid + matching an existing pin with ID 0 (e.g. CVL-SDP22 on E810) when a + nonexistent pin is specified in the config. + + Signed-off-by: Miroslav Lichvar + +diff --git a/dpll_mon.c b/dpll_mon.c +index 39659fe..36aa559 100644 +--- a/dpll_mon.c ++++ b/dpll_mon.c +@@ -240,6 +240,7 @@ static struct dpll_mon_pin *pin_create(void) + } + pr_debug("%s %p", __func__, pin); + pin->parent_used_by = PARENT_NOT_USED; ++ pin->id = -1; + STAILQ_INIT(&pin->parents); + + return pin; diff --git a/synce4l.spec b/synce4l.spec index 54463b1..672b26c 100644 --- a/synce4l.spec +++ b/synce4l.spec @@ -14,6 +14,8 @@ Patch1: synce4l-ccwarns.patch Patch2: synce4l-smc.patch # Fix crash observed with newer E810 firmware Patch3: synce4l-noduppin.patch +# Fix initial pin ID to not match an existing pin +Patch4: synce4l-initpinid.patch BuildRequires: gcc make systemd BuildRequires: libnl3-devel