Lines Matching refs:subpgsize
31 static int subpgsize; variable
49 prandom_bytes_state(&rnd_state, writebuf, subpgsize); in write_eraseblock()
50 err = mtd_write(mtd, addr, subpgsize, &written, writebuf); in write_eraseblock()
51 if (unlikely(err || written != subpgsize)) { in write_eraseblock()
54 if (written != subpgsize) { in write_eraseblock()
55 pr_err(" write size: %#x\n", subpgsize); in write_eraseblock()
61 addr += subpgsize; in write_eraseblock()
63 prandom_bytes_state(&rnd_state, writebuf, subpgsize); in write_eraseblock()
64 err = mtd_write(mtd, addr, subpgsize, &written, writebuf); in write_eraseblock()
65 if (unlikely(err || written != subpgsize)) { in write_eraseblock()
68 if (written != subpgsize) { in write_eraseblock()
69 pr_err(" write size: %#x\n", subpgsize); in write_eraseblock()
85 if (addr + (subpgsize * k) > (loff_t)(ebnum + 1) * mtd->erasesize) in write_eraseblock2()
87 prandom_bytes_state(&rnd_state, writebuf, subpgsize * k); in write_eraseblock2()
88 err = mtd_write(mtd, addr, subpgsize * k, &written, writebuf); in write_eraseblock2()
89 if (unlikely(err || written != subpgsize * k)) { in write_eraseblock2()
92 if (written != subpgsize * k) { in write_eraseblock2()
94 subpgsize * k); in write_eraseblock2()
100 addr += subpgsize * k; in write_eraseblock2()
110 for (i = 0; i < subpgsize; ) { in print_subpage()
111 for (j = 0; i < subpgsize && j < 32; ++i, ++j) in print_subpage()
123 prandom_bytes_state(&rnd_state, writebuf, subpgsize); in verify_eraseblock()
124 clear_data(readbuf, subpgsize); in verify_eraseblock()
125 err = mtd_read(mtd, addr, subpgsize, &read, readbuf); in verify_eraseblock()
126 if (unlikely(err || read != subpgsize)) { in verify_eraseblock()
127 if (mtd_is_bitflip(err) && read == subpgsize) { in verify_eraseblock()
137 if (unlikely(memcmp(readbuf, writebuf, subpgsize))) { in verify_eraseblock()
148 addr += subpgsize; in verify_eraseblock()
150 prandom_bytes_state(&rnd_state, writebuf, subpgsize); in verify_eraseblock()
151 clear_data(readbuf, subpgsize); in verify_eraseblock()
152 err = mtd_read(mtd, addr, subpgsize, &read, readbuf); in verify_eraseblock()
153 if (unlikely(err || read != subpgsize)) { in verify_eraseblock()
154 if (mtd_is_bitflip(err) && read == subpgsize) { in verify_eraseblock()
164 if (unlikely(memcmp(readbuf, writebuf, subpgsize))) { in verify_eraseblock()
185 if (addr + (subpgsize * k) > (loff_t)(ebnum + 1) * mtd->erasesize) in verify_eraseblock2()
187 prandom_bytes_state(&rnd_state, writebuf, subpgsize * k); in verify_eraseblock2()
188 clear_data(readbuf, subpgsize * k); in verify_eraseblock2()
189 err = mtd_read(mtd, addr, subpgsize * k, &read, readbuf); in verify_eraseblock2()
190 if (unlikely(err || read != subpgsize * k)) { in verify_eraseblock2()
191 if (mtd_is_bitflip(err) && read == subpgsize * k) { in verify_eraseblock2()
201 if (unlikely(memcmp(readbuf, writebuf, subpgsize * k))) { in verify_eraseblock2()
206 addr += subpgsize * k; in verify_eraseblock2()
219 memset(writebuf, 0xff, subpgsize); in verify_eraseblock_ff()
220 for (j = 0; j < mtd->erasesize / subpgsize; ++j) { in verify_eraseblock_ff()
221 clear_data(readbuf, subpgsize); in verify_eraseblock_ff()
222 err = mtd_read(mtd, addr, subpgsize, &read, readbuf); in verify_eraseblock_ff()
223 if (unlikely(err || read != subpgsize)) { in verify_eraseblock_ff()
224 if (mtd_is_bitflip(err) && read == subpgsize) { in verify_eraseblock_ff()
234 if (unlikely(memcmp(readbuf, writebuf, subpgsize))) { in verify_eraseblock_ff()
239 addr += subpgsize; in verify_eraseblock_ff()
297 subpgsize = mtd->writesize >> mtd->subpage_sft; in mtd_subpagetest_init()
307 mtd->writesize, subpgsize, ebcnt, pgcnt, mtd->oobsize); in mtd_subpagetest_init()
310 bufsize = subpgsize * 32; in mtd_subpagetest_init()