Skip to content

ASoC: intel: hdac_hdmi: fix use _write function for SET_POWER_STATE verb - #246

Closed
bardliao wants to merge 1 commit into
thesofproject:topic/sof-devfrom
bardliao:topic/hdac_hdmi
Closed

ASoC: intel: hdac_hdmi: fix use _write function for SET_POWER_STATE verb#246
bardliao wants to merge 1 commit into
thesofproject:topic/sof-devfrom
bardliao:topic/hdac_hdmi

Conversation

@bardliao

Copy link
Copy Markdown
Collaborator

Currently we use snd_hdac_codec_read to set AC_VERB_SET_POWER_STATE
verb. Replace it with snd_hdac_codec_write.

Signed-off-by: Bard liao bard.liao@intel.com

*/
snd_hdac_codec_read(hdev, hdev->afg, 0,AC_VERB_SET_POWER_STATE,
AC_PWRST_D3);
snd_hdac_codec_write(hdev, hdev->afg, 0,AC_VERB_SET_POWER_STATE,

@ranj063ranj063Nov 6, 2018

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bardliao the comment just above this line contradicts exactly what you're doing here. This commit explains why codec_read should be instead of codec_write() 1b377cc
Care to explain the reason for the change?

@bardliao

Copy link
Copy Markdown
CollaboratorAuthor

Thanks @ranj063 Now I understand why it uses snd_hdac_codec_read instead of snd_hdac_codec_write. :)

@bardliaobardliao closed this Nov 6, 2018
Currently we use snd_hdac_codec_read to set AC_VERB_SET_POWER_STATE
verb. Replace it with snd_hdac_codec_write.
Signed-off-by: Bard liao <bard.liao@intel.com>
@jsarhajsarha mentioned this pull request Nov 30, 2022
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
Add a big batch of test coverage to assert all aspects of the tcx opts
attach, detach and query API:
# ./vmtest.sh -- ./test_progs -t tc_opts
[...]
thesofproject#238 tc_opts_after:OK
thesofproject#239 tc_opts_append:OK
thesofproject#240 tc_opts_basic:OK
thesofproject#241 tc_opts_before:OK
thesofproject#242 tc_opts_chain_classic:OK
thesofproject#243 tc_opts_demixed:OK
thesofproject#244 tc_opts_detach:OK
thesofproject#245 tc_opts_detach_after:OK
thesofproject#246 tc_opts_detach_before:OK
thesofproject#247 tc_opts_dev_cleanup:OK
thesofproject#248 tc_opts_invalid:OK
thesofproject#249 tc_opts_mixed:OK
thesofproject#250 tc_opts_prepend:OK
thesofproject#251 tc_opts_replace:OK
thesofproject#252 tc_opts_revision:OK
Summary: 15/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20230719140858.13224-8-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
Add a detachment test case with miniq present to assert that with and
without the miniq we get the same error.
# ./test_progs -t tc_opts
thesofproject#244 tc_opts_after:OK
thesofproject#245 tc_opts_append:OK
thesofproject#246 tc_opts_basic:OK
thesofproject#247 tc_opts_before:OK
thesofproject#248 tc_opts_chain_classic:OK
thesofproject#249 tc_opts_delete_empty:OK
thesofproject#250 tc_opts_demixed:OK
thesofproject#251 tc_opts_detach:OK
thesofproject#252 tc_opts_detach_after:OK
thesofproject#253 tc_opts_detach_before:OK
thesofproject#254 tc_opts_dev_cleanup:OK
thesofproject#255 tc_opts_invalid:OK
thesofproject#256 tc_opts_mixed:OK
thesofproject#257 tc_opts_prepend:OK
thesofproject#258 tc_opts_replace:OK
thesofproject#259 tc_opts_revision:OK
Summary: 16/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20230804131112.11012-2-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
Add several new tcx test cases to improve test coverage. This also includes
a few new tests with ingress instead of clsact qdisc, to cover the fix from
commit dc644b5 ("tcx: Fix splat in ingress_destroy upon tcx_entry_free").
# ./test_progs -t tc
[...]
thesofproject#234 tc_links_after:OK
thesofproject#235 tc_links_append:OK
thesofproject#236 tc_links_basic:OK
thesofproject#237 tc_links_before:OK
thesofproject#238 tc_links_chain_classic:OK
thesofproject#239 tc_links_chain_mixed:OK
thesofproject#240 tc_links_dev_cleanup:OK
thesofproject#241 tc_links_dev_mixed:OK
thesofproject#242 tc_links_ingress:OK
thesofproject#243 tc_links_invalid:OK
thesofproject#244 tc_links_prepend:OK
thesofproject#245 tc_links_replace:OK
thesofproject#246 tc_links_revision:OK
thesofproject#247 tc_opts_after:OK
thesofproject#248 tc_opts_append:OK
thesofproject#249 tc_opts_basic:OK
thesofproject#250 tc_opts_before:OK
thesofproject#251 tc_opts_chain_classic:OK
thesofproject#252 tc_opts_chain_mixed:OK
thesofproject#253 tc_opts_delete_empty:OK
thesofproject#254 tc_opts_demixed:OK
thesofproject#255 tc_opts_detach:OK
thesofproject#256 tc_opts_detach_after:OK
thesofproject#257 tc_opts_detach_before:OK
thesofproject#258 tc_opts_dev_cleanup:OK
thesofproject#259 tc_opts_invalid:OK
thesofproject#260 tc_opts_mixed:OK
thesofproject#261 tc_opts_prepend:OK
thesofproject#262 tc_opts_replace:OK
thesofproject#263 tc_opts_revision:OK
[...]
Summary: 44/38 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/8699efc284b75ccdc51ddf7062fa2370330dc6c0.1692029283.git.daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
bardliao pushed a commit that referenced this pull request May 21, 2026
ovpn injects decrypted packets into the netdev RX path through
ovpn_netdev_write() which invokes gro_cells_receive() and
dev_dstats_rx_add().
ovpn_netdev_write() is normally called in softirq context,
however, in case of TCP connections it may also be invoked
process context.
When this happens gro_cells_receive() will throw a warning:
[ 230.183747][ T12] WARNING: net/core/gro_cells.c:30 at gro_cells_receive+0x708/0xaa0, CPU#1: kworker/u16:0/12
and lockdep will also report a potential inconsistent lock state:
WARNING: inconsistent lock state
7.0.0-rc4+ #246 Tainted: G W
--------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
because attempts to acquire gro_cells->bh_lock by both
contexts may lead to a deadlock.
At the same time, dev_dstats_rx_add() does not expect to race
with a softirq (which may happen when invoked in process context),
because the latter may access its per-cpu state and corrupt
it.
Fix all this by invoking local_bh_disable/enable() around
gro_cells_receive() and dev_dstats_rx_add() to ensure that
bottom halves are always disabled before calling both of
them.
Fixes: 11851cb ("ovpn: implement TCP transport")
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bardliao@ranj063