Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195893
b: refs/heads/master
c: 9aca334
h: refs/heads/master
i:
  195891: 5cb792d
v: v3
  • Loading branch information
Maxim Levitsky authored and David Woodhouse committed Feb 26, 2010
1 parent 80c0b1e commit c787358
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 49ef3c6ee11e221b26caf4ac55c2702a37cca103
refs/heads/master: 9aca334e854c319ccafea871006fda3814196e7b
6 changes: 5 additions & 1 deletion trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,9 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
int ret = 0;
uint32_t readlen = ops->len;
uint32_t oobreadlen = ops->ooblen;
uint32_t max_oobsize = ops->mode == MTD_OOB_AUTO ?
mtd->oobavail : mtd->oobsize;

uint8_t *bufpoi, *oob, *buf;

stats = mtd->ecc_stats;
Expand Down Expand Up @@ -1470,10 +1473,11 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
buf += bytes;

if (unlikely(oob)) {

/* Raw mode does data:oob:data:oob */
if (ops->mode != MTD_OOB_RAW) {
int toread = min(oobreadlen,
chip->ecc.layout->oobavail);
max_oobsize);
if (toread) {
oob = nand_transfer_oob(chip,
oob, ops, toread);
Expand Down

0 comments on commit c787358

Please sign in to comment.