[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.00.0803160958260.3020@woody.linux-foundation.org>
Date: Sun, 16 Mar 2008 10:13:26 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Anders Eriksson <aeriksson@...tmail.fm>
cc: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Jens Axboe <jens.axboe@...cle.com>,
Ingo Molnar <mingo@...e.hu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Linux 2.6.25-rc4
On Sun, 16 Mar 2008, Linus Torvalds wrote:
>
> - there's a totally untested patch at the end here that tries to make the
> error handling do that DRQ flush unconditionally. Does it make a
> difference for you?
Ok, it's not going to make any difference, because that
IDE_HFLAG_ERROR_STOPS_FIFO flag won't be set for you anyway.
So assuming it's about a pending DRQ issue that needs to be flushed before
the controller will generate any more interrupts (which your bisect
implies it is), maybe we have one of
- this ide_ata_error() case isn't called at all.
This happens for at least WIN_SPECIFY (see ide_ata_error() - it
returns early)
Could you add a printk() to ide_ata_error() and see if it gets called
when your machine hangs, and if so, what the case was.
- try_to_flush_leftover_data() doesn't work (it does have a test for only
acting on disk drives - is this perhaps a CD-ROM?)
- or rq_data_dir(rq) is wrong for the offending command (again, maybe
the printk() could help with that).
IOW, try something like this instead of the previous patch.
Linus
---
drivers/ide/ide-io.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 7153796..6a98937 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -414,6 +414,7 @@ static void try_to_flush_leftover_data (ide_drive_t *drive)
{
int i = (drive->mult_count ? drive->mult_count : 1) * SECTOR_WORDS;
+printk("try_to_flush(%d,%d)\n", i, drive->media == ide_disk);
if (drive->media != ide_disk)
return;
while (i > 0) {
@@ -440,7 +441,10 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
{
ide_hwif_t *hwif = drive->hwif;
- if (stat & BUSY_STAT || ((stat & WRERR_STAT) && !drive->nowerr)) {
+printk("ide_ata_error() stat=%02x err=%02x dir=%d CMD=%02x\n",
+ stat, err, rq_data_dir(rq), hwif->INB(IDE_COMMAND_REG));
+
+ if ((stat & BUSY_STAT) || ((stat & WRERR_STAT) && !drive->nowerr)) {
/* other bits are useless when BUSY */
rq->errors |= ERROR_RESET;
} else if (stat & ERR_STAT) {
@@ -462,8 +466,7 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
}
}
- if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ &&
- (hwif->host_flags & IDE_HFLAG_ERROR_STOPS_FIFO) == 0)
+ if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ)
try_to_flush_leftover_data(drive);
if (rq->errors >= ERROR_MAX || blk_noretry_request(rq)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists