From: Linus Torvalds <torvalds@linux-foundation.org>
To: Anders Eriksson <aeriksson@fastmail.fm>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Jens Axboe <jens.axboe@oracle.com>, Ingo Molnar <mingo@elte.hu>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.6.25-rc4
Date: Sun, 16 Mar 2008 10:13:26 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.00.0803160958260.3020@woody.linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0803160924580.3020@woody.linux-foundation.org>
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)) {
next prev parent reply other threads:[~2008-03-16 17:14 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-05 5:03 Linus Torvalds
2008-03-05 8:09 ` FUJITA Tomonori
2008-03-05 16:46 ` Grant Grundler
2008-03-06 9:00 ` Ingo Molnar
2008-03-06 12:59 ` Jens Axboe
2008-03-06 13:06 ` Ingo Molnar
2008-03-06 13:12 ` Jens Axboe
2008-03-07 8:53 ` Ingo Molnar
2008-03-07 8:57 ` Jens Axboe
2008-03-07 9:02 ` Ingo Molnar
2008-03-07 9:59 ` Paul Mackerras
2008-03-07 15:20 ` Valdis.Kletnieks
2008-03-08 23:36 ` Pavel Machek
2008-03-09 11:59 ` Ingo Molnar
2008-03-09 12:55 ` Andi Kleen
2008-03-10 10:10 ` Pavel Machek
2008-03-10 11:52 ` Andi Kleen
2008-03-06 13:38 ` Bartlomiej Zolnierkiewicz
2008-03-06 13:33 ` Ingo Molnar
2008-03-06 14:06 ` Bartlomiej Zolnierkiewicz
2008-03-06 13:55 ` Jens Axboe
2008-03-06 21:17 ` Anders Eriksson
2008-03-07 8:48 ` Jens Axboe
2008-03-07 22:04 ` Anders Eriksson
2008-03-08 20:22 ` Linus Torvalds
2008-03-08 21:05 ` Anders Eriksson
2008-03-10 8:55 ` Anders Eriksson
2008-03-10 12:36 ` Bartlomiej Zolnierkiewicz
2008-03-10 13:10 ` Rafael J. Wysocki
2008-03-10 14:04 ` Bartlomiej Zolnierkiewicz
2008-03-16 14:01 ` Anders Eriksson
2008-03-16 14:29 ` Bartlomiej Zolnierkiewicz
2008-03-16 14:29 ` Anders Eriksson
2008-03-16 15:14 ` Bartlomiej Zolnierkiewicz
2008-03-16 16:56 ` Linus Torvalds
2008-03-16 17:13 ` Linus Torvalds [this message]
2008-03-16 18:18 ` Anders Eriksson
2008-03-16 18:07 ` Bartlomiej Zolnierkiewicz
2008-03-16 18:13 ` Linus Torvalds
2008-03-16 18:36 ` Bartlomiej Zolnierkiewicz
2008-03-16 19:08 ` Anders Eriksson
2008-03-16 18:56 ` Alan Cox
2008-03-16 19:39 ` Linus Torvalds
2008-03-16 20:31 ` Alan Cox
2008-03-16 21:06 ` Linus Torvalds
2008-03-21 15:03 ` Mark Lord
2008-03-21 14:49 ` Alan Cox
2008-03-16 19:54 ` Bartlomiej Zolnierkiewicz
2008-03-16 22:59 ` Anders Eriksson
2008-03-16 23:27 ` Linus Torvalds
2008-03-17 21:09 ` Anders Eriksson
2008-03-17 22:52 ` Linus Torvalds
2008-03-18 0:18 ` Anders Eriksson
2008-03-18 13:03 ` Bartlomiej Zolnierkiewicz
2008-03-18 13:32 ` Anders Eriksson
2008-03-18 14:48 ` Bartlomiej Zolnierkiewicz
2008-03-18 15:10 ` Anders Eriksson
2008-03-18 15:41 ` Linus Torvalds
2008-03-18 16:30 ` Anders Eriksson
2008-03-18 16:47 ` Linus Torvalds
2008-03-18 21:02 ` Anders Eriksson
2008-03-19 1:21 ` Bartlomiej Zolnierkiewicz
2008-03-19 1:28 ` Linus Torvalds
2008-03-19 3:24 ` Bartlomiej Zolnierkiewicz
2008-03-19 3:28 ` Linus Torvalds
2008-03-19 3:56 ` Linus Torvalds
2008-03-19 4:03 ` Bartlomiej Zolnierkiewicz
2008-03-19 4:48 ` Linus Torvalds
2008-03-19 11:14 ` Bartlomiej Zolnierkiewicz
2008-03-16 18:23 ` Anders Eriksson
2008-03-16 18:26 ` Bartlomiej Zolnierkiewicz
2008-03-16 18:25 ` Anders Eriksson
2008-03-17 7:23 ` Jens Axboe
2008-03-16 18:44 ` Alan Cox
2008-03-10 13:19 ` Anders Eriksson
2008-03-10 13:56 ` Bartlomiej Zolnierkiewicz
2008-03-16 18:59 ` Andrey Borzenkov
2008-03-07 10:08 ` [patch] drivers/char/esp.c: fix bootup lockup (was: Re: Linux 2.6.25-rc4) Ingo Molnar
2008-03-09 13:41 ` [patch] drivers/char/esp.c: fix bootup lockup Jiri Slaby
2008-03-09 22:49 ` Rafael J. Wysocki
2008-03-09 23:04 ` Jiri Slaby
2008-03-05 22:30 Linux 2.6.25-rc4 Jonathan McDowell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.1.00.0803160958260.3020@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=aeriksson@fastmail.fm \
--cc=bzolnier@gmail.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®