1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

frontends/cxd2843: get_ber_t2() deadlock fix

This commit is contained in:
Andrey Dyldin 2016-08-31 15:27:00 +05:00
parent bb191aa5d7
commit a6770c8b99

View File

@ -1504,9 +1504,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;
@ -1514,10 +1514,9 @@ static int get_ber_t2(struct cxd_state *state, u32 *n, u32 *d)
if (FECType > 1)
return 0;
readregst(state, 0x20, 0x72, &Scale, 1);
Scale &= 0x0F;
if (BERRegs[0] & 0x01) {
if (BERRegs[0] & 0x01) {
state->LastBERNominator = (((u32) BERRegs[1] & 0x3F) << 16) |
(((u32) BERRegs[2]) << 8) | BERRegs[3];
state->LastBERDenominator = nBCHBitsLookup[FECType][CodeRate] << Scale;
@ -1529,6 +1528,7 @@ static int get_ber_t2(struct cxd_state *state, u32 *n, u32 *d)
}
*n = state->LastBERNominator;
*d = state->LastBERDenominator;
return 0;
}