[asterisk-dev] A plan for span
Kevin P. Fleming
kpfleming at digium.com
Tue Jul 8 11:12:25 CDT 2008
Shaun Ruffell wrote:
> For example, you could export an sysfs attribute (register) that when written
> to, that driver will in order register all the spans it supports. Then the
> hotplug script or init script can wait until all the devices it's been
> configured for are loaded and have exported their names in sysfs, and then
> instruct them to register with dahdi in the order that it wants. So when you
> add a new card to your system, you would also add it to the list of devices to
> be registered.
In previous versions of this discussion (months ago), we considered that
option, and discarded it because it requires configuration and things to
happen 'at the right time', and it doesn't work for devices that can be
added after boot time (Xorcom's Astribank devices, dynamic spans created
with dahdi_dynamic_eth or dahdi_dynamic_loc, hotplug PCI, etc.).
Using the existing hotplug mechanism to provide symbolic names to spans
and devices both solves the load ordering issue and also provides much
more understandable configuration and usage syntax. It also avoids a 250
channel limit, as we no longer have to have any specific major or minor
numbers for channels, they can be totally dynamic.
The one downside to this mechanism is that it really won't work with
distros or systems that don't use udev, which is not many (but probably
small embedded-style systems would fall into that category).
--
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)
More information about the asterisk-dev
mailing list