Subversion Repositories freemyipod

Rev

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

Rev 66 Rev 68
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)
-
 
1291
		panicf(PANIC_KILLTHREAD,
-
 
1292
		       "ftl_read: Misaligned data buffer at %08X (sector %lu, count %lu)",
-
 
1293
			   (unsigned int)buffer, sector, count);
-
 
1294
 
1290
    if (sector + count > ftl_nand_type->userblocks * ppb)
1295
    if (sector + count > ftl_nand_type->userblocks * ppb)
1291
    {
1296
    {
1292
        DEBUGF("FTL: Sector %d is out of range!", sector + count - 1);
1297
        DEBUGF("FTL: Sector %d is out of range!", sector + count - 1);
1293
        return 1;
1298
        return 1;
1294
    }
1299
    }
Line 1940... Line 1945...
1940
 
1945
 
1941
#ifdef FTL_TRACE
1946
#ifdef FTL_TRACE
1942
    DEBUGF("FTL: Writing %d sectors starting at %d", count, sector);
1947
    DEBUGF("FTL: Writing %d sectors starting at %d", count, sector);
1943
#endif
1948
#endif
1944
 
1949
 
-
 
1950
	if ((uint32_t)buffer & 0xf)
-
 
1951
		panicf(PANIC_KILLTHREAD,
-
 
1952
		       "ftl_write: Misaligned data buffer at %08X (sector %lu, count %lu)",
-
 
1953
			   (unsigned int)buffer, sector, count);
-
 
1954
 
1945
    if (sector + count > ftl_nand_type->userblocks * ppb)
1955
    if (sector + count > ftl_nand_type->userblocks * ppb)
1946
    {
1956
    {
1947
        DEBUGF("FTL: Sector %d is out of range!", sector + count - 1);
1957
        DEBUGF("FTL: Sector %d is out of range!", sector + count - 1);
1948
        return 1;
1958
        return 1;
1949
    }
1959
    }