[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.SOC.1.00.1010041135060.12325@math.ut.ee>
Date: Mon, 4 Oct 2010 11:39:02 +0300 (EEST)
From: Meelis Roos <mroos@...ux.ee>
To: David Miller <davem@...emloft.net>
cc: netdev@...r.kernel.org
Subject: Re: [PATCH] tms380tr: fix long delays in initialization
> > 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@...ux.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@...ux.ee)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists