netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tilman Schmidt <tilman@imap.cc>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Paul Bolle <pebolle@tiscali.nl>,
	Karsten Keil <isdn@linux-pingi.de>,
	isdn4linux@listserv.isdn4linux.de, Jiri Slaby <jslaby@suse.cz>
Subject: Re: [PATCH 3/3] isdn/capi: fix (middleware) device nodes
Date: Sun, 1 Jun 2014 14:52:14 -0700	[thread overview]
Message-ID: <20140601215214.GA16029@kroah.com> (raw)
In-Reply-To: <b97b151835aecb1f13eb924bef9d04b25cc4cbf3.1401475962.git.tilman@imap.cc>

On Sun, Jun 01, 2014 at 11:47:24PM +0200, Tilman Schmidt wrote:
> From: Paul Bolle <pebolle@tiscali.nl>
> 
> 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>
> ---
>  drivers/isdn/capi/Kconfig | 2 +-
>  drivers/isdn/capi/capi.c  | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/isdn/capi/Kconfig b/drivers/isdn/capi/Kconfig
> index 1d7adff..7641b30 100644
> --- a/drivers/isdn/capi/Kconfig
> +++ b/drivers/isdn/capi/Kconfig
> @@ -9,7 +9,7 @@ config CAPI_TRACE
>  	  If unsure, say Y.
>  
>  config ISDN_CAPI_CAPI20
> -	tristate "CAPI2.0 /dev/capi support"
> +	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
> diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
> index ac6f72b..f9a87ed 100644
> --- a/drivers/isdn/capi/capi.c
> +++ b/drivers/isdn/capi/capi.c
> @@ -1271,7 +1271,7 @@ static int __init capinc_tty_init(void)
>  		return -ENOMEM;
>  	}
>  	drv->driver_name = "capi_nc";
> -	drv->name = "capi";
> +	drv->name = "capi!";
>  	drv->major = 0;
>  	drv->minor_start = 0;
>  	drv->type = TTY_DRIVER_TYPE_SERIAL;
> @@ -1417,7 +1417,7 @@ static int __init capi_init(void)
>  		return PTR_ERR(capi_class);
>  	}
>  
> -	device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi");
> +	device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi20");
>  
>  	if (capinc_tty_init() < 0) {
>  		device_destroy(capi_class, MKDEV(capi_major, 0));

Much nicer than the previous patches to resolve this issue :)

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

  reply	other threads:[~2014-06-01 21:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-01 21:47 [PATCH 0/3] ISDN patches for net-next (v2) Tilman Schmidt
2014-06-01 21:47 ` [PATCH 1/3] isdn/capi: move capi_info2str to capidrv.c Tilman Schmidt
2014-06-01 21:47 ` [PATCH 3/3] isdn/capi: fix (middleware) device nodes Tilman Schmidt
2014-06-01 21:52   ` Greg Kroah-Hartman [this message]
2014-06-01 21:47 ` [PATCH 2/3] isdn/capi: Make verbose reporting depend on capidrv Tilman Schmidt
2014-06-05  6:14 ` [PATCH 0/3] ISDN patches for net-next (v2) David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140601215214.GA16029@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=isdn4linux@listserv.isdn4linux.de \
    --cc=isdn@linux-pingi.de \
    --cc=jslaby@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    --cc=tilman@imap.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).