mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Mark Haverkamp <markh@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Cliff White <cliffw@osdl.org>
Subject: Re: ide taskfile and cdrom hang
Date: Sun, 1 Feb 2004 21:48:20 +0100	[thread overview]
Message-ID: <200402012148.20590.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <1075502193.26342.61.camel@markh1.pdx.osdl.net>


Hi,

On Friday 30 of January 2004 23:36, Mark Haverkamp wrote:
> We have some test machines here at OSDL that have a problem with the ide
> cdrom driver hanging when we cat the /proc/ide/hda/identify file. After
> 30 seconds the console displays: "hda: lost interrupt" which reoccurs
> every 30 seconds forever. We noticed it on 2.6.2-rc2-mm1 but It looks
> like this has been a problem for a while. Our test machines just changed
> their configuration to use make defconfig.  I found that if
> CONFIG_IDE_TASKFILE_IO is N then the hang doesn't occur.  Is this a
> common problem or are there just certain drives that won't work with
> taskfile i/o enabled?  I've included my .config, lspci as attachments.
> The cdrom model is CD-224E.

Does 'hdparm -I /dev/hda" work?  If so can you try this patch?
It reverts taskfile code to use old (non-taskfile) order of accessing
port registers for ATAPI identify command.  This is a good starting point.

If CONFIG_IDE_TASKFILE_IO is N code just ignores BUSY status of a drive
and reads some random data.  I would like to have this problem solved
at least instead of adding the same workaround to CONFIG_IDE_TASKFILE_IO.

Cheers,
--bart

 linux-2.6.2-rc2-root/drivers/ide/ide-taskfile.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+)

diff -puN drivers/ide/ide-taskfile.c~ide_tf_identify_debug drivers/ide/ide-taskfile.c
--- linux-2.6.2-rc2/drivers/ide/ide-taskfile.c~ide_tf_identify_debug	2004-02-01 21:06:58.494873136 +0100
+++ linux-2.6.2-rc2-root/drivers/ide/ide-taskfile.c	2004-02-01 21:15:06.268720240 +0100
@@ -142,6 +142,20 @@ ide_startstop_t do_rw_taskfile (ide_driv
 	void debug_taskfile(drive, task);
 #endif /* CONFIG_IDE_TASK_IOCTL_DEBUG */
 
+	if (taskfile->command == WIN_PIDENTIFY) {
+		hwif->OUTB(taskfile->feature, IDE_FEATURE_REG);
+
+		if (IDE_CONTROL_REG)
+			hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
+		SELECT_MASK(drive, 0);
+
+		hwif->OUTB(taskfile->sector_count, IDE_NSECTOR_REG);
+
+		ide_execute_command(drive, taskfile->command, task->handler,
+				    WAIT_WORSTCASE, NULL);
+		return ide_started;
+	}
+
 	/* ALL Command Block Executions SHALL clear nIEN, unless otherwise */
 	if (IDE_CONTROL_REG) {
 		/* clear nIEN */

_


  reply	other threads:[~2004-02-01 20:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-30 22:36 Mark Haverkamp
2004-02-01 20:48 ` Bartlomiej Zolnierkiewicz [this message]
2004-02-02 18:46   ` Mark Haverkamp
2004-02-02 19:45     ` Bartlomiej Zolnierkiewicz
2004-02-02 20:45       ` Mark Haverkamp
2004-02-02 21:35         ` Bartlomiej Zolnierkiewicz
2004-02-02 21:44           ` Mark Haverkamp
2004-02-02 23:37             ` Bartlomiej Zolnierkiewicz
2004-02-02 23:52               ` Mark Haverkamp
2004-02-03  0:13                 ` Bartlomiej Zolnierkiewicz
2004-02-03  0:16                   ` Mark Haverkamp
2004-02-03  1:09                     ` Bartlomiej Zolnierkiewicz
     [not found] <1075502193.26342.61.camel@markh1.pdx.osdl.net.suse.lists.linux.kernel>
2004-01-31  0:46 ` Andi Kleen

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=200402012148.20590.bzolnier@elka.pw.edu.pl \
    --to=b.zolnierkiewicz@elka.pw.edu.pl \
    --cc=cliffw@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markh@osdl.org \
    /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®