diff options
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r-- | drivers/ide/ide-lib.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 738c007a04d3..c5c37bfd8b09 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -340,16 +340,16 @@ static void ide_dump_sector(ide_drive_t *drive) | |||
340 | static void ide_dump_ata_error(ide_drive_t *drive, u8 err) | 340 | static void ide_dump_ata_error(ide_drive_t *drive, u8 err) |
341 | { | 341 | { |
342 | printk("{ "); | 342 | printk("{ "); |
343 | if (err & ABRT_ERR) printk("DriveStatusError "); | 343 | if (err & ATA_ABORTED) printk("DriveStatusError "); |
344 | if (err & ICRC_ERR) | 344 | if (err & ATA_ICRC) |
345 | printk((err & ABRT_ERR) ? "BadCRC " : "BadSector "); | 345 | printk((err & ATA_ABORTED) ? "BadCRC " : "BadSector "); |
346 | if (err & ECC_ERR) printk("UncorrectableError "); | 346 | if (err & ATA_UNC) printk("UncorrectableError "); |
347 | if (err & ID_ERR) printk("SectorIdNotFound "); | 347 | if (err & ATA_IDNF) printk("SectorIdNotFound "); |
348 | if (err & TRK0_ERR) printk("TrackZeroNotFound "); | 348 | if (err & ATA_TRK0NF) printk("TrackZeroNotFound "); |
349 | if (err & MARK_ERR) printk("AddrMarkNotFound "); | 349 | if (err & ATA_AMNF) printk("AddrMarkNotFound "); |
350 | printk("}"); | 350 | printk("}"); |
351 | if ((err & (BBD_ERR | ABRT_ERR)) == BBD_ERR || | 351 | if ((err & (ATA_BBK | ATA_ABORTED)) == ATA_BBK || |
352 | (err & (ECC_ERR|ID_ERR|MARK_ERR))) { | 352 | (err & (ATA_UNC | ATA_IDNF | ATA_AMNF))) { |
353 | ide_dump_sector(drive); | 353 | ide_dump_sector(drive); |
354 | if (HWGROUP(drive) && HWGROUP(drive)->rq) | 354 | if (HWGROUP(drive) && HWGROUP(drive)->rq) |
355 | printk(", sector=%llu", | 355 | printk(", sector=%llu", |
@@ -361,12 +361,12 @@ static void ide_dump_ata_error(ide_drive_t *drive, u8 err) | |||
361 | static void ide_dump_atapi_error(ide_drive_t *drive, u8 err) | 361 | static void ide_dump_atapi_error(ide_drive_t *drive, u8 err) |
362 | { | 362 | { |
363 | printk("{ "); | 363 | printk("{ "); |
364 | if (err & ILI_ERR) printk("IllegalLengthIndication "); | 364 | if (err & ATAPI_ILI) printk("IllegalLengthIndication "); |
365 | if (err & EOM_ERR) printk("EndOfMedia "); | 365 | if (err & ATAPI_EOM) printk("EndOfMedia "); |
366 | if (err & ABRT_ERR) printk("AbortedCommand "); | 366 | if (err & ATA_ABORTED) printk("AbortedCommand "); |
367 | if (err & MCR_ERR) printk("MediaChangeRequested "); | 367 | if (err & ATA_MCR) printk("MediaChangeRequested "); |
368 | if (err & LFS_ERR) printk("LastFailedSense=0x%02x ", | 368 | if (err & ATAPI_LFS) printk("LastFailedSense=0x%02x ", |
369 | (err & LFS_ERR) >> 4); | 369 | (err & ATAPI_LFS) >> 4); |
370 | printk("}\n"); | 370 | printk("}\n"); |
371 | } | 371 | } |
372 | 372 | ||
@@ -388,19 +388,19 @@ u8 ide_dump_status(ide_drive_t *drive, const char *msg, u8 stat) | |||
388 | 388 | ||
389 | local_irq_save(flags); | 389 | local_irq_save(flags); |
390 | printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); | 390 | printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); |
391 | if (stat & BUSY_STAT) | 391 | if (stat & ATA_BUSY) |
392 | printk("Busy "); | 392 | printk("Busy "); |
393 | else { | 393 | else { |
394 | if (stat & READY_STAT) printk("DriveReady "); | 394 | if (stat & ATA_DRDY) printk("DriveReady "); |
395 | if (stat & WRERR_STAT) printk("DeviceFault "); | 395 | if (stat & ATA_DF) printk("DeviceFault "); |
396 | if (stat & SEEK_STAT) printk("SeekComplete "); | 396 | if (stat & ATA_DSC) printk("SeekComplete "); |
397 | if (stat & DRQ_STAT) printk("DataRequest "); | 397 | if (stat & ATA_DRQ) printk("DataRequest "); |
398 | if (stat & ECC_STAT) printk("CorrectedError "); | 398 | if (stat & ATA_CORR) printk("CorrectedError "); |
399 | if (stat & INDEX_STAT) printk("Index "); | 399 | if (stat & ATA_IDX) printk("Index "); |
400 | if (stat & ERR_STAT) printk("Error "); | 400 | if (stat & ATA_ERR) printk("Error "); |
401 | } | 401 | } |
402 | printk("}\n"); | 402 | printk("}\n"); |
403 | if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) { | 403 | if ((stat & (ATA_BUSY | ATA_ERR)) == ATA_ERR) { |
404 | err = ide_read_error(drive); | 404 | err = ide_read_error(drive); |
405 | printk("%s: %s: error=0x%02x ", drive->name, msg, err); | 405 | printk("%s: %s: error=0x%02x ", drive->name, msg, err); |
406 | if (drive->media == ide_disk) | 406 | if (drive->media == ide_disk) |