linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brad Hards <bhards@bigpond.net.au>
To: linux-hotplug@vger.kernel.org
Subject: Re: Is there any docs or design guides for adding hotplugablity to drivers?
Date: Tue, 02 Jul 2002 03:37:36 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-102558135611761@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-102555728227620@msgid-missing>

On Tue, 2 Jul 2002 12:32, Chris Hanson wrote:
>    Date: 01 Jul 2002 14:00:19 -0700
>    From: Mark Atwood <mra@pobox.com>
>
>    Other than just reading the source, of course.
>
>    I'm working on a Linux appliance, and I feel that using hotplug events
>    to signal things like moving in range of an 802.11 access point,
>    getting carrier on an ethernet port, and someone plugging a cable into
>    the serial port, would make a lot of stuff much much easier.
>
>    I suspect that a lot of this would be useful out in the "regular
>    linux" world as well. Especially the ethernet carrier detect. (Windows
>    can do it, and will invoke DHCP when you plug in an ethernet cable, it
>    would be nice if Linux can do the same.)

> I'm working on this.  I've already implemented code to do carrier
> detect, although this only works on NICs that support MII.
> (Unfortunately the Lucent Prism II doesn't support MII; if anyone
> knows how to do carrier detect on non-MII NICs, I'd appreciate
> learning how.)  See the Debian package "laptop-net" for details:
The concept of carrier detect is a bit marginal on a non-wired links. Normally 
you need to associate to be considered on the link.

Note that most newish network cards do support carrier detect in some form. We 
even support it for most of the USB networking devices. You can see this 
using a proggie like ethtool (http://www.sf.net/projects/gkernel). 

The way it works is that the driver does whatever magic it needs, and then 
signals to the networking stack using netif_carrier_on() and 
netif_carrier_off. The trivial solution is to add a call_usermodehelper() to 
the netif_carrier_[off,on] routines (in <linux/netdevice.h>. Unfortunately 
the call_usermodehelper() needs process context, and you can't assume that 
for the netif_carrier_[on|off] calls.

Brad

-- 
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2002-07-02  3:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-01 21:00 Is there any docs or design guides for adding hotplugablity to drivers? Mark Atwood
2002-07-02  2:23 ` Is there any docs or design guides for adding hotplugablity to David Brownell
2002-07-02  2:32 ` Is there any docs or design guides for adding hotplugablity to drivers? Chris Hanson
2002-07-02  3:37 ` Brad Hards [this message]
2002-07-02  4:52 ` Greg KH

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=marc-linux-hotplug-102558135611761@msgid-missing \
    --to=bhards@bigpond.net.au \
    --cc=linux-hotplug@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).