Subversion Repositories freemyipod

Rev

Rev 68 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68 Rev 69
Line 1285... Line 1285...
1285
 
1285
 
1286
#ifdef FTL_TRACE
1286
#ifdef FTL_TRACE
1287
    DEBUGF("FTL: Reading %d sectors starting at %d", count, sector);
1287
    DEBUGF("FTL: Reading %d sectors starting at %d", count, sector);
1288
#endif
1288
#endif
1289
 
1289
 
1290
	if ((uint32_t)buffer & 0xf)
1290
	if ((uint32_t)buffer & (CACHEALIGN_SIZE - 1))
1291
		panicf(PANIC_KILLTHREAD,
1291
		panicf(PANIC_KILLTHREAD,
1292
		       "ftl_read: Misaligned data buffer at %08X (sector %lu, count %lu)",
1292
		       "ftl_read: Misaligned data buffer at %08X (sector %lu, count %lu)",
1293
			   (unsigned int)buffer, sector, count);
1293
			   (unsigned int)buffer, sector, count);
1294
 
1294
 
1295
    if (sector + count > ftl_nand_type->userblocks * ppb)
1295
    if (sector + count > ftl_nand_type->userblocks * ppb)
Line 1945... Line 1945...
1945
 
1945
 
1946
#ifdef FTL_TRACE
1946
#ifdef FTL_TRACE
1947
    DEBUGF("FTL: Writing %d sectors starting at %d", count, sector);
1947
    DEBUGF("FTL: Writing %d sectors starting at %d", count, sector);
1948
#endif
1948
#endif
1949
 
1949
 
1950
	if ((uint32_t)buffer & 0xf)
1950
	if ((uint32_t)buffer & (CACHEALIGN_SIZE - 1))
1951
		panicf(PANIC_KILLTHREAD,
1951
		panicf(PANIC_KILLTHREAD,
1952
		       "ftl_write: Misaligned data buffer at %08X (sector %lu, count %lu)",
1952
		       "ftl_write: Misaligned data buffer at %08X (sector %lu, count %lu)",
1953
			   (unsigned int)buffer, sector, count);
1953
			   (unsigned int)buffer, sector, count);
1954
 
1954
 
1955
    if (sector + count > ftl_nand_type->userblocks * ppb)
1955
    if (sector + count > ftl_nand_type->userblocks * ppb)