* [PATCH AUTOSEL 4.14 2/5] ASoC: cs43130: Fix incorrect frame delay configuration
2023-12-11 14:03 [PATCH AUTOSEL 4.14 1/5] ASoC: cs43130: Fix the position of const qualifier Sasha Levin
@ 2023-12-11 14:03 ` Sasha Levin
2023-12-11 14:03 ` [PATCH AUTOSEL 4.14 3/5] net/tg3: fix race condition in tg3_reset_task() Sasha Levin
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-12-11 14:03 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Maciej Strozek, Charles Keepax, Mark Brown, Sasha Levin,
james.schulman, david.rhodes, rf, lgirdwood, perex, tiwai,
alsa-devel, patches, linux-sound
From: Maciej Strozek <mstrozek@opensource.cirrus.com>
[ Upstream commit aa7e8e5e4011571022dc06e4d7a2f108feb53d1a ]
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231117141344.64320-3-mstrozek@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/cs43130.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c
index 793496e8d262d..ad5d527e6e527 100644
--- a/sound/soc/codecs/cs43130.c
+++ b/sound/soc/codecs/cs43130.c
@@ -581,7 +581,7 @@ static int cs43130_set_sp_fmt(int dai_id, unsigned int bitwidth_sclk,
break;
case SND_SOC_DAIFMT_LEFT_J:
hi_size = bitwidth_sclk;
- frm_delay = 2;
+ frm_delay = 0;
frm_phase = 1;
break;
case SND_SOC_DAIFMT_DSP_A:
--
2.42.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH AUTOSEL 4.14 3/5] net/tg3: fix race condition in tg3_reset_task()
2023-12-11 14:03 [PATCH AUTOSEL 4.14 1/5] ASoC: cs43130: Fix the position of const qualifier Sasha Levin
2023-12-11 14:03 ` [PATCH AUTOSEL 4.14 2/5] ASoC: cs43130: Fix incorrect frame delay configuration Sasha Levin
@ 2023-12-11 14:03 ` Sasha Levin
2023-12-11 14:03 ` [PATCH AUTOSEL 4.14 4/5] ASoC: da7219: Support low DC impedance headset Sasha Levin
2023-12-11 14:03 ` [PATCH AUTOSEL 4.14 5/5] drm/exynos: fix a potential error pointer dereference Sasha Levin
3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-12-11 14:03 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Thinh Tran, Venkata Sai Duggi, David Christensen, Michael Chan,
Jakub Kicinski, Sasha Levin, pavan.chebbi, mchan, davem,
edumazet, pabeni, netdev
From: Thinh Tran <thinhtr@linux.vnet.ibm.com>
[ Upstream commit 16b55b1f2269962fb6b5154b8bf43f37c9a96637 ]
When an EEH error is encountered by a PCI adapter, the EEH driver
modifies the PCI channel's state as shown below:
enum {
/* I/O channel is in normal state */
pci_channel_io_normal = (__force pci_channel_state_t) 1,
/* I/O to channel is blocked */
pci_channel_io_frozen = (__force pci_channel_state_t) 2,
/* PCI card is dead */
pci_channel_io_perm_failure = (__force pci_channel_state_t) 3,
};
If the same EEH error then causes the tg3 driver's transmit timeout
logic to execute, the tg3_tx_timeout() function schedules a reset
task via tg3_reset_task_schedule(), which may cause a race condition
between the tg3 and EEH driver as both attempt to recover the HW via
a reset action.
EEH driver gets error event
--> eeh_set_channel_state()
and set device to one of
error state above scheduler: tg3_reset_task() get
returned error from tg3_init_hw()
--> dev_close() shuts down the interface
tg3_io_slot_reset() and
tg3_io_resume() fail to
reset/resume the device
To resolve this issue, we avoid the race condition by checking the PCI
channel state in the tg3_reset_task() function and skip the tg3 driver
initiated reset when the PCI channel is not in the normal state. (The
driver has no access to tg3 device registers at this point and cannot
even complete the reset task successfully without external assistance.)
We'll leave the reset procedure to be managed by the EEH driver which
calls the tg3_io_error_detected(), tg3_io_slot_reset() and
tg3_io_resume() functions as appropriate.
Adding the same checking in tg3_dump_state() to avoid dumping all
device registers when the PCI channel is not in the normal state.
Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
Tested-by: Venkata Sai Duggi <venkata.sai.duggi@ibm.com>
Reviewed-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20231201001911.656-1-thinhtr@linux.vnet.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/broadcom/tg3.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index fa89d71336c6a..20ec767179ecb 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6434,6 +6434,14 @@ static void tg3_dump_state(struct tg3 *tp)
int i;
u32 *regs;
+ /* If it is a PCI error, all registers will be 0xffff,
+ * we don't dump them out, just report the error and return
+ */
+ if (tp->pdev->error_state != pci_channel_io_normal) {
+ netdev_err(tp->dev, "PCI channel ERROR!\n");
+ return;
+ }
+
regs = kzalloc(TG3_REG_BLK_SIZE, GFP_ATOMIC);
if (!regs)
return;
@@ -11159,7 +11167,8 @@ static void tg3_reset_task(struct work_struct *work)
rtnl_lock();
tg3_full_lock(tp, 0);
- if (tp->pcierr_recovery || !netif_running(tp->dev)) {
+ if (tp->pcierr_recovery || !netif_running(tp->dev) ||
+ tp->pdev->error_state != pci_channel_io_normal) {
tg3_flag_clear(tp, RESET_TASK_PENDING);
tg3_full_unlock(tp);
rtnl_unlock();
--
2.42.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH AUTOSEL 4.14 4/5] ASoC: da7219: Support low DC impedance headset
2023-12-11 14:03 [PATCH AUTOSEL 4.14 1/5] ASoC: cs43130: Fix the position of const qualifier Sasha Levin
2023-12-11 14:03 ` [PATCH AUTOSEL 4.14 2/5] ASoC: cs43130: Fix incorrect frame delay configuration Sasha Levin
2023-12-11 14:03 ` [PATCH AUTOSEL 4.14 3/5] net/tg3: fix race condition in tg3_reset_task() Sasha Levin
@ 2023-12-11 14:03 ` Sasha Levin
2023-12-11 14:03 ` [PATCH AUTOSEL 4.14 5/5] drm/exynos: fix a potential error pointer dereference Sasha Levin
3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-12-11 14:03 UTC (permalink / raw)
To: linux-kernel, stable
Cc: David Rau, Mark Brown, Sasha Levin, support.opensource,
lgirdwood, perex, tiwai, linux-sound
From: David Rau <David.Rau.opensource@dm.renesas.com>
[ Upstream commit 5f44de697383fcc9a9a1a78f99e09d1838704b90 ]
Change the default MIC detection impedance threshold to 200ohm
to support low mic DC impedance headset.
Signed-off-by: David Rau <David.Rau.opensource@dm.renesas.com>
Link: https://lore.kernel.org/r/20231201042933.26392-1-David.Rau.opensource@dm.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/da7219-aad.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/da7219-aad.c b/sound/soc/codecs/da7219-aad.c
index 793c8768f7c44..5a31a4db1e23a 100644
--- a/sound/soc/codecs/da7219-aad.c
+++ b/sound/soc/codecs/da7219-aad.c
@@ -650,7 +650,7 @@ static struct da7219_aad_pdata *da7219_aad_fw_to_pdata(struct snd_soc_codec *cod
aad_pdata->mic_det_thr =
da7219_aad_fw_mic_det_thr(codec, fw_val32);
else
- aad_pdata->mic_det_thr = DA7219_AAD_MIC_DET_THR_500_OHMS;
+ aad_pdata->mic_det_thr = DA7219_AAD_MIC_DET_THR_200_OHMS;
if (fwnode_property_read_u32(aad_np, "dlg,jack-ins-deb", &fw_val32) >= 0)
aad_pdata->jack_ins_deb =
--
2.42.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 4.14 5/5] drm/exynos: fix a potential error pointer dereference
2023-12-11 14:03 [PATCH AUTOSEL 4.14 1/5] ASoC: cs43130: Fix the position of const qualifier Sasha Levin
` (2 preceding siblings ...)
2023-12-11 14:03 ` [PATCH AUTOSEL 4.14 4/5] ASoC: da7219: Support low DC impedance headset Sasha Levin
@ 2023-12-11 14:03 ` Sasha Levin
3 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2023-12-11 14:03 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Xiang Yang, Inki Dae, Sasha Levin, sw0312.kim, kyungmin.park,
airlied, daniel, krzysztof.kozlowski, dri-devel,
linux-arm-kernel, linux-samsung-soc
From: Xiang Yang <xiangyang3@huawei.com>
[ Upstream commit 73bf1c9ae6c054c53b8e84452c5e46f86dd28246 ]
Smatch reports the warning below:
drivers/gpu/drm/exynos/exynos_hdmi.c:1864 hdmi_bind()
error: 'crtc' dereferencing possible ERR_PTR()
The return value of exynos_drm_crtc_get_by_type maybe ERR_PTR(-ENODEV),
which can not be used directly. Fix this by checking the return value
before using it.
Signed-off-by: Xiang Yang <xiangyang3@huawei.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 0109ff40b1db2..3d79a7af8c862 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1722,6 +1722,8 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data)
return ret;
crtc = exynos_drm_crtc_get_by_type(drm_dev, EXYNOS_DISPLAY_TYPE_HDMI);
+ if (IS_ERR(crtc))
+ return PTR_ERR(crtc);
crtc->pipe_clk = &hdata->phy_clk;
ret = hdmi_create_connector(encoder);
--
2.42.0
^ permalink raw reply [flat|nested] 5+ messages in thread