Searched refs:ebnum (Results 1 - 8 of 8) sorted by relevance

/linux-4.1.27/drivers/mtd/tests/
H A Dmtd_test.c9 int mtdtest_erase_eraseblock(struct mtd_info *mtd, unsigned int ebnum) mtdtest_erase_eraseblock() argument
13 loff_t addr = (loff_t)ebnum * mtd->erasesize; mtdtest_erase_eraseblock()
22 pr_info("error %d while erasing EB %d\n", err, ebnum); mtdtest_erase_eraseblock()
27 pr_info("some erase error occurred at EB %d\n", ebnum); mtdtest_erase_eraseblock()
33 static int is_block_bad(struct mtd_info *mtd, unsigned int ebnum) is_block_bad() argument
36 loff_t addr = (loff_t)ebnum * mtd->erasesize; is_block_bad()
40 pr_info("block %d is bad\n", ebnum); is_block_bad()
H A Dpagetest.c53 static int write_eraseblock(int ebnum) write_eraseblock() argument
55 loff_t addr = (loff_t)ebnum * mtd->erasesize; write_eraseblock()
62 static int verify_eraseblock(int ebnum) verify_eraseblock() argument
67 loff_t addr = (loff_t)ebnum * mtd->erasesize; verify_eraseblock()
97 if (addr <= addrn - pgsize - pgsize && !bbt[ebnum + 1]) { verify_eraseblock()
203 int err = 0, i, ebnum, ebnum2; erasecrosstest() local
209 ebnum = 0; erasecrosstest()
213 ebnum += 1; erasecrosstest()
220 pr_info("erasing block %d\n", ebnum); erasecrosstest()
221 err = mtdtest_erase_eraseblock(mtd, ebnum); erasecrosstest()
225 pr_info("writing 1st page of block %d\n", ebnum); erasecrosstest()
232 pr_info("reading 1st page of block %d\n", ebnum); erasecrosstest()
238 pr_info("verifying 1st page of block %d\n", ebnum); erasecrosstest()
245 pr_info("erasing block %d\n", ebnum); erasecrosstest()
246 err = mtdtest_erase_eraseblock(mtd, ebnum); erasecrosstest()
250 pr_info("writing 1st page of block %d\n", ebnum); erasecrosstest()
262 pr_info("reading 1st page of block %d\n", ebnum); erasecrosstest()
268 pr_info("verifying 1st page of block %d\n", ebnum); erasecrosstest()
282 int err = 0, i, ebnum, ok = 1; erasetest() local
287 ebnum = 0; erasetest()
291 ebnum += 1; erasetest()
294 pr_info("erasing block %d\n", ebnum); erasetest()
295 err = mtdtest_erase_eraseblock(mtd, ebnum); erasetest()
299 pr_info("writing 1st page of block %d\n", ebnum); erasetest()
305 pr_info("erasing block %d\n", ebnum); erasetest()
306 err = mtdtest_erase_eraseblock(mtd, ebnum); erasetest()
310 pr_info("reading 1st page of block %d\n", ebnum); erasetest()
316 ebnum); erasetest()
H A Dmtd_test.h15 int mtdtest_erase_eraseblock(struct mtd_info *mtd, unsigned int ebnum);
H A Dspeedtest.c54 static int multiblock_erase(int ebnum, int blocks) multiblock_erase() argument
58 loff_t addr = (loff_t)ebnum * mtd->erasesize; multiblock_erase()
68 err, ebnum, blocks); multiblock_erase()
74 "blocks %d\n", ebnum, blocks); multiblock_erase()
81 static int write_eraseblock(int ebnum) write_eraseblock() argument
83 loff_t addr = (loff_t)ebnum * mtd->erasesize; write_eraseblock()
88 static int write_eraseblock_by_page(int ebnum) write_eraseblock_by_page() argument
91 loff_t addr = (loff_t)ebnum * mtd->erasesize; write_eraseblock_by_page()
105 static int write_eraseblock_by_2pages(int ebnum) write_eraseblock_by_2pages() argument
109 loff_t addr = (loff_t)ebnum * mtd->erasesize; write_eraseblock_by_2pages()
125 static int read_eraseblock(int ebnum) read_eraseblock() argument
127 loff_t addr = (loff_t)ebnum * mtd->erasesize; read_eraseblock()
132 static int read_eraseblock_by_page(int ebnum) read_eraseblock_by_page() argument
135 loff_t addr = (loff_t)ebnum * mtd->erasesize; read_eraseblock_by_page()
149 static int read_eraseblock_by_2pages(int ebnum) read_eraseblock_by_2pages() argument
153 loff_t addr = (loff_t)ebnum * mtd->erasesize; read_eraseblock_by_2pages()
H A Dsubpagetest.c56 static int write_eraseblock(int ebnum) write_eraseblock() argument
60 loff_t addr = (loff_t)ebnum * mtd->erasesize; write_eraseblock()
91 static int write_eraseblock2(int ebnum) write_eraseblock2() argument
95 loff_t addr = (loff_t)ebnum * mtd->erasesize; write_eraseblock2()
98 if (addr + (subpgsize * k) > (loff_t)(ebnum + 1) * mtd->erasesize) write_eraseblock2()
130 static int verify_eraseblock(int ebnum) verify_eraseblock() argument
134 loff_t addr = (loff_t)ebnum * mtd->erasesize; verify_eraseblock()
191 static int verify_eraseblock2(int ebnum) verify_eraseblock2() argument
195 loff_t addr = (loff_t)ebnum * mtd->erasesize; verify_eraseblock2()
198 if (addr + (subpgsize * k) > (loff_t)(ebnum + 1) * mtd->erasesize) verify_eraseblock2()
225 static int verify_eraseblock_ff(int ebnum) verify_eraseblock_ff() argument
230 loff_t addr = (loff_t)ebnum * mtd->erasesize; verify_eraseblock_ff()
H A Dreadtest.c47 static int read_eraseblock_by_page(int ebnum) read_eraseblock_by_page() argument
50 loff_t addr = (loff_t)ebnum * mtd->erasesize; read_eraseblock_by_page()
91 static void dump_eraseblock(int ebnum) dump_eraseblock() argument
97 pr_info("dumping eraseblock %d\n", ebnum); dump_eraseblock()
110 pr_info("dumping oob from eraseblock %d\n", ebnum); dump_eraseblock()
H A Dtorturetest.c100 static inline int check_eraseblock(int ebnum, unsigned char *buf) check_eraseblock() argument
104 loff_t addr = (loff_t)ebnum * mtd->erasesize; check_eraseblock()
108 addr = (loff_t)(ebnum + 1) * mtd->erasesize - pgcnt * pgsize; check_eraseblock()
116 "MTD reported that it was fixed.\n", ebnum); check_eraseblock()
119 "read %zd\n", err, ebnum, read); check_eraseblock()
126 len, ebnum, read); check_eraseblock()
131 pr_err("read wrong data from EB %d\n", ebnum); check_eraseblock()
138 ebnum); check_eraseblock()
154 static inline int write_pattern(int ebnum, void *buf) write_pattern() argument
158 loff_t addr = (loff_t)ebnum * mtd->erasesize; write_pattern()
162 addr = (loff_t)(ebnum + 1) * mtd->erasesize - pgcnt * pgsize; write_pattern()
168 " bytes\n", err, ebnum, written); write_pattern()
H A Doobtest.c68 static int write_eraseblock(int ebnum) write_eraseblock() argument
73 loff_t addr = (loff_t)ebnum * mtd->erasesize; write_eraseblock()
172 static int verify_eraseblock(int ebnum) verify_eraseblock() argument
177 loff_t addr = (loff_t)ebnum * mtd->erasesize; verify_eraseblock()
261 static int verify_eraseblock_in_one_go(int ebnum) verify_eraseblock_in_one_go() argument
265 loff_t addr = (loff_t)ebnum * mtd->erasesize; verify_eraseblock_in_one_go()

Completed in 125 milliseconds