aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:12 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:12 -0500
commit0e38a66a1e69821ab57a06d5a7b11f0df9275bf4 (patch)
treee287752203edfe30f3bdc5966eb8f4c91b508c45 /drivers/ide/ide-lib.c
parent22c525b976778cce5bb6f8fdcc70046168c54b1a (diff)
ide: remove atapi_error_t (take 2)
Remove atapi_error_t. While at it: * replace 'HWIF(drive)' by 'drive->hwif' v2: * Add {ILI,EOM,LFS}_ERR defines to <linux/hdreg.h>. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index dc7e539b4d0..562f5efae9c 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -562,9 +562,8 @@ 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 atapi_error_t error; 565 u8 err = 0;
566 566
567 error.all = 0;
568 local_irq_save(flags); 567 local_irq_save(flags);
569 printk("%s: %s: status=0x%02x { ", drive->name, msg, stat); 568 printk("%s: %s: status=0x%02x { ", drive->name, msg, stat);
570 if (stat & BUSY_STAT) 569 if (stat & BUSY_STAT)
@@ -580,19 +579,19 @@ static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat)
580 } 579 }
581 printk("}\n"); 580 printk("}\n");
582 if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) { 581 if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
583 error.all = HWIF(drive)->INB(IDE_ERROR_REG); 582 err = drive->hwif->INB(IDE_ERROR_REG);
584 printk("%s: %s: error=0x%02x { ", drive->name, msg, error.all); 583 printk("%s: %s: error=0x%02x { ", drive->name, msg, err);
585 if (error.b.ili) printk("IllegalLengthIndication "); 584 if (err & ILI_ERR) printk("IllegalLengthIndication ");
586 if (error.b.eom) printk("EndOfMedia "); 585 if (err & EOM_ERR) printk("EndOfMedia ");
587 if (error.b.abrt) printk("AbortedCommand "); 586 if (err & ABRT_ERR) printk("AbortedCommand ");
588 if (error.b.mcr) printk("MediaChangeRequested "); 587 if (err & MCR_ERR) printk("MediaChangeRequested ");
589 if (error.b.sense_key) printk("LastFailedSense=0x%02x ", 588 if (err & LFS_ERR) printk("LastFailedSense=0x%02x ",
590 error.b.sense_key); 589 (err & LFS_ERR) >> 4);
591 printk("}\n"); 590 printk("}\n");
592 } 591 }
593 ide_dump_opcode(drive); 592 ide_dump_opcode(drive);
594 local_irq_restore(flags); 593 local_irq_restore(flags);
595 return error.all; 594 return err;
596} 595}
597 596
598/** 597/**