Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207773
b: refs/heads/master
c: c9fb677
h: refs/heads/master
i:
  207771: bbadc8a
v: v3
  • Loading branch information
Mark Ware authored and David Woodhouse committed Aug 4, 2010
1 parent 71162be commit cc8c8d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b0507eb697ea157533b9a7e0a955f64a00b1b1d
refs/heads/master: c9fb67735b307a3cdf57e568b6c50c860248d1d3
5 changes: 3 additions & 2 deletions trunk/drivers/mtd/nand/diskonchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc)
uint8_t parity;
uint16_t ds[4], s[5], tmp, errval[8], syn[4];

memset(syn, 0, sizeof(syn));
/* Convert the ecc bytes into words */
ds[0] = ((ecc[4] & 0xff) >> 0) | ((ecc[5] & 0x03) << 8);
ds[1] = ((ecc[5] & 0xfc) >> 2) | ((ecc[2] & 0x0f) << 6);
Expand All @@ -169,9 +170,9 @@ static int doc_ecc_decode(struct rs_control *rs, uint8_t *data, uint8_t *ecc)
s[i] ^= rs->alpha_to[rs_modnn(rs, tmp + (FCR + i) * j)];
}

/* Calc s[i] = s[i] / alpha^(v + i) */
/* Calc syn[i] = s[i] / alpha^(v + i) */
for (i = 0; i < NROOTS; i++) {
if (syn[i])
if (s[i])
syn[i] = rs_modnn(rs, rs->index_of[s[i]] + (NN - FCR - i));
}
/* Call the decoder library */
Expand Down

0 comments on commit cc8c8d0

Please sign in to comment.