Re: Possibly wrong BIO usage in ide_multwrite

From: Bartlomiej Zolnierkiewicz
Date: Mon Jan 05 2004 - 15:12:13 EST


On Monday 05 of January 2004 20:37, Frederik Deweerdt wrote:
> On Mon, 2004-01-05 at 17:12, Bartlomiej Zolnierkiewicz wrote:
> > - hangs during reading /proc/ide/<cdrom>/identify on some drives
> > (workaround is now known thanks to debugging done by Andi+BenH+Andre)
>
> could you explain about this workaround? i've searched the archives
> without finding anything.

Because it was discovered recently and it is not the proper fix. :-)

drivers/ide/ide-taskfile.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff -puN drivers/ide/ide-taskfile.c~ide-tf-identify-fix drivers/ide/ide-taskfile.c
--- linux-2.6.1-rc1/drivers/ide/ide-taskfile.c~ide-tf-identify-fix 2004-01-04 16:35:53.094766576 +0100
+++ linux-2.6.1-rc1-root/drivers/ide/ide-taskfile.c 2004-01-04 16:45:03.240131768 +0100
@@ -797,9 +797,12 @@ check_status:
if (!OK_STAT(stat, good_stat, BAD_R_STAT)) {
if (stat & (ERR_STAT | DRQ_STAT))
return DRIVER(drive)->error(drive, __FUNCTION__, stat);
- /* BUSY_STAT: No data yet, so wait for another IRQ. */
- ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL);
- return ide_started;
+ /* Workaround for some ATAPI drives which set only BSY bit. */
+ if (drive->media != ide_cdrom) {
+ /* BUSY_STAT: No data yet, so wait for another IRQ. */
+ ide_set_handler(drive, &task_in_intr, WAIT_WORSTCASE, NULL);
+ return ide_started;
+ }
}

/*

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/