From fbarton@ntlworld.com Tue Jun 10 18:04:35 2003 Received: with ECARTIS (v1.0.0; list devfs); Tue, 10 Jun 2003 18:04:37 -0700 (PDT) Received: from mta03-svc.ntlworld.com (mta03-svc.ntlworld.com [62.253.162.43]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5B14X2x016916 for ; Tue, 10 Jun 2003 18:04:34 -0700 Received: from m82-mp1.cvx1-a.bri.dial.ntli.net ([62.255.4.82]) by mta03-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20030611010431.XEQT11246.mta03-svc.ntlworld.com@m82-mp1.cvx1-a.bri.dial.ntli.net> for ; Wed, 11 Jun 2003 02:04:31 +0100 Date: Wed, 11 Jun 2003 02:03:52 +0100 (BST) From: Francis Barton Subject: module autoloading errors To: devfs@oss.sgi.com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Disposition: INLINE X-Mailer: Mahogany 0.64 'Sparc', compiled for Linux 2.4.20 i686 Message-Id: <20030611010431.XEQT11246.mta03-svc.ntlworld.com@m82-mp1.cvx1-a.bri.dial.ntli.net> X-archive-position: 141 X-ecartis-version: Ecartis v1.0.0 Sender: devfs-bounce@oss.sgi.com Errors-to: devfs-bounce@oss.sgi.com X-original-sender: fbarton@ntlworld.com Precedence: bulk X-list: devfs Hi there, I've got devfs running nicely on kernel 2.4.20, but I seem to be having a few problems. Maybe someone can point out what I'm doing wrong. My devfsd.conf includes the following : # Enable module autoloading. You may comment this out if you don't use # autoloading LOOKUP .* MODLOAD # Extra lookups and registers for sound, modem, printer etc. LOOKUP dsp MODLOAD REGISTER sound/dsp PERMISSIONS root.audio 660 LOOKUP mixer MODLOAD REGISTER sound/mixer PERMISSIONS root.audio 660 LOOKUP tts/0 MODLOAD REGISTER tts/0 PERMISSIONS root.dialout 660 LOOKUP printers/0 MODLOAD REGISTER printers/0 PERMISSIONS root.lp 660 And my /etc/modules.conf contains: alias /dev/tts* serial alias /dev/printers* lp Here's the problem(s): My ppp dialup script specifies /dev/tts/0 as the location of my modem so when I run "ppp-go" to dialup I expect it to call for /dev/tts/0 and then devfs to handle the MODLOAD, passing it over to modules.conf which then sends back to devfs to load the serial module, and hey presto we have tts/0! But this is not happening. When I manually "modprobe serial" I get my device node and all is well. But the autoload is not working correctly. I get the same problem when I try to send to my printer on /dev/printers/0 which I have specified in /etc/printcap. lp is not being autoloaded and so /dev/printers/0 is not being created. Please can someone point out what I have done wrong with my configuration. For comparison, XMMS calls to /dev/dsp work just fine, autoloading my sound modules no problemo. Many thanks, Francis Barton. From Andrey.Borzenkov@siemens.com Tue Jun 10 22:36:19 2003 Received: with ECARTIS (v1.0.0; list devfs); Tue, 10 Jun 2003 22:36:28 -0700 (PDT) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5B5aH2x001702 for ; Tue, 10 Jun 2003 22:36:19 -0700 Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.11.7/8.11.7) with ESMTP id h5B5aFo20656; Wed, 11 Jun 2003 07:36:15 +0200 (MEST) Received: from MOWD019A.mow.siemens.ru ([163.242.196.119]) by mail1.siemens.de (8.11.7/8.11.7) with ESMTP id h5B5aFV12327; Wed, 11 Jun 2003 07:36:15 +0200 (MEST) Received: by mowd019a.mow.siemens.ru with Internet Mail Service (5.5.2653.19) id ; Wed, 11 Jun 2003 09:41:26 +0400 Received: from mw2b210c (163.242.193.12 [163.242.193.12]) by MOWD019A.mow.siemens.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id MT30JB3T; Wed, 11 Jun 2003 09:41:20 +0400 From: Borzenkov Andrey To: "'Francis Barton'" , devfs@oss.sgi.com Subject: RE: module autoloading errors Date: Wed, 11 Jun 2003 09:36:04 +0400 Message-ID: <6134254DE87BD411908B00A0C99B044F05A0C94B@mowd019a.mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 In-Reply-To: <20030611010431.XEQT11246.mta03-svc.ntlworld.com@m82-mp1.cvx1-a.bri.dial.ntli.net> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id h5B5aH2x001702 X-archive-position: 142 X-ecartis-version: Ecartis v1.0.0 Sender: devfs-bounce@oss.sgi.com Errors-to: devfs-bounce@oss.sgi.com X-original-sender: Andrey.Borzenkov@siemens.com Precedence: bulk X-list: devfs > > My devfsd.conf includes the following : > > # Enable module autoloading. You may comment this out if you don't use > # autoloading > LOOKUP .* MODLOAD > > # Extra lookups and registers for sound, modem, printer etc. > LOOKUP dsp MODLOAD redundant > REGISTER sound/dsp PERMISSIONS root.audio 660 > > LOOKUP mixer MODLOAD ditto > REGISTER sound/mixer PERMISSIONS root.audio 660 > > LOOKUP tts/0 MODLOAD ditto > REGISTER tts/0 PERMISSIONS root.dialout 660 > > LOOKUP printers/0 MODLOAD ditto > REGISTER printers/0 PERMISSIONS root.lp 660 > > And my /etc/modules.conf contains: > alias /dev/tts* serial > alias /dev/printers* lp > > Here's the problem(s): > My ppp dialup script specifies /dev/tts/0 as the location of my modem so > when I run "ppp-go" to dialup I expect it to call for /dev/tts/0 and then > devfs to handle the MODLOAD, passing it over to modules.conf which then > sends back to devfs to load the serial module, and hey presto we have > tts/0! > > But this is not happening. When I manually "modprobe serial" I get my > device node and all is well. But the autoload is not working correctly. > what is in your /etc/modules.devfs? What is modutils version (anyone knows if there was a version that could not handle wildcards in aliases?) What devfsd version? what happens if you just do ls /dev/tts/0 finally, strace devfsd when doing ls /dev/tts/0: strace -f -o /tmp/out -p PID-of-devfsd it will show you how modprobe is really called. -andrey > I get the same problem when I try to send to my printer on /dev/printers/0 > which I have specified in /etc/printcap. lp is not being autoloaded and so > /dev/printers/0 is not being created. > > Please can someone point out what I have done wrong with my configuration. > For comparison, XMMS calls to /dev/dsp work just fine, autoloading my > sound > modules no problemo. > > Many thanks, > Francis Barton. From arvidjaar@mail.ru Sun Jun 15 09:28:17 2003 Received: with ECARTIS (v1.0.0; list devfs); Sun, 15 Jun 2003 09:28:22 -0700 (PDT) Received: from hueymiccailhuitl.mtu.ru (hueytecuilhuitl.mtu.ru [195.34.32.123]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5FGS52x021948 for ; Sun, 15 Jun 2003 09:28:06 -0700 Received: from ppp139-68.dialup.mtu-net.ru (ppp139-68.dialup.mtu-net.ru [62.118.139.68]) by hueymiccailhuitl.mtu.ru (Postfix) with ESMTP id 83535FA94D; Sun, 15 Jun 2003 20:19:31 +0400 (MSD) (envelope-from arvidjaar@mail.ru) From: Andrey Borzenkov To: linux-kernel@vger.kernel.org Subject: [PATCH] 2.5.70: raw.c devfs support Date: Sun, 15 Jun 2003 20:18:52 +0400 User-Agent: KMail/1.5 Cc: devfs@oss.sgi.com MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_sxJ7+u4mjwoEybC" Message-Id: <200306152018.52602.arvidjaar@mail.ru> X-archive-position: 143 X-ecartis-version: Ecartis v1.0.0 Sender: devfs-bounce@oss.sgi.com Errors-to: devfs-bounce@oss.sgi.com X-original-sender: arvidjaar@mail.ru Precedence: bulk X-list: devfs --Boundary-00=_sxJ7+u4mjwoEybC Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Trivial patch to add devfs support to raw.c. Similar patch has been posted for 2.4 but apparently never applied. -andrey --Boundary-00=_sxJ7+u4mjwoEybC Content-Type: text/x-diff; charset="us-ascii"; name="2.5.70-raw.devfs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="2.5.70-raw.devfs.patch" --- linux-2.5.70/drivers/char/raw.c.devfs 2003-06-01 11:49:51.000000000 +0400 +++ linux-2.5.70/drivers/char/raw.c 2003-06-15 19:23:20.000000000 +0400 @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -258,12 +259,27 @@ static struct file_operations raw_ctl_fo static int __init raw_init(void) { + int i; + register_chrdev(RAW_MAJOR, "raw", &raw_fops); + devfs_mk_cdev(MKDEV(RAW_MAJOR, 0), + S_IFCHR | S_IRUGO | S_IWUGO, + "raw/rawctl"); + for (i = 0; i < MAX_RAW_MINORS; i++) + devfs_mk_cdev(MKDEV(RAW_MAJOR, i), + S_IFCHR | S_IRUGO | S_IWUGO, + "raw/raw%d", i); return 0; } static void __exit raw_exit(void) { + int i; + + for (i = 0; i < MAX_RAW_MINORS; i++) + devfs_remove("raw/raw%d", i); + devfs_remove("raw/rawctl"); + devfs_remove("raw"); unregister_chrdev(RAW_MAJOR, "raw"); } --Boundary-00=_sxJ7+u4mjwoEybC-- From arvidjaar@mail.ru Sun Jun 15 09:37:39 2003 Received: with ECARTIS (v1.0.0; list devfs); Sun, 15 Jun 2003 09:37:43 -0700 (PDT) Received: from hueymiccailhuitl.mtu.ru (hueytecuilhuitl.mtu.ru [195.34.32.123]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h5FGbS2x022064 for ; Sun, 15 Jun 2003 09:37:28 -0700 Received: from ppp139-68.dialup.mtu-net.ru (ppp139-68.dialup.mtu-net.ru [62.118.139.68]) by hueymiccailhuitl.mtu.ru (Postfix) with ESMTP id 4267BF81F7 for ; Sun, 15 Jun 2003 20:19:28 +0400 (MSD) (envelope-from arvidjaar@mail.ru) From: Andrey Borzenkov To: devfs@oss.sgi.com Subject: [PATCH] devfsd - autodetect modutils/module-init-tools Date: Sun, 15 Jun 2003 20:01:08 +0400 User-Agent: KMail/1.5 References: In-Reply-To: MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_EhJ7+N8NDq5ukYy" Message-Id: <200306152001.08705.arvidjaar@mail.ru> X-archive-position: 144 X-ecartis-version: Ecartis v1.0.0 Sender: devfs-bounce@oss.sgi.com Errors-to: devfs-bounce@oss.sgi.com X-original-sender: arvidjaar@mail.ru Precedence: bulk X-list: devfs --Boundary-00=_EhJ7+N8NDq5ukYy Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline modprobe from module-init-tools has a hack that replaces /etc/modules.devfs with /etc/modprobe.devfs if "module name" starts with "/dev". This hack does not work reliably, it is quite possible that modprobe will be called with "generic" name while resolving device (esp. as modprobe has very limited aliasing support so it is neccessary to use install with nested modprobe call). This patch makes devfsd autodetect what tools are is use and use corr. modules.devfs or modprobe.devfs. It is using exactly the same check as modprobe to decide if it should fallback to modprobe.old (a.k.a. modutils). So far I had no evil from using it and it allows me to boot both 2.4 and 2.5 without any problem (I did have problems booting 2.5 before). It also allowed me to remove hack from modprobe. Hopefully it gets applied. -andrey --Boundary-00=_EhJ7+N8NDq5ukYy Content-Type: application/x-bzip2; name="devfsd-1.3.25-kernel-2.5.patch.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="devfsd-1.3.25-kernel-2.5.patch.bz2" QlpoOTFBWSZTWRdeweoAAZdfgGYyf3////+/3u6////+UAXd3cLddjm1ktad3Lu2Y3YSiEAEaNA1 PTSmaam1GTJiZpGmgxDQ9Ro0NpBoJJCNMTRoKZSZ6mSAAxNBkZAMQDTQNqBkGRGiYk1PIp+iamnp tU00BtRoBkGgAAaADT1AkSTQhPRMUZgFNGE0YQBoNGgyAAAAONDQNGmRpo0yAxMEAANAaA0yAwJk VJLmeuJ4XW4bCAiNjOublJ0U0tpkiMR5MXN7XOXRq444VMyP+6gtYwwTFjVq1/zCctcbKno9RqSp OtRRjydSl699uKxvttHS5zSvgypV8osNe8QckAyEE4i+5EGXT96tOBmdCEo4CFQr4Xdr2Ogssb1v fhkvRBkRn6R0A5qujNSYktTN33DEPEJj0cTGaMwkPHiim2nMJmathJeTg1SYOViZY0H8M6HYbIpp y75Y5wpS700YqlW9juM1rzbdTHw2pt6mvLK9iMF9kSziyKOz4YxS3AsKsljWB+0be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