From: David Miller <davem@davemloft.net>
To: mroos@linux.ee
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] tms380tr: fix long delays in initialization
Date: Mon, 04 Oct 2010 09:42:54 -0700 (PDT) [thread overview]
Message-ID: <20101004.094254.35052481.davem@davemloft.net> (raw)
In-Reply-To: <alpine.SOC.1.00.1010041135060.12325@math.ut.ee>
From: Meelis Roos <mroos@linux.ee>
Date: Mon, 4 Oct 2010 11:39:02 +0300 (EEST)
>> > 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().
tms380tr_init_adapter() gets called from tms380tr_chk_irq() which is
invoked from the interrupt handler.
next prev parent reply other threads:[~2010-10-04 16:42 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
2010-10-04 16:42 ` David Miller [this message]
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=20101004.094254.35052481.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=mroos@linux.ee \
--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).