Bug 139321

Summary: CAPI subsystem not working with udev
Product: [Fedora] Fedora Reporter: Tomasz Kepczynski <tomek>
Component: udevAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: alain.richard, axel.thimm, cwickert, harald, ubeck
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-20 06:25:11 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
Patch for /etc/udev/rules.d/50-udev.rules none

Description Tomasz Kepczynski 2004-11-15 02:14:49 EST
Description of problem:
After loading Diva Server modules (included in kernel) and loading
firmware capiinfo whould display card information. Instead it
displays: "capi not installed - No such device or address (6)".
Additionally after loading modules the following message is logged
in /var/log/messages:
Nov 14 23:17:26 triss wait_for_sysfs[5807]: either wait_for_sysfs
(udev 039) needs an update to handle the device '/class/capi/capi'
properly (no device symlink) or the sysfs-support of your device's
driver needs to be fixed, please report to
<linux-hotplug-devel@lists.sourceforge.net>

How reproducible:
Always

Steps to Reproduce:
1. load divas, divacapi, capi, capidrv modules with modprobe
2. issue capiinfo
  
Actual results:
capi not installed - No such device or address (6)

Expected results:
Information about controller and supported ISDN services.

Additional info:
This email:
http://listserv.isdn4linux.de/pipermail/isdn4linux/2004-August/000811.html
points, that for /dev/capi20 beining 191,20 (this is the case) new
udev utils are needed (FC3 is 0.39, the latest is 0.44).
I didn't have time to try it yet.
This worked fine with FC2 with kernel 2.6.9-643.
Comment 1 Tomasz Kepczynski 2004-11-15 15:46:44 EST
Tried udev-0.44. The message from the log file is gone. However
capiinfo still complains with the same message.
I also noticed that after loading isdn and capidrv modules there
are no ttyI* devices.
I am also not sure about device mode as capifs marks in the log
that major for capi20 is 68, not 191.
To sum up - capi and isdn with Diva server card is useless... Hisax
(on AVM Fritz! PCI) at least manages to create ttyI* devices.
Comment 2 Tomasz Kepczynski 2004-11-15 16:15:17 EST
Tried udev-0.44. The message from the log file is gone. However
capiinfo still complains with the same message.
I also noticed that after loading isdn and capidrv modules there
are no ttyI* devices.
I am also not sure about device mode as capifs marks in the log
that major for capi20 is 68, not 191.
To sum up - capi and isdn with Diva server card is useless... Hisax
(on AVM Fritz! PCI) at least manages to create ttyI* devices.
Comment 3 Harald Hoyer 2004-11-16 09:50:01 EST
reassigning to kernel...
ttyI* should be created for Diva server cards
Comment 4 Tomasz Kepczynski 2004-11-16 10:05:28 EST
I tried to change device mode for /dev/capi20 to 68,0, and then
capiinfo works.
Also please note that capifs is not mounted (used to be /dev/capi/)
but this may be configuration issue.

Comment 5 Alain RICHARD 2005-02-14 10:39:17 EST
current isdn subsystem register /sys/class/capi/capi/dev = 68:0 and /sys/class/tty/
capi0/dev = 191:0 to /sys/class/tty/capi31/dev = 191:31. There are several problems :

The current capi user space tools expect /dev/capi20 to be 68:0 and /dev/capi/0 to 31 to 
be 191:0 to 191:31.

The default rules in udev are not handling that and per create /dev/capi as 68:0 and /dev/
capi0..31 as 191:0 to 191:31. This will create a /dev/capi20 entry as 191:20 that breaks 
capiinfo and all capi userspace tools.

A very simple fix is to add a rule to udev :

[root@pctest root]# cat /etc/udev/rules.d/10-capi.rules 
SYSFS{dev}="68:0",              NAME="capi20"
SYSFS{dev}="191:[0-9]*",        NAME="capi/%n"
[root@pctest root]# 

so that /dev/capi20 is created as 68:0 and /dev/capi/0..31 as 191:0..31.

Instead of creating /dev/capi/0..31, it is also possible to mount the 
capifs filesystem on /dev/capi.


Comment 6 Harald Hoyer 2005-03-04 10:54:16 EST
why not fix the userspace tools or the kernel module to use better
device names?

SYSFS{dev}="191:[0-9]*",        NAME="capi/%n"
SYSFS{dev}="68:0",              NAME="capi20"

are bad, cause they rely on the numbers, it should be:

KERNEL="capi*",        SYMLINK="capi/%k"

so that /dev/capi/capi is your control device and
/dev/capi/capi[0-9]* 
maybe then /dev/capi/capi could be named /dev/capi/capicrtl or
/dev/capi/capiinfo

/dev/capi20 is strange to me...
Comment 7 Alain RICHARD 2005-03-17 04:58:55 EST
In fact /dev/capi20 is so named because it is the device to control the new kernel capi 2.0 stack (as far 
as I know, it works differently than original capi stack). As the two stacks are still supported (not all 
isdn devices have been ported to capi 2.0), you should keep two different capi devices. isdn4linux 
project has choosen /dev/capi20.

The fix proposed is a quick fix that works and do not necessitate to modify all userspace tools and 
various x front-ends. As far as I know, the isdn stack is still under heavy modification and their priority 
is not change the userspace tools, but to develop a new device framework for all isdn devices.
Comment 8 Dave Jones 2005-07-15 16:23:47 EDT
An update has been released for Fedora Core 3 (kernel-2.6.12-1.1372_FC3) which
may contain a fix for your problem.   Please update to this new kernel, and
report whether or not it fixes your problem.

If you have updated to Fedora Core 4 since this bug was opened, and the problem
still occurs with the latest updates for that release, please change the version
field of this bug to 'fc4'.

Thank you.
Comment 9 Rudolf Kastl 2005-07-17 08:19:48 EDT
the problem is reproduceable with eicon diva server card and the proposed udev
rules.d fix works.
Comment 10 Rahul Sundaram 2005-07-17 09:15:15 EDT

Changing status back to assigned
Comment 11 Alain RICHARD 2005-07-20 04:45:16 EDT
The problem is still present in Fedora-4 with current kernel 2.6.12-1.1398_FC4

The fixe is still fixing perfectly the bug.

Please upgrade this bug as a Fedora-4 one (I am not the owner of this bug and so unable to do it).
Comment 12 Tomasz Kepczynski 2005-07-20 14:52:44 EDT
Upgrading to fc4 on request of other users. I am unfortunately unable to verify
this as my system was moved to CentOS.
Comment 13 Peter Bieringer 2005-09-01 08:03:52 EDT
Same happen on CentOS 4.1 / RHEL 4 U1 - workaround would help
Comment 14 Peter Bieringer 2005-09-01 08:15:55 EDT
Filed a bug for RHEL4 now:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=167291
Comment 15 Christoph Wickert 2006-03-03 22:03:32 EST
Works for me with kernel-2.6.15-1.1831_FC4, udev-071-0.FC4.3 and
isdn4k-utils-3.2-28, although I get _lots_ of udev errors. I'm using a
FRITZ!card PCI v1 with AVM's driver. No modifications to udev configuration (I
had to use the udev rules from comment #5 before to get things working).

# capiinit start &
# tail -f /var/log/messages
Mar  4 02:59:49 hal9000 kernel: CAPI Subsystem Rev 1.1.2.8
Mar  4 02:59:49 hal9000 udev[3725]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:49 hal9000 kernel: SELinux: initialized (dev capifs, type capifs),
uses genfs_contexts
Mar  4 02:59:49 hal9000 kernel: capifs: Rev 1.1.2.3
Mar  4 02:59:49 hal9000 udev[3728]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:49 hal9000 udev[3730]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:49 hal9000 udev[3732]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:49 hal9000 udev[3734]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:49 hal9000 udev[3743]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:49 hal9000 udev[3745]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:49 hal9000 udev[3747]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:50 hal9000 udev[3749]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:50 hal9000 udev[3758]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:50 hal9000 udev[3764]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:50 hal9000 udev[3766]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:50 hal9000 udev[3775]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:50 hal9000 udev[3784]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:51 hal9000 kernel: capi20: Rev 1.1.2.7: started up with major 68
(middleware+capifs)
Mar  4 02:59:51 hal9000 udev[3734]: udev_make_node: mknod(/dev/capi/0, 020660,
191, 0) failed with error 'Operation not permitted'
Mar  4 02:59:51 hal9000 udev[3743]: udev_make_node: mknod(/dev/capi/1, 020660,
191, 1) failed with error 'Operation not permitted'
Mar  4 02:59:51 hal9000 udev[3745]: udev_make_node: mknod(/dev/capi/2, 020660,
191, 2) failed with error 'Operation not permitted'
Mar  4 02:59:51 hal9000 udev[3758]: udev_make_node: mknod(/dev/capi/5, 020660,
191, 5) failed with error 'Operation not permitted'
Mar  4 02:59:52 hal9000 udev[3775]: udev_make_node: mknod(/dev/capi/8, 020660,
191, 8) failed with error 'Operation not permitted'
Mar  4 02:59:52 hal9000 udev[3821]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:52 hal9000 udev[3826]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:52 hal9000 udev[3831]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:52 hal9000 udev[3831]: udev_make_node: mknod(/dev/capi/12, 020660,
191, 12) failed with error 'Operation not permitted'
Mar  4 02:59:52 hal9000 udev[3836]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:52 hal9000 udev[3841]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:52 hal9000 udev[3846]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:52 hal9000 udev[3849]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:52 hal9000 udev[3849]: udev_make_node: mknod(/dev/capi/16, 020660,
191, 16) failed with error 'Operation not permitted'
Mar  4 02:59:52 hal9000 udev[3854]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:53 hal9000 udev[3821]: udev_make_node: mknod(/dev/capi/10, 020660,
191, 10) failed with error 'Operation not permitted'
Mar  4 02:59:53 hal9000 udev[3826]: udev_make_node: mknod(/dev/capi/11, 020660,
191, 11) failed with error 'Operation not permitted'
Mar  4 02:59:53 hal9000 udev[3836]: udev_make_node: mknod(/dev/capi/13, 020660,
191, 13) failed with error 'Operation not permitted'
Mar  4 02:59:53 hal9000 udev[3841]: udev_make_node: mknod(/dev/capi/14, 020660,
191, 14) failed with error 'Operation not permitted'
Mar  4 02:59:53 hal9000 udev[3846]: udev_make_node: mknod(/dev/capi/15, 020660,
191, 15) failed with error 'Operation not permitted'
Mar  4 02:59:54 hal9000 udev[3854]: udev_make_node: mknod(/dev/capi/17, 020660,
191, 17) failed with error 'Operation not permitted'
Mar  4 02:59:54 hal9000 udev[3864]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:54 hal9000 udev[3864]: udev_make_node: mknod(/dev/capi/18, 020660,
191, 18) failed with error 'Operation not permitted'
Mar  4 02:59:54 hal9000 udev[3869]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:54 hal9000 udev[3874]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:54 hal9000 udev[3879]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:54 hal9000 udev[3884]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:54 hal9000 udev[3884]: udev_make_node: mknod(/dev/capi/22, 020660,
191, 22) failed with error 'Operation not permitted'
Mar  4 02:59:54 hal9000 udev[3892]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:54 hal9000 udev[3892]: udev_make_node: mknod(/dev/capi/23, 020660,
191, 23) failed with error 'Operation not permitted'
Mar  4 02:59:54 hal9000 udev[3869]: udev_make_node: mknod(/dev/capi/19, 020660,
191, 19) failed with error 'Operation not permitted'
Mar  4 02:59:55 hal9000 udev[3874]: udev_make_node: mknod(/dev/capi/20, 020660,
191, 20) failed with error 'Operation not permitted'
Mar  4 02:59:55 hal9000 udev[3879]: udev_make_node: mknod(/dev/capi/21, 020660,
191, 21) failed with error 'Operation not permitted'
Mar  4 02:59:55 hal9000 udev[3900]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:55 hal9000 udev[3901]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:55 hal9000 udev[3907]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:55 hal9000 udev[3912]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:55 hal9000 kernel: fcpci: AVM FRITZ!Card PCI driver, revision 0.7.2
Mar  4 02:59:55 hal9000 kernel: fcpci: (fcpci built on Mar  4 2006 at 01:00:48)
Mar  4 02:59:55 hal9000 kernel: fcpci: -- 32 bit CAPI driver --
Mar  4 02:59:55 hal9000 kernel: ACPI: PCI Interrupt 0000:00:0f.0[A] -> Link
[LNKD] -> GSI 11 (level, low) -> IRQ 11
Mar  4 02:59:55 hal9000 kernel: fcpci: AVM FRITZ!Card PCI found: port 0xbc00, irq 11
Mar  4 02:59:55 hal9000 kernel: fcpci: Loading...
Mar  4 02:59:55 hal9000 kernel: fcpci: Driver 'fcpci' attached to fcpci-stack. (152)
Mar  4 02:59:55 hal9000 kernel: fcpci: Stack version 3.11-07
Mar  4 02:59:55 hal9000 kernel: kcapi: Controller 1: fcpci-bc00-11 attached
Mar  4 02:59:55 hal9000 kernel: kcapi: card 1 "fcpci-bc00-11" ready.
Mar  4 02:59:55 hal9000 kernel: fcpci: Loaded.
Mar  4 02:59:55 hal9000 udev[3916]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:56 hal9000 udev[3916]: udev_make_node: mknod(/dev/capi/28, 020660,
191, 28) failed with error 'Operation not permitted'
Mar  4 02:59:56 hal9000 udev[3921]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:56 hal9000 udev[3921]: udev_make_node: mknod(/dev/capi/29, 020660,
191, 29) failed with error 'Operation not permitted'
Mar  4 02:59:56 hal9000 udev[3926]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:56 hal9000 udev[3927]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:56 hal9000 udev[3927]: udev_make_node: mknod(/dev/capi/31, 020660,
191, 31) failed with error 'Operation not permitted'
Mar  4 02:59:56 hal9000 udev[3932]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:56 hal9000 udev[3933]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:56 hal9000 udev[3900]: udev_make_node: mknod(/dev/capi/24, 020660,
191, 24) failed with error 'Operation not permitted'
Mar  4 02:59:56 hal9000 udev[3901]: udev_make_node: mknod(/dev/capi/25, 020660,
191, 25) failed with error 'Operation not permitted'
Mar  4 02:59:56 hal9000 udev[3907]: udev_make_node: mknod(/dev/capi/26, 020660,
191, 26) failed with error 'Operation not permitted'
Mar  4 02:59:57 hal9000 udev[3912]: udev_make_node: mknod(/dev/capi/27, 020660,
191, 27) failed with error 'Operation not permitted'
Mar  4 02:59:57 hal9000 udev[3926]: udev_make_node: mknod(/dev/capi/30, 020660,
191, 30) failed with error 'Operation not permitted'

# ls -l /dev/capi*
crw-rw----  1 root root 68,  0  4. Mär 02:56 /dev/capi20
crw-------  1 root root 68,  1  4. Mär 02:56 /dev/capi20.00
crw-------  1 root root 68,  2  4. Mär 02:56 /dev/capi20.01
crw-------  1 root root 68,  3  4. Mär 02:56 /dev/capi20.02
crw-------  1 root root 68,  4  4. Mär 02:56 /dev/capi20.03
crw-------  1 root root 68,  5  4. Mär 02:56 /dev/capi20.04
crw-------  1 root root 68,  6  4. Mär 02:56 /dev/capi20.05
crw-------  1 root root 68,  7  4. Mär 02:56 /dev/capi20.06
crw-------  1 root root 68,  8  4. Mär 02:56 /dev/capi20.07
crw-------  1 root root 68,  9  4. Mär 02:56 /dev/capi20.08
crw-------  1 root root 68, 10  4. Mär 02:56 /dev/capi20.09
crw-------  1 root root 68, 11  4. Mär 02:56 /dev/capi20.10
crw-------  1 root root 68, 12  4. Mär 02:56 /dev/capi20.11
crw-------  1 root root 68, 13  4. Mär 02:56 /dev/capi20.12
crw-------  1 root root 68, 14  4. Mär 02:56 /dev/capi20.13
crw-------  1 root root 68, 15  4. Mär 02:56 /dev/capi20.14
crw-------  1 root root 68, 16  4. Mär 02:56 /dev/capi20.15
crw-------  1 root root 68, 17  4. Mär 02:56 /dev/capi20.16
crw-------  1 root root 68, 18  4. Mär 02:56 /dev/capi20.17
crw-------  1 root root 68, 19  4. Mär 02:56 /dev/capi20.18
crw-------  1 root root 68, 20  4. Mär 02:56 /dev/capi20.19

# capiinfo
Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.11-07  (49.23)
Serial Number: 1000001
BChannels: 2
[snipped]

Test connection is fine:
# pppd call isdn/avm
Plugin userpass.so loaded.
userpass: $Revision: 1.5 $
Plugin capiplugin.so loaded.
capiplugin: $Revision: 1.36 $
capiconn:  1.13
Comment 16 Harald Hoyer 2006-03-06 02:51:11 EST
Mar  4 02:59:54 hal9000 udev[3884]: add_to_rules: invalid rule 'BUS'
Mar  4 02:59:54 hal9000 udev[3884]: udev_make_node: mknod(/dev/capi/22, 020660,
191, 22) failed with error 'Operation not permitted'

err... does rebooting help?
Comment 17 Christoph Wickert 2006-04-02 10:38:08 EDT
(In reply to comment #16)

> err... does rebooting help?

Nope. Relabeling works ether. 

I see the "bad hack" from comment #5 has made it into
/etc/udev/rules.d/50-udev.rules (at least on core 4) but I cant find anything
about it in the changelog.

Sorry for replying so late, forgot to CC myelf.
Comment 18 Christoph Wickert 2006-08-04 18:18:43 EDT
Still present in Core 5, but can be fixed with the attached patch. No more
errors, no more "invalid rules".

# rpm -q kernel udev isdn4k-utils
kernel-2.6.17-1.2145_FC5
kernel-2.6.17-1.2157_FC5
udev-084-13
isdn4k-utils-3.2-41.1.fc5
Comment 19 Christoph Wickert 2006-08-04 18:21:00 EDT
Created attachment 133670 [details]
Patch for /etc/udev/rules.d/50-udev.rules
Comment 20 Christian Iseli 2007-01-22 06:32:37 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.