Subversion Repositories freemyipod

Rev

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

Rev 620 Rev 627
Line 430... Line 430...
430
}
430
}
431
#endif
431
#endif
432
 
432
 
433
int ata_rw_sectors(uint64_t sector, uint32_t count, void* buffer, bool write)
433
int ata_rw_sectors(uint64_t sector, uint32_t count, void* buffer, bool write)
434
{
434
{
-
 
435
    if (((uint32_t)buffer) & (CACHEALIGN_SIZE - 1))
-
 
436
        panicf(PANIC_KILLTHREAD,
-
 
437
               "ATA: Misaligned data buffer at %08X (sector %lu, count %lu)",
-
 
438
               (unsigned int)buffer, (unsigned int)sector, count);
435
#ifdef ATA_HAVE_BBT
439
#ifdef ATA_HAVE_BBT
436
    if (sector + count > ata_virtual_sectors) RET_ERR(0);
440
    if (sector + count > ata_virtual_sectors) RET_ERR(0);
437
    if (ata_bbt)
441
    if (ata_bbt)
438
        while (count)
442
        while (count)
439
        {
443
        {