===== drivers/ide/ide-taskfile.c 1.28 vs edited ===== --- 1.28/drivers/ide/ide-taskfile.c Thu Feb 26 12:11:20 2004 +++ edited/drivers/ide/ide-taskfile.c Sat Feb 28 21:18:27 2004 @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -81,7 +82,12 @@ void taskfile_output_data (ide_drive_t *drive, void *buffer, u32 wcount) { - if (drive->bswap) { + if (unlikely(drive->bswap)) { + /* FIXME: Besides the inefficiency each sector + * twice, this can lead to data corruption on + * SMP. Fortunately drives that need this swapping + * are quite uncommon. + */ ata_bswap_data(buffer, wcount); HWIF(drive)->ata_output_data(drive, buffer, wcount); ata_bswap_data(buffer, wcount);