From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 4/6] ide: add ide_busy_sleep() helper
Date: Tue, 4 Dec 2007 15:01:22 +0100 [thread overview]
Message-ID: <200712041501.22872.bzolnier@gmail.com> (raw)
In-Reply-To: <475548F1.6040308@ru.mvista.com>
Hi,
On Tuesday 04 December 2007, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
>
> > Add ide_busy_sleep() helper and use it in do_probe(),
> > enable_nest() and probe_hwif().
>
> > As a nice side-effect this fixes a minor bug in enable_nest()
> > (the code was reading status register without any delay).
>
> Huh?
>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> > Index: b/drivers/ide/ide-probe.c
> > ===================================================================
> > --- a/drivers/ide/ide-probe.c
> > +++ b/drivers/ide/ide-probe.c
> [...]
> > @@ -489,20 +499,16 @@ static int do_probe (ide_drive_t *drive,
> > static void enable_nest (ide_drive_t *drive)
> > {
> > ide_hwif_t *hwif = HWIF(drive);
> > - unsigned long timeout;
> >
> > printk("%s: enabling %s -- ", hwif->name, drive->id->model);
> > SELECT_DRIVE(drive);
> > msleep(50);
> > hwif->OUTB(EXABYTE_ENABLE_NEST, IDE_COMMAND_REG);
> > - timeout = jiffies + WAIT_WORSTCASE;
> > - do {
> > - if (time_after(jiffies, timeout)) {
> > - printk("failed (timeout)\n");
> > - return;
> > - }
> > - msleep(50);
>
> Here's a delay, isn't it?
s/enable_nest/do_probe/
Thanks for pointing this out, I fixed patch description locally.
> > - } while ((hwif->INB(IDE_STATUS_REG)) & BUSY_STAT);
> > +
> > + if (ide_busy_sleep(hwif)) {
> > + printk(KERN_CONT "failed (timeout)\n");
> > + return;
> > + }
> >
> > msleep(50);
prev parent reply other threads:[~2007-12-04 13:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 21:52 [PATCH 4/6] ide: add ide_busy_sleep() helper Bartlomiej Zolnierkiewicz
2007-12-04 12:32 ` Sergei Shtylyov
2007-12-04 14:01 ` Bartlomiej Zolnierkiewicz [this message]
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=200712041501.22872.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=sshtylyov@ru.mvista.com \
/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;
as well as URLs for NNTP newsgroup(s).