diff --git a/patches/pm-detect-firmware-unsupported-danctnix/0001-bes2600-self-detect-when-firmware-does-not-honor-PSM.patch b/patches/pm-detect-firmware-unsupported-danctnix/0001-bes2600-self-detect-when-firmware-does-not-honor-PSM.patch index e313fbb24..e26b39116 100644 --- a/patches/pm-detect-firmware-unsupported-danctnix/0001-bes2600-self-detect-when-firmware-does-not-honor-PSM.patch +++ b/patches/pm-detect-firmware-unsupported-danctnix/0001-bes2600-self-detect-when-firmware-does-not-honor-PSM.patch @@ -1,4 +1,4 @@ -From b466db98ceb35d9f755e0faacf836b51acb704a2 Mon Sep 17 00:00:00 2001 +From d1de35c62930b1bc035d3863d75901356548b6f0 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Tue, 28 Apr 2026 16:54:07 +0200 Subject: [PATCH] bes2600: self-detect when firmware does not honor PSM and @@ -64,12 +64,12 @@ firing entirely. The firmware-side wedge is observed once per boot Signed-off-by: Markus Fritsche --- - drivers/staging/bes2600/bes_pwr.c | 67 +++++++++++++++++++++++++++++++ - drivers/staging/bes2600/bes_pwr.h | 9 +++++ - 2 files changed, 76 insertions(+) + drivers/staging/bes2600/bes_pwr.c | 70 ++++++++++++++++++++++++++++++- + drivers/staging/bes2600/bes_pwr.h | 9 ++++ + 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/drivers/staging/bes2600/bes_pwr.c b/drivers/staging/bes2600/bes_pwr.c -index d54e1a0bab0c..a88ee40e7c60 100644 +index d54e1a0bab0c..ebaa42e3e61e 100644 --- a/drivers/staging/bes2600/bes_pwr.c +++ b/drivers/staging/bes2600/bes_pwr.c @@ -467,6 +467,45 @@ static void bes2600_pwr_device_enter_lp_mode(struct bes2600_common *hw_priv) @@ -146,7 +146,17 @@ index d54e1a0bab0c..a88ee40e7c60 100644 } } } else { -@@ -932,6 +985,8 @@ void bes2600_pwr_init(struct bes2600_common *hw_priv) +@@ -609,7 +662,8 @@ static int bes2600_pwr_enter_lp_mode(struct bes2600_common *hw_priv) + * GPIO stays high and the bit clear here is purely + * bookkeeping (so the next gpio_wake doesn't no-op). + */ +- if (hw_priv->sbus_ops->gpio_sleep) ++ if (!hw_priv->bes_power.pm_unsupported && ++ hw_priv->sbus_ops->gpio_sleep) + hw_priv->sbus_ops->gpio_sleep(hw_priv->sbus_priv, + GPIO_WAKE_FLAG_MCU); + ret = -ETIMEDOUT; +@@ -932,6 +986,8 @@ void bes2600_pwr_init(struct bes2600_common *hw_priv) mutex_init(&hw_priv->bes_power.pwr_mutex); atomic_set(&hw_priv->bes_power.dev_state, 0); atomic_set(&hw_priv->bes_power.chip_pm_state, BES2600_CHIP_PM_UNKNOWN); @@ -155,7 +165,7 @@ index d54e1a0bab0c..a88ee40e7c60 100644 init_completion(&hw_priv->bes_power.pm_enter_cmpl); sema_init(&hw_priv->bes_power.sync_lock, 1); device_set_wakeup_capable(hw_priv->pdev, true); -@@ -1321,6 +1376,18 @@ void bes2600_pwr_notify_ps_changed(struct bes2600_common *hw_priv, u8 psmode) +@@ -1321,6 +1377,18 @@ void bes2600_pwr_notify_ps_changed(struct bes2600_common *hw_priv, u8 psmode) * indication can prime a future wait against a freshly * reinit_completion()'ed state. */ diff --git a/patches/pm-detect-firmware-unsupported/0001-bes2600-self-detect-when-firmware-does-not-honor-PSM.patch b/patches/pm-detect-firmware-unsupported/0001-bes2600-self-detect-when-firmware-does-not-honor-PSM.patch index 4ce5e2373..a042abc1c 100644 --- a/patches/pm-detect-firmware-unsupported/0001-bes2600-self-detect-when-firmware-does-not-honor-PSM.patch +++ b/patches/pm-detect-firmware-unsupported/0001-bes2600-self-detect-when-firmware-does-not-honor-PSM.patch @@ -1,4 +1,4 @@ -From 0c618d6a139fffb9f17d6bed8fff3b42f0f3e586 Mon Sep 17 00:00:00 2001 +From f12e87002576f094c441ac6c945a451c88868592 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Tue, 28 Apr 2026 16:54:06 +0200 Subject: [PATCH] bes2600: self-detect when firmware does not honor PSM and @@ -64,12 +64,12 @@ firing entirely. The firmware-side wedge is observed once per boot Signed-off-by: Markus Fritsche --- - bes2600/bes_pwr.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++ - bes2600/bes_pwr.h | 9 +++++++ - 2 files changed, 76 insertions(+) + bes2600/bes_pwr.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++- + bes2600/bes_pwr.h | 9 ++++++ + 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/bes2600/bes_pwr.c b/bes2600/bes_pwr.c -index b7b6c2f..5f7979d 100644 +index b7b6c2f..620acef 100644 --- a/bes2600/bes_pwr.c +++ b/bes2600/bes_pwr.c @@ -467,6 +467,45 @@ static void bes2600_pwr_device_enter_lp_mode(struct bes2600_common *hw_priv) @@ -146,7 +146,17 @@ index b7b6c2f..5f7979d 100644 } } } else { -@@ -932,6 +985,8 @@ void bes2600_pwr_init(struct bes2600_common *hw_priv) +@@ -609,7 +662,8 @@ static int bes2600_pwr_enter_lp_mode(struct bes2600_common *hw_priv) + * GPIO stays high and the bit clear here is purely + * bookkeeping (so the next gpio_wake doesn't no-op). + */ +- if (hw_priv->sbus_ops->gpio_sleep) ++ if (!hw_priv->bes_power.pm_unsupported && ++ hw_priv->sbus_ops->gpio_sleep) + hw_priv->sbus_ops->gpio_sleep(hw_priv->sbus_priv, + GPIO_WAKE_FLAG_MCU); + ret = -ETIMEDOUT; +@@ -932,6 +986,8 @@ void bes2600_pwr_init(struct bes2600_common *hw_priv) mutex_init(&hw_priv->bes_power.pwr_mutex); atomic_set(&hw_priv->bes_power.dev_state, 0); atomic_set(&hw_priv->bes_power.chip_pm_state, BES2600_CHIP_PM_UNKNOWN); @@ -155,7 +165,7 @@ index b7b6c2f..5f7979d 100644 init_completion(&hw_priv->bes_power.pm_enter_cmpl); sema_init(&hw_priv->bes_power.sync_lock, 1); device_set_wakeup_capable(hw_priv->pdev, true); -@@ -1321,6 +1376,18 @@ void bes2600_pwr_notify_ps_changed(struct bes2600_common *hw_priv, u8 psmode) +@@ -1321,6 +1377,18 @@ void bes2600_pwr_notify_ps_changed(struct bes2600_common *hw_priv, u8 psmode) * indication can prime a future wait against a freshly * reinit_completion()'ed state. */