linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
@ 2006-01-31 21:33 Adrian Bunk
  2006-01-31 21:44 ` Marcel Holtmann
  2006-02-01  8:43 ` Armin Schindler
  0 siblings, 2 replies; 14+ messages in thread
From: Adrian Bunk @ 2006-01-31 21:33 UTC (permalink / raw)
  To: kkeil, kai.germaschewski; +Cc: isdn4linux, linux-kernel

This patch contains the following cleanups:
- move the help text to the right option
- replace some #ifdef's in capi.c with dummy functions in capifs.h
- use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/isdn/capi/Kconfig  |   10 +++++-----
 drivers/isdn/capi/capi.c   |    9 ++-------
 drivers/isdn/capi/capifs.h |    9 +++++++++
 3 files changed, 16 insertions(+), 12 deletions(-)

--- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/Kconfig.old	2006-01-31 20:36:44.000000000 +0100
+++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/Kconfig	2006-01-31 20:38:10.000000000 +0100
@@ -31,17 +31,17 @@
 config ISDN_CAPI_CAPIFS_BOOL
 	bool "CAPI2.0 filesystem support"
 	depends on ISDN_CAPI_MIDDLEWARE && ISDN_CAPI_CAPI20
-
-config ISDN_CAPI_CAPIFS
-	tristate
-	depends on ISDN_CAPI_CAPIFS_BOOL
-	default ISDN_CAPI_CAPI20
 	help
 	  This option provides a special file system, similar to /dev/pts with
 	  device nodes for the special ttys established by using the
 	  middleware extension above. If you want to use pppd with
 	  pppdcapiplugin to dial up to your ISP, say Y here.
 
+config ISDN_CAPI_CAPIFS
+	tristate
+	depends on ISDN_CAPI_CAPIFS_BOOL
+	default ISDN_CAPI_CAPI20
+
 config ISDN_CAPI_CAPIDRV
 	tristate "CAPI2.0 capidrv interface support"
 	depends on ISDN_CAPI && ISDN_I4L
--- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capifs.h.old	2006-01-31 20:40:36.000000000 +0100
+++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capifs.h	2006-01-31 20:41:44.000000000 +0100
@@ -7,5 +7,14 @@
  *
  */
 
+#ifdef CONFIG_ISDN_CAPI_CAPIFS_BOOL
+
 void capifs_new_ncci(unsigned int num, dev_t device);
 void capifs_free_ncci(unsigned int num);
+
+#else  /*  CONFIG_ISDN_CAPI_CAPIFS_BOOL  */
+
+static inline void capifs_new_ncci(unsigned int num, dev_t device) {}
+static inline void capifs_free_ncci(unsigned int num) {}
+
+#endif  /*  CONFIG_ISDN_CAPI_CAPIFS_BOOL  */
--- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capi.c.old	2006-01-31 20:38:53.000000000 +0100
+++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capi.c	2006-01-31 20:40:24.000000000 +0100
@@ -42,9 +42,8 @@
 #include <linux/devfs_fs_kernel.h>
 #include <linux/isdn/capiutil.h>
 #include <linux/isdn/capicmd.h>
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
+
 #include "capifs.h"
-#endif
 
 static char *revision = "$Revision: 1.1.2.7 $";
 
@@ -311,9 +310,7 @@
 #ifdef _DEBUG_REFCOUNT
 		printk(KERN_DEBUG "set mp->nccip\n");
 #endif
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
 		capifs_new_ncci(mp->minor, MKDEV(capi_ttymajor, mp->minor));
-#endif
 	}
 #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
 	for (pp=&cdev->nccis; *pp; pp = &(*pp)->next)
@@ -336,9 +333,7 @@
 			*pp = (*pp)->next;
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
 			if ((mp = np->minorp) != 0) {
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
 				capifs_free_ncci(mp->minor);
-#endif
 				if (mp->tty) {
 					mp->nccip = NULL;
 #ifdef _DEBUG_REFCOUNT
@@ -1520,7 +1515,7 @@
 	proc_init();
 
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
-#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
+#ifdef CONFIG_ISDN_CAPI_CAPIFS_BOOL
         compileinfo = " (middleware+capifs)";
 #else
         compileinfo = " (no capifs)";


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-01-31 21:33 [2.6 patch] ISDN_CAPI_CAPIFS related cleanups Adrian Bunk
@ 2006-01-31 21:44 ` Marcel Holtmann
  2006-02-02 21:40   ` Adrian Bunk
  2006-02-01  8:43 ` Armin Schindler
  1 sibling, 1 reply; 14+ messages in thread
From: Marcel Holtmann @ 2006-01-31 21:44 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: kkeil, kai.germaschewski, isdn4linux, linux-kernel

Hi Adrian,

> This patch contains the following cleanups:
> - move the help text to the right option
> - replace some #ifdef's in capi.c with dummy functions in capifs.h
> - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c

I actually still like to see capifs removed completely. It is not really
needed if you gonna use udev. The only thing that it is doing, is to set
the correct permissions and make sure that the device nodes are created.
And with a 2.6 kernel this can be all done by udev.

Regards

Marcel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-01-31 21:33 [2.6 patch] ISDN_CAPI_CAPIFS related cleanups Adrian Bunk
  2006-01-31 21:44 ` Marcel Holtmann
@ 2006-02-01  8:43 ` Armin Schindler
  2006-02-01 10:44   ` Adrian Bunk
  1 sibling, 1 reply; 14+ messages in thread
From: Armin Schindler @ 2006-02-01  8:43 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: kkeil, kai.germaschewski, isdn4linux, linux-kernel

On Tue, 31 Jan 2006, Adrian Bunk wrote:
> This patch contains the following cleanups:
> - move the help text to the right option

where did you move it to? I just see the removal of the help text.

Armin

> - replace some #ifdef's in capi.c with dummy functions in capifs.h
> - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c
> 
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
> 
> ---
> 
>  drivers/isdn/capi/Kconfig  |   10 +++++-----
>  drivers/isdn/capi/capi.c   |    9 ++-------
>  drivers/isdn/capi/capifs.h |    9 +++++++++
>  3 files changed, 16 insertions(+), 12 deletions(-)
> 
> --- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/Kconfig.old	2006-01-31 20:36:44.000000000 +0100
> +++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/Kconfig	2006-01-31 20:38:10.000000000 +0100
> @@ -31,17 +31,17 @@
>  config ISDN_CAPI_CAPIFS_BOOL
>  	bool "CAPI2.0 filesystem support"
>  	depends on ISDN_CAPI_MIDDLEWARE && ISDN_CAPI_CAPI20
> -
> -config ISDN_CAPI_CAPIFS
> -	tristate
> -	depends on ISDN_CAPI_CAPIFS_BOOL
> -	default ISDN_CAPI_CAPI20
>  	help
>  	  This option provides a special file system, similar to /dev/pts with
>  	  device nodes for the special ttys established by using the
>  	  middleware extension above. If you want to use pppd with
>  	  pppdcapiplugin to dial up to your ISP, say Y here.
>  
> +config ISDN_CAPI_CAPIFS
> +	tristate
> +	depends on ISDN_CAPI_CAPIFS_BOOL
> +	default ISDN_CAPI_CAPI20
> +
>  config ISDN_CAPI_CAPIDRV
>  	tristate "CAPI2.0 capidrv interface support"
>  	depends on ISDN_CAPI && ISDN_I4L
> --- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capifs.h.old	2006-01-31 20:40:36.000000000 +0100
> +++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capifs.h	2006-01-31 20:41:44.000000000 +0100
> @@ -7,5 +7,14 @@
>   *
>   */
>  
> +#ifdef CONFIG_ISDN_CAPI_CAPIFS_BOOL
> +
>  void capifs_new_ncci(unsigned int num, dev_t device);
>  void capifs_free_ncci(unsigned int num);
> +
> +#else  /*  CONFIG_ISDN_CAPI_CAPIFS_BOOL  */
> +
> +static inline void capifs_new_ncci(unsigned int num, dev_t device) {}
> +static inline void capifs_free_ncci(unsigned int num) {}
> +
> +#endif  /*  CONFIG_ISDN_CAPI_CAPIFS_BOOL  */
> --- linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capi.c.old	2006-01-31 20:38:53.000000000 +0100
> +++ linux-2.6.16-rc1-mm4-full/drivers/isdn/capi/capi.c	2006-01-31 20:40:24.000000000 +0100
> @@ -42,9 +42,8 @@
>  #include <linux/devfs_fs_kernel.h>
>  #include <linux/isdn/capiutil.h>
>  #include <linux/isdn/capicmd.h>
> -#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
> +
>  #include "capifs.h"
> -#endif
>  
>  static char *revision = "$Revision: 1.1.2.7 $";
>  
> @@ -311,9 +310,7 @@
>  #ifdef _DEBUG_REFCOUNT
>  		printk(KERN_DEBUG "set mp->nccip\n");
>  #endif
> -#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
>  		capifs_new_ncci(mp->minor, MKDEV(capi_ttymajor, mp->minor));
> -#endif
>  	}
>  #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
>  	for (pp=&cdev->nccis; *pp; pp = &(*pp)->next)
> @@ -336,9 +333,7 @@
>  			*pp = (*pp)->next;
>  #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
>  			if ((mp = np->minorp) != 0) {
> -#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
>  				capifs_free_ncci(mp->minor);
> -#endif
>  				if (mp->tty) {
>  					mp->nccip = NULL;
>  #ifdef _DEBUG_REFCOUNT
> @@ -1520,7 +1515,7 @@
>  	proc_init();
>  
>  #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
> -#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
> +#ifdef CONFIG_ISDN_CAPI_CAPIFS_BOOL
>          compileinfo = " (middleware+capifs)";
>  #else
>          compileinfo = " (no capifs)";
> 
> _______________________________________________
> isdn4linux mailing list
> isdn4linux@listserv.isdn4linux.de
> https://www.isdn4linux.de/mailman/listinfo/isdn4linux
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-01  8:43 ` Armin Schindler
@ 2006-02-01 10:44   ` Adrian Bunk
  2006-02-01 11:01     ` Armin Schindler
  0 siblings, 1 reply; 14+ messages in thread
From: Adrian Bunk @ 2006-02-01 10:44 UTC (permalink / raw)
  To: Armin Schindler; +Cc: kkeil, kai.germaschewski, isdn4linux, linux-kernel

On Wed, Feb 01, 2006 at 09:43:48AM +0100, Armin Schindler wrote:
> On Tue, 31 Jan 2006, Adrian Bunk wrote:
> > This patch contains the following cleanups:
> > - move the help text to the right option
> 
> where did you move it to? I just see the removal of the help text.

I moved it from ISDN_CAPI_CAPIFS to ISDN_CAPI_CAPIFS_BOOL (diff displays 
this a bit strange).

> Armin
>...
> >  config ISDN_CAPI_CAPIFS_BOOL
> >  	bool "CAPI2.0 filesystem support"
> >  	depends on ISDN_CAPI_MIDDLEWARE && ISDN_CAPI_CAPI20
> > -
> > -config ISDN_CAPI_CAPIFS
> > -	tristate
> > -	depends on ISDN_CAPI_CAPIFS_BOOL
> > -	default ISDN_CAPI_CAPI20
> >  	help
> >  	  This option provides a special file system, similar to /dev/pts with
> >  	  device nodes for the special ttys established by using the
> >  	  middleware extension above. If you want to use pppd with
> >  	  pppdcapiplugin to dial up to your ISP, say Y here.
> >  
> > +config ISDN_CAPI_CAPIFS
> > +	tristate
> > +	depends on ISDN_CAPI_CAPIFS_BOOL
> > +	default ISDN_CAPI_CAPI20
> > +
>...

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-01 10:44   ` Adrian Bunk
@ 2006-02-01 11:01     ` Armin Schindler
  0 siblings, 0 replies; 14+ messages in thread
From: Armin Schindler @ 2006-02-01 11:01 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: kai.germaschewski, isdn4linux, linux-kernel, kkeil

On Wed, 1 Feb 2006, Adrian Bunk wrote:
> On Wed, Feb 01, 2006 at 09:43:48AM +0100, Armin Schindler wrote:
> > On Tue, 31 Jan 2006, Adrian Bunk wrote:
> > > This patch contains the following cleanups:
> > > - move the help text to the right option
> > 
> > where did you move it to? I just see the removal of the help text.
> 
> I moved it from ISDN_CAPI_CAPIFS to ISDN_CAPI_CAPIFS_BOOL (diff displays 
> this a bit strange).

Yes, sorry. I didn't look close enough. I should wait a bit after wake up... 

Armin
 
> > Armin
> >...
> > >  config ISDN_CAPI_CAPIFS_BOOL
> > >  	bool "CAPI2.0 filesystem support"
> > >  	depends on ISDN_CAPI_MIDDLEWARE && ISDN_CAPI_CAPI20
> > > -
> > > -config ISDN_CAPI_CAPIFS
> > > -	tristate
> > > -	depends on ISDN_CAPI_CAPIFS_BOOL
> > > -	default ISDN_CAPI_CAPI20
> > >  	help
> > >  	  This option provides a special file system, similar to /dev/pts with
> > >  	  device nodes for the special ttys established by using the
> > >  	  middleware extension above. If you want to use pppd with
> > >  	  pppdcapiplugin to dial up to your ISP, say Y here.
> > >  
> > > +config ISDN_CAPI_CAPIFS
> > > +	tristate
> > > +	depends on ISDN_CAPI_CAPIFS_BOOL
> > > +	default ISDN_CAPI_CAPI20
> > > +
> >...
> 
> cu
> Adrian
> 
> -- 
> 
>        "Is there not promise of rain?" Ling Tan asked suddenly out
>         of the darkness. There had been need of rain for many days.
>        "Only a promise," Lao Er said.
>                                        Pearl S. Buck - Dragon Seed
> 
> _______________________________________________
> isdn4linux mailing list
> isdn4linux@listserv.isdn4linux.de
> https://www.isdn4linux.de/mailman/listinfo/isdn4linux
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-01-31 21:44 ` Marcel Holtmann
@ 2006-02-02 21:40   ` Adrian Bunk
  2006-02-02 23:57     ` Marcel Holtmann
  0 siblings, 1 reply; 14+ messages in thread
From: Adrian Bunk @ 2006-02-02 21:40 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: kkeil, kai.germaschewski, isdn4linux, linux-kernel

On Tue, Jan 31, 2006 at 10:44:04PM +0100, Marcel Holtmann wrote:

> Hi Adrian,

Hi Marcel,

> > This patch contains the following cleanups:
> > - move the help text to the right option
> > - replace some #ifdef's in capi.c with dummy functions in capifs.h
> > - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c
> 
> I actually still like to see capifs removed completely. It is not really
> needed if you gonna use udev. The only thing that it is doing, is to set
> the correct permissions and make sure that the device nodes are created.
> And with a 2.6 kernel this can be all done by udev.

udev is not mandatory.

Static /dev is still 100% supported and working fine.

> Regards
> 
> Marcel

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-02 21:40   ` Adrian Bunk
@ 2006-02-02 23:57     ` Marcel Holtmann
  2006-02-03  8:45       ` Armin Schindler
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel Holtmann @ 2006-02-02 23:57 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: kkeil, kai.germaschewski, isdn4linux, linux-kernel

Hi Adrian,

> > > This patch contains the following cleanups:
> > > - move the help text to the right option
> > > - replace some #ifdef's in capi.c with dummy functions in capifs.h
> > > - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c
> > 
> > I actually still like to see capifs removed completely. It is not really
> > needed if you gonna use udev. The only thing that it is doing, is to set
> > the correct permissions and make sure that the device nodes are created.
> > And with a 2.6 kernel this can be all done by udev.
> 
> udev is not mandatory.
> 
> Static /dev is still 100% supported and working fine.

and if you have static /dev then you can use mknod and chown by
yourself. If you use CAPI on any newer distribution with the latest 2.6
kernel you will have udev anyway and so no static /dev at all.

Regards

Marcel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-02 23:57     ` Marcel Holtmann
@ 2006-02-03  8:45       ` Armin Schindler
  2006-02-03  8:53         ` Marcel Holtmann
  0 siblings, 1 reply; 14+ messages in thread
From: Armin Schindler @ 2006-02-03  8:45 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Adrian Bunk, kai.germaschewski, isdn4linux, linux-kernel, kkeil

On Fri, 3 Feb 2006, Marcel Holtmann wrote:
> Hi Adrian,
> 
> > > > This patch contains the following cleanups:
> > > > - move the help text to the right option
> > > > - replace some #ifdef's in capi.c with dummy functions in capifs.h
> > > > - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c
> > > 
> > > I actually still like to see capifs removed completely. It is not really
> > > needed if you gonna use udev. The only thing that it is doing, is to set
> > > the correct permissions and make sure that the device nodes are created.
> > > And with a 2.6 kernel this can be all done by udev.
> > 
> > udev is not mandatory.
> > 
> > Static /dev is still 100% supported and working fine.
> 
> and if you have static /dev then you can use mknod and chown by
> yourself. If you use CAPI on any newer distribution with the latest 2.6
> kernel you will have udev anyway and so no static /dev at all.

Sorry for my ignorance, but I think capifs was introduced to have own 
dynamic 'files' like pts and not to have the restrictions of character 
devices and the needed major/minor numbers.

So changing this to character device nodes may break applications
out there.

Armin


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-03  8:45       ` Armin Schindler
@ 2006-02-03  8:53         ` Marcel Holtmann
  2006-02-03 10:18           ` Armin Schindler
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel Holtmann @ 2006-02-03  8:53 UTC (permalink / raw)
  To: Armin Schindler
  Cc: Adrian Bunk, kai.germaschewski, isdn4linux, linux-kernel, kkeil

Hi Armin,

> > > > > This patch contains the following cleanups:
> > > > > - move the help text to the right option
> > > > > - replace some #ifdef's in capi.c with dummy functions in capifs.h
> > > > > - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c
> > > > 
> > > > I actually still like to see capifs removed completely. It is not really
> > > > needed if you gonna use udev. The only thing that it is doing, is to set
> > > > the correct permissions and make sure that the device nodes are created.
> > > > And with a 2.6 kernel this can be all done by udev.
> > > 
> > > udev is not mandatory.
> > > 
> > > Static /dev is still 100% supported and working fine.
> > 
> > and if you have static /dev then you can use mknod and chown by
> > yourself. If you use CAPI on any newer distribution with the latest 2.6
> > kernel you will have udev anyway and so no static /dev at all.
> 
> Sorry for my ignorance, but I think capifs was introduced to have own 
> dynamic 'files' like pts and not to have the restrictions of character 
> devices and the needed major/minor numbers.

I am under the impression that it was introduced to change the ownership
of the device node the current process. Nothing more, nothing less.
Please correct me if I am wrong here.
 
> So changing this to character device nodes may break applications
> out there.

Actually I stopped compiling in and using capifs over a year ago and I
never had any problems with it. However you must ensure that the device
has been created by udev, nut nowadays this is no problem.

Regards

Marcel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-03  8:53         ` Marcel Holtmann
@ 2006-02-03 10:18           ` Armin Schindler
  2006-02-03 19:57             ` Marcel Holtmann
  0 siblings, 1 reply; 14+ messages in thread
From: Armin Schindler @ 2006-02-03 10:18 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Adrian Bunk, kai.germaschewski, isdn4linux,
	Linux Kernel Mailinglist, kkeil, Carsten Paeth

On Fri, 3 Feb 2006, Marcel Holtmann wrote:
> Hi Armin,
> 
> > > > > > This patch contains the following cleanups:
> > > > > > - move the help text to the right option
> > > > > > - replace some #ifdef's in capi.c with dummy functions in capifs.h
> > > > > > - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c
> > > > > 
> > > > > I actually still like to see capifs removed completely. It is not really
> > > > > needed if you gonna use udev. The only thing that it is doing, is to set
> > > > > the correct permissions and make sure that the device nodes are created.
> > > > > And with a 2.6 kernel this can be all done by udev.
> > > > 
> > > > udev is not mandatory.
> > > > 
> > > > Static /dev is still 100% supported and working fine.
> > > 
> > > and if you have static /dev then you can use mknod and chown by
> > > yourself. If you use CAPI on any newer distribution with the latest 2.6
> > > kernel you will have udev anyway and so no static /dev at all.
> > 
> > Sorry for my ignorance, but I think capifs was introduced to have own 
> > dynamic 'files' like pts and not to have the restrictions of character 
> > devices and the needed major/minor numbers.
> 
> I am under the impression that it was introduced to change the ownership
> of the device node the current process. Nothing more, nothing less.
> Please correct me if I am wrong here.

I really don't know. Calle should be asked, I think he did that.
  
> > So changing this to character device nodes may break applications
> > out there.
> 
> Actually I stopped compiling in and using capifs over a year ago and I
> never had any problems with it. However you must ensure that the device
> has been created by udev, nut nowadays this is no problem.

I use capi-ppp connections with capifs. If you don't use capifs, how do you
do ppp over CAPI?

What about the major number? Wouldn't we need a major number then?

If udev is creating the device, it may be not existent when the application
expects it. E.g. the application is doing the ioctl to retreive the 
connection number (filename) and expects to be able to open it. But in case 
of udev, it might be not done in that time. So the application needs to wait
for some time..., but how long? I don't like this idea.

Armin

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-03 10:18           ` Armin Schindler
@ 2006-02-03 19:57             ` Marcel Holtmann
  2006-02-12 11:09               ` Carsten Paeth
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel Holtmann @ 2006-02-03 19:57 UTC (permalink / raw)
  To: Armin Schindler
  Cc: Adrian Bunk, kai.germaschewski, isdn4linux,
	Linux Kernel Mailinglist, kkeil, Carsten Paeth

Hi Armin,

> > > > > > > This patch contains the following cleanups:
> > > > > > > - move the help text to the right option
> > > > > > > - replace some #ifdef's in capi.c with dummy functions in capifs.h
> > > > > > > - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c
> > > > > > 
> > > > > > I actually still like to see capifs removed completely. It is not really
> > > > > > needed if you gonna use udev. The only thing that it is doing, is to set
> > > > > > the correct permissions and make sure that the device nodes are created.
> > > > > > And with a 2.6 kernel this can be all done by udev.
> > > > > 
> > > > > udev is not mandatory.
> > > > > 
> > > > > Static /dev is still 100% supported and working fine.
> > > > 
> > > > and if you have static /dev then you can use mknod and chown by
> > > > yourself. If you use CAPI on any newer distribution with the latest 2.6
> > > > kernel you will have udev anyway and so no static /dev at all.
> > > 
> > > Sorry for my ignorance, but I think capifs was introduced to have own 
> > > dynamic 'files' like pts and not to have the restrictions of character 
> > > devices and the needed major/minor numbers.
> > 
> > I am under the impression that it was introduced to change the ownership
> > of the device node the current process. Nothing more, nothing less.
> > Please correct me if I am wrong here.
> 
> I really don't know. Calle should be asked, I think he did that.

I asked him some time ago, but never got a final feedback for it.
  
> > > So changing this to character device nodes may break applications
> > > out there.
> > 
> > Actually I stopped compiling in and using capifs over a year ago and I
> > never had any problems with it. However you must ensure that the device
> > has been created by udev, nut nowadays this is no problem.
> 
> I use capi-ppp connections with capifs. If you don't use capifs, how do you
> do ppp over CAPI?
> 
> What about the major number? Wouldn't we need a major number then?

It has already a major number.

> If udev is creating the device, it may be not existent when the application
> expects it. E.g. the application is doing the ioctl to retreive the 
> connection number (filename) and expects to be able to open it. But in case 
> of udev, it might be not done in that time. So the application needs to wait
> for some time..., but how long? I don't like this idea.

This is a small race condition that existed with the original udev, but
it was easy to work around it. Adding a simple sleep is enough and I did
the same with Bluetooth RFCOMM. However it should be work nowadays, but
I am not 100% sure. We should check this with the udev guys.

Regards

Marcel



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-03 19:57             ` Marcel Holtmann
@ 2006-02-12 11:09               ` Carsten Paeth
  2006-02-12 11:36                 ` Marcel Holtmann
  0 siblings, 1 reply; 14+ messages in thread
From: Carsten Paeth @ 2006-02-12 11:09 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Armin Schindler, Adrian Bunk, kai.germaschewski, isdn4linux,
	Linux Kernel Mailinglist, kkeil

Hello,

I have no problems, when capifs is removed, but the pppdcapiplugin
has to work without it.
So if you want to remove capifs make sure pppdcapiplugin is
working without problems together with udev ...

I'm too busy to check pppdcapiplugin together with udev ....

regards,

calle

Fri, Feb 03, 2006 at 08:57:20PM +0100, Marcel Holtmann schrieb:
> Hi Armin,
> 
> > > > > > > > This patch contains the following cleanups:
> > > > > > > > - move the help text to the right option
> > > > > > > > - replace some #ifdef's in capi.c with dummy functions in capifs.h
> > > > > > > > - use CONFIG_ISDN_CAPI_CAPIFS_BOOL in one place in capi.c
> > > > > > > 
> > > > > > > I actually still like to see capifs removed completely. It is not really
> > > > > > > needed if you gonna use udev. The only thing that it is doing, is to set
> > > > > > > the correct permissions and make sure that the device nodes are created.
> > > > > > > And with a 2.6 kernel this can be all done by udev.
> > > > > > 
> > > > > > udev is not mandatory.
> > > > > > 
> > > > > > Static /dev is still 100% supported and working fine.
> > > > > 
> > > > > and if you have static /dev then you can use mknod and chown by
> > > > > yourself. If you use CAPI on any newer distribution with the latest 2.6
> > > > > kernel you will have udev anyway and so no static /dev at all.
> > > > 
> > > > Sorry for my ignorance, but I think capifs was introduced to have own 
> > > > dynamic 'files' like pts and not to have the restrictions of character 
> > > > devices and the needed major/minor numbers.
> > > 
> > > I am under the impression that it was introduced to change the ownership
> > > of the device node the current process. Nothing more, nothing less.
> > > Please correct me if I am wrong here.
> > 
> > I really don't know. Calle should be asked, I think he did that.
> 
> I asked him some time ago, but never got a final feedback for it.
>   
> > > > So changing this to character device nodes may break applications
> > > > out there.
> > > 
> > > Actually I stopped compiling in and using capifs over a year ago and I
> > > never had any problems with it. However you must ensure that the device
> > > has been created by udev, nut nowadays this is no problem.
> > 
> > I use capi-ppp connections with capifs. If you don't use capifs, how do you
> > do ppp over CAPI?
> > 
> > What about the major number? Wouldn't we need a major number then?
> 
> It has already a major number.
> 
> > If udev is creating the device, it may be not existent when the application
> > expects it. E.g. the application is doing the ioctl to retreive the 
> > connection number (filename) and expects to be able to open it. But in case 
> > of udev, it might be not done in that time. So the application needs to wait
> > for some time..., but how long? I don't like this idea.
> 
> This is a small race condition that existed with the original udev, but
> it was easy to work around it. Adding a simple sleep is enough and I did
> the same with Bluetooth RFCOMM. However it should be work nowadays, but
> I am not 100% sure. We should check this with the udev guys.
> 
> Regards
> 
> Marcel
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-12 11:09               ` Carsten Paeth
@ 2006-02-12 11:36                 ` Marcel Holtmann
  2006-02-18 15:46                   ` Carsten Paeth
  0 siblings, 1 reply; 14+ messages in thread
From: Marcel Holtmann @ 2006-02-12 11:36 UTC (permalink / raw)
  To: Carsten Paeth
  Cc: Armin Schindler, Adrian Bunk, kai.germaschewski, isdn4linux,
	Linux Kernel Mailinglist, kkeil

[-- Attachment #1: Type: text/plain, Size: 483 bytes --]

Hi Calle,

> I have no problems, when capifs is removed, but the pppdcapiplugin
> has to work without it.
> So if you want to remove capifs make sure pppdcapiplugin is
> working without problems together with udev ...
> 
> I'm too busy to check pppdcapiplugin together with udev ....

I posted this patch some time ago (actually April 2004) which made pppd
wait for the device node to be created before failing. I used it since
then and it still works fine for me.

Regards

Marcel


[-- Attachment #2: patch-pppdcapiplugin-wait-for-dev --]
[-- Type: text/x-patch, Size: 743 bytes --]

Index: capiplugin.c
===================================================================
RCS file: /i4ldev/isdn4k-utils/pppdcapiplugin/capiplugin.c,v
retrieving revision 1.33
diff -u -r1.33 capiplugin.c
--- capiplugin.c	16 Jan 2004 15:27:13 -0000	1.33
+++ capiplugin.c	12 Apr 2004 13:20:50 -0000
@@ -1413,6 +1413,11 @@
 	   fatal("capiplugin: failed to get tty devname - %s (%d)",
 			strerror(serrno), serrno);
 	}
+	retry = 0;
+	while (access(tty, 0) != 0 && (retry++ < 4)) {
+	   dbglog("capiplugin: capitty not available, waiting for device ...");
+	   sleep(1);
+	}
 	if (access(tty, 0) != 0 && errno == ENOENT) {
 	      fatal("capiplugin: tty %s doesn't exist - CAPI Filesystem Support not enabled in kernel or not mounted ?", tty);
 	}

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [2.6 patch] ISDN_CAPI_CAPIFS related cleanups
  2006-02-12 11:36                 ` Marcel Holtmann
@ 2006-02-18 15:46                   ` Carsten Paeth
  0 siblings, 0 replies; 14+ messages in thread
From: Carsten Paeth @ 2006-02-18 15:46 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Armin Schindler, Adrian Bunk, kai.germaschewski, isdn4linux,
	Linux Kernel Mailinglist, kkeil

Sun, Feb 12, 2006 at 12:36:15PM +0100, Marcel Holtmann schrieb:
> Hi Calle,
> 
> > I have no problems, when capifs is removed, but the pppdcapiplugin
> > has to work without it.
> > So if you want to remove capifs make sure pppdcapiplugin is
> > working without problems together with udev ...
> > 
> > I'm too busy to check pppdcapiplugin together with udev ....
> 
> I posted this patch some time ago (actually April 2004) which made pppd
> wait for the device node to be created before failing. I used it since
> then and it still works fine for me.

Oh, I missed that patch. So check it in und remove capifs :-)

calle

> 
> Regards
> 
> Marcel
> 

> Index: capiplugin.c
> ===================================================================
> RCS file: /i4ldev/isdn4k-utils/pppdcapiplugin/capiplugin.c,v
> retrieving revision 1.33
> diff -u -r1.33 capiplugin.c
> --- capiplugin.c	16 Jan 2004 15:27:13 -0000	1.33
> +++ capiplugin.c	12 Apr 2004 13:20:50 -0000
> @@ -1413,6 +1413,11 @@
>  	   fatal("capiplugin: failed to get tty devname - %s (%d)",
>  			strerror(serrno), serrno);
>  	}
> +	retry = 0;
> +	while (access(tty, 0) != 0 && (retry++ < 4)) {
> +	   dbglog("capiplugin: capitty not available, waiting for device ...");
> +	   sleep(1);
> +	}
>  	if (access(tty, 0) != 0 && errno == ENOENT) {
>  	      fatal("capiplugin: tty %s doesn't exist - CAPI Filesystem Support not enabled in kernel or not mounted ?", tty);
>  	}


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-02-18 16:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-31 21:33 [2.6 patch] ISDN_CAPI_CAPIFS related cleanups Adrian Bunk
2006-01-31 21:44 ` Marcel Holtmann
2006-02-02 21:40   ` Adrian Bunk
2006-02-02 23:57     ` Marcel Holtmann
2006-02-03  8:45       ` Armin Schindler
2006-02-03  8:53         ` Marcel Holtmann
2006-02-03 10:18           ` Armin Schindler
2006-02-03 19:57             ` Marcel Holtmann
2006-02-12 11:09               ` Carsten Paeth
2006-02-12 11:36                 ` Marcel Holtmann
2006-02-18 15:46                   ` Carsten Paeth
2006-02-01  8:43 ` Armin Schindler
2006-02-01 10:44   ` Adrian Bunk
2006-02-01 11:01     ` Armin Schindler

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).