Lines Matching refs:SECTORSIZE
18 #define SECTORSIZE 512 macro
30 u8 buf[SECTORSIZE]; in find_boot_record()
53 ret = mtd_read(mtd, block * nftl->EraseSize, SECTORSIZE, in find_boot_record()
57 if (retlen != SECTORSIZE) { in find_boot_record()
80 SECTORSIZE + 8, 8, &retlen, in find_boot_record()
100 ret = mtd->read(mtd, block * nftl->EraseSize, SECTORSIZE, in find_boot_record()
179 nftl->mbd.size = nftl->numvunits * (nftl->EraseSize / SECTORSIZE); in find_boot_record()
217 if ((i & (SECTORSIZE - 1)) == 0) { in find_boot_record()
221 SECTORSIZE, SECTORSIZE, in find_boot_record()
232 if (buf[i & (SECTORSIZE - 1)] != 0xff) in find_boot_record()
267 buf = kmalloc(SECTORSIZE + mtd->oobsize, GFP_KERNEL); in check_free_sectors()
272 for (i = 0; i < len; i += SECTORSIZE) { in check_free_sectors()
273 if (mtd_read(mtd, address, SECTORSIZE, &retlen, buf)) in check_free_sectors()
275 if (memcmpb(buf, 0xff, SECTORSIZE) != 0) in check_free_sectors()
280 &retlen, &buf[SECTORSIZE]) < 0) in check_free_sectors()
282 if (memcmpb(buf + SECTORSIZE, 0xff, mtd->oobsize) != 0) in check_free_sectors()
285 address += SECTORSIZE; in check_free_sectors()
311 if (nftl_read_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 8, in NFTL_formatblock()
349 if (nftl_write_oob(mtd, block * nftl->EraseSize + SECTORSIZE + in NFTL_formatblock()
377 sectors_per_block = nftl->EraseSize / SECTORSIZE; in check_sectors_in_chain()
382 block * nftl->EraseSize + i * SECTORSIZE, in check_sectors_in_chain()
393 check_free_sectors(nftl, block * nftl->EraseSize + i * SECTORSIZE, in check_sectors_in_chain()
394 SECTORSIZE, 0) != 0) { in check_sectors_in_chain()
404 i * SECTORSIZE, 8, in check_sectors_in_chain()
496 if (nftl_read_oob(mtd, block * nftl->EraseSize + SECTORSIZE + 8, 8, in check_and_mark_free_block()
512 block * nftl->EraseSize + SECTORSIZE + 8, 8, in check_and_mark_free_block()
518 for (i = 0; i < nftl->EraseSize; i += SECTORSIZE) { in check_and_mark_free_block()
521 SECTORSIZE, 0) != 0) in check_and_mark_free_block()
527 if (i == SECTORSIZE) { in check_and_mark_free_block()
555 if (nftl_read_oob(mtd, block * nftl->EraseSize + 2 * SECTORSIZE + 8, in get_fold_mark()
600 SECTORSIZE + 8, 8, in NFTL_mount()