Commit 9a5a7622 authored by Alexander Viro's avatar Alexander Viro Committed by Bartlomiej Zolnierkiewicz

[ide] fix ide_dump_atapi_status()

From: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>

On Fri, 4 Feb 2005, Al Viro wrote:

> BTW, ide-lib.c code that triggers the ICE happens to be completely broken.
> Jens, it's your patch from September 2002 - what used to be
>        if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
> became
>        if ((status.all & (status.b.bsy|status.b.check)) == status.b.check) {
> and that's *not* an equivalent transformation.  Fixing it doesn't get rid
> of ICE, but it certainly deserves fixing.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent e65f57e8
......@@ -570,6 +570,7 @@ static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat)
atapi_error_t error;
status.all = stat;
error.all = 0;
local_irq_set(flags);
printk("%s: %s: status=0x%02x { ", drive->name, msg, stat);
if (status.b.bsy)
......@@ -584,7 +585,7 @@ static u8 ide_dump_atapi_status(ide_drive_t *drive, const char *msg, u8 stat)
if (status.b.check) printk("Error ");
}
printk("}\n");
if ((status.all & (status.b.bsy|status.b.check)) == status.b.check) {
if (status.b.check && !status.b.bsy) {
error.all = HWIF(drive)->INB(IDE_ERROR_REG);
printk("%s: %s: error=0x%02x { ", drive->name, msg, error.all);
if (error.b.ili) printk("IllegalLengthIndication ");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment