mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Haverkamp <markh@osdl.org>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Cliff White <cliffw@osdl.org>
Subject: Re: ide taskfile and cdrom hang
Date: Mon, 02 Feb 2004 13:44:07 -0800	[thread overview]
Message-ID: <1075758247.12117.1.camel@markh1.pdx.osdl.net> (raw)
In-Reply-To: <200402022235.47439.bzolnier@elka.pw.edu.pl>

On Mon, 2004-02-02 at 13:35, Bartlomiej Zolnierkiewicz wrote:
> On Monday 02 of February 2004 21:45, Mark Haverkamp wrote:
> > On Mon, 2004-02-02 at 11:45, Bartlomiej Zolnierkiewicz wrote:
> > > On Monday 02 of February 2004 19:46, Mark Haverkamp wrote:
> > > > On Sun, 2004-02-01 at 12:48, Bartlomiej Zolnierkiewicz wrote:
> >
> > [ .... ]
> >
> > > > Thanks,
> > > >
> > > > hdparm -I /dev/hda didn't hang.  I got this on the console:
> > > >
> > > > hda: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
> > > > hda: drive_cmd: error=0x04Aborted Command
> > >
> > > That's okay.
> > > hdparm first tries WIN_IDENTIFY which can fail on ATAPI devices.
> > >
> > > > I added the patch that you provided and I still get the hang when I cat
> > > > /proc/ide/hda/identify.  I put a printk In the code to make sure that
> > > > it was going through the added code, and it is.
> > >
> > > So it is something different.  Can you give this patch a go?
> > > We will know more about what's going on.
> > >
> > > Thanks,
> > > --bart
> >
> > OK, Here it is:
> >
> > hda: (WAIT_NOT_BUSY) status=0xd0
> > hda: (CHECK_STATUS) status=0xd0
> > hda: (BUSY) status=0xd0
> > hda: lost interrupt
> > hda: (BUSY) status=0x50
> > hda: lost interrupt
> > hda: (BUSY) status=0x50
> > hda: lost interrupt
> > hda: (BUSY) status=0x50
> > hda: lost interrupt
> > hda: (BUSY) status=0x50
> 
> Here we go with next (incremental) patch...
> 
>  linux-2.6.2-rc2-root/drivers/ide/ide-taskfile.c |   12 ++++++++----
>  1 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff -puN drivers/ide/ide-taskfile.c~ide_tf_identify_debug2 drivers/ide/ide-taskfile.c
> --- linux-2.6.2-rc2/drivers/ide/ide-taskfile.c~ide_tf_identify_debug2	2004-02-02 22:24:31.802461904 +0100
> +++ linux-2.6.2-rc2-root/drivers/ide/ide-taskfile.c	2004-02-02 22:33:54.987844712 +0100
> @@ -786,14 +786,18 @@ EXPORT_SYMBOL(task_mulout_intr);
>  static u8 wait_drive_not_busy(ide_drive_t *drive)
>  {
>  	ide_hwif_t *hwif = HWIF(drive);
> -	int retries = 5;
> +	int retries = 100;
>  	u8 stat;
> +
>  	/*
> -	 * (ks) Last sector was transfered, wait until drive is ready.
> -	 * This can take up to 10 usec. We willl wait max 50 us.
> +	 * Last sector was transfered, wait until drive is ready.
> +	 * This can take up to 10 usec, but we will wait max 1 ms
> +	 * (drive_cmd_intr() waits that long).
>  	 */
> -	while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
> +	while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--) {
> +		printk("%s: (UDELAY(10)) status=0x%02x\n", drive->name, stat);
>  		udelay(10);
> +	}
>  	printk("%s: (WAIT_NOT_BUSY) status=0x%02x\n", drive->name, stat);
>  	return stat;
>  }
> 
> _

No hang this time.  Saw this on the console:

hda: (UDELAY(10)) status=0xd8
hda: (WAIT_NOT_BUSY) status=0x50
hda: (CHECK_STATUS) status=0x50
hda: (UDELAY(10)) status=0xd8
hda: (WAIT_NOT_BUSY) status=0x50
hda: (CHECK_STATUS) status=0x50


-- 
Mark Haverkamp <markh@osdl.org>


  reply	other threads:[~2004-02-02 21: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
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 [this message]
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=1075758247.12117.1.camel@markh1.pdx.osdl.net \
    --to=markh@osdl.org \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=cliffw@osdl.org \
    --cc=linux-kernel@vger.kernel.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®