Hi David,
I double-check my patch and the ->mac->xxx calls are still under the lock.
I think that lock is trying to protect priv struct and related data, so i
just remove some functions have no bearing on priv struct.
Hao
2014-10-01 3:10 GMT+08:00 David Miller <da...@da...>:
> From: <hli...@gm...>
> Date: Tue, 30 Sep 2014 13:55:34 +0800
>
> > From: Hao Liang <hli...@gm...>
> >
> > This is the fix for a power management issue caused by suspend and
> resume function in stmmac_main.c.
> > After enable CONFIG_DEBUG_ATOMIC_SLEEP which enable sleep-inside atomic
> section checking, power
> > managemet can not work normally. Board couldn't wakeup successfully
> after suspend. Command
> > "echo mem > /sys/power/state" suspend the board.
> >
> > In suspend and resume function of stmmac driver, there are some
> sleep-inside function in atomic section
> > created by spin lock. These functions will causes system warnings and
> wakeup issue when enable
> > CONFIG_DEBUG_ATOMIC_SLEEP.
> >
> > This bug was fixed by:
> > * replace some sleep function with non-sleep function
> > clk_disable_unprepare -> clk_disable ...
> > * decrease the atomic area created by spin lock function. The original
> atomic area in resume function is
> > too large.
> >
> > Signed-off-by: Hao Liang <hli...@gm...>
>
> I really think the ->mac->xxx calls need to be under the lock, and
> therefore this
> spinlock region shortening is not valid.
>
|