Subject: Re: marching unit numbers
To: Chris G. Demetriou <>
From: Bill Sommerfeld <>
List: tech-kern
Date: 12/31/1999 12:23:50
> Of course, there's no good way to add this type of configuration
> information to config files, but that's more a bug than a feature.
> (e.g. you can't say "i want this unit to correspond to this MAC
> address," etc.)  If people are interested in solving it, i'd love to
> see proposals...

I looked into this briefly at one point while looking at interface
detach support..

It looks like it shouldn't be difficult for those PCMCIA network
interfaces which have te MAC address in the CIS (Card Info String)
area on the card (which is accessible in a driver-independant way ..
I'm told that many early PCMCIA cards don't support it, but the couple
of newer ones I've looked at do have it).  The pcmcia bus code could
extract the MAC address and use it as a locator to match the
appropriate device instance.

One "structural" problem is that locators can only be integers; MAC
addresses are too big for that on ILP32 systems.  You could kludge
around this by using two locators (maclo, machi)..

Second piece, independant of the first:

Now, I haven't looked at the code with an eye towards seeing how
difficult this would be, but another piece of this might be to allow
certain locators for wildcarded attachments to be "sticky"; if any
locator for a given wildcard-derived attachment were "sticky", then,
on attachment, a config entry for the device, with sticky locators
matching the new device and with all other locators wildcard, would
get created; this would hang around even after detach, so that if
another device matching the sticky locators were attached, it would
get the same unit number as the previous one.

					- Bill