aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2014-06-01 17:47:24 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-05 02:13:41 -0400
commitd1cadce15af85e409b199c541badd5c9b8839aa0 (patch)
tree762df762094bc72ca13d4b4a3421cfe766d92f01 /drivers/isdn
parenta79f5d2612ef7ecc8728e35e31d65da7a9ab49c7 (diff)
isdn/capi: fix (middleware) device nodes
Since v2.4 the capi driver used the following device nodes if "middleware" support was enabled: /dev/capi20 /dev/capi/0 /dev/capi/1 [...] /dev/capi20 is a character device node. /dev/capi/0 (and up) are tty device nodes (with a different major). This device node (naming) scheme is not documented anywhere, as far as I know. It was originally provided by the capifs pseudo filesystem (before udev became available). It is required for example by the pppd capiplugin. It was supported until a few years ago. But a number of developments broke it: - v2.6.6 (May 2004) renamed /dev/capi20 to /dev/capi and removed the "/" from the name of capi's tty driver. The explanation of the patch that did this included two examples of udev rules "to restore the old namespace"; - either udev 154 (May 2010) or udev 179 (January 2012) stopped allowing to rename device nodes, and thus the ability to have /dev/capi20 appear instead of /dev/capi and /dev/capi/0 (and up) instead of /dev/capi0 (and up); - v3.0 (July 2011) also removed capifs. That disabled another method to create the /dev/capi/0 (and up) device nodes. So now users need to manually tweak their setup (eg, create /dev/capi/ and fill that with symlinks) to get things working. This is all rather hacky and only discoverable by searching the web. Fix all this by renaming /dev/capi back to /dev/capi20, and by setting the name of the "capi_nc" tty driver to "capi!" so the tty device nodes appear as /dev/capi/0 (and up). Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/capi/Kconfig2
-rw-r--r--drivers/isdn/capi/capi.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig
index 1d7adff265f7..7641b3096ea6 100644
--- a/drivers/isdn/capi/Kconfig
+++ b/drivers/isdn/capi/Kconfig
@@ -9,7 +9,7 @@ config CAPI_TRACE
9 If unsure, say Y. 9 If unsure, say Y.
10 10
11config ISDN_CAPI_CAPI20 11config ISDN_CAPI_CAPI20
12 tristate "CAPI2.0 /dev/capi support" 12 tristate "CAPI2.0 /dev/capi20 support"
13 help 13 help
14 This option will provide the CAPI 2.0 interface to userspace 14 This option will provide the CAPI 2.0 interface to userspace
15 applications via /dev/capi20. Applications should use the 15 applications via /dev/capi20. Applications should use the
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index ac6f72b455d1..f9a87ed2392b 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1271,7 +1271,7 @@ static int __init capinc_tty_init(void)
1271 return -ENOMEM; 1271 return -ENOMEM;
1272 } 1272 }
1273 drv->driver_name = "capi_nc"; 1273 drv->driver_name = "capi_nc";
1274 drv->name = "capi"; 1274 drv->name = "capi!";
1275 drv->major = 0; 1275 drv->major = 0;
1276 drv->minor_start = 0; 1276 drv->minor_start = 0;
1277 drv->type = TTY_DRIVER_TYPE_SERIAL; 1277 drv->type = TTY_DRIVER_TYPE_SERIAL;
@@ -1417,7 +1417,7 @@ static int __init capi_init(void)
1417 return PTR_ERR(capi_class); 1417 return PTR_ERR(capi_class);
1418 } 1418 }
1419 1419
1420 device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi"); 1420 device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi20");
1421 1421
1422 if (capinc_tty_init() < 0) { 1422 if (capinc_tty_init() < 0) {
1423 device_destroy(capi_class, MKDEV(capi_major, 0)); 1423 device_destroy(capi_class, MKDEV(capi_major, 0));