提交 eb8e0ee4 编写于 作者: M Mike Isely 提交者: Mauro Carvalho Chehab

V4L/DVB (4241): Fix faulty encoder error recovery in pvrusb2

Signed-off-by: NMike Isely <isely@pobox.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 a761f431
......@@ -1098,12 +1098,13 @@ void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw,
if (!hdw->flag_ok) return;
msk &= PVR2_SUBSYS_ALL;
nmsk = (hdw->subsys_enabled_mask & ~msk) | (val & msk);
nmsk &= PVR2_SUBSYS_ALL;
for (;;) {
tryCount++;
vmsk = hdw->subsys_enabled_mask & PVR2_SUBSYS_ALL;
nmsk = (vmsk & ~msk) | (val & msk);
if (!(nmsk ^ vmsk)) break;
if (!((nmsk ^ hdw->subsys_enabled_mask) &
PVR2_SUBSYS_ALL)) break;
if (tryCount > 4) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Too many retries when configuring device;"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册