Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\bch.c Create Date:2022-07-28 06:59:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:mpute 2t syndromes of ecc polynomial, i.e. ecc(a^j) for j=1..2t

Proto:static void compute_syndromes(struct bch_control *bch, uint32_t *ecc, unsigned int *syn)

Type:void

Parameter:

TypeParameterName
struct bch_control *bch
uint32_t *ecc
unsigned int *syn
353  t = GF_T(bch)
355  s = ecc_bits
358  m = s & 31
359  If m Then ecc[s / 32] &= ~((1u << 32 - m ) - 1)
361  memset(syn, 0, 2 * t * size of syn )
364  Do
365  poly = ecc++
366  s -= 32
367  When poly cycle
368  i = deg(poly)
369  When j < 2 * t cycle syn[j] ^= a_pow(bch, (j + 1) * (i + s))
372  poly ^= 1 << i
374  When s > 0 cycle
377  When j < t cycle syn[2 * j + 1] = gf_sqr(bch, syn[j])
Caller
NameDescribe
decode_bchdecode_bch - decode received codeword and find bit error locations*@bch: BCH control structure*@data: received data, ignored if @calc_ecc is provided*@len: data length in bytes, must always be provided*@recv_ecc: received ecc, if NULL then assume it was