public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
Subject: Re: [PATCH] i2c-pxa: fix scheduling while atomic	in	i2c_pxa_abort()
Date: Thu, 7 Aug 2008 10:12:54 +0000 (UTC)	[thread overview]
Message-ID: <g7ehr6$i0n$2@ger.gmane.org> (raw)
In-Reply-To: 20080806223816.GD2716@fluff.org.uk

Ben Dooks wrote:

> On Tue, Aug 05, 2008 at 03:17:11PM +0400, Dmitry Baryshkov wrote:
>> i2c_pxa_abort can be called from the atomic context. Change it to use
>> mdelay and counted loop.
> 
> if this can be called from an atomic context, is there a distinct
> possibility you are going to stop execution of the entire cpu for the
> time it takes to sort this out? Is it possible to disable the interrupt
> request, fire a work-struct to deal with this and then re-enabled the
> controller once it is finished?

If the bus isn't stalled by some hanged device, the reset will happen very
fast, so I don't see a reason to take that route.

However I'd implement the suggestion by Eric to choose mdelay or msleep
based on the atomicity of the context.

>  
>> Signed-off-by: Dmitry Baryshkov
>> <dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>




-- 
With best wishes
Dmitry



_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

      reply	other threads:[~2008-08-07 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-05 11:17 [PATCH] i2c-pxa: fix scheduling while atomic in i2c_pxa_abort() Dmitry Baryshkov
     [not found] ` <20080805111711.GA4807-nIupHZaCssqR2kOLt6zJ8ErlnG4Plg33XqFh9Ls21Oc@public.gmane.org>
2008-08-06 22:38   ` Ben Dooks
2008-08-07 10:12     ` Dmitry Baryshkov [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='g7ehr6$i0n$2@ger.gmane.org' \
    --to=dbaryshkov-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.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