* [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24
@ 2024-07-09 16:21 Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 02/33] Input: i8042 - add Ayaneo Kun to i8042 quirk table Sasha Levin
` (31 more replies)
0 siblings, 32 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jonathan Denose, Dmitry Torokhov, Sasha Levin, jefferymiller,
linux-input
From: Jonathan Denose <jdenose@google.com>
[ Upstream commit a69ce592cbe0417664bc5a075205aa75c2ec1273 ]
The Lenovo N24 on resume becomes stuck in a state where it
sends incorrect packets, causing elantech_packet_check_v4 to fail.
The only way for the device to resume sending the correct packets is for
it to be disabled and then re-enabled.
This change adds a dmi check to trigger this behavior on resume.
Signed-off-by: Jonathan Denose <jdenose@google.com>
Link: https://lore.kernel.org/r/20240503155020.v2.1.Ifa0e25ebf968d8f307f58d678036944141ab17e6@changeid
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/input/mouse/elantech.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 4e38229404b4b..b4723ea395eb9 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1476,16 +1476,47 @@ static void elantech_disconnect(struct psmouse *psmouse)
psmouse->private = NULL;
}
+/*
+ * Some hw_version 4 models fail to properly activate absolute mode on
+ * resume without going through disable/enable cycle.
+ */
+static const struct dmi_system_id elantech_needs_reenable[] = {
+#if defined(CONFIG_DMI) && defined(CONFIG_X86)
+ {
+ /* Lenovo N24 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "81AF"),
+ },
+ },
+#endif
+ { }
+};
+
/*
* Put the touchpad back into absolute mode when reconnecting
*/
static int elantech_reconnect(struct psmouse *psmouse)
{
+ int err;
+
psmouse_reset(psmouse);
if (elantech_detect(psmouse, 0))
return -1;
+ if (dmi_check_system(elantech_needs_reenable)) {
+ err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE);
+ if (err)
+ psmouse_warn(psmouse, "failed to deactivate mouse on %s: %d\n",
+ psmouse->ps2dev.serio->phys, err);
+
+ err = ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE);
+ if (err)
+ psmouse_warn(psmouse, "failed to reactivate mouse on %s: %d\n",
+ psmouse->ps2dev.serio->phys, err);
+ }
+
if (elantech_set_absolute_mode(psmouse)) {
psmouse_err(psmouse,
"failed to put touchpad back into absolute mode.\n");
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 02/33] Input: i8042 - add Ayaneo Kun to i8042 quirk table
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 03/33] ASoC: rt722-sdca-sdw: add silence detection register as volatile Sasha Levin
` (30 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Tobias Jakobi, Dmitry Torokhov, Sasha Levin, szfabian, wse,
eshimanovich, linux-input
From: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
[ Upstream commit 955af6355ddfe35140f9706a635838212a32513b ]
See the added comment for details. Also fix a typo in the
quirk's define.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Link: https://lore.kernel.org/r/20240531190100.3874731-1-tjakobi@math.uni-bielefeld.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/input/serio/i8042-acpipnpio.h | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h
index dfc6c581873b7..5b50475ec4140 100644
--- a/drivers/input/serio/i8042-acpipnpio.h
+++ b/drivers/input/serio/i8042-acpipnpio.h
@@ -76,7 +76,7 @@ static inline void i8042_write_command(int val)
#define SERIO_QUIRK_PROBE_DEFER BIT(5)
#define SERIO_QUIRK_RESET_ALWAYS BIT(6)
#define SERIO_QUIRK_RESET_NEVER BIT(7)
-#define SERIO_QUIRK_DIECT BIT(8)
+#define SERIO_QUIRK_DIRECT BIT(8)
#define SERIO_QUIRK_DUMBKBD BIT(9)
#define SERIO_QUIRK_NOLOOP BIT(10)
#define SERIO_QUIRK_NOTIMEOUT BIT(11)
@@ -1332,6 +1332,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
},
+ {
+ /*
+ * The Ayaneo Kun is a handheld device where some the buttons
+ * are handled by an AT keyboard. The keyboard is usually
+ * detected as raw, but sometimes, usually after a cold boot,
+ * it is detected as translated. Make sure that the keyboard
+ * is always in raw mode.
+ */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AYANEO"),
+ DMI_MATCH(DMI_BOARD_NAME, "KUN"),
+ },
+ .driver_data = (void *)(SERIO_QUIRK_DIRECT)
+ },
{ }
};
@@ -1655,7 +1669,7 @@ static void __init i8042_check_quirks(void)
if (quirks & SERIO_QUIRK_RESET_NEVER)
i8042_reset = I8042_RESET_NEVER;
}
- if (quirks & SERIO_QUIRK_DIECT)
+ if (quirks & SERIO_QUIRK_DIRECT)
i8042_direct = true;
if (quirks & SERIO_QUIRK_DUMBKBD)
i8042_dumbkbd = true;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 03/33] ASoC: rt722-sdca-sdw: add silence detection register as volatile
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 02/33] Input: i8042 - add Ayaneo Kun to i8042 quirk table Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 04/33] Input: xpad - add support for ASUS ROG RAIKIRI PRO Sasha Levin
` (29 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jack Yu, Mark Brown, Sasha Levin, oder_chiou, lgirdwood, perex,
tiwai, linux-sound
From: Jack Yu <jack.yu@realtek.com>
[ Upstream commit 968c974c08106fcf911d8d390d0f049af855d348 ]
Including silence detection register as volatile.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://msgid.link/r/c66a6bd6d220426793096b42baf85437@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt722-sdca-sdw.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c
index 43a4e79e56966..cf2feb41c8354 100644
--- a/sound/soc/codecs/rt722-sdca-sdw.c
+++ b/sound/soc/codecs/rt722-sdca-sdw.c
@@ -68,6 +68,7 @@ static bool rt722_sdca_mbq_readable_register(struct device *dev, unsigned int re
case 0x200007f:
case 0x2000082 ... 0x200008e:
case 0x2000090 ... 0x2000094:
+ case 0x3110000:
case 0x5300000 ... 0x5300002:
case 0x5400002:
case 0x5600000 ... 0x5600007:
@@ -125,6 +126,7 @@ static bool rt722_sdca_mbq_volatile_register(struct device *dev, unsigned int re
case 0x2000067:
case 0x2000084:
case 0x2000086:
+ case 0x3110000:
return true;
default:
return false;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 04/33] Input: xpad - add support for ASUS ROG RAIKIRI PRO
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 02/33] Input: i8042 - add Ayaneo Kun to i8042 quirk table Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 03/33] ASoC: rt722-sdca-sdw: add silence detection register as volatile Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 05/33] ASoC: topology: Fix references to freed memory Sasha Levin
` (28 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Luke D. Jones, Dmitry Torokhov, Sasha Levin, carl.ng,
maxwell.nguyen, appsforartists, luca, matt.git,
christophe.jaillet, matthias_berndt, linux-input
From: "Luke D. Jones" <luke@ljones.dev>
[ Upstream commit cee77149ebe9cd971ba238d87aa10e09bd98f1c9 ]
Add the VID/PID for ASUS ROG RAIKIRI PRO to the list of known devices.
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20240607223722.1170776-1-luke@ljones.dev
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/input/joystick/xpad.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index cd97a7a9f812d..daf2a46521f01 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -208,6 +208,7 @@ static const struct xpad_device {
{ 0x0738, 0xf738, "Super SFIV FightStick TE S", 0, XTYPE_XBOX360 },
{ 0x07ff, 0xffff, "Mad Catz GamePad", 0, XTYPE_XBOX360 },
{ 0x0b05, 0x1a38, "ASUS ROG RAIKIRI", 0, XTYPE_XBOXONE },
+ { 0x0b05, 0x1abb, "ASUS ROG RAIKIRI PRO", 0, XTYPE_XBOXONE },
{ 0x0c12, 0x0005, "Intec wireless", 0, XTYPE_XBOX },
{ 0x0c12, 0x8801, "Nyko Xbox Controller", 0, XTYPE_XBOX },
{ 0x0c12, 0x8802, "Zeroplus Xbox Controller", 0, XTYPE_XBOX },
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 05/33] ASoC: topology: Fix references to freed memory
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (2 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 04/33] Input: xpad - add support for ASUS ROG RAIKIRI PRO Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 06/33] ASoC: topology: Do not assign fields that are already set Sasha Levin
` (27 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Amadeusz Sławiński, Jason Montleon, Cezary Rojewski,
Mark Brown, Sasha Levin, lgirdwood, perex, tiwai, linux-sound
From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
[ Upstream commit 97ab304ecd95c0b1703ff8c8c3956dc6e2afe8e1 ]
Most users after parsing a topology file, release memory used by it, so
having pointer references directly into topology file contents is wrong.
Use devm_kmemdup(), to allocate memory as needed.
Reported-by: Jason Montleon <jmontleo@redhat.com>
Link: https://github.com/thesofproject/avs-topology-xml/issues/22#issuecomment-2127892605
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/soc-topology.c | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 2362c282ec8b3..c63545b27d450 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1060,15 +1060,32 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
break;
}
- route->source = elem->source;
- route->sink = elem->sink;
+ route->source = devm_kmemdup(tplg->dev, elem->source,
+ min(strlen(elem->source),
+ SNDRV_CTL_ELEM_ID_NAME_MAXLEN),
+ GFP_KERNEL);
+ route->sink = devm_kmemdup(tplg->dev, elem->sink,
+ min(strlen(elem->sink), SNDRV_CTL_ELEM_ID_NAME_MAXLEN),
+ GFP_KERNEL);
+ if (!route->source || !route->sink) {
+ ret = -ENOMEM;
+ break;
+ }
/* set to NULL atm for tplg users */
route->connected = NULL;
- if (strnlen(elem->control, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == 0)
+ if (strnlen(elem->control, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == 0) {
route->control = NULL;
- else
- route->control = elem->control;
+ } else {
+ route->control = devm_kmemdup(tplg->dev, elem->control,
+ min(strlen(elem->control),
+ SNDRV_CTL_ELEM_ID_NAME_MAXLEN),
+ GFP_KERNEL);
+ if (!route->control) {
+ ret = -ENOMEM;
+ break;
+ }
+ }
/* add route dobj to dobj_list */
route->dobj.type = SND_SOC_DOBJ_GRAPH;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 06/33] ASoC: topology: Do not assign fields that are already set
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (3 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 05/33] ASoC: topology: Fix references to freed memory Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 07/33] ASoC: topology: Clean up route loading Sasha Levin
` (26 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Amadeusz Sławiński, Cezary Rojewski, Mark Brown,
Sasha Levin, lgirdwood, perex, tiwai, linux-sound
From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
[ Upstream commit daf0b99d4720c9f05bdb81c73b2efdb43fa9def3 ]
The routes are allocated with kzalloc(), so all fields are zeroed by
default, skip unnecessary assignments.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-4-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/soc-topology.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index c63545b27d450..8b58a7864703e 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1072,11 +1072,7 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
break;
}
- /* set to NULL atm for tplg users */
- route->connected = NULL;
- if (strnlen(elem->control, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) == 0) {
- route->control = NULL;
- } else {
+ if (strnlen(elem->control, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) != 0) {
route->control = devm_kmemdup(tplg->dev, elem->control,
min(strlen(elem->control),
SNDRV_CTL_ELEM_ID_NAME_MAXLEN),
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 07/33] ASoC: topology: Clean up route loading
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (4 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 06/33] ASoC: topology: Do not assign fields that are already set Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 08/33] bytcr_rt5640 : inverse jack detect for Archos 101 cesium Sasha Levin
` (25 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Amadeusz Sławiński, Cezary Rojewski, Mark Brown,
Sasha Levin, lgirdwood, perex, tiwai, linux-sound
From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
[ Upstream commit e0e7bc2cbee93778c4ad7d9a792d425ffb5af6f7 ]
Instead of using very long macro name, assign it to shorter variable
and use it instead. While doing that, we can reduce multiple if checks
using this define to one.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240603102818.36165-5-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/soc-topology.c | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 8b58a7864703e..e7a2426dd7443 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1021,6 +1021,7 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
struct snd_soc_tplg_hdr *hdr)
{
struct snd_soc_dapm_context *dapm = &tplg->comp->dapm;
+ const size_t maxlen = SNDRV_CTL_ELEM_ID_NAME_MAXLEN;
struct snd_soc_tplg_dapm_graph_elem *elem;
struct snd_soc_dapm_route *route;
int count, i;
@@ -1044,38 +1045,27 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
tplg->pos += sizeof(struct snd_soc_tplg_dapm_graph_elem);
/* validate routes */
- if (strnlen(elem->source, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) ==
- SNDRV_CTL_ELEM_ID_NAME_MAXLEN) {
- ret = -EINVAL;
- break;
- }
- if (strnlen(elem->sink, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) ==
- SNDRV_CTL_ELEM_ID_NAME_MAXLEN) {
- ret = -EINVAL;
- break;
- }
- if (strnlen(elem->control, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) ==
- SNDRV_CTL_ELEM_ID_NAME_MAXLEN) {
+ if ((strnlen(elem->source, maxlen) == maxlen) ||
+ (strnlen(elem->sink, maxlen) == maxlen) ||
+ (strnlen(elem->control, maxlen) == maxlen)) {
ret = -EINVAL;
break;
}
route->source = devm_kmemdup(tplg->dev, elem->source,
- min(strlen(elem->source),
- SNDRV_CTL_ELEM_ID_NAME_MAXLEN),
+ min(strlen(elem->source), maxlen),
GFP_KERNEL);
route->sink = devm_kmemdup(tplg->dev, elem->sink,
- min(strlen(elem->sink), SNDRV_CTL_ELEM_ID_NAME_MAXLEN),
+ min(strlen(elem->sink), maxlen),
GFP_KERNEL);
if (!route->source || !route->sink) {
ret = -ENOMEM;
break;
}
- if (strnlen(elem->control, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) != 0) {
+ if (strnlen(elem->control, maxlen) != 0) {
route->control = devm_kmemdup(tplg->dev, elem->control,
- min(strlen(elem->control),
- SNDRV_CTL_ELEM_ID_NAME_MAXLEN),
+ min(strlen(elem->control), maxlen),
GFP_KERNEL);
if (!route->control) {
ret = -ENOMEM;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 08/33] bytcr_rt5640 : inverse jack detect for Archos 101 cesium
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (5 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 07/33] ASoC: topology: Clean up route loading Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 09/33] ALSA: dmaengine: Synchronize dma channel after drop() Sasha Levin
` (24 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Thomas GENTY, Hans de Goede, Pierre-Louis Bossart, Mark Brown,
Sasha Levin, cezary.rojewski, liam.r.girdwood, peter.ujfalusi,
yung-chuan.liao, ranjani.sridharan, kai.vehmanen, perex, tiwai,
alban.boye, kuninori.morimoto.gx, alsa-devel, linux-sound
From: Thomas GENTY <tomlohave@gmail.com>
[ Upstream commit e3209a1827646daaab744aa6a5767b1f57fb5385 ]
When headphones are plugged in, they appear absent; when they are removed,
they appear present.
Add a specific entry in bytcr_rt5640 for this device
Signed-off-by: Thomas GENTY <tomlohave@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240608170251.99936-1-tomlohave@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/intel/boards/bytcr_rt5640.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 651408c6f399d..5b8b21ade9cfe 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -610,6 +610,17 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
BYT_RT5640_SSP0_AIF1 |
BYT_RT5640_MCLK_EN),
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ARCHOS"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ARCHOS 101 CESIUM"),
+ },
+ .driver_data = (void *)(BYTCR_INPUT_DEFAULTS |
+ BYT_RT5640_JD_NOT_INV |
+ BYT_RT5640_DIFF_MIC |
+ BYT_RT5640_SSP0_AIF1 |
+ BYT_RT5640_MCLK_EN),
+ },
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ARCHOS"),
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 09/33] ALSA: dmaengine: Synchronize dma channel after drop()
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (6 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 08/33] bytcr_rt5640 : inverse jack detect for Archos 101 cesium Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 10/33] ASoC: ti: davinci-mcasp: Set min period size using FIFO config Sasha Levin
` (23 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jai Luthra, Peter Ujfalusi, Mark Brown, Sasha Levin, lars, perex,
tiwai, lgirdwood, linux-sound
From: Jai Luthra <j-luthra@ti.com>
[ Upstream commit e8343410ddf08fc36a9b9cc7c51a4e53a262d4c6 ]
Sometimes the stream may be stopped due to XRUN events, in which case
the userspace can call snd_pcm_drop() and snd_pcm_prepare() to stop and
start the stream again.
In these cases, we must wait for the DMA channel to synchronize before
marking the stream as prepared for playback, as the DMA channel gets
stopped by drop() without any synchronization. Make sure the ALSA core
synchronizes the DMA channel by adding a sync_stop() hook.
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Link: https://lore.kernel.org/r/20240611-asoc_next-v3-1-fcfd84b12164@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/sound/dmaengine_pcm.h | 1 +
sound/core/pcm_dmaengine.c | 10 ++++++++++
sound/soc/soc-generic-dmaengine-pcm.c | 8 ++++++++
3 files changed, 19 insertions(+)
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h
index d70c55f17df7c..94dbb23580f2f 100644
--- a/include/sound/dmaengine_pcm.h
+++ b/include/sound/dmaengine_pcm.h
@@ -36,6 +36,7 @@ snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substream
int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
struct dma_chan *chan);
int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream);
+int snd_dmaengine_pcm_sync_stop(struct snd_pcm_substream *substream);
int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
dma_filter_fn filter_fn, void *filter_data);
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c
index 494ec0c207fad..d142609570347 100644
--- a/sound/core/pcm_dmaengine.c
+++ b/sound/core/pcm_dmaengine.c
@@ -349,6 +349,16 @@ int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
}
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan);
+int snd_dmaengine_pcm_sync_stop(struct snd_pcm_substream *substream)
+{
+ struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
+
+ dmaengine_synchronize(prtd->dma_chan);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_sync_stop);
+
/**
* snd_dmaengine_pcm_close - Close a dmaengine based PCM substream
* @substream: PCM substream
diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
index cad222eb9a293..30bb1b018aa89 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -318,6 +318,12 @@ static int dmaengine_copy(struct snd_soc_component *component,
return 0;
}
+static int dmaengine_pcm_sync_stop(struct snd_soc_component *component,
+ struct snd_pcm_substream *substream)
+{
+ return snd_dmaengine_pcm_sync_stop(substream);
+}
+
static const struct snd_soc_component_driver dmaengine_pcm_component = {
.name = SND_DMAENGINE_PCM_DRV_NAME,
.probe_order = SND_SOC_COMP_ORDER_LATE,
@@ -327,6 +333,7 @@ static const struct snd_soc_component_driver dmaengine_pcm_component = {
.trigger = dmaengine_pcm_trigger,
.pointer = dmaengine_pcm_pointer,
.pcm_construct = dmaengine_pcm_new,
+ .sync_stop = dmaengine_pcm_sync_stop,
};
static const struct snd_soc_component_driver dmaengine_pcm_component_process = {
@@ -339,6 +346,7 @@ static const struct snd_soc_component_driver dmaengine_pcm_component_process = {
.pointer = dmaengine_pcm_pointer,
.copy = dmaengine_copy,
.pcm_construct = dmaengine_pcm_new,
+ .sync_stop = dmaengine_pcm_sync_stop,
};
static const char * const dmaengine_pcm_dma_channel_names[] = {
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 10/33] ASoC: ti: davinci-mcasp: Set min period size using FIFO config
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (7 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 09/33] ALSA: dmaengine: Synchronize dma channel after drop() Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 11/33] ASoC: ti: omap-hdmi: Fix too long driver name Sasha Levin
` (22 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jai Luthra, Peter Ujfalusi, Mark Brown, Sasha Levin, lgirdwood,
perex, tiwai, alsa-devel, linux-sound
From: Jai Luthra <j-luthra@ti.com>
[ Upstream commit c5dcf8ab10606e76c1d8a0ec77f27d84a392e874 ]
The minimum period size was enforced to 64 as older devices integrating
McASP with EDMA used an internal FIFO of 64 samples.
With UDMA based platforms this internal McASP FIFO is optional, as the
DMA engine internally does some buffering which is already accounted for
when registering the platform. So we should read the actual FIFO
configuration (txnumevt/rxnumevt) instead of hardcoding frames.min to
64.
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Link: https://lore.kernel.org/r/20240611-asoc_next-v3-2-fcfd84b12164@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/ti/davinci-mcasp.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sound/soc/ti/davinci-mcasp.c b/sound/soc/ti/davinci-mcasp.c
index a5c2cca38d01a..8c8b2a2f6f862 100644
--- a/sound/soc/ti/davinci-mcasp.c
+++ b/sound/soc/ti/davinci-mcasp.c
@@ -1474,10 +1474,11 @@ static int davinci_mcasp_hw_rule_min_periodsize(
{
struct snd_interval *period_size = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_PERIOD_SIZE);
+ u8 numevt = *((u8 *)rule->private);
struct snd_interval frames;
snd_interval_any(&frames);
- frames.min = 64;
+ frames.min = numevt;
frames.integer = 1;
return snd_interval_refine(period_size, &frames);
@@ -1492,6 +1493,7 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
u32 max_channels = 0;
int i, dir, ret;
int tdm_slots = mcasp->tdm_slots;
+ u8 *numevt;
/* Do not allow more then one stream per direction */
if (mcasp->substreams[substream->stream])
@@ -1591,9 +1593,12 @@ static int davinci_mcasp_startup(struct snd_pcm_substream *substream,
return ret;
}
+ numevt = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
+ &mcasp->txnumevt :
+ &mcasp->rxnumevt;
snd_pcm_hw_rule_add(substream->runtime, 0,
SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
- davinci_mcasp_hw_rule_min_periodsize, NULL,
+ davinci_mcasp_hw_rule_min_periodsize, numevt,
SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1);
return 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 11/33] ASoC: ti: omap-hdmi: Fix too long driver name
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (8 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 10/33] ASoC: ti: davinci-mcasp: Set min period size using FIFO config Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 12/33] ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback Sasha Levin
` (21 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Primoz Fiser, Peter Ujfalusi, Mark Brown, Sasha Levin,
jarkko.nikula, lgirdwood, perex, tiwai, alsa-devel, linux-omap,
linux-sound
From: Primoz Fiser <primoz.fiser@norik.com>
[ Upstream commit 524d3f126362b6033e92cbe107ae2158d7fbff94 ]
Set driver name to "HDMI". This simplifies the code and gets rid of
the following error messages:
ASoC: driver name too long 'HDMI 58040000.encoder' -> 'HDMI_58040000_e'
Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20240610125847.773394-1-primoz.fiser@norik.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/ti/omap-hdmi.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c
index a3663ab065ac2..0a731b21e5a58 100644
--- a/sound/soc/ti/omap-hdmi.c
+++ b/sound/soc/ti/omap-hdmi.c
@@ -354,11 +354,7 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev)
if (!card)
return -ENOMEM;
- card->name = devm_kasprintf(dev, GFP_KERNEL,
- "HDMI %s", dev_name(ad->dssdev));
- if (!card->name)
- return -ENOMEM;
-
+ card->name = "HDMI";
card->owner = THIS_MODULE;
card->dai_link =
devm_kzalloc(dev, sizeof(*(card->dai_link)), GFP_KERNEL);
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 12/33] ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (9 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 11/33] ASoC: ti: omap-hdmi: Fix too long driver name Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 13/33] ASoC: rt722-sdca-sdw: add debounce time for type detection Sasha Levin
` (20 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Peter Ujfalusi, Pierre-Louis Bossart, Kai Vehmanen,
Ranjani Sridharan, Mark Brown, Sasha Levin, lgirdwood,
yung-chuan.liao, daniel.baluta, perex, tiwai, sound-open-firmware,
linux-sound
From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
[ Upstream commit 6f2a43e3d14f6e31a3b041a1043195d02c54d615 ]
If the ipc_prepare() callback fails for a module instance, on error rewind
we must skip the ipc_unprepare() call for ones that has positive use count.
The positive use count means that the module instance is in active use, it
cannot be unprepared.
The issue affects capture direction paths with branches (single dai with
multiple PCMs), the affected widgets are in the shared part of the paths.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20240612121203.15468-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/sof-audio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index 77cc64ac71131..5162625834725 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -488,7 +488,7 @@ sof_prepare_widgets_in_path(struct snd_sof_dev *sdev, struct snd_soc_dapm_widget
if (ret < 0) {
/* unprepare the source widget */
if (widget_ops[widget->id].ipc_unprepare &&
- swidget && swidget->prepared) {
+ swidget && swidget->prepared && swidget->use_count == 0) {
widget_ops[widget->id].ipc_unprepare(swidget);
swidget->prepared = false;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 13/33] ASoC: rt722-sdca-sdw: add debounce time for type detection
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (10 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 12/33] ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 14/33] ASoC: topology: Fix route memory corruption Sasha Levin
` (19 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jack Yu, Mark Brown, Sasha Levin, oder_chiou, lgirdwood, perex,
tiwai, linux-sound
From: Jack Yu <jack.yu@realtek.com>
[ Upstream commit f3b198e4788fcc8d03ed0c8bd5e3856c6a5760c5 ]
Add debounce time in headset type detection for better performance.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://lore.kernel.org/r/7e502e9a9dd94122a1b60deb5ceb60fb@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/rt722-sdca-sdw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c
index cf2feb41c8354..32578a212642e 100644
--- a/sound/soc/codecs/rt722-sdca-sdw.c
+++ b/sound/soc/codecs/rt722-sdca-sdw.c
@@ -349,7 +349,7 @@ static int rt722_sdca_interrupt_callback(struct sdw_slave *slave,
if (status->sdca_cascade && !rt722->disable_irq)
mod_delayed_work(system_power_efficient_wq,
- &rt722->jack_detect_work, msecs_to_jiffies(30));
+ &rt722->jack_detect_work, msecs_to_jiffies(280));
mutex_unlock(&rt722->disable_irq_lock);
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 14/33] ASoC: topology: Fix route memory corruption
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (11 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 13/33] ASoC: rt722-sdca-sdw: add debounce time for type detection Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 15/33] nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA Sasha Levin
` (18 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Amadeusz Sławiński, Pierre-Louis Bossart,
Péter Ujfalusi, Mark Brown, Sasha Levin, lgirdwood, perex,
tiwai, linux-sound
From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
[ Upstream commit 0298f51652be47b79780833e0b63194e1231fa34 ]
It was reported that recent fix for memory corruption during topology
load, causes corruption in other cases. Instead of being overeager with
checking topology, assume that it is properly formatted and just
duplicate strings.
Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Closes: https://lore.kernel.org/linux-sound/171812236450.201359.3019210915105428447.b4-ty@kernel.org/T/#m8c4bd5abf453960fde6f826c4b7f84881da63e9d
Suggested-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20240613090126.841189-1-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/soc-topology.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index e7a2426dd7443..7e8fca0b06628 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -1052,21 +1052,15 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
break;
}
- route->source = devm_kmemdup(tplg->dev, elem->source,
- min(strlen(elem->source), maxlen),
- GFP_KERNEL);
- route->sink = devm_kmemdup(tplg->dev, elem->sink,
- min(strlen(elem->sink), maxlen),
- GFP_KERNEL);
+ route->source = devm_kstrdup(tplg->dev, elem->source, GFP_KERNEL);
+ route->sink = devm_kstrdup(tplg->dev, elem->sink, GFP_KERNEL);
if (!route->source || !route->sink) {
ret = -ENOMEM;
break;
}
if (strnlen(elem->control, maxlen) != 0) {
- route->control = devm_kmemdup(tplg->dev, elem->control,
- min(strlen(elem->control), maxlen),
- GFP_KERNEL);
+ route->control = devm_kstrdup(tplg->dev, elem->control, GFP_KERNEL);
if (!route->control) {
ret = -ENOMEM;
break;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 15/33] nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA.
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (12 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 14/33] ASoC: topology: Fix route memory corruption Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 16/33] Input: ads7846 - use spi_device_id table Sasha Levin
` (17 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Boyang Yu, Kanchan Joshi, Keith Busch, Sasha Levin, sagi,
linux-nvme
From: Boyang Yu <yuboyang@dapustor.com>
[ Upstream commit 9570a48847e3acfa1a741cef431c923325ddc637 ]
The value of NVME_NS_DEAC is 3,
which means NVME_NS_METADATA_SUPPORTED | NVME_NS_EXT_LBAS. Provide a
unique value for this feature flag.
Fixes 1b96f862eccc ("nvme: implement the DEAC bit for the Write Zeroes command")
Signed-off-by: Boyang Yu <yuboyang@dapustor.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/nvme/host/nvme.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index fd67240795e3a..21c24cd8b1e8a 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -485,7 +485,7 @@ static inline bool nvme_ns_head_multipath(struct nvme_ns_head *head)
enum nvme_ns_features {
NVME_NS_EXT_LBAS = 1 << 0, /* support extended LBA format */
NVME_NS_METADATA_SUPPORTED = 1 << 1, /* support getting generated md */
- NVME_NS_DEAC, /* DEAC bit in Write Zeores supported */
+ NVME_NS_DEAC = 1 << 2, /* DEAC bit in Write Zeores supported */
};
struct nvme_ns {
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 16/33] Input: ads7846 - use spi_device_id table
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (13 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 15/33] nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 17/33] can: kvaser_usb: fix return value for hif_usb_send_regout Sasha Levin
` (16 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alexander Stein, Dmitry Torokhov, Sasha Levin, gregkh,
linux-input
From: Alexander Stein <alexander.stein@ew.tq-group.com>
[ Upstream commit 7c7b1be19b228b450c2945ec379d7fc6bfef9852 ]
As the driver supports more devices over time the single MODULE_ALIAS
is complete and raises several warnings:
SPI driver ads7846 has no spi_device_id for ti,tsc2046
SPI driver ads7846 has no spi_device_id for ti,ads7843
SPI driver ads7846 has no spi_device_id for ti,ads7845
SPI driver ads7846 has no spi_device_id for ti,ads7873
Fix this by adding a spi_device_id table and removing the manual
MODULE_ALIAS.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20240619122703.2081476-1-alexander.stein@ew.tq-group.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/input/touchscreen/ads7846.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index faea40dd66d01..a66375700a630 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1114,6 +1114,16 @@ static const struct of_device_id ads7846_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, ads7846_dt_ids);
+static const struct spi_device_id ads7846_spi_ids[] = {
+ { "tsc2046", 7846 },
+ { "ads7843", 7843 },
+ { "ads7845", 7845 },
+ { "ads7846", 7846 },
+ { "ads7873", 7873 },
+ { },
+};
+MODULE_DEVICE_TABLE(spi, ads7846_spi_ids);
+
static const struct ads7846_platform_data *ads7846_get_props(struct device *dev)
{
struct ads7846_platform_data *pdata;
@@ -1392,10 +1402,10 @@ static struct spi_driver ads7846_driver = {
},
.probe = ads7846_probe,
.remove = ads7846_remove,
+ .id_table = ads7846_spi_ids,
};
module_spi_driver(ads7846_driver);
MODULE_DESCRIPTION("ADS7846 TouchScreen Driver");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("spi:ads7846");
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 17/33] can: kvaser_usb: fix return value for hif_usb_send_regout
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (14 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 16/33] Input: ads7846 - use spi_device_id table Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 18/33] gpio: pca953x: fix pca953x_irq_bus_sync_unlock race Sasha Levin
` (15 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Chen Ni, Marc Kleine-Budde, Sasha Levin, mailhol.vincent, davem,
edumazet, kuba, pabeni, extja, linux-can, netdev
From: Chen Ni <nichen@iscas.ac.cn>
[ Upstream commit 0d34d8163fd87978a6abd792e2d8ad849f4c3d57 ]
As the potential failure of usb_submit_urb(), it should be better to
return the err variable to catch the error.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/all/20240521041020.1519416-1-nichen@iscas.ac.cn
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
index 71ef4db5c09f6..51c8b7c109728 100644
--- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
+++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c
@@ -291,7 +291,7 @@ int kvaser_usb_send_cmd_async(struct kvaser_usb_net_priv *priv, void *cmd,
}
usb_free_urb(urb);
- return 0;
+ return err;
}
int kvaser_usb_can_rx_over_error(struct net_device *netdev)
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 18/33] gpio: pca953x: fix pca953x_irq_bus_sync_unlock race
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (15 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 17/33] can: kvaser_usb: fix return value for hif_usb_send_regout Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 19/33] octeontx2-pf: Fix coverity and klockwork issues in octeon PF driver Sasha Levin
` (14 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Ian Ray, Bartosz Golaszewski, Sasha Levin, linus.walleij, brgl,
linux-gpio
From: Ian Ray <ian.ray@gehealthcare.com>
[ Upstream commit bfc6444b57dc7186b6acc964705d7516cbaf3904 ]
Ensure that `i2c_lock' is held when setting interrupt latch and mask in
pca953x_irq_bus_sync_unlock() in order to avoid races.
The other (non-probe) call site pca953x_gpio_set_multiple() ensures the
lock is held before calling pca953x_write_regs().
The problem occurred when a request raced against irq_bus_sync_unlock()
approximately once per thousand reboots on an i.MX8MP based system.
* Normal case
0-0022: write register AI|3a {03,02,00,00,01} Input latch P0
0-0022: write register AI|49 {fc,fd,ff,ff,fe} Interrupt mask P0
0-0022: write register AI|08 {ff,00,00,00,00} Output P3
0-0022: write register AI|12 {fc,00,00,00,00} Config P3
* Race case
0-0022: write register AI|08 {ff,00,00,00,00} Output P3
0-0022: write register AI|08 {03,02,00,00,01} *** Wrong register ***
0-0022: write register AI|12 {fc,00,00,00,00} Config P3
0-0022: write register AI|49 {fc,fd,ff,ff,fe} Interrupt mask P0
Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
Link: https://lore.kernel.org/r/20240620042915.2173-1-ian.ray@gehealthcare.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpio/gpio-pca953x.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index bdd50a78e4142..ce9a94e332801 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -766,6 +766,8 @@ static void pca953x_irq_bus_sync_unlock(struct irq_data *d)
int level;
if (chip->driver_data & PCA_PCAL) {
+ guard(mutex)(&chip->i2c_lock);
+
/* Enable latch on interrupt-enabled inputs */
pca953x_write_regs(chip, PCAL953X_IN_LATCH, chip->irq_mask);
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 19/33] octeontx2-pf: Fix coverity and klockwork issues in octeon PF driver
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (16 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 18/33] gpio: pca953x: fix pca953x_irq_bus_sync_unlock race Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 20/33] s390/sclp: Fix sclp_init() cleanup on failure Sasha Levin
` (13 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Ratheesh Kannoth, Suman Ghosh, David S . Miller, Sasha Levin,
sgoutham, gakula, sbhatta, hkelam, edumazet, kuba, pabeni, netdev
From: Ratheesh Kannoth <rkannoth@marvell.com>
[ Upstream commit 02ea312055da84e08e3e5bce2539c1ff11c8b5f2 ]
Fix unintended sign extension and klockwork issues. These are not real
issue but for sanity checks.
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../marvell/octeontx2/nic/otx2_common.c | 10 ++--
.../ethernet/marvell/octeontx2/nic/otx2_reg.h | 55 ++++++++++---------
.../marvell/octeontx2/nic/otx2_txrx.c | 2 +-
.../net/ethernet/marvell/octeontx2/nic/qos.c | 3 +-
4 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index af62d66470d5e..b3064377510ed 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -648,14 +648,14 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for
} else if (lvl == NIX_TXSCH_LVL_TL4) {
parent = schq_list[NIX_TXSCH_LVL_TL3][prio];
req->reg[0] = NIX_AF_TL4X_PARENT(schq);
- req->regval[0] = parent << 16;
+ req->regval[0] = (u64)parent << 16;
req->num_regs++;
req->reg[1] = NIX_AF_TL4X_SCHEDULE(schq);
req->regval[1] = dwrr_val;
} else if (lvl == NIX_TXSCH_LVL_TL3) {
parent = schq_list[NIX_TXSCH_LVL_TL2][prio];
req->reg[0] = NIX_AF_TL3X_PARENT(schq);
- req->regval[0] = parent << 16;
+ req->regval[0] = (u64)parent << 16;
req->num_regs++;
req->reg[1] = NIX_AF_TL3X_SCHEDULE(schq);
req->regval[1] = dwrr_val;
@@ -670,11 +670,11 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for
} else if (lvl == NIX_TXSCH_LVL_TL2) {
parent = schq_list[NIX_TXSCH_LVL_TL1][prio];
req->reg[0] = NIX_AF_TL2X_PARENT(schq);
- req->regval[0] = parent << 16;
+ req->regval[0] = (u64)parent << 16;
req->num_regs++;
req->reg[1] = NIX_AF_TL2X_SCHEDULE(schq);
- req->regval[1] = TXSCH_TL1_DFLT_RR_PRIO << 24 | dwrr_val;
+ req->regval[1] = (u64)hw->txschq_aggr_lvl_rr_prio << 24 | dwrr_val;
if (lvl == hw->txschq_link_cfg_lvl) {
req->num_regs++;
@@ -698,7 +698,7 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_for
req->num_regs++;
req->reg[1] = NIX_AF_TL1X_TOPOLOGY(schq);
- req->regval[1] = (TXSCH_TL1_DFLT_RR_PRIO << 1);
+ req->regval[1] = hw->txschq_aggr_lvl_rr_prio << 1;
req->num_regs++;
req->reg[2] = NIX_AF_TL1X_CIR(schq);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_reg.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_reg.h
index 45a32e4b49d1c..e3aee6e362151 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_reg.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_reg.h
@@ -139,33 +139,34 @@
#define NIX_LF_CINTX_ENA_W1C(a) (NIX_LFBASE | 0xD50 | (a) << 12)
/* NIX AF transmit scheduler registers */
-#define NIX_AF_SMQX_CFG(a) (0x700 | (a) << 16)
-#define NIX_AF_TL1X_SCHEDULE(a) (0xC00 | (a) << 16)
-#define NIX_AF_TL1X_CIR(a) (0xC20 | (a) << 16)
-#define NIX_AF_TL1X_TOPOLOGY(a) (0xC80 | (a) << 16)
-#define NIX_AF_TL2X_PARENT(a) (0xE88 | (a) << 16)
-#define NIX_AF_TL2X_SCHEDULE(a) (0xE00 | (a) << 16)
-#define NIX_AF_TL2X_TOPOLOGY(a) (0xE80 | (a) << 16)
-#define NIX_AF_TL2X_CIR(a) (0xE20 | (a) << 16)
-#define NIX_AF_TL2X_PIR(a) (0xE30 | (a) << 16)
-#define NIX_AF_TL3X_PARENT(a) (0x1088 | (a) << 16)
-#define NIX_AF_TL3X_SCHEDULE(a) (0x1000 | (a) << 16)
-#define NIX_AF_TL3X_SHAPE(a) (0x1010 | (a) << 16)
-#define NIX_AF_TL3X_CIR(a) (0x1020 | (a) << 16)
-#define NIX_AF_TL3X_PIR(a) (0x1030 | (a) << 16)
-#define NIX_AF_TL3X_TOPOLOGY(a) (0x1080 | (a) << 16)
-#define NIX_AF_TL4X_PARENT(a) (0x1288 | (a) << 16)
-#define NIX_AF_TL4X_SCHEDULE(a) (0x1200 | (a) << 16)
-#define NIX_AF_TL4X_SHAPE(a) (0x1210 | (a) << 16)
-#define NIX_AF_TL4X_CIR(a) (0x1220 | (a) << 16)
-#define NIX_AF_TL4X_PIR(a) (0x1230 | (a) << 16)
-#define NIX_AF_TL4X_TOPOLOGY(a) (0x1280 | (a) << 16)
-#define NIX_AF_MDQX_SCHEDULE(a) (0x1400 | (a) << 16)
-#define NIX_AF_MDQX_SHAPE(a) (0x1410 | (a) << 16)
-#define NIX_AF_MDQX_CIR(a) (0x1420 | (a) << 16)
-#define NIX_AF_MDQX_PIR(a) (0x1430 | (a) << 16)
-#define NIX_AF_MDQX_PARENT(a) (0x1480 | (a) << 16)
-#define NIX_AF_TL3_TL2X_LINKX_CFG(a, b) (0x1700 | (a) << 16 | (b) << 3)
+#define NIX_AF_SMQX_CFG(a) (0x700 | (u64)(a) << 16)
+#define NIX_AF_TL4X_SDP_LINK_CFG(a) (0xB10 | (u64)(a) << 16)
+#define NIX_AF_TL1X_SCHEDULE(a) (0xC00 | (u64)(a) << 16)
+#define NIX_AF_TL1X_CIR(a) (0xC20 | (u64)(a) << 16)
+#define NIX_AF_TL1X_TOPOLOGY(a) (0xC80 | (u64)(a) << 16)
+#define NIX_AF_TL2X_PARENT(a) (0xE88 | (u64)(a) << 16)
+#define NIX_AF_TL2X_SCHEDULE(a) (0xE00 | (u64)(a) << 16)
+#define NIX_AF_TL2X_TOPOLOGY(a) (0xE80 | (u64)(a) << 16)
+#define NIX_AF_TL2X_CIR(a) (0xE20 | (u64)(a) << 16)
+#define NIX_AF_TL2X_PIR(a) (0xE30 | (u64)(a) << 16)
+#define NIX_AF_TL3X_PARENT(a) (0x1088 | (u64)(a) << 16)
+#define NIX_AF_TL3X_SCHEDULE(a) (0x1000 | (u64)(a) << 16)
+#define NIX_AF_TL3X_SHAPE(a) (0x1010 | (u64)(a) << 16)
+#define NIX_AF_TL3X_CIR(a) (0x1020 | (u64)(a) << 16)
+#define NIX_AF_TL3X_PIR(a) (0x1030 | (u64)(a) << 16)
+#define NIX_AF_TL3X_TOPOLOGY(a) (0x1080 | (u64)(a) << 16)
+#define NIX_AF_TL4X_PARENT(a) (0x1288 | (u64)(a) << 16)
+#define NIX_AF_TL4X_SCHEDULE(a) (0x1200 | (u64)(a) << 16)
+#define NIX_AF_TL4X_SHAPE(a) (0x1210 | (u64)(a) << 16)
+#define NIX_AF_TL4X_CIR(a) (0x1220 | (u64)(a) << 16)
+#define NIX_AF_TL4X_PIR(a) (0x1230 | (u64)(a) << 16)
+#define NIX_AF_TL4X_TOPOLOGY(a) (0x1280 | (u64)(a) << 16)
+#define NIX_AF_MDQX_SCHEDULE(a) (0x1400 | (u64)(a) << 16)
+#define NIX_AF_MDQX_SHAPE(a) (0x1410 | (u64)(a) << 16)
+#define NIX_AF_MDQX_CIR(a) (0x1420 | (u64)(a) << 16)
+#define NIX_AF_MDQX_PIR(a) (0x1430 | (u64)(a) << 16)
+#define NIX_AF_MDQX_PARENT(a) (0x1480 | (u64)(a) << 16)
+#define NIX_AF_TL3_TL2X_LINKX_CFG(a, b) (0x1700 | (u64)(a) << 16 | (b) << 3)
/* LMT LF registers */
#define LMT_LFBASE BIT_ULL(RVU_FUNC_BLKADDR_SHIFT)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
index 04a49b9b545f3..0ca9f2ffd932d 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
@@ -510,7 +510,7 @@ static int otx2_tx_napi_handler(struct otx2_nic *pfvf,
static void otx2_adjust_adaptive_coalese(struct otx2_nic *pfvf, struct otx2_cq_poll *cq_poll)
{
- struct dim_sample dim_sample;
+ struct dim_sample dim_sample = { 0 };
u64 rx_frames, rx_bytes;
u64 tx_frames, tx_bytes;
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
index 6cddb4da85b71..4995a2d54d7d0 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos.c
@@ -153,7 +153,6 @@ static void __otx2_qos_txschq_cfg(struct otx2_nic *pfvf,
num_regs++;
otx2_config_sched_shaping(pfvf, node, cfg, &num_regs);
-
} else if (level == NIX_TXSCH_LVL_TL4) {
otx2_config_sched_shaping(pfvf, node, cfg, &num_regs);
} else if (level == NIX_TXSCH_LVL_TL3) {
@@ -176,7 +175,7 @@ static void __otx2_qos_txschq_cfg(struct otx2_nic *pfvf,
/* check if node is root */
if (node->qid == OTX2_QOS_QID_INNER && !node->parent) {
cfg->reg[num_regs] = NIX_AF_TL2X_SCHEDULE(node->schq);
- cfg->regval[num_regs] = TXSCH_TL1_DFLT_RR_PRIO << 24 |
+ cfg->regval[num_regs] = (u64)hw->txschq_aggr_lvl_rr_prio << 24 |
mtu_to_dwrr_weight(pfvf,
pfvf->tx_max_pktlen);
num_regs++;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 20/33] s390/sclp: Fix sclp_init() cleanup on failure
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (17 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 19/33] octeontx2-pf: Fix coverity and klockwork issues in octeon PF driver Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 21/33] platform/mellanox: nvsw-sn2201: Add check for platform_device_add_resources Sasha Levin
` (12 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Heiko Carstens, Peter Oberparleiter, Alexander Gordeev,
Sasha Levin, gor, justinstitt, linux-s390
From: Heiko Carstens <hca@linux.ibm.com>
[ Upstream commit 6434b33faaa063df500af355ee6c3942e0f8d982 ]
If sclp_init() fails it only partially cleans up: if there are multiple
failing calls to sclp_init() sclp_state_change_event will be added several
times to sclp_reg_list, which results in the following warning:
------------[ cut here ]------------
list_add double add: new=000003ffe1598c10, prev=000003ffe1598bf0, next=000003ffe1598c10.
WARNING: CPU: 0 PID: 1 at lib/list_debug.c:35 __list_add_valid_or_report+0xde/0xf8
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.10.0-rc3
Krnl PSW : 0404c00180000000 000003ffe0d6076a (__list_add_valid_or_report+0xe2/0xf8)
R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
...
Call Trace:
[<000003ffe0d6076a>] __list_add_valid_or_report+0xe2/0xf8
([<000003ffe0d60766>] __list_add_valid_or_report+0xde/0xf8)
[<000003ffe0a8d37e>] sclp_init+0x40e/0x450
[<000003ffe00009f2>] do_one_initcall+0x42/0x1e0
[<000003ffe15b77a6>] do_initcalls+0x126/0x150
[<000003ffe15b7a0a>] kernel_init_freeable+0x1ba/0x1f8
[<000003ffe0d6650e>] kernel_init+0x2e/0x180
[<000003ffe000301c>] __ret_from_fork+0x3c/0x60
[<000003ffe0d759ca>] ret_from_fork+0xa/0x30
Fix this by removing sclp_state_change_event from sclp_reg_list when
sclp_init() fails.
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/s390/char/sclp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
index 8f74db689a0c2..ba10f9b8fac72 100644
--- a/drivers/s390/char/sclp.c
+++ b/drivers/s390/char/sclp.c
@@ -1293,6 +1293,7 @@ sclp_init(void)
fail_unregister_reboot_notifier:
unregister_reboot_notifier(&sclp_reboot_notifier);
fail_init_state_uninitialized:
+ list_del(&sclp_state_change_event.list);
sclp_init_state = sclp_init_state_uninitialized;
free_page((unsigned long) sclp_read_sccb);
free_page((unsigned long) sclp_init_sccb);
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 21/33] platform/mellanox: nvsw-sn2201: Add check for platform_device_add_resources
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (18 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 20/33] s390/sclp: Fix sclp_init() cleanup on failure Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 22/33] platform/x86: wireless-hotkey: Add support for LG Airplane Button Sasha Levin
` (11 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Chen Ni, Hans de Goede, Sasha Levin, ilpo.jarvinen, vadimp,
platform-driver-x86
From: Chen Ni <nichen@iscas.ac.cn>
[ Upstream commit d56fbfbaf592a115b2e11c1044829afba34069d2 ]
Add check for the return value of platform_device_add_resources() and
return the error if it fails in order to catch the error.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://lore.kernel.org/r/20240605032745.2916183-1-nichen@iscas.ac.cn
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/mellanox/nvsw-sn2201.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/mellanox/nvsw-sn2201.c b/drivers/platform/mellanox/nvsw-sn2201.c
index 75b699676ca6d..1a7c45aa41bbf 100644
--- a/drivers/platform/mellanox/nvsw-sn2201.c
+++ b/drivers/platform/mellanox/nvsw-sn2201.c
@@ -1198,6 +1198,7 @@ static int nvsw_sn2201_config_pre_init(struct nvsw_sn2201 *nvsw_sn2201)
static int nvsw_sn2201_probe(struct platform_device *pdev)
{
struct nvsw_sn2201 *nvsw_sn2201;
+ int ret;
nvsw_sn2201 = devm_kzalloc(&pdev->dev, sizeof(*nvsw_sn2201), GFP_KERNEL);
if (!nvsw_sn2201)
@@ -1205,8 +1206,10 @@ static int nvsw_sn2201_probe(struct platform_device *pdev)
nvsw_sn2201->dev = &pdev->dev;
platform_set_drvdata(pdev, nvsw_sn2201);
- platform_device_add_resources(pdev, nvsw_sn2201_lpc_io_resources,
+ ret = platform_device_add_resources(pdev, nvsw_sn2201_lpc_io_resources,
ARRAY_SIZE(nvsw_sn2201_lpc_io_resources));
+ if (ret)
+ return ret;
nvsw_sn2201->main_mux_deferred_nr = NVSW_SN2201_MAIN_MUX_DEFER_NR;
nvsw_sn2201->main_mux_devs = nvsw_sn2201_main_mux_brdinfo;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 22/33] platform/x86: wireless-hotkey: Add support for LG Airplane Button
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (19 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 21/33] platform/mellanox: nvsw-sn2201: Add check for platform_device_add_resources Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 23/33] platform/x86: lg-laptop: Remove LGEX0815 hotkey handling Sasha Levin
` (10 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Armin Wolf, Agathe Boutmy, Ilpo Järvinen, Hans de Goede,
Sasha Levin, platform-driver-x86
From: Armin Wolf <W_Armin@gmx.de>
[ Upstream commit 151e78a0b89ee6dec93382dbdf5b1ef83f9c4716 ]
The LGEX0815 ACPI device is used by the "LG Airplane Mode Button"
Windows driver for handling rfkill requests. When the ACPI device
receives an 0x80 ACPI notification, an rfkill event is to be
send to userspace.
Add support for the LGEX0815 ACPI device to the driver.
Tested-by: Agathe Boutmy <agathe@boutmy.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240606233540.9774-2-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/wireless-hotkey.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/platform/x86/wireless-hotkey.c b/drivers/platform/x86/wireless-hotkey.c
index 4422863f47bbe..01feb6e6787f2 100644
--- a/drivers/platform/x86/wireless-hotkey.c
+++ b/drivers/platform/x86/wireless-hotkey.c
@@ -19,6 +19,7 @@ MODULE_AUTHOR("Alex Hung");
MODULE_ALIAS("acpi*:HPQ6001:*");
MODULE_ALIAS("acpi*:WSTADEF:*");
MODULE_ALIAS("acpi*:AMDI0051:*");
+MODULE_ALIAS("acpi*:LGEX0815:*");
struct wl_button {
struct input_dev *input_dev;
@@ -29,6 +30,7 @@ static const struct acpi_device_id wl_ids[] = {
{"HPQ6001", 0},
{"WSTADEF", 0},
{"AMDI0051", 0},
+ {"LGEX0815", 0},
{"", 0},
};
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 23/33] platform/x86: lg-laptop: Remove LGEX0815 hotkey handling
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (20 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 22/33] platform/x86: wireless-hotkey: Add support for LG Airplane Button Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 24/33] platform/x86: lg-laptop: Change ACPI device id Sasha Levin
` (9 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Armin Wolf, Agathe Boutmy, Ilpo Järvinen, Hans de Goede,
Sasha Levin, matan, platform-driver-x86
From: Armin Wolf <W_Armin@gmx.de>
[ Upstream commit 413c204595ca98a4f33414a948c18d7314087342 ]
The rfkill hotkey handling is already provided by the wireless-hotkey
driver. Remove the now unnecessary rfkill hotkey handling to avoid
duplicating functionality.
The ACPI notify handler still prints debugging information when
receiving ACPI notifications to aid in reverse-engineering.
Tested-by: Agathe Boutmy <agathe@boutmy.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240606233540.9774-3-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/lg-laptop.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c
index ad3c39e9e9f58..545872adbc52a 100644
--- a/drivers/platform/x86/lg-laptop.c
+++ b/drivers/platform/x86/lg-laptop.c
@@ -84,7 +84,6 @@ static const struct key_entry wmi_keymap[] = {
* this key both sends an event and
* changes backlight level.
*/
- {KE_KEY, 0x80, {KEY_RFKILL} },
{KE_END, 0}
};
@@ -272,14 +271,7 @@ static void wmi_input_setup(void)
static void acpi_notify(struct acpi_device *device, u32 event)
{
- struct key_entry *key;
-
acpi_handle_debug(device->handle, "notify: %d\n", event);
- if (inited & INIT_SPARSE_KEYMAP) {
- key = sparse_keymap_entry_from_scancode(wmi_input_dev, 0x80);
- if (key && key->type == KE_KEY)
- sparse_keymap_report_entry(wmi_input_dev, key, 1, true);
- }
}
static ssize_t fan_mode_store(struct device *dev,
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 24/33] platform/x86: lg-laptop: Change ACPI device id
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (21 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 23/33] platform/x86: lg-laptop: Remove LGEX0815 hotkey handling Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 25/33] platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB Sasha Levin
` (8 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Armin Wolf, Agathe Boutmy, Ilpo Järvinen, Hans de Goede,
Sasha Levin, matan, platform-driver-x86
From: Armin Wolf <W_Armin@gmx.de>
[ Upstream commit 58a54f27a0dac81f7fd3514be01012635219a53c ]
The LGEX0815 ACPI device id is used for handling hotkey events, but
this functionality is already handled by the wireless-hotkey driver.
The LGEX0820 ACPI device id however is used to manage various
platform features using the WMAB/WMBB ACPI methods. Use this ACPI
device id to avoid blocking the wireless-hotkey driver from probing.
Tested-by: Agathe Boutmy <agathe@boutmy.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240606233540.9774-4-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/lg-laptop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c
index 545872adbc52a..8f8eb13b2a6b2 100644
--- a/drivers/platform/x86/lg-laptop.c
+++ b/drivers/platform/x86/lg-laptop.c
@@ -768,7 +768,7 @@ static void acpi_remove(struct acpi_device *device)
}
static const struct acpi_device_id device_ids[] = {
- {"LGEX0815", 0},
+ {"LGEX0820", 0},
{"", 0}
};
MODULE_DEVICE_TABLE(acpi, device_ids);
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 25/33] platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (22 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 24/33] platform/x86: lg-laptop: Change ACPI device id Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 26/33] btrfs: qgroup: fix quota root leak after quota disable failure Sasha Levin
` (7 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Armin Wolf, Agathe Boutmy, Ilpo Järvinen, Hans de Goede,
Sasha Levin, matan, platform-driver-x86
From: Armin Wolf <W_Armin@gmx.de>
[ Upstream commit b27ea279556121b54d3f45d0529706cf100cdb3a ]
On the LG Gram 16Z90S, the WMAB and WMBB ACPI methods are not mapped
under \XINI, but instead are mapped under \_SB.XINI.
The reason for this is that the LGEX0820 ACPI device used by this
driver is mapped at \_SB.XINI, so the ACPI methods where moved as well
to appear below the LGEX0820 ACPI device.
Fix this by using the ACPI handle from the ACPI device when evaluating
both methods.
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218901
Tested-by: Agathe Boutmy <agathe@boutmy.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240606233540.9774-5-W_Armin@gmx.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/platform/x86/lg-laptop.c | 79 +++++++++++++-------------------
1 file changed, 33 insertions(+), 46 deletions(-)
diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c
index 8f8eb13b2a6b2..a1e27334cdf54 100644
--- a/drivers/platform/x86/lg-laptop.c
+++ b/drivers/platform/x86/lg-laptop.c
@@ -39,8 +39,6 @@ MODULE_LICENSE("GPL");
#define WMI_METHOD_WMBB "2B4F501A-BD3C-4394-8DCF-00A7D2BC8210"
#define WMI_EVENT_GUID WMI_EVENT_GUID0
-#define WMAB_METHOD "\\XINI.WMAB"
-#define WMBB_METHOD "\\XINI.WMBB"
#define SB_GGOV_METHOD "\\_SB.GGOV"
#define GOV_TLED 0x2020008
#define WM_GET 1
@@ -74,7 +72,7 @@ static u32 inited;
static int battery_limit_use_wmbb;
static struct led_classdev kbd_backlight;
-static enum led_brightness get_kbd_backlight_level(void);
+static enum led_brightness get_kbd_backlight_level(struct device *dev);
static const struct key_entry wmi_keymap[] = {
{KE_KEY, 0x70, {KEY_F15} }, /* LG control panel (F1) */
@@ -127,11 +125,10 @@ static int ggov(u32 arg0)
return res;
}
-static union acpi_object *lg_wmab(u32 method, u32 arg1, u32 arg2)
+static union acpi_object *lg_wmab(struct device *dev, u32 method, u32 arg1, u32 arg2)
{
union acpi_object args[3];
acpi_status status;
- acpi_handle handle;
struct acpi_object_list arg;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -142,29 +139,22 @@ static union acpi_object *lg_wmab(u32 method, u32 arg1, u32 arg2)
args[2].type = ACPI_TYPE_INTEGER;
args[2].integer.value = arg2;
- status = acpi_get_handle(NULL, (acpi_string) WMAB_METHOD, &handle);
- if (ACPI_FAILURE(status)) {
- pr_err("Cannot get handle");
- return NULL;
- }
-
arg.count = 3;
arg.pointer = args;
- status = acpi_evaluate_object(handle, NULL, &arg, &buffer);
+ status = acpi_evaluate_object(ACPI_HANDLE(dev), "WMAB", &arg, &buffer);
if (ACPI_FAILURE(status)) {
- acpi_handle_err(handle, "WMAB: call failed.\n");
+ dev_err(dev, "WMAB: call failed.\n");
return NULL;
}
return buffer.pointer;
}
-static union acpi_object *lg_wmbb(u32 method_id, u32 arg1, u32 arg2)
+static union acpi_object *lg_wmbb(struct device *dev, u32 method_id, u32 arg1, u32 arg2)
{
union acpi_object args[3];
acpi_status status;
- acpi_handle handle;
struct acpi_object_list arg;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
u8 buf[32];
@@ -180,18 +170,12 @@ static union acpi_object *lg_wmbb(u32 method_id, u32 arg1, u32 arg2)
args[2].buffer.length = 32;
args[2].buffer.pointer = buf;
- status = acpi_get_handle(NULL, (acpi_string)WMBB_METHOD, &handle);
- if (ACPI_FAILURE(status)) {
- pr_err("Cannot get handle");
- return NULL;
- }
-
arg.count = 3;
arg.pointer = args;
- status = acpi_evaluate_object(handle, NULL, &arg, &buffer);
+ status = acpi_evaluate_object(ACPI_HANDLE(dev), "WMBB", &arg, &buffer);
if (ACPI_FAILURE(status)) {
- acpi_handle_err(handle, "WMAB: call failed.\n");
+ dev_err(dev, "WMBB: call failed.\n");
return NULL;
}
@@ -222,7 +206,7 @@ static void wmi_notify(u32 value, void *context)
if (eventcode == 0x10000000) {
led_classdev_notify_brightness_hw_changed(
- &kbd_backlight, get_kbd_backlight_level());
+ &kbd_backlight, get_kbd_backlight_level(kbd_backlight.dev->parent));
} else {
key = sparse_keymap_entry_from_scancode(
wmi_input_dev, eventcode);
@@ -287,7 +271,7 @@ static ssize_t fan_mode_store(struct device *dev,
if (ret)
return ret;
- r = lg_wmab(WM_FAN_MODE, WM_GET, 0);
+ r = lg_wmab(dev, WM_FAN_MODE, WM_GET, 0);
if (!r)
return -EIO;
@@ -298,9 +282,9 @@ static ssize_t fan_mode_store(struct device *dev,
m = r->integer.value;
kfree(r);
- r = lg_wmab(WM_FAN_MODE, WM_SET, (m & 0xffffff0f) | (value << 4));
+ r = lg_wmab(dev, WM_FAN_MODE, WM_SET, (m & 0xffffff0f) | (value << 4));
kfree(r);
- r = lg_wmab(WM_FAN_MODE, WM_SET, (m & 0xfffffff0) | value);
+ r = lg_wmab(dev, WM_FAN_MODE, WM_SET, (m & 0xfffffff0) | value);
kfree(r);
return count;
@@ -312,7 +296,7 @@ static ssize_t fan_mode_show(struct device *dev,
unsigned int status;
union acpi_object *r;
- r = lg_wmab(WM_FAN_MODE, WM_GET, 0);
+ r = lg_wmab(dev, WM_FAN_MODE, WM_GET, 0);
if (!r)
return -EIO;
@@ -339,7 +323,7 @@ static ssize_t usb_charge_store(struct device *dev,
if (ret)
return ret;
- r = lg_wmbb(WMBB_USB_CHARGE, WM_SET, value);
+ r = lg_wmbb(dev, WMBB_USB_CHARGE, WM_SET, value);
if (!r)
return -EIO;
@@ -353,7 +337,7 @@ static ssize_t usb_charge_show(struct device *dev,
unsigned int status;
union acpi_object *r;
- r = lg_wmbb(WMBB_USB_CHARGE, WM_GET, 0);
+ r = lg_wmbb(dev, WMBB_USB_CHARGE, WM_GET, 0);
if (!r)
return -EIO;
@@ -381,7 +365,7 @@ static ssize_t reader_mode_store(struct device *dev,
if (ret)
return ret;
- r = lg_wmab(WM_READER_MODE, WM_SET, value);
+ r = lg_wmab(dev, WM_READER_MODE, WM_SET, value);
if (!r)
return -EIO;
@@ -395,7 +379,7 @@ static ssize_t reader_mode_show(struct device *dev,
unsigned int status;
union acpi_object *r;
- r = lg_wmab(WM_READER_MODE, WM_GET, 0);
+ r = lg_wmab(dev, WM_READER_MODE, WM_GET, 0);
if (!r)
return -EIO;
@@ -423,7 +407,7 @@ static ssize_t fn_lock_store(struct device *dev,
if (ret)
return ret;
- r = lg_wmab(WM_FN_LOCK, WM_SET, value);
+ r = lg_wmab(dev, WM_FN_LOCK, WM_SET, value);
if (!r)
return -EIO;
@@ -437,7 +421,7 @@ static ssize_t fn_lock_show(struct device *dev,
unsigned int status;
union acpi_object *r;
- r = lg_wmab(WM_FN_LOCK, WM_GET, 0);
+ r = lg_wmab(dev, WM_FN_LOCK, WM_GET, 0);
if (!r)
return -EIO;
@@ -467,9 +451,9 @@ static ssize_t charge_control_end_threshold_store(struct device *dev,
union acpi_object *r;
if (battery_limit_use_wmbb)
- r = lg_wmbb(WMBB_BATT_LIMIT, WM_SET, value);
+ r = lg_wmbb(&pf_device->dev, WMBB_BATT_LIMIT, WM_SET, value);
else
- r = lg_wmab(WM_BATT_LIMIT, WM_SET, value);
+ r = lg_wmab(&pf_device->dev, WM_BATT_LIMIT, WM_SET, value);
if (!r)
return -EIO;
@@ -488,7 +472,7 @@ static ssize_t charge_control_end_threshold_show(struct device *device,
union acpi_object *r;
if (battery_limit_use_wmbb) {
- r = lg_wmbb(WMBB_BATT_LIMIT, WM_GET, 0);
+ r = lg_wmbb(&pf_device->dev, WMBB_BATT_LIMIT, WM_GET, 0);
if (!r)
return -EIO;
@@ -499,7 +483,7 @@ static ssize_t charge_control_end_threshold_show(struct device *device,
status = r->buffer.pointer[0x10];
} else {
- r = lg_wmab(WM_BATT_LIMIT, WM_GET, 0);
+ r = lg_wmab(&pf_device->dev, WM_BATT_LIMIT, WM_GET, 0);
if (!r)
return -EIO;
@@ -578,7 +562,7 @@ static void tpad_led_set(struct led_classdev *cdev,
{
union acpi_object *r;
- r = lg_wmab(WM_TLED, WM_SET, brightness > LED_OFF);
+ r = lg_wmab(cdev->dev->parent, WM_TLED, WM_SET, brightness > LED_OFF);
kfree(r);
}
@@ -600,16 +584,16 @@ static void kbd_backlight_set(struct led_classdev *cdev,
val = 0;
if (brightness >= LED_FULL)
val = 0x24;
- r = lg_wmab(WM_KEY_LIGHT, WM_SET, val);
+ r = lg_wmab(cdev->dev->parent, WM_KEY_LIGHT, WM_SET, val);
kfree(r);
}
-static enum led_brightness get_kbd_backlight_level(void)
+static enum led_brightness get_kbd_backlight_level(struct device *dev)
{
union acpi_object *r;
int val;
- r = lg_wmab(WM_KEY_LIGHT, WM_GET, 0);
+ r = lg_wmab(dev, WM_KEY_LIGHT, WM_GET, 0);
if (!r)
return LED_OFF;
@@ -637,7 +621,7 @@ static enum led_brightness get_kbd_backlight_level(void)
static enum led_brightness kbd_backlight_get(struct led_classdev *cdev)
{
- return get_kbd_backlight_level();
+ return get_kbd_backlight_level(cdev->dev->parent);
}
static LED_DEVICE(kbd_backlight, 255, LED_BRIGHT_HW_CHANGED);
@@ -664,6 +648,11 @@ static struct platform_driver pf_driver = {
static int acpi_add(struct acpi_device *device)
{
+ struct platform_device_info pdev_info = {
+ .fwnode = acpi_fwnode_handle(device),
+ .name = PLATFORM_NAME,
+ .id = PLATFORM_DEVID_NONE,
+ };
int ret;
const char *product;
int year = 2017;
@@ -675,9 +664,7 @@ static int acpi_add(struct acpi_device *device)
if (ret)
return ret;
- pf_device = platform_device_register_simple(PLATFORM_NAME,
- PLATFORM_DEVID_NONE,
- NULL, 0);
+ pf_device = platform_device_register_full(&pdev_info);
if (IS_ERR(pf_device)) {
ret = PTR_ERR(pf_device);
pf_device = NULL;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 26/33] btrfs: qgroup: fix quota root leak after quota disable failure
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (23 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 25/33] platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 27/33] ibmvnic: Add tx check to prevent skb leak Sasha Levin
` (6 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Filipe Manana, Boris Burkov, Qu Wenruo, David Sterba, Sasha Levin,
clm, josef, linux-btrfs
From: Filipe Manana <fdmanana@suse.com>
[ Upstream commit a7e4c6a3031c74078dba7fa36239d0f4fe476c53 ]
If during the quota disable we fail when cleaning the quota tree or when
deleting the root from the root tree, we jump to the 'out' label without
ever dropping the reference on the quota root, resulting in a leak of the
root since fs_info->quota_root is no longer pointing to the root (we have
set it to NULL just before those steps).
Fix this by always doing a btrfs_put_root() call under the 'out' label.
This is a problem that exists since qgroups were first added in 2012 by
commit bed92eae26cc ("Btrfs: qgroup implementation and prototypes"), but
back then we missed a kfree on the quota root and free_extent_buffer()
calls on its root and commit root nodes, since back then roots were not
yet reference counted.
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/btrfs/qgroup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 99ea2c6d31944..223dfbf009938 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1228,7 +1228,7 @@ int btrfs_quota_enable(struct btrfs_fs_info *fs_info)
int btrfs_quota_disable(struct btrfs_fs_info *fs_info)
{
- struct btrfs_root *quota_root;
+ struct btrfs_root *quota_root = NULL;
struct btrfs_trans_handle *trans = NULL;
int ret = 0;
@@ -1323,9 +1323,9 @@ int btrfs_quota_disable(struct btrfs_fs_info *fs_info)
btrfs_free_tree_block(trans, btrfs_root_id(quota_root),
quota_root->node, 0, 1);
- btrfs_put_root(quota_root);
out:
+ btrfs_put_root(quota_root);
mutex_unlock(&fs_info->qgroup_ioctl_lock);
if (ret && trans)
btrfs_end_transaction(trans);
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 27/33] ibmvnic: Add tx check to prevent skb leak
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (24 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 26/33] btrfs: qgroup: fix quota root leak after quota disable failure Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 28/33] ALSA: PCM: Allow resume only for suspended streams Sasha Levin
` (5 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Nick Child, Paolo Abeni, Sasha Levin, mpe, haren, ricklind, davem,
edumazet, kuba, linuxppc-dev, netdev
From: Nick Child <nnac123@linux.ibm.com>
[ Upstream commit 0983d288caf984de0202c66641577b739caad561 ]
Below is a summary of how the driver stores a reference to an skb during
transmit:
tx_buff[free_map[consumer_index]]->skb = new_skb;
free_map[consumer_index] = IBMVNIC_INVALID_MAP;
consumer_index ++;
Where variable data looks like this:
free_map == [4, IBMVNIC_INVALID_MAP, IBMVNIC_INVALID_MAP, 0, 3]
consumer_index^
tx_buff == [skb=null, skb=<ptr>, skb=<ptr>, skb=null, skb=null]
The driver has checks to ensure that free_map[consumer_index] pointed to
a valid index but there was no check to ensure that this index pointed
to an unused/null skb address. So, if, by some chance, our free_map and
tx_buff lists become out of sync then we were previously risking an
skb memory leak. This could then cause tcp congestion control to stop
sending packets, eventually leading to ETIMEDOUT.
Therefore, add a conditional to ensure that the skb address is null. If
not then warn the user (because this is still a bug that should be
patched) and free the old pointer to prevent memleak/tcp problems.
Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/ibm/ibmvnic.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index cdf5251e56795..e6e03cb014cb7 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2478,6 +2478,18 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
(tx_pool->consumer_index + 1) % tx_pool->num_buffers;
tx_buff = &tx_pool->tx_buff[bufidx];
+
+ /* Sanity checks on our free map to make sure it points to an index
+ * that is not being occupied by another skb. If skb memory is
+ * not freed then we see congestion control kick in and halt tx.
+ */
+ if (unlikely(tx_buff->skb)) {
+ dev_warn_ratelimited(dev, "TX free map points to untracked skb (%s %d idx=%d)\n",
+ skb_is_gso(skb) ? "tso_pool" : "tx_pool",
+ queue_num, bufidx);
+ dev_kfree_skb_any(tx_buff->skb);
+ }
+
tx_buff->skb = skb;
tx_buff->index = bufidx;
tx_buff->pool_index = queue_num;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 28/33] ALSA: PCM: Allow resume only for suspended streams
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (25 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 27/33] ibmvnic: Add tx check to prevent skb leak Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 29/33] ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx Sasha Levin
` (4 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Takashi Iwai, Sasha Levin, perex, tiwai, pavel.hofman, dhowells,
cezary.rojewski, linux-sound
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 1225675ca74c746f09211528588e83b3def1ff6a ]
snd_pcm_resume() should bail out if the stream isn't in a suspended
state. Otherwise it'd allow doubly resume.
Link: https://patch.msgid.link/20240624125443.27808-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/core/pcm_native.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index bd9ddf412b465..cc21c483c4a57 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1783,6 +1783,8 @@ static int snd_pcm_pre_resume(struct snd_pcm_substream *substream,
snd_pcm_state_t state)
{
struct snd_pcm_runtime *runtime = substream->runtime;
+ if (runtime->state != SNDRV_PCM_STATE_SUSPENDED)
+ return -EBADFD;
if (!(runtime->info & SNDRV_PCM_INFO_RESUME))
return -ENOSYS;
runtime->trigger_master = substream;
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 29/33] ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (26 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 28/33] ALSA: PCM: Allow resume only for suspended streams Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 30/33] ALSA: dmaengine_pcm: terminate dmaengine before synchronize Sasha Levin
` (3 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Aivaz Latypov, Takashi Iwai, Sasha Levin, perex, tiwai, kailang,
sbinding, shenghao-ding, simont, foss, rf, linux-sound
From: Aivaz Latypov <reichaivaz@gmail.com>
[ Upstream commit 1d091a98c399c17d0571fa1d91a7123a698446e4 ]
This HP Laptop uses ALC236 codec with COEF 0x07 controlling
the mute LED. Enable existing quirk for this device.
Signed-off-by: Aivaz Latypov <reichaivaz@gmail.com>
Link: https://patch.msgid.link/20240625081217.1049-1-reichaivaz@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index af70e764ea4bc..404c6080a6538 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9852,6 +9852,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
+ SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 30/33] ALSA: dmaengine_pcm: terminate dmaengine before synchronize
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (27 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 29/33] ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 31/33] parisc: use generic sys_fanotify_mark implementation Sasha Levin
` (2 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Shengjiu Wang, Takashi Iwai, Sasha Levin, lars, perex, tiwai,
linux-sound
From: Shengjiu Wang <shengjiu.wang@nxp.com>
[ Upstream commit 6a7db25aad8ce6512b366d2ce1d0e60bac00a09d ]
When dmaengine supports pause function, in suspend state,
dmaengine_pause() is called instead of dmaengine_terminate_async(),
In end of playback stream, the runtime->state will go to
SNDRV_PCM_STATE_DRAINING, if system suspend & resume happen
at this time, application will not resume playback stream, the
stream will be closed directly, the dmaengine_terminate_async()
will not be called before the dmaengine_synchronize(), which
violates the call sequence for dmaengine_synchronize().
This behavior also happens for capture streams, but there is no
SNDRV_PCM_STATE_DRAINING state for capture. So use
dmaengine_tx_status() to check the DMA status if the status is
DMA_PAUSED, then call dmaengine_terminate_async() to terminate
dmaengine before dmaengine_synchronize().
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1718851218-27803-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/core/pcm_dmaengine.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c
index d142609570347..e299e8634751f 100644
--- a/sound/core/pcm_dmaengine.c
+++ b/sound/core/pcm_dmaengine.c
@@ -368,6 +368,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_sync_stop);
int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream)
{
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
+ struct dma_tx_state state;
+ enum dma_status status;
+
+ status = dmaengine_tx_status(prtd->dma_chan, prtd->cookie, &state);
+ if (status == DMA_PAUSED)
+ dmaengine_terminate_async(prtd->dma_chan);
dmaengine_synchronize(prtd->dma_chan);
kfree(prtd);
@@ -388,6 +394,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_close);
int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream)
{
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
+ struct dma_tx_state state;
+ enum dma_status status;
+
+ status = dmaengine_tx_status(prtd->dma_chan, prtd->cookie, &state);
+ if (status == DMA_PAUSED)
+ dmaengine_terminate_async(prtd->dma_chan);
dmaengine_synchronize(prtd->dma_chan);
dma_release_channel(prtd->dma_chan);
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 31/33] parisc: use generic sys_fanotify_mark implementation
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (28 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 30/33] ALSA: dmaengine_pcm: terminate dmaengine before synchronize Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 32/33] ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 33/33] net: usb: qmi_wwan: add Telit FN912 compositions Sasha Levin
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Arnd Bergmann, Adhemerval Zanella, Helge Deller, Sasha Levin,
James.Bottomley, geert, peterz, tglx, sohil.mehta, jeffxu,
mszeredi, casey, linux-parisc
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit 403f17a330732a666ae793f3b15bc75bb5540524 ]
The sys_fanotify_mark() syscall on parisc uses the reverse word order
for the two halves of the 64-bit argument compared to all syscalls on
all 32-bit architectures. As far as I can tell, the problem is that
the function arguments on parisc are sorted backwards (26, 25, 24, 23,
...) compared to everyone else, so the calling conventions of using an
even/odd register pair in native word order result in the lower word
coming first in function arguments, matching the expected behavior
on little-endian architectures. The system call conventions however
ended up matching what the other 32-bit architectures do.
A glibc cleanup in 2020 changed the userspace behavior in a way that
handles all architectures consistently, but this inadvertently broke
parisc32 by changing to the same method as everyone else.
The change made it into glibc-2.35 and subsequently into debian 12
(bookworm), which is the latest stable release. This means we
need to choose between reverting the glibc change or changing the
kernel to match it again, but either hange will leave some systems
broken.
Pick the option that is more likely to help current and future
users and change the kernel to match current glibc. This also
means the behavior is now consistent across architectures, but
it breaks running new kernels with old glibc builds before 2.35.
Link: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d150181d73d9
Link: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/arch/parisc/kernel/sys_parisc.c?h=57b1dfbd5b4a39d
Cc: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Tested-by: Helge Deller <deller@gmx.de>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I found this through code inspection, please double-check to make
sure I got the bug and the fix right.
The alternative is to fix this by reverting glibc back to the
unusual behavior.
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/parisc/Kconfig | 1 +
arch/parisc/kernel/sys_parisc32.c | 9 ---------
arch/parisc/kernel/syscalls/syscall.tbl | 2 +-
3 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 4adeb73d5885c..722e83edad282 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -14,6 +14,7 @@ config PARISC
select ARCH_HAS_UBSAN_SANITIZE_ALL
select ARCH_HAS_PTE_SPECIAL
select ARCH_NO_SG_CHAIN
+ select ARCH_SPLIT_ARG64 if !64BIT
select ARCH_SUPPORTS_HUGETLBFS if PA20
select ARCH_SUPPORTS_MEMORY_FAILURE
select ARCH_STACKWALK
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index 2a12a547b447b..826c8e51b5853 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -23,12 +23,3 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
current->comm, current->pid, r20);
return -ENOSYS;
}
-
-asmlinkage long sys32_fanotify_mark(compat_int_t fanotify_fd, compat_uint_t flags,
- compat_uint_t mask0, compat_uint_t mask1, compat_int_t dfd,
- const char __user * pathname)
-{
- return sys_fanotify_mark(fanotify_fd, flags,
- ((__u64)mask1 << 32) | mask0,
- dfd, pathname);
-}
diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl
index e97c175b56f96..b2515974ea954 100644
--- a/arch/parisc/kernel/syscalls/syscall.tbl
+++ b/arch/parisc/kernel/syscalls/syscall.tbl
@@ -364,7 +364,7 @@
320 common accept4 sys_accept4
321 common prlimit64 sys_prlimit64
322 common fanotify_init sys_fanotify_init
-323 common fanotify_mark sys_fanotify_mark sys32_fanotify_mark
+323 common fanotify_mark sys_fanotify_mark compat_sys_fanotify_mark
324 32 clock_adjtime sys_clock_adjtime32
324 64 clock_adjtime sys_clock_adjtime
325 common name_to_handle_at sys_name_to_handle_at
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 32/33] ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (29 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 31/33] parisc: use generic sys_fanotify_mark implementation Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 33/33] net: usb: qmi_wwan: add Telit FN912 compositions Sasha Levin
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Vyacheslav Frantsishko, Mario Limonciello, Mark Brown,
Sasha Levin, lgirdwood, perex, tiwai, me, end.to.start, git,
linux-sound
From: Vyacheslav Frantsishko <itmymaill@gmail.com>
[ Upstream commit 63b47f026cc841bd3d3438dd6fccbc394dfead87 ]
The Vivobook S 16X IPS needs a quirks-table entry for the internal microphone to function properly.
Signed-off-by: Vyacheslav Frantsishko <itmymaill@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20240626070334.45633-1-itmymaill@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 1760b5d42460a..4e3a8ce690a45 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -283,6 +283,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "M5402RA"),
}
},
+ {
+ .driver_data = &acp6x_card,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "M5602RA"),
+ }
+ },
{
.driver_data = &acp6x_card,
.matches = {
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
* [PATCH AUTOSEL 6.6 33/33] net: usb: qmi_wwan: add Telit FN912 compositions
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
` (30 preceding siblings ...)
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 32/33] ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA Sasha Levin
@ 2024-07-09 16:21 ` Sasha Levin
31 siblings, 0 replies; 33+ messages in thread
From: Sasha Levin @ 2024-07-09 16:21 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Daniele Palmas, Bjørn Mork, Jakub Kicinski, Sasha Levin,
davem, edumazet, pabeni, netdev, linux-usb
From: Daniele Palmas <dnlplm@gmail.com>
[ Upstream commit 77453e2b015b5ced5b3f45364dd5a72dfc3bdecb ]
Add the following Telit FN912 compositions:
0x3000: rmnet + tty (AT/NMEA) + tty (AT) + tty (diag)
T: Bus=03 Lev=01 Prnt=03 Port=07 Cnt=01 Dev#= 8 Spd=480 MxCh= 0
D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1bc7 ProdID=3000 Rev=05.15
S: Manufacturer=Telit Cinterion
S: Product=FN912
S: SerialNumber=92c4c4d8
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
0x3001: rmnet + tty (AT) + tty (diag) + DPL (data packet logging) + adb
T: Bus=03 Lev=01 Prnt=03 Port=07 Cnt=01 Dev#= 7 Spd=480 MxCh= 0
D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1bc7 ProdID=3001 Rev=05.15
S: Manufacturer=Telit Cinterion
S: Product=FN912
S: SerialNumber=92c4c4d8
C: #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=80 Driver=(none)
E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Link: https://patch.msgid.link/20240625102236.69539-1-dnlplm@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/qmi_wwan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index a5469cf5cf670..befbca01bfe37 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1380,6 +1380,8 @@ static const struct usb_device_id products[] = {
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1260, 2)}, /* Telit LE910Cx */
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1261, 2)}, /* Telit LE910Cx */
{QMI_QUIRK_SET_DTR(0x1bc7, 0x1900, 1)}, /* Telit LN940 series */
+ {QMI_QUIRK_SET_DTR(0x1bc7, 0x3000, 0)}, /* Telit FN912 series */
+ {QMI_QUIRK_SET_DTR(0x1bc7, 0x3001, 0)}, /* Telit FN912 series */
{QMI_FIXED_INTF(0x1c9e, 0x9801, 3)}, /* Telewell TW-3G HSPA+ */
{QMI_FIXED_INTF(0x1c9e, 0x9803, 4)}, /* Telewell TW-3G HSPA+ */
{QMI_FIXED_INTF(0x1c9e, 0x9b01, 3)}, /* XS Stick W100-2 from 4G Systems */
--
2.43.0
^ permalink raw reply related [flat|nested] 33+ messages in thread
end of thread, other threads:[~2024-07-09 16:23 UTC | newest]
Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 16:21 [PATCH AUTOSEL 6.6 01/33] Input: elantech - fix touchpad state on resume for Lenovo N24 Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 02/33] Input: i8042 - add Ayaneo Kun to i8042 quirk table Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 03/33] ASoC: rt722-sdca-sdw: add silence detection register as volatile Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 04/33] Input: xpad - add support for ASUS ROG RAIKIRI PRO Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 05/33] ASoC: topology: Fix references to freed memory Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 06/33] ASoC: topology: Do not assign fields that are already set Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 07/33] ASoC: topology: Clean up route loading Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 08/33] bytcr_rt5640 : inverse jack detect for Archos 101 cesium Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 09/33] ALSA: dmaengine: Synchronize dma channel after drop() Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 10/33] ASoC: ti: davinci-mcasp: Set min period size using FIFO config Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 11/33] ASoC: ti: omap-hdmi: Fix too long driver name Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 12/33] ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 13/33] ASoC: rt722-sdca-sdw: add debounce time for type detection Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 14/33] ASoC: topology: Fix route memory corruption Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 15/33] nvme: fix NVME_NS_DEAC may incorrectly identifying the disk as EXT_LBA Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 16/33] Input: ads7846 - use spi_device_id table Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 17/33] can: kvaser_usb: fix return value for hif_usb_send_regout Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 18/33] gpio: pca953x: fix pca953x_irq_bus_sync_unlock race Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 19/33] octeontx2-pf: Fix coverity and klockwork issues in octeon PF driver Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 20/33] s390/sclp: Fix sclp_init() cleanup on failure Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 21/33] platform/mellanox: nvsw-sn2201: Add check for platform_device_add_resources Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 22/33] platform/x86: wireless-hotkey: Add support for LG Airplane Button Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 23/33] platform/x86: lg-laptop: Remove LGEX0815 hotkey handling Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 24/33] platform/x86: lg-laptop: Change ACPI device id Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 25/33] platform/x86: lg-laptop: Use ACPI device handle when evaluating WMAB/WMBB Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 26/33] btrfs: qgroup: fix quota root leak after quota disable failure Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 27/33] ibmvnic: Add tx check to prevent skb leak Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 28/33] ALSA: PCM: Allow resume only for suspended streams Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 29/33] ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 30/33] ALSA: dmaengine_pcm: terminate dmaengine before synchronize Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 31/33] parisc: use generic sys_fanotify_mark implementation Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 32/33] ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA Sasha Levin
2024-07-09 16:21 ` [PATCH AUTOSEL 6.6 33/33] net: usb: qmi_wwan: add Telit FN912 compositions Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).