netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karl Hiramoto <karl@hiramoto.org>
To: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [PATCH v2 1/9] atm: propagate signal changes via notifier
Date: Wed, 07 Jul 2010 09:40:37 +0200	[thread overview]
Message-ID: <4C342F75.3000500@hiramoto.org> (raw)
In-Reply-To: <20100706154158.542551c7@thirdoffive.cmf.nrl.navy.mil>

  On 07/06/2010 09:41 PM, chas williams - CONTRACTOR wrote:
> On Mon,  5 Jul 2010 10:45:53 +0200
> Karl Hiramoto<karl@hiramoto.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

  reply	other threads:[~2010-07-07  7:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05  8:45 [PATCH v2 0/9] atm: propagate atm_dev signal carrier to LOWER_UP of netdevice Karl Hiramoto
2010-07-05  8:45 ` [PATCH v2 1/9] atm: propagate signal changes via notifier Karl Hiramoto
2010-07-06 19:29   ` chas williams - CONTRACTOR
2010-07-06 19:33   ` chas williams - CONTRACTOR
2010-07-06 19:41   ` chas williams - CONTRACTOR
2010-07-07  7:40     ` Karl Hiramoto [this message]
2010-07-05  8:45 ` [PATCH v2 2/9] atm/br2684: register notifier event for carrier signal changes Karl Hiramoto
2010-07-05  8:45 ` [PATCH v2 3/9] atm/adummy: add syfs DEVICE_ATTR to change signal Karl Hiramoto
2010-07-05  8:45 ` [PATCH v2 4/9] atm/idt77105.c: call atm_dev_signal_change() when signal changes Karl Hiramoto
2010-07-05  8:45 ` [PATCH v2 5/9] atm/solos-pci: " Karl Hiramoto
2010-07-05  8:45 ` [PATCH v2 6/9] atm/suni.c: " Karl Hiramoto
2010-07-05  8:45 ` [PATCH v2 7/9] usb/atm/cxacru.c: " Karl Hiramoto
2010-07-05  8:46 ` [PATCH v2 8/9] usb/atm/speedtch.c: " Karl Hiramoto
2010-07-05  8:46 ` [PATCH v2 9/9] usb/atm/ueagle-atm.c: " Karl Hiramoto

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=4C342F75.3000500@hiramoto.org \
    --to=karl@hiramoto.org \
    --cc=chas@cmf.nrl.navy.mil \
    --cc=linux-atm-general@lists.sourceforge.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).