staging: remove isdn capi drivers
Subsystems (4)
PATCH 1/2 staging: remove isdn capi drivers
As described in drivers/staging/isdn/TODO, the drivers are all assumed to be unmaintained and unused now, with gigaset being the last one to stop being maintained after Paul Bolle lost access to an ISDN network.
The CAPI subsystem remains for now, as it is still required by bluetooth/cmtp.
--- Documentation/isdn/avmb1.rst | 246 -- Documentation/isdn/gigaset.rst | 465 --- Documentation/isdn/hysdn.rst | 196 -- Documentation/isdn/index.rst | 3 - .../userspace-api/ioctl/ioctl-number.rst | 1 - MAINTAINERS | 3 +- drivers/staging/Kconfig | 2 - drivers/staging/Makefile | 1 - drivers/staging/isdn/Kconfig | 12 - drivers/staging/isdn/Makefile | 8 - drivers/staging/isdn/TODO | 22 - drivers/staging/isdn/avm/Kconfig | 65 - drivers/staging/isdn/avm/Makefile | 12 - drivers/staging/isdn/avm/avm_cs.c | 166 - drivers/staging/isdn/avm/avmcard.h | 581 ---- drivers/staging/isdn/avm/b1.c | 819 ----- drivers/staging/isdn/avm/b1dma.c | 981 ------ drivers/staging/isdn/avm/b1isa.c | 243 -- drivers/staging/isdn/avm/b1pci.c | 416 --- drivers/staging/isdn/avm/b1pcmcia.c | 224 -- drivers/staging/isdn/avm/c4.c | 1317 -------- drivers/staging/isdn/avm/t1isa.c | 594 ---- drivers/staging/isdn/avm/t1pci.c | 259 -- drivers/staging/isdn/gigaset/Kconfig | 62 - drivers/staging/isdn/gigaset/Makefile | 17 - drivers/staging/isdn/gigaset/asyncdata.c | 606 ---- drivers/staging/isdn/gigaset/bas-gigaset.c | 2672 ----------------- drivers/staging/isdn/gigaset/capi.c | 2517 ---------------- drivers/staging/isdn/gigaset/common.c | 1153 ------- drivers/staging/isdn/gigaset/dummyll.c | 74 - drivers/staging/isdn/gigaset/ev-layer.c | 1910 ------------ drivers/staging/isdn/gigaset/gigaset.h | 827 ----- drivers/staging/isdn/gigaset/interface.c | 613 ---- drivers/staging/isdn/gigaset/isocdata.c | 1006 ------- drivers/staging/isdn/gigaset/proc.c | 77 - drivers/staging/isdn/gigaset/ser-gigaset.c | 796 ----- drivers/staging/isdn/gigaset/usb-gigaset.c | 946 ------ drivers/staging/isdn/hysdn/Kconfig | 15 - drivers/staging/isdn/hysdn/Makefile | 12 - drivers/staging/isdn/hysdn/boardergo.c | 445 --- drivers/staging/isdn/hysdn/boardergo.h | 100 - drivers/staging/isdn/hysdn/hycapi.c | 785 ----- drivers/staging/isdn/hysdn/hysdn_boot.c | 400 --- drivers/staging/isdn/hysdn/hysdn_defs.h | 282 -- drivers/staging/isdn/hysdn/hysdn_init.c | 213 -- drivers/staging/isdn/hysdn/hysdn_net.c | 330 -- drivers/staging/isdn/hysdn/hysdn_pof.h | 78 - drivers/staging/isdn/hysdn/hysdn_procconf.c | 411 --- drivers/staging/isdn/hysdn/hysdn_proclog.c | 357 --- drivers/staging/isdn/hysdn/hysdn_sched.c | 197 -- drivers/staging/isdn/hysdn/ince1pc.h | 134 - include/linux/b1pcmcia.h | 21 - include/uapi/linux/gigaset_dev.h | 39 - include/uapi/linux/hysdn_if.h | 34 - 54 files changed, 1 insertion(+), 23764 deletions(-) delete mode 100644 Documentation/isdn/avmb1.rst delete mode 100644 Documentation/isdn/gigaset.rst delete mode 100644 Documentation/isdn/hysdn.rst delete mode 100644 drivers/staging/isdn/Kconfig delete mode 100644 drivers/staging/isdn/Makefile delete mode 100644 drivers/staging/isdn/TODO delete mode 100644 drivers/staging/isdn/avm/Kconfig delete mode 100644 drivers/staging/isdn/avm/Makefile delete mode 100644 drivers/staging/isdn/avm/avm_cs.c delete mode 100644 drivers/staging/isdn/avm/avmcard.h delete mode 100644 drivers/staging/isdn/avm/b1.c delete mode 100644 drivers/staging/isdn/avm/b1dma.c delete mode 100644 drivers/staging/isdn/avm/b1isa.c delete mode 100644 drivers/staging/isdn/avm/b1pci.c delete mode 100644 drivers/staging/isdn/avm/b1pcmcia.c delete mode 100644 drivers/staging/isdn/avm/c4.c delete mode 100644 drivers/staging/isdn/avm/t1isa.c delete mode 100644 drivers/staging/isdn/avm/t1pci.c delete mode 100644 drivers/staging/isdn/gigaset/Kconfig delete mode 100644 drivers/staging/isdn/gigaset/Makefile delete mode 100644 drivers/staging/isdn/gigaset/asyncdata.c delete mode 100644 drivers/staging/isdn/gigaset/bas-gigaset.c delete mode 100644 drivers/staging/isdn/gigaset/capi.c delete mode 100644 drivers/staging/isdn/gigaset/common.c delete mode 100644 drivers/staging/isdn/gigaset/dummyll.c delete mode 100644 drivers/staging/isdn/gigaset/ev-layer.c delete mode 100644 drivers/staging/isdn/gigaset/gigaset.h delete mode 100644 drivers/staging/isdn/gigaset/interface.c delete mode 100644 drivers/staging/isdn/gigaset/isocdata.c delete mode 100644 drivers/staging/isdn/gigaset/proc.c delete mode 100644 drivers/staging/isdn/gigaset/ser-gigaset.c delete mode 100644 drivers/staging/isdn/gigaset/usb-gigaset.c delete mode 100644 drivers/staging/isdn/hysdn/Kconfig delete mode 100644 drivers/staging/isdn/hysdn/Makefile delete mode 100644 drivers/staging/isdn/hysdn/boardergo.c delete mode 100644 drivers/staging/isdn/hysdn/boardergo.h delete mode 100644 drivers/staging/isdn/hysdn/hycapi.c delete mode 100644 drivers/staging/isdn/hysdn/hysdn_boot.c delete mode 100644 drivers/staging/isdn/hysdn/hysdn_defs.h delete mode 100644 drivers/staging/isdn/hysdn/hysdn_init.c delete mode 100644 drivers/staging/isdn/hysdn/hysdn_net.c delete mode 100644 drivers/staging/isdn/hysdn/hysdn_pof.h delete mode 100644 drivers/staging/isdn/hysdn/hysdn_procconf.c delete mode 100644 drivers/staging/isdn/hysdn/hysdn_proclog.c delete mode 100644 drivers/staging/isdn/hysdn/hysdn_sched.c delete mode 100644 drivers/staging/isdn/hysdn/ince1pc.h delete mode 100644 include/linux/b1pcmcia.h delete mode 100644 include/uapi/linux/gigaset_dev.h delete mode 100644 include/uapi/linux/hysdn_if.h
Documentation/isdn/avmb1.rst deleted +0 -246
@@ -1,246 +0,0 @@ -================================ -Driver for active AVM Controller -================================ - -The driver provides a kernel capi2.0 Interface (kernelcapi) and -on top of this a User-Level-CAPI2.0-interface (capi) -and a driver to connect isdn4linux with CAPI2.0 (capidrv). -The lowlevel interface can be used to implement a CAPI2.0 -also for passive cards since July 1999. - -The author can be reached at [email protected]. -The command avmcapictrl is part of the isdn4k-utils. -t4-files can be found at ftp://ftp.avm.de/cardware/b1/linux/firmware - -Currently supported cards: - - - B1 ISA (all versions) - - B1 PCI - - T1/T1B (HEMA card) - - M1 - - M2 - - B1 PCMCIA - -Installing ----------- - -You need at least /dev/capi20 to load the firmware. - -:: - - mknod /dev/capi20 c 68 0 - mknod /dev/capi20.00 c 68 1 - mknod /dev/capi20.01 c 68 2 - . - . - . - mknod /dev/capi20.19 c 68 20 - -Running -------- - -To use the card you need the t4-files to download the firmware. -AVM GmbH provides several t4-files for the different D-channel -protocols (b1.t4 for Euro-ISDN). Install these file in /lib/isdn. - -if you configure as modules load the modules this way:: - - insmod /lib/modules/current/misc/capiutil.o - insmod /lib/modules/current/misc/b1.o - insmod /lib/modules/current/misc/kernelcapi.o - insmod /lib/modules/current/misc/capidrv.o - insmod /lib/modules/current/misc/capi.o - -if you have an B1-PCI card load the module b1pci.o:: - - insmod /lib/modules/current/misc/b1pci.o - -and load the firmware with:: - - avmcapictrl load /lib/isdn/b1.t4 1 - -if you have an B1-ISA card load the module b1isa.o -and add the card by calling:: - - avmcapictrl add 0x150 15 - -and load the firmware by calling:: - - avmcapictrl load /lib/isdn/b1.t4 1 - -if you have an T1-ISA card load the module t1isa.o -and add the card by calling:: - - avmcapictrl add 0x450 15 T1 0 - -and load the firmware by calling:: - - avmcapictrl load /lib/isdn/t1.t4 1 - -if you have an PCMCIA card (B1/M1/M2) load the module b1pcmcia.o -before you insert the card. - -Leased Lines with B1 --------------------- - -Init card and load firmware. - -For an D64S use "FV: 1" as phone number - -For an D64S2 use "FV: 1" and "FV: 2" for multilink -or "FV: 1,2" to use CAPI channel bundling. - -/proc-Interface ------------------ - -/proc/capi:: - - dr-xr-xr-x 2 root root 0 Jul 1 14:03 . - dr-xr-xr-x 82 root root 0 Jun 30 19:08 .. - -r--r--r-- 1 root root 0 Jul 1 14:03 applications - -r--r--r-- 1 root root 0 Jul 1 14:03 applstats - -r--r--r-- 1 root root 0 Jul 1 14:03 capi20 - -r--r--r-- 1 root root 0 Jul 1 14:03 capidrv - -r--r--r-- 1 root root 0 Jul 1 14:03 controller - -r--r--r-- 1 root root 0 Jul 1 14:03 contrstats - -r--r--r-- 1 root root 0 Jul 1 14:03 driver - -r--r--r-- 1 root root 0 Jul 1 14:03 ncci - -r--r--r-- 1 root root 0 Jul 1 14:03 users - -/proc/capi/applications: - applid level3cnt datablkcnt datablklen ncci-cnt recvqueuelen - level3cnt: - capi_register parameter - datablkcnt: - capi_register parameter - ncci-cnt: - current number of nccis (connections) - recvqueuelen: - number of messages on receive queue - - for example:: - - 1 -2 16 2048 1 0 - 2 2 7 2048 1 0 - -/proc/capi/applstats: - applid recvctlmsg nrecvdatamsg nsentctlmsg nsentdatamsg - recvctlmsg: - capi messages received without DATA_B3_IND - recvdatamsg: - capi DATA_B3_IND received - sentctlmsg: - capi messages sent without DATA_B3_REQ - sentdatamsg: - capi DATA_B3_REQ sent - - for example:: - - 1 2057 1699 1721 1699 - -/proc/capi/capi20: statistics of capi.o (/dev/capi20) - minor nopen nrecvdropmsg nrecvctlmsg nrecvdatamsg sentctlmsg sentdatamsg - minor: - minor device number of capi device - nopen: - number of calls to devices open - nrecvdropmsg: - capi messages dropped (messages in recvqueue in close) - nrecvctlmsg: - capi messages received without DATA_B3_IND - nrecvdatamsg: - capi DATA_B3_IND received - nsentctlmsg: - capi messages sent without DATA_B3_REQ - nsentdatamsg: - capi DATA_B3_REQ sent - - for example:: - - 1 2 18 0 16 2 - -/proc/capi/capidrv: statistics of capidrv.o (capi messages) - nrecvctlmsg nrecvdatamsg sentctlmsg sentdatamsg - nrecvctlmsg: - capi messages received without DATA_B3_IND - nrecvdatamsg: - capi DATA_B3_IND received - nsentctlmsg: - capi messages sent without DATA_B3_REQ - nsentdatamsg: - capi DATA_B3_REQ sent - - for example: - 2780 2226 2256 2226 - -/proc/capi/controller: - controller drivername state cardname controllerinfo - - for example:: - - 1 b1pci running b1pci-e000 B1 3.07-01 0xe000 19 - 2 t1isa running t1isa-450 B1 3.07-01 0x450 11 0 - 3 b1pcmcia running m2-150 B1 3.07-01 0x150 5 - -/proc/capi/contrstats: - controller nrecvctlmsg nrecvdatamsg sentctlmsg sentdatamsg - nrecvctlmsg: - capi messages received without DATA_B3_IND - nrecvdatamsg: - capi DATA_B3_IND received - nsentctlmsg: - capi messages sent without DATA_B3_REQ - nsentdatamsg: - capi DATA_B3_REQ sent - - for example:: - - 1 2845 2272 2310 2274 - 2 2 0 2 0 - 3 2 0 2 0 - -/proc/capi/driver: - drivername ncontroller - - for example:: - - b1pci 1 - t1isa 1 - b1pcmcia 1 - b1isa 0 - -/proc/capi/ncci: - apllid ncci winsize sendwindow - - for example:: - - 1 0x10101 8 0 - -/proc/capi/users: kernelmodules that use the kernelcapi. - name - - for example:: - - capidrv - capi20 - -Questions ---------- - -Check out the FAQ (ftp.isdn4linux.de) or subscribe to the [email protected] mailing list by sending -a mail to [email protected] with -subscribe linux-avmb1 -in the body. - -German documentation and several scripts can be found at -ftp://ftp.avm.de/cardware/b1/linux/ - -Bugs ----- - -If you find any please let me know. - -Enjoy, - -Carsten Paeth ([email protected])
Documentation/isdn/gigaset.rst deleted +0 -465
465 lines not on this page · raw message
Documentation/isdn/hysdn.rst deleted +0 -196
196 lines not on this page · raw message
Documentation/isdn/index.rst +0 -3
@@ -9,9 +9,6 @@ ISDN interface_capi - avmb1 - gigaset - hysdn m_isdn credits
Documentation/userspace-api/ioctl/ioctl-number.rst +0 -1
@@ -132,7 +132,6 @@ Code Seq# Include File Comments 'F' 80-8F linux/arcfb.h conflict! 'F' DD video/sstfb.h conflict! 'G' 00-3F drivers/misc/sgi-gru/grulib.h conflict! -'G' 00-0F linux/gigaset_dev.h conflict! 'H' 00-7F linux/hiddev.h conflict! 'H' 00-0F linux/hidraw.h conflict! 'H' 01 linux/mei.h conflict!
MAINTAINERS +1 -2
@@ -8794,7 +8794,7 @@ S: Maintained F: drivers/isdn/mISDN F: drivers/isdn/hardware -ISDN/CAPI SUBSYSTEM +ISDN/CMTP OVER BLUETOOTH M: Karsten Keil <[email protected]> L: [email protected] (subscribers-only) L: [email protected]
@@ -8802,7 +8802,6 @@ W: http://www.isdn4linux.de S: Odd Fixes F: Documentation/isdn/ F: drivers/isdn/capi/ -F: drivers/staging/isdn/ F: net/bluetooth/cmtp/ F: include/linux/isdn/ F: include/uapi/linux/isdn/
drivers/staging/Kconfig +0 -2
@@ -116,8 +116,6 @@ source "drivers/staging/fieldbus/Kconfig" source "drivers/staging/kpc2000/Kconfig" -source "drivers/staging/isdn/Kconfig" - source "drivers/staging/wusbcore/Kconfig" source "drivers/staging/uwb/Kconfig"
drivers/staging/Makefile +0 -1
@@ -48,7 +48,6 @@ obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/ obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/ obj-$(CONFIG_FIELDBUS_DEV) += fieldbus/ obj-$(CONFIG_KPC2000) += kpc2000/ -obj-$(CONFIG_ISDN_CAPI) += isdn/ obj-$(CONFIG_UWB) += uwb/ obj-$(CONFIG_USB_WUSB) += wusbcore/ obj-$(CONFIG_EXFAT_FS) += exfat/
drivers/staging/isdn/Kconfig deleted +0 -12
@@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -menu "ISDN CAPI drivers" - depends on ISDN_CAPI - -source "drivers/staging/isdn/avm/Kconfig" - -source "drivers/staging/isdn/gigaset/Kconfig" - -source "drivers/staging/isdn/hysdn/Kconfig" - -endmenu -
drivers/staging/isdn/Makefile deleted +0 -8
@@ -1,8 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# Makefile for the kernel ISDN subsystem and device drivers. - -# Object files in subdirectories - -obj-$(CONFIG_CAPI_AVM) += avm/ -obj-$(CONFIG_HYSDN) += hysdn/ -obj-$(CONFIG_ISDN_DRV_GIGASET) += gigaset/
drivers/staging/isdn/TODO deleted +0 -22
@@ -1,22 +0,0 @@ -TODO: Remove in late 2019 unless there are users - - -I tried to find any indication of whether the capi drivers are -still in use, and have not found anything from a long time ago. - -With public ISDN networks almost completely shut down over the past 12 -months, there is very little you can actually do with this hardware. The -main remaining use case would be to connect ISDN voice phones to an -in-house installation with Asterisk or LCR, but anyone trying this in -turn seems to be using either the mISDN driver stack, or out-of-tree -drivers from the hardware vendors. - -I may of course have missed something, so I would suggest moving -these into drivers/staging/ just in case someone still uses one -of the three remaining in-kernel drivers (avm, hysdn, gigaset). - -If nobody complains, we can remove them entirely in six months, -or otherwise move the core code and any drivers that are still -needed back into drivers/isdn. - - Arnd Bergmann <[email protected]>
drivers/staging/isdn/avm/Kconfig deleted +0 -65
65 lines not on this page · raw message
drivers/staging/isdn/avm/Makefile deleted +0 -12
@@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -# Makefile for the AVM ISDN device drivers - -# Each configuration option enables a list of files. - -obj-$(CONFIG_ISDN_DRV_AVMB1_B1ISA) += b1isa.o b1.o -obj-$(CONFIG_ISDN_DRV_AVMB1_B1PCI) += b1pci.o b1.o b1dma.o -obj-$(CONFIG_ISDN_DRV_AVMB1_B1PCMCIA) += b1pcmcia.o b1.o -obj-$(CONFIG_ISDN_DRV_AVMB1_AVM_CS) += avm_cs.o -obj-$(CONFIG_ISDN_DRV_AVMB1_T1ISA) += t1isa.o b1.o -obj-$(CONFIG_ISDN_DRV_AVMB1_T1PCI) += t1pci.o b1.o b1dma.o -obj-$(CONFIG_ISDN_DRV_AVMB1_C4) += c4.o b1.o
drivers/staging/isdn/avm/avm_cs.c deleted +0 -166
166 lines not on this page · raw message
drivers/staging/isdn/avm/avmcard.h deleted +0 -581
581 lines not on this page · raw message
drivers/staging/isdn/avm/b1.c deleted +0 -819
819 lines not on this page · raw message
drivers/staging/isdn/avm/b1dma.c deleted +0 -981
362 lines not on this page · raw message
drivers/staging/isdn/avm/b1isa.c deleted +0 -243
243 lines not on this page · raw message
drivers/staging/isdn/avm/b1pci.c deleted +0 -416
416 lines not on this page · raw message
drivers/staging/isdn/avm/b1pcmcia.c deleted +0 -224
224 lines not on this page · raw message
drivers/staging/isdn/avm/c4.c deleted +0 -1317
1,317 lines not on this page · raw message
drivers/staging/isdn/avm/t1isa.c deleted +0 -594
594 lines not on this page · raw message
drivers/staging/isdn/avm/t1pci.c deleted +0 -259
259 lines not on this page · raw message
drivers/staging/isdn/gigaset/Kconfig deleted +0 -62
62 lines not on this page · raw message
drivers/staging/isdn/gigaset/Makefile deleted +0 -17
Lines of this file are not shown. View the raw message.
drivers/staging/isdn/gigaset/asyncdata.c deleted +0 -606
606 lines not on this page · raw message
drivers/staging/isdn/gigaset/bas-gigaset.c deleted +0 -2672
2,672 lines not on this page · raw message
drivers/staging/isdn/gigaset/capi.c deleted +0 -2517
2,517 lines not on this page · raw message
drivers/staging/isdn/gigaset/common.c deleted +0 -1153
1,153 lines not on this page · raw message
drivers/staging/isdn/gigaset/dummyll.c deleted +0 -74
74 lines not on this page · raw message
drivers/staging/isdn/gigaset/ev-layer.c deleted +0 -1910
1,910 lines not on this page · raw message
drivers/staging/isdn/gigaset/gigaset.h deleted +0 -827
827 lines not on this page · raw message
drivers/staging/isdn/gigaset/interface.c deleted +0 -613
613 lines not on this page · raw message
drivers/staging/isdn/gigaset/isocdata.c deleted +0 -1006
1,006 lines not on this page · raw message
drivers/staging/isdn/gigaset/proc.c deleted +0 -77
77 lines not on this page · raw message
drivers/staging/isdn/gigaset/ser-gigaset.c deleted +0 -796
796 lines not on this page · raw message
drivers/staging/isdn/gigaset/usb-gigaset.c deleted +0 -946
946 lines not on this page · raw message
drivers/staging/isdn/hysdn/Kconfig deleted +0 -15
Lines of this file are not shown. View the raw message.
drivers/staging/isdn/hysdn/Makefile deleted +0 -12
Lines of this file are not shown. View the raw message.
drivers/staging/isdn/hysdn/boardergo.c deleted +0 -445
445 lines not on this page · raw message
drivers/staging/isdn/hysdn/boardergo.h deleted +0 -100
100 lines not on this page · raw message
drivers/staging/isdn/hysdn/hycapi.c deleted +0 -785
785 lines not on this page · raw message
drivers/staging/isdn/hysdn/hysdn_boot.c deleted +0 -400
400 lines not on this page · raw message
drivers/staging/isdn/hysdn/hysdn_defs.h deleted +0 -282
282 lines not on this page · raw message
drivers/staging/isdn/hysdn/hysdn_init.c deleted +0 -213
213 lines not on this page · raw message
drivers/staging/isdn/hysdn/hysdn_net.c deleted +0 -330
330 lines not on this page · raw message
drivers/staging/isdn/hysdn/hysdn_pof.h deleted +0 -78
78 lines not on this page · raw message
drivers/staging/isdn/hysdn/hysdn_procconf.c deleted +0 -411
411 lines not on this page · raw message
drivers/staging/isdn/hysdn/hysdn_proclog.c deleted +0 -357
357 lines not on this page · raw message
drivers/staging/isdn/hysdn/hysdn_sched.c deleted +0 -197
197 lines not on this page · raw message
drivers/staging/isdn/hysdn/ince1pc.h deleted +0 -134
134 lines not on this page · raw message
include/uapi/linux/gigaset_dev.h deleted +0 -39
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.20.0
Part of the diff is not shown here. View the raw message.
PATCH 2/2 isdn: capi: dead code removal
The staging isdn drivers are gone, and CONFIG_BT_CMTP is now the only user. This means a lot of the code in the subsystem has no remaining callers and can be removed.
Change the capi user space front-end to be part of kernelcapi, and the combined module to only be compiled if BT_CMTP is also enabled, then remove the interfaces that have no remaining callers.
As the notifier list and the capi_drivers list have no callers outside of kcapi.c, the implementation gets much simpler.
Some definitions from the include/linux/*.h headers are only needed internally and are moved to kcapi.h.
--- Documentation/isdn/interface_capi.rst | 71 ---- drivers/isdn/Makefile | 2 +- drivers/isdn/capi/Kconfig | 32 +- drivers/isdn/capi/Makefile | 18 +- drivers/isdn/capi/capi.c | 14 +- drivers/isdn/capi/capilib.c | 202 ------------ drivers/isdn/capi/capiutil.c | 231 +------------ drivers/isdn/capi/kcapi.c | 409 +---------------------- drivers/isdn/capi/kcapi.h | 149 ++++++++- drivers/isdn/capi/kcapi_proc.c | 34 +- include/linux/isdn/capilli.h | 18 - include/linux/isdn/capiutil.h | 456 -------------------------- include/linux/kernelcapi.h | 75 ----- include/uapi/linux/b1lli.h | 74 ----- 14 files changed, 179 insertions(+), 1606 deletions(-) delete mode 100644 drivers/isdn/capi/capilib.c delete mode 100644 include/uapi/linux/b1lli.h
Documentation/isdn/interface_capi.rst +0 -71
@@ -26,13 +26,6 @@ This standard is freely available from https://www.capi.org. 2. Driver and Device Registration ================================= -CAPI drivers optionally register themselves with Kernel CAPI by calling the -Kernel CAPI function register_capi_driver() with a pointer to a struct -capi_driver. This structure must be filled with the name and revision of the -driver, and optionally a pointer to a callback function, add_card(). The -registration can be revoked by calling the function unregister_capi_driver() -with a pointer to the same struct capi_driver. - CAPI drivers must register each of the ISDN devices they control with Kernel CAPI by calling the Kernel CAPI function attach_capi_ctr() with a pointer to a struct capi_ctr before they can be used. This structure must be filled with
@@ -89,9 +82,6 @@ register_capi_driver(): the name of the driver, as a zero-terminated ASCII string ``char revision[32]`` the revision number of the driver, as a zero-terminated ASCII string -``int (*add_card)(struct capi_driver *driver, capicardparams *data)`` - a callback function pointer (may be NULL) - 4.2 struct capi_ctr -------------------
@@ -178,12 +168,6 @@ to be set by the driver before calling attach_capi_ctr(): pointer to a callback function returning the entry for the device in the CAPI controller info table, /proc/capi/controller -``const struct file_operations *proc_fops`` - pointers to callback functions for the device's proc file - system entry, /proc/capi/controllers/<n>; pointer to the device's - capi_ctr structure is available from struct proc_dir_entry::data - which is available from struct inode. - Note: Callback functions except send_message() are never called in interrupt context.
@@ -267,25 +251,10 @@ _cmstruct alternative representation for CAPI parameters of type 'struct' _cmsg structure members. =========== ================================================================= -Functions capi_cmsg2message() and capi_message2cmsg() are provided to convert -messages between their transport encoding described in the CAPI 2.0 standard -and their _cmsg structure representation. Note that capi_cmsg2message() does -not know or check the size of its destination buffer. The caller must make -sure it is big enough to accommodate the resulting CAPI message. - 5. Lower Layer Interface Functions ================================== -(declared in <linux/isdn/capilli.h>) - -:: - - void register_capi_driver(struct capi_driver *drvr) - void unregister_capi_driver(struct capi_driver *drvr) - -register/unregister a driver with Kernel CAPI - :: int attach_capi_ctr(struct capi_ctr *ctrlr)
@@ -300,13 +269,6 @@ register/unregister a device (controller) with Kernel CAPI signal controller ready/not ready -:: - - void capi_ctr_suspend_output(struct capi_ctr *ctrlr) - void capi_ctr_resume_output(struct capi_ctr *ctrlr) - -signal suspend/resume - :: void capi_ctr_handle_message(struct capi_ctr * ctrlr, u16 applid,
@@ -319,21 +281,6 @@ for forwarding to the specified application 6. Helper Functions and Macros ============================== -Library functions (from <linux/isdn/capilli.h>): - -:: - - void capilib_new_ncci(struct list_head *head, u16 applid, - u32 ncci, u32 winsize) - void capilib_free_ncci(struct list_head *head, u16 applid, u32 ncci) - void capilib_release_appl(struct list_head *head, u16 applid) - void capilib_release(struct list_head *head) - void capilib_data_b3_conf(struct list_head *head, u16 applid, - u32 ncci, u16 msgid) - u16 capilib_data_b3_req(struct list_head *head, u16 applid, - u32 ncci, u16 msgid) - - Macros to extract/set element values from/in a CAPI message header (from <linux/isdn/capiutil.h>):
@@ -357,24 +304,6 @@ CAPIMSG_DATALEN(m) CAPIMSG_SETDATALEN(m, len) Data Length (u16) Library functions for working with _cmsg structures (from <linux/isdn/capiutil.h>): -``unsigned capi_cmsg2message(_cmsg *cmsg, u8 *msg)`` - Assembles a CAPI 2.0 message from the parameters in ``*cmsg``, - storing the result in ``*msg``. - -``unsigned capi_message2cmsg(_cmsg *cmsg, u8 *msg)`` - Disassembles the CAPI 2.0 message in ``*msg``, storing the parameters - in ``*cmsg``. - -``unsigned capi_cmsg_header(_cmsg *cmsg, u16 ApplId, u8 Command, u8 Subcommand, u16 Messagenumber, u32 Controller)`` - Fills the header part and address field of the _cmsg structure ``*cmsg`` - with the given values, zeroing the remainder of the structure so only - parameters with non-default values need to be changed before sending - the message. - -``void capi_cmsg_answer(_cmsg *cmsg)`` - Sets the low bit of the Subcommand field in ``*cmsg``, thereby - converting ``_REQ`` to ``_CONF`` and ``_IND`` to ``_RESP``. - ``char *capi_cmd2str(u8 Command, u8 Subcommand)`` Returns the CAPI 2.0 message name corresponding to the given command and subcommand values, as a static ASCII string. The return value may
drivers/isdn/Makefile +1 -1
@@ -3,6 +3,6 @@ # Object files in subdirectories -obj-$(CONFIG_ISDN_CAPI) += capi/ +obj-$(CONFIG_BT_CMTP) += capi/ obj-$(CONFIG_MISDN) += mISDN/ obj-$(CONFIG_ISDN) += hardware/
drivers/isdn/capi/Kconfig +4 -28
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only -menuconfig ISDN_CAPI - tristate "CAPI 2.0 subsystem" +config ISDN_CAPI + def_bool ISDN && BT help This provides CAPI (the Common ISDN Application Programming Interface) Version 2.0, a standard making it easy for programs to
@@ -15,42 +15,18 @@ menuconfig ISDN_CAPI See CONFIG_BT_CMTP for the last remaining regular driver in the kernel that uses the CAPI subsystem. -if ISDN_CAPI - config CAPI_TRACE - bool "CAPI trace support" - default y + def_bool BT_CMTP help If you say Y here, the kernelcapi driver can make verbose traces of CAPI messages. This feature can be enabled/disabled via IOCTL for every controller (default disabled). - This will increase the size of the kernelcapi module by 20 KB. - If unsure, say Y. - -config ISDN_CAPI_CAPI20 - tristate "CAPI2.0 /dev/capi20 support" - help - This option will provide the CAPI 2.0 interface to userspace - applications via /dev/capi20. Applications should use the - standardized libcapi20 to access this functionality. You should say - Y/M here. config ISDN_CAPI_MIDDLEWARE - bool "CAPI2.0 Middleware support" - depends on ISDN_CAPI_CAPI20 && TTY + def_bool BT_CMTP && TTY help This option will enhance the capabilities of the /dev/capi20 interface. It will provide a means of moving a data connection, established via the usual /dev/capi20 interface to a special tty device. If you want to use pppd with pppdcapiplugin to dial up to your ISP, say Y here. - -config ISDN_CAPI_CAPIDRV_VERBOSE - bool "Verbose reason code reporting" - depends on ISDN_CAPI_CAPIDRV - help - If you say Y here, the capidrv interface will give verbose reasons - for disconnecting. This will increase the size of the kernel by 7 KB. - If unsure, say N. - -endif
drivers/isdn/capi/Makefile +3 -15
@@ -1,17 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -# Makefile for the CAPI subsystem. +# Makefile for the CAPI subsystem used by BT_CMTP -# Ordering constraints: kernelcapi.o first - -# Each configuration option enables a list of files. - -obj-$(CONFIG_ISDN_CAPI) += kernelcapi.o -obj-$(CONFIG_ISDN_CAPI_CAPI20) += capi.o -obj-$(CONFIG_ISDN_CAPI_CAPIDRV) += capidrv.o - -# Multipart objects. - -kernelcapi-y := kcapi.o capiutil.o capilib.o -kernelcapi-$(CONFIG_PROC_FS) += kcapi_proc.o - -ccflags-y += -I$(srctree)/$(src)/../include -I$(srctree)/$(src)/../include/uapi +obj-$(CONFIG_BT_CMTP) += kernelcapi.o +kernelcapi-y := kcapi.o capiutil.o capi.o kcapi_proc.o
drivers/isdn/capi/capi.c +13 -1
@@ -39,7 +39,9 @@#include <linux/isdn/capiutil.h> #include <linux/isdn/capicmd.h> -MODULE_DESCRIPTION ("CAPI4Linux: Userspace /dev/capi20 interface" ); +#include "kcapi.h" + +MODULE_DESCRIPTION ("CAPI4Linux: kernel CAPI layer and /dev/capi20 interface" );MODULE_AUTHOR ("Carsten Paeth" );MODULE_LICENSE ("GPL" );
@@ -1412,15 +1414,22 @@ static int __init capi_init(void) {const char *compileinfo;int major_ret; +int ret; + + ret =kcapi_init (); +if (ret) +return ret; major_ret =register_chrdev (capi_major,"capi20" , &capi_fops);if (major_ret <0 ) {printk (KERN_ERR "capi20: unable to get major %d\n" , capi_major); +kcapi_exit ();return major_ret; } capi_class =class_create (THIS_MODULE ,"capi" );if (IS_ERR (capi_class)) {unregister_chrdev (capi_major,"capi20" ); +kcapi_exit ();return PTR_ERR (capi_class); }
@@ -1430,6 +1439,7 @@ static int __init capi_init(void)device_destroy (capi_class,MKDEV (capi_major,0 ));class_destroy (capi_class);unregister_chrdev (capi_major,"capi20" ); +kcapi_exit ();return -ENOMEM ; }
@@ -1455,6 +1465,8 @@ static void __exit capi_exit(void)unregister_chrdev (capi_major,"capi20" );capinc_tty_exit (); + +kcapi_exit (); }module_init (capi_init);
drivers/isdn/capi/capilib.c deleted +0 -202
202 lines not on this page · raw message
drivers/isdn/capi/capiutil.c +4 -227
268 lines not on this page · raw message
drivers/isdn/capi/kcapi.c +8 -401
581 lines not on this page · raw message
drivers/isdn/capi/kcapi.h +140 -9
162 lines not on this page · raw message
drivers/isdn/capi/kcapi_proc.c +6 -28
@@ -192,37 +192,15 @@ static const struct seq_operations seq_applstats_ops = {// --------------------------------------------------------------------------- -static void *capi_driver_start (struct seq_file *seq,loff_t *pos) - __acquires(&capi_drivers_lock) +/* /proc/capi/drivers is always empty */ +static ssize_t empty_read (struct file *file,char __user *buf, +size_t size,loff_t *off) { -mutex_lock (&capi_drivers_lock); -return seq_list_start (&capi_drivers, *pos); -} - -static void *capi_driver_next (struct seq_file *seq,void *v,loff_t *pos) -{ -return seq_list_next (v, &capi_drivers, pos); -} - -static void capi_driver_stop (struct seq_file *seq,void *v) - __releases(&capi_drivers_lock) -{ -mutex_unlock (&capi_drivers_lock); -} - -static int capi_driver_show (struct seq_file *seq,void *v) -{ - struct capi_driver *drv = list_entry(v, struct capi_driver, list); - -seq_printf (seq,"%-32s %s\n" , drv->name, drv->revision);return 0 ; } -static const struct seq_operations seq_capi_driver_ops = { - .start = capi_driver_start, - .next = capi_driver_next, - .stop = capi_driver_stop, - .show = capi_driver_show, +static const struct file_operations empty_fops = { + .read = empty_read, };// ---------------------------------------------------------------------------
@@ -236,7 +214,7 @@ kcapi_proc_init(void)proc_create_seq ("capi/contrstats" ,0 ,NULL , &seq_contrstats_ops);proc_create_seq ("capi/applications" ,0 ,NULL , &seq_applications_ops);proc_create_seq ("capi/applstats" ,0 ,NULL , &seq_applstats_ops); -proc_create_seq ("capi/driver" ,0 ,NULL , &seq_capi_driver_ops); +proc_create ("capi/driver" ,0 ,NULL , &empty_fops); }void
include/linux/isdn/capilli.h +0 -18
@@ -69,7 +69,6 @@ struct capi_ctr {unsigned short state;/* controller state */ int blocked;/* output blocked */ int traceflag;/* capi trace */ -wait_queue_head_t state_wait_queue;struct proc_dir_entry *procent;char procfn[128 ];
@@ -80,8 +79,6 @@ int detach_capi_ctr(struct capi_ctr *);void capi_ctr_ready (struct capi_ctr * card);void capi_ctr_down (struct capi_ctr * card); -void capi_ctr_suspend_output (struct capi_ctr * card); -void capi_ctr_resume_output (struct capi_ctr * card);void capi_ctr_handle_message (struct capi_ctr * card,u16 appl,struct sk_buff *skb);// ---------------------------------------------------------------------------
@@ -91,23 +88,8 @@ struct capi_driver {char name[32 ];/* driver name */ char revision[32 ]; -int (*add_card)(struct capi_driver *driver,capicardparams *data); -/* management information for kcapi */ struct list_head list; }; -void register_capi_driver (struct capi_driver *driver); -void unregister_capi_driver (struct capi_driver *driver); - -// --------------------------------------------------------------------------- -// library functions for use by hardware controller drivers - -void capilib_new_ncci (struct list_head *head,u16 applid,u32 ncci,u32 winsize); -void capilib_free_ncci (struct list_head *head,u16 applid,u32 ncci); -void capilib_release_appl (struct list_head *head,u16 applid); -void capilib_release (struct list_head *head); -void capilib_data_b3_conf (struct list_head *head,u16 applid,u32 ncci,u16 msgid); -u16 capilib_data_b3_req (struct list_head *head,u16 applid,u32 ncci,u16 msgid); -#endif /* __CAPILLI_H__ */
include/linux/isdn/capiutil.h +0 -456
460 lines not on this page · raw message
include/linux/kernelcapi.h +0 -75
91 lines not on this page · raw message
include/uapi/linux/b1lli.h deleted +0 -74
74 lines not on this page · raw message
Signature · 1 line
2.20.0