A vISDN low-level driver interfaces the vISDN infrastructure to a real ISDN line.
Once loaded, a vISDN driver register every resource provided by each device it finds to the core infrastructure. Currently resources may be ports and channels.
Ports are typically:
Each port is comprised of several channels each of them may play a specifici role:
Hardware drivers make exensive use of the sysfs filesystem to export internal parameters to userspace.
Just like any other PCI device, a vISDN PCI adapter will have a device entry in the /sys/bus/pci/devices/ directory. Analogously a USB device will have its entry in /sys/bus/usb/devices/.
Among the usual parameters, vISDN devices create other attributes and subdevices. A typical tree may look like:
/sys/bus/pci/devices/0000:00:09.0/ |-- 11 | |-- i11.B1 | | |-- bitorder | | |-- bus -> ../../../../../bus/visdn | | |-- detach_state | | |-- flags | | |-- framing | | |-- port_name | | |-- power | | | `-- state | | |-- role | | |-- roles | | `-- speed | |-- 11.B2 | | |-- bitorder | | |-- bus -> ../../../../../bus/visdn | | |-- detach_state | | |-- flags | | |-- framing | | |-- port_name | | |-- power | | | `-- state | | |-- role | | |-- roles | | `-- speed | |-- 11.D | | |-- bitorder | | |-- bus -> ../../../../../bus/visdn | | |-- connected -> ../../../../../devices/visdn-system/netdev/8.1 | | |-- detach_state | | |-- flags | | |-- framing | | |-- port_name | | |-- power | | | `-- state | | |-- role | | |-- roles | | `-- speed | |-- 11.E | | |-- bitorder | | |-- bus -> ../../../../../bus/visdn | | |-- detach_state | | |-- flags | | |-- framing | | |-- port_name | | |-- power | | | `-- state | | |-- role | | |-- roles | | `-- speed | |-- 11.SQ | | |-- bitorder | | |-- bus -> ../../../../../bus/visdn | | |-- detach_state | | |-- flags | | |-- framing | | |-- port_name | | |-- power | | | `-- state | | |-- role | | |-- roles | | `-- speed | |-- B1 -> ../../../../devices/pci0000:00/0000:00:09.0/11/11.B1 | |-- B2 -> ../../../../devices/pci0000:00/0000:00:09.0/11/11.B2 | |-- D -> ../../../../devices/pci0000:00/0000:00:09.0/11/11.D | |-- E -> ../../../../devices/pci0000:00/0000:00:09.0/11/11.E | |-- SQ -> ../../../../devices/pci0000:00/0000:00:09.0/11/11.SQ | |-- detach_state | |-- enabled | |-- l1_state | |-- port_id | |-- power | | `-- state | |-- role | |-- st_clock_delay | `-- st_sampling_comp |-- 12 | |-- bitrate | |-- detach_state | |-- enabled | |-- master | |-- port_id | |-- power | | `-- state | `-- slots_state |-- bus -> ../../../bus/pci |-- class |-- config |-- detach_state |-- device |-- driver -> ../../../bus/pci/drivers/hfc-pci |-- fifo_state |-- irq |-- local_cpus |-- pcm -> ../../../devices/pci0000:00/0000:00:09.0/12 |-- power | `-- state |-- resource |-- resource0 |-- resource1 |-- st0 -> ../../../devices/pci0000:00/0000:00:09.0/11 |-- subsystem_device |-- subsystem_vendor `-- vendor
You may see that the driver exports one S/T port whose unique ID is 11 and
which is named st0. pcm0 (ID 12) is a PCM port
facing towards an (unconfigured) hardware PCM bus.
Each port and each channel declare several attriutes. enabled for example, allows you to enable/disable the port which is normally disabled prior to configuration. l1_state may be used to read or modify the S/T port's L1 state.
Other attributes like fifo_state are device-wise and may be used to inspect internal card parameters.
A complete description of all the attributes exported by every driver may be found in the driver's page linked at the top of this page.