From 95b9a644b65f9eeb9ad4b98236511dc1a2f08c5f Mon Sep 17 00:00:00 2001 From: mvoelkel Date: Wed, 31 Aug 2016 19:10:23 +0200 Subject: [PATCH] Fix dead lock in T2 BER thanks to Andrey Dyldin (cesbo) for heads up --- frontends/cxd2843.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontends/cxd2843.c b/frontends/cxd2843.c index 3aa258c..82bc7c5 100644 --- a/frontends/cxd2843.c +++ b/frontends/cxd2843.c @@ -1606,9 +1606,9 @@ static int get_ber_t2(struct cxd_state *state, u32 *n, u32 *d) *n = 0; *d = 1; freeze_regst(state); - readregst(state, 0x24, 0x40, BERRegs, 4); - readregst(state, 0x22, 0x5e, &FECType, 1); - readregst(state, 0x22, 0x5b, &CodeRate, 1); + readregst_unlocked(state, 0x24, 0x40, BERRegs, 4); + readregst_unlocked(state, 0x22, 0x5e, &FECType, 1); + readregst_unlocked(state, 0x22, 0x5b, &CodeRate, 1); FECType &= 0x03; CodeRate &= 0x07; @@ -1619,7 +1619,7 @@ static int get_ber_t2(struct cxd_state *state, u32 *n, u32 *d) readregst(state, 0x20, 0x72, &Scale, 1); Scale &= 0x0F; - if (BERRegs[0] & 0x01) { + if (BERRegs[0] & 0x01) { state->LastBERNumerator = (((u32) BERRegs[1] & 0x3F) << 16) | (((u32) BERRegs[2]) << 8) | BERRegs[3]; state->LastBERDenominator = nBCHBitsLookup[FECType][CodeRate] << Scale;