The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: "domen@coderock.org" <domen@coderock.org>,
	emoenke@gwdg.de, linux-kernel@vger.kernel.org
Subject: Re: [patch 2/4] cdrom/aztcd: remove sleep_on() usage
Date: Mon, 20 Jun 2005 16:24:03 -0700	[thread overview]
Message-ID: <20050620232403.GC2623@us.ibm.com> (raw)
In-Reply-To: <9a87484905062016141082daff@mail.gmail.com>

On 21.06.2005 [01:14:11 +0200], Jesper Juhl wrote:
> On 6/20/05, domen@coderock.org <domen@coderock.org> wrote:
> > From: Nishanth Aravamudan <nacc@us.ibm.com>
> > 
> > 
> > 
> > Directly use wait-queues instead of the deprecated sleep_on().
> > This required adding a local waitqueue. Patch is compile-tested.
> > 
> > Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> > Signed-off-by: Domen Puncer <domen@coderock.org>
> > ---
> >  aztcd.c |    6 +++++-
> >  1 files changed, 5 insertions(+), 1 deletion(-)
> > 
> > Index: quilt/drivers/cdrom/aztcd.c
> > ===================================================================
> > --- quilt.orig/drivers/cdrom/aztcd.c
> > +++ quilt/drivers/cdrom/aztcd.c
> > @@ -179,6 +179,7 @@
> >  #include <linux/ioport.h>
> >  #include <linux/string.h>
> >  #include <linux/major.h>
> > +#include <linux/wait.h>
> > 
> >  #include <linux/init.h>
> > 
> > @@ -429,9 +430,12 @@ static void dten_low(void)
> >  #define STEN_LOW_WAIT   statusAzt()
> >  static void statusAzt(void)
> >  {
> > +       DEFINE_WAIT(wait);
> >         AztTimeout = AZT_STATUS_DELAY;
> >         SET_TIMER(aztStatTimer, HZ / 100);
> > -       sleep_on(&azt_waitq);
> > +       prepare_to_wait(&azt_waitq, &wait, TASK_UNINTERRUPTIBLE);
> > +       schedule();
> > +       finish_wait(&azt_waitq, &wait);
> >         if (AztTimeout <= 0)
> >                 printk("aztcd: Error Wait STEN_LOW_WAIT command:%x\n",
> >                        aztCmd);
> > 
> 
> Hmm, now that noone's sleeping on azt_waitq the two
> wake_up(&azt_waitq); calls in aztStatTimer() don't seem to make much
> sense any more... Can they just go away or?  If they can go away then
> axt_waitq itself would seem to be a goner as well...   It might just
> be me missing something, but this patch looks incomplete and not
> completely thought through to me.

Huh? prepare_to_wait() means the 'wait' here is sleeping on azt_waitq...

Thanks,
Nish

  reply	other threads:[~2005-06-21  1:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-20 21:51 [patch 2/4] cdrom/aztcd: remove sleep_on() usage domen
2005-06-20 23:14 ` Jesper Juhl
2005-06-20 23:24   ` Nishanth Aravamudan [this message]
2005-06-20 23:34     ` Jesper Juhl
2005-06-21  9:58 ` Johannes Stezenbach

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=20050620232403.GC2623@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=domen@coderock.org \
    --cc=emoenke@gwdg.de \
    --cc=jesper.juhl@gmail.com \
    --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