aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 3bae2c46924f..dc7e539b4d0b 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -562,27 +562,24 @@ static u8 ide_dump_ata_status(ide_drive_t *drive, const char *msg, u8 stat)
562static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat) 562static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat)
563{ 563{
564 unsigned long flags; 564 unsigned long flags;
565
566 atapi_status_t status;
567 atapi_error_t error; 565 atapi_error_t error;
568 566
569 status.all = stat;
570 error.all = 0; 567 error.all = 0;
571 local_irq_save(flags); 568 local_irq_save(flags);
572 printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); 569 printk("%s: %s: status=0x%02x { ", drive->name, msg, stat);
573 if (status.b.bsy) 570 if (stat & BUSY_STAT)
574 printk("Busy "); 571 printk("Busy ");
575 else { 572 else {
576 if (status.b.drdy) printk("DriveReady "); 573 if (stat & READY_STAT) printk("DriveReady ");
577 if (status.b.df) printk("DeviceFault "); 574 if (stat & WRERR_STAT) printk("DeviceFault ");
578 if (status.b.dsc) printk("SeekComplete "); 575 if (stat & SEEK_STAT) printk("SeekComplete ");
579 if (status.b.drq) printk("DataRequest "); 576 if (stat & DRQ_STAT) printk("DataRequest ");
580 if (status.b.corr) printk("CorrectedError "); 577 if (stat & ECC_STAT) printk("CorrectedError ");
581 if (status.b.idx) printk("Index "); 578 if (stat & INDEX_STAT) printk("Index ");
582 if (status.b.check) printk("Error "); 579 if (stat & ERR_STAT) printk("Error ");
583 } 580 }
584 printk("}\n"); 581 printk("}\n");
585 if (status.b.check && !status.b.bsy) { 582 if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
586 error.all = HWIF(drive)->INB(IDE_ERROR_REG); 583 error.all = HWIF(drive)->INB(IDE_ERROR_REG);
587 printk("%s: %s: error=0x%02x { ", drive->name, msg, error.all); 584 printk("%s: %s: error=0x%02x { ", drive->name, msg, error.all);
588 if (error.b.ili) printk("IllegalLengthIndication "); 585 if (error.b.ili) printk("IllegalLengthIndication ");