netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: karl@hiramoto.org
Cc: linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org,
	chas@cmf.nrl.navy.mil
Subject: Re: [PATCH v3 0/9] atm: propagate atm_dev signal carrier to LOWER_UP of netdevice
Date: Wed, 07 Jul 2010 15:07:41 -0700 (PDT)	[thread overview]
Message-ID: <20100707.150741.267964636.davem@davemloft.net> (raw)
In-Reply-To: <1278492636-11094-1-git-send-email-karl@hiramoto.org>

From: Karl Hiramoto <karl@hiramoto.org>
Date: Wed,  7 Jul 2010 10:50:27 +0200

> Changes from v2:
>  * use atomic instead of blocking notifier
>  * use read_lock_irq() instead of read_lock() in atm/br2684
>  * clean up comments
>  * remove unused variable.  I feel really bad about missing that last time.
>  
> Changes from v1:
> Use atm_dev notifier chain  instead of callback function pointer in struct vcc.
> In drivers/usb/atm call atm_dev_signal_change().
> 
> In userspace it's helpful to know if a network device has a carrier signal.
> Often it is monitored via netlink.  This patchset allows a way for the
> struct atm_dev drivers to pass carrier on/off to the netdevice.
> 
> For DSL, carrier is on when the line has reached showtime state.
> 
> Currently this patchset only propagates the changes to br2684 vccs,
> as this is the only type of hardware I have to test.
> 
> If you prefer git you can pull from:
> git://github.com/karlhiramoto/linux-2.6.git atm-v3

I think the locking still needs another tweak.

By using read_lock_irq() you are assuming that you are invoked
from a context where irqs are disabled.

That's not necessarily the case, in fact some of your notifier call
sites in the drivers are in interrupt handlers where interrupts may or
may not be disabled.

So you'll likely need to use read_lock_irqsave() and read_lock_irqrestore().

Next, please format comments:

/* Like
 * this.
 */

Thanks.

      parent reply	other threads:[~2010-07-07 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-07  8:50 [PATCH v3 0/9] atm: propagate atm_dev signal carrier to LOWER_UP of netdevice Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 1/9] atm: propagate signal changes via notifier Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 2/9] atm/br2684: register notifier event for carrier signal changes Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 3/9] atm/adummy: add syfs DEVICE_ATTR to change signal Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 4/9] atm/idt77105.c: call atm_dev_signal_change() when signal changes Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 5/9] atm/solos-pci: " Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 6/9] atm/suni.c: " Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 7/9] usb/atm/cxacru.c: " Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 8/9] usb/atm/speedtch.c: " Karl Hiramoto
2010-07-07  8:50 ` [PATCH v3 9/9] usb/atm/ueagle-atm.c: " Karl Hiramoto
2010-07-07 22:07 ` David Miller [this message]

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=20100707.150741.267964636.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=chas@cmf.nrl.navy.mil \
    --cc=karl@hiramoto.org \
    --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).