[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 07 Jul 2010 09:40:37 +0200
From: Karl Hiramoto <karl@...amoto.org>
To: chas williams - CONTRACTOR <chas@....nrl.navy.mil>
CC: linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org
Subject: Re: [PATCH v2 1/9] atm: propagate signal changes via notifier
On 07/06/2010 09:41 PM, chas williams - CONTRACTOR wrote:
> On Mon, 5 Jul 2010 10:45:53 +0200
> Karl Hiramoto<karl@...amoto.org> wrote:
>
>> +void atm_dev_signal_change(struct atm_dev *dev, char signal)
>> +{
>> + int i;
>> + pr_debug("%s signal=%d dev=%p number=%d dev->signal=%d\n",
>> + __func__, signal, dev, dev->number, dev->signal);
>> +
>> + /* atm driver sending invalid signal */
>> + WARN_ON(signal< ATM_PHY_SIG_LOST || signal>
>> ATM_PHY_SIG_FOUND); +
>> + if (dev->signal == signal)
>> + return; /* no change */
>> +
>> + dev->signal = signal;
>> +
>> + &atm_dev_notify_chain, signal,
>> dev); +}
> i am not sure that you can use blocking_notifier_call_chain() here.
> atm_dev_signal_change() might be called from an interrupt context in
> some of the drivers.
>
> this implies that the notifier functions themselves must also not block.
> so in br2684 you probably want to use read_lock_irq() instead of just
> read_lock()
Chas,
I'll change to an atomic notifier, fix these issues, your other comments and send a new version of the patchset.
Thanks.
--
Karl
--
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