Subversion Repositories freemyipod

Rev

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

Rev 435 Rev 624
Line 1323... Line 1323...
1323
 
1323
 
1324
#ifdef FTL_TRACE
1324
#ifdef FTL_TRACE
1325
    DEBUGF("FTL: Reading %d sectors starting at %d", count, sector);
1325
    DEBUGF("FTL: Reading %d sectors starting at %d", count, sector);
1326
#endif
1326
#endif
1327
 
1327
 
1328
    if ((uint32_t)buffer & (CACHEALIGN_SIZE - 1))
1328
    if (((uint32_t)buffer) & (CACHEALIGN_SIZE - 1))
1329
        panicf(PANIC_KILLTHREAD,
1329
        panicf(PANIC_KILLTHREAD,
1330
               "ftl_read: Misaligned data buffer at %08X (sector %lu, count %lu)",
1330
               "ftl_read: Misaligned data buffer at %08X (sector %lu, count %lu)",
1331
               (unsigned int)buffer, sector, count);
1331
               (unsigned int)buffer, sector, count);
1332
 
1332
 
1333
    if (sector + count > ftl_nand_type->userblocks * ppb)
1333
    if (sector + count > ftl_nand_type->userblocks * ppb)
Line 2000... Line 2000...
2000
 
2000
 
2001
#ifdef FTL_TRACE
2001
#ifdef FTL_TRACE
2002
    DEBUGF("FTL: Writing %d sectors starting at %d", count, sector);
2002
    DEBUGF("FTL: Writing %d sectors starting at %d", count, sector);
2003
#endif
2003
#endif
2004
 
2004
 
2005
    if ((uint32_t)buffer & (CACHEALIGN_SIZE - 1))
2005
    if (((uint32_t)buffer) & (CACHEALIGN_SIZE - 1))
2006
        panicf(PANIC_KILLTHREAD,
2006
        panicf(PANIC_KILLTHREAD,
2007
               "ftl_write: Misaligned data buffer at %08X (sector %lu, count %lu)",
2007
               "ftl_write: Misaligned data buffer at %08X (sector %lu, count %lu)",
2008
               (unsigned int)buffer, sector, count);
2008
               (unsigned int)buffer, sector, count);
2009
 
2009
 
2010
    if (sector + count > ftl_nand_type->userblocks * ppb)
2010
    if (sector + count > ftl_nand_type->userblocks * ppb)