diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:21 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-10 16:39:21 -0400 |
commit | 3a7d24841ad794ae64c90d7d00d62a83741912aa (patch) | |
tree | d71a36678fa88ed1e0b279390b6169f5018186bf /drivers/ide/ide-lib.c | |
parent | f26b3d75959e9a0e43a2e1e1148c075592746c3d (diff) |
ide: use ATA_* defines instead of *_STAT and *_ERR ones
* ERR_STAT -> ATA_ERR
* INDEX_STAT -> ATA_IDX
* ECC_STAT -> ATA_CORR
* DRQ_STAT -> ATA_DRQ
* SEEK_STAT -> ATA_DSC
* WRERR_STAT -> ATA_DF
* READY_STAT -> ATA_DRDY
* BUSY_STAT -> ATA_BUSY
* MARK_ERR -> ATA_AMNF
* TRK0_ERR -> ATA_TRK0NF
* ABRT_ERR -> ATA_ABORTED
* MCR_ERR -> ATA_MCR
* ID_ERR -> ATA_IDNF
* MC_ERR -> ATA_MC
* ECC_ERR -> ATA_UNC
* ICRC_ERR -> ATA_ICRC
* BBD_ERR -> ATA_BBK
Also:
* ILI_ERR -> ATAPI_ILI
* EOM_ERR -> ATAPI_EOM
* LFS_ERR -> ATAPI_LFS
* CD -> ATAPI_COD
* IO -> ATAPI_IO
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
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) |