Subject: Re: hot plugging network cards
To: Darren Reed <darrenr@reed.wattle.id.au>
From: Jun-ichiro itojun Hagino <itojun@itojun.org>
List: tech-net
Date: 05/27/1999 14:11:42
>Playing around with PCMCIA network cards, it appears that there is
>currently no support (1.4) for actually _ejecting_ a card.  Does
>anyone have a set of patches I can try out or should I just hack
>on this myself ? (As I recall, it's not very hard to make an interface
>disappear as far as the kernel is concerned).

	I would like to see that patch, but...

	From the source code it looks that direction is to reclaim
	struct ifnet completely.  IMHO removing struct ifnet is very
	hard task as it is referenced from almost everywhere.

	From my experience with BSDI's pcmcia support (was done by
	shinoda@jaist.ac.jp and other voluntteers including me)
	I think it is better to:
	- separate card slot # and name of interface.  bind name of interface
	  (say ne2) to MAC address of the interface card.
	  This gives you the following behavior:
		insert card A (macaddr=A) to slot 0.  it will be ne2.
		insert card B (macaddr=B) to slot 1.  it will be ne3.
		remove both cards.  ne2 and ne3 are kept in the kernel,
		but all write operations will fail.
		insert card A (macaddr=A) to slot 2.  it will be recognized
		as ne2 again.
	  This is needed if you would like to make a router with notebook
	  PC, run routing daemon, and run IPv6 on notebooks.
	  (part of IPv6 address is taken from mac address so it is important
	  to keep interfadce name - mac address mapping)
	- separate card power state and ifconfig up/down.  we sometimes
	  would like to remove cards with IFF_UP state
	  (it is not high priority, though)

	I would like to know plans and direcitons, and would like to
	volunteer (of course).

itojun