From: Russell King <rmk@arm.linux.org.uk>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Albert Cranford <ac9410@attbi.com>,
Linus Torvalds <torvalds@transmeta.com>,
Kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [patch 9/9]Four new i2c drivers and __init/__exit cleanup to i2c
Date: Mon, 16 Sep 2002 00:26:19 +0100 [thread overview]
Message-ID: <20020916002619.D30390@flint.arm.linux.org.uk> (raw)
In-Reply-To: <3D851556.7070203@mandrakesoft.com>; from jgarzik@mandrakesoft.com on Sun, Sep 15, 2002 at 07:18:46PM -0400
On Sun, Sep 15, 2002 at 07:18:46PM -0400, Jeff Garzik wrote:
> Albert Cranford wrote:
> > --- linux/drivers/i2c/i2c-elektor.c.orig 2002-09-14 22:10:45.000000000 -0400
> > +++ linux-2.5.34/drivers/i2c/i2c-elektor.c 2002-09-15 01:18:55.000000000 -0400
> > @@ -125,12 +125,12 @@
> > int timeout = 2;
> >
> > if (irq > 0) {
> > - cli();
> > + local_irq_disable();
> > if (pcf_pending == 0) {
> > interruptible_sleep_on_timeout(&pcf_wait, timeout*HZ );
> > } else
> > pcf_pending = 0;
> > - sti();
> > + local_irq_enable();
> > } else {
> > udelay(100);
> > }
>
>
>
> this is _not_ the way to fix... use a proper spinlock
You can't hold a spinlock and sleep though, was one of my points back
in August. (Albert submitted a patch with all cli()/sti() converted
to spin_lock_irqsave()/spin_unlock_irqrestore().)
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2002-09-15 23:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-15 22:46 [patch 9/9]Four new i2c drivers and __init/__exit cleanup to i2c Albert Cranford
2002-09-15 23:18 ` Jeff Garzik
2002-09-15 23:26 ` Russell King [this message]
2002-09-15 23:31 ` Jeff Garzik
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=20020916002619.D30390@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=ac9410@attbi.com \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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