Commit 6cc4e5e
ALSA: hdsp: Break infinite MIDI input flush loop
[ Upstream commit c01f381 ]
The current MIDI input flush on HDSP and HDSPM drivers relies on the
hardware reporting the right value. If the hardware doesn't give the
proper value but returns -1, it may be stuck at an infinite loop.
Add a counter and break if the loop is unexpectedly too long.
Link: https://patch.msgid.link/20240808091513.31380-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 7a55740 commit 6cc4e5e
2 files changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1298 | 1298 | | |
1299 | 1299 | | |
1300 | 1300 | | |
1301 | | - | |
1302 | | - | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1303 | 1305 | | |
1304 | 1306 | | |
1305 | 1307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1838 | 1838 | | |
1839 | 1839 | | |
1840 | 1840 | | |
1841 | | - | |
1842 | | - | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
1843 | 1845 | | |
1844 | 1846 | | |
1845 | 1847 | | |
| |||
0 commit comments