From: Meelis Roos <mroos@linux.ee>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] tms380tr: fix long delays in initialization
Date: Mon, 4 Oct 2010 11:39:02 +0300 (EEST) [thread overview]
Message-ID: <alpine.SOC.1.00.1010041135060.12325@math.ut.ee> (raw)
In-Reply-To: <20101003.200109.226763463.davem@davemloft.net>
> > tms380tr driver tries to use udelay (meaning busy loop) for several half
> > second delays during hardware initialization. Crazy overly long busy
> > wait delays mean no delay at all so driver initialization fails without
> > waiting. Fix it by using msleep() for long delays and leave it to
> > udelay() for short delays.
> >
> > Signed-off-by: Meelis Roos <mroos@linux.ee>
>
> You can't use msleep() here because this code can be invoked
> from interrupts and thus cannot sleep.
I checked these two functions that contain long delays that I changed -
tms380tr_bringup_diags() and tms380tr_init_adapter() - to be called only
from tms380tr_chipset_init() that is only called from tms380tr_open() so
no call paths from interrupts AFAICS. Short delyas from interrupt
context are not changed in any way, they still use udelay().
--
Meelis Roos (mroos@linux.ee)
next prev parent reply other threads:[~2010-10-04 8:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-03 19:34 [PATCH] tms380tr: fix long delays in initialization Meelis Roos
2010-10-04 3:01 ` David Miller
2010-10-04 8:39 ` Meelis Roos [this message]
2010-10-04 16:42 ` David Miller
2010-10-04 21:15 ` Meelis Roos
2010-10-04 21:33 ` David Miller
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=alpine.SOC.1.00.1010041135060.12325@math.ut.ee \
--to=mroos@linux.ee \
--cc=davem@davemloft.net \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).