From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gabriel C Date: Wed, 11 Apr 2007 17:51:28 +0000 Subject: Re: Problems with udev > 106 and multiple network cards Message-Id: <461D2020.9090606@googlemail.com> List-Id: References: <461BFFDD.2040401@googlemail.com> In-Reply-To: <461BFFDD.2040401@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Gabriel C wrote: > Matthias Schwarzott wrote: > =20 >> On Dienstag, 10. April 2007, Gabriel C wrote: >> =20 >> =20 >>> Hello, >>> >>> I have some problems with udev 107 and 108 with my network cards. >>> >>> This box has 3 network cards ( 2 at the moment ) a buildin sis900 , and >>> 2 RealTek cards one USB and one pcmcia. >>> >>> I use the pcmcia RealTek one as default , sis900 is not used while >>> borken and the usb one is used just sometimes for my LAN. >>> >>> I use on this box minimal initramfs ( FS drivers etc to boot ) but I get >>> the same problem without initramfs too. >>> >>> After upgrading from udev 106 to 107 ( later to 108 ) and rebooting the >>> box my network stoped working. >>> >>> I figured the 'cards names' looks weird , random they are called now >>> ethX_rename ( >>> http://frugalware.org/~crazy/other/udev/sys_class_net.txt | >>> http://frugalware.org/~crazy/other/udev/ifconfig-a.txt ) >>> as well I get for each card an long timeout ( 5 to 15 seconds for each >>> wrong named card ) on boot because the 70-persistent-net.rules. >>> >>> =20 >>> =20 >> =20 >> =20 >>> Deleting the rules before udev starts make the timout be human again ( >>> like 2 - 3 seconds ) but the rules are still wrong because I get as >>> NAME ethX_rename. >>> >>> =20 >>> =20 >> I suspect it is this bug:=20 >> http://thread.gmane.org/gmane.linux.hotplug.devel/11001 >> =20 >> =20 > > Yes is the same problem. > > =20 >> Look into /etc/udev/rules.d/70-persistent-net.rules, and=20 >> into /dev/.udev/tmp-rules--70-persistent-net.rules if there are rules th= at=20 >> set the same name for two different cards (mac addresses). >> The tmp-location is used as long as / is read-only at udev startup time. >> >> =20 >> Easiest is to delete both files and reboot / or edit the set names for=20 >> net-devices to be unique. Then the error should be gone. >> If not you found another bug. >> =20 >> =20 > > I said editing the *rules manually make them work but this is a very=20 > ugly workaround for this problem. > > I've detelet both rules and now after rebooting the box only the=20 > /dev/.udev/tmp-* one is created. > > The *_rename thing is gone but there is still something wrong. > > eth0 is eth1 and it is the only card right now here : > > $ ls -1 /sys/class/net > eth1@ > lo@ > ppp0@ > > ifconfig -a | grep eth > eth1 Link encap:Ethernet HWaddr 00:80:5A:24:8C:FA > =20 This problem is fixed in git for me by this commit : http://git.kernel.org/?p=3Dlinux/hotplug/udev.git;a=3Dcommitdiff;h=81313e1b= 48866efb9e40eb88420643de05275b56 > > So is the same problem but I guess the bug is different. > > =20 I've played around abit and I think I know the reason for this problem=20 but I have no idea where the bug is in code. ( maybe is the kernel ? ) I have also an FireWire device too which is there as : /sys/class/net/eth0 -> ../../devices/virtual/net/eth0/ INTERFACE=3D"eth0" DEVPATH=3D"/sys/class/net/eth0" \ > sudo /lib/udev/write_net_rules No MAC address for eth0. This virtual device is causing the whole problem. Udev does not write=20 any rules for it ( knows about it ? ) and without to blacklist the=20 firewire driver eth0 is always the firewire devices as : eth0 Link encap:UNSPEC HWaddr=20 00-40-D0-01-00-15-F6-9E-00-00-00-00-00-00-00-00 .... Booting with Firewire device the sis and pcmcia card I get this rules ,=20 generated by udev : # PCI device 0x1039:0x0900 (sis900) SUBSYSTEM=3D"net", DRIVERS=3D"?*", ATTRS{address}=3D"00:40:d0:42:ed:0b",=20 NAME=3D"eth2" # PCI device 0x10ec:0x8139 (8139too) SUBSYSTEM=3D"net", DRIVERS=3D"?*", ATTRS{address}=3D"00:80:5a:24:8c:fa",=20 NAME=3D"eth1" Trying now to make eth1 -> eth0 I get on next boot ( with an long=20 timeout ) : ..... eth2 Link encap:Ethernet HWaddr 00:40:D0:42:ED:0B BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:11 Base address:0xe400 eth2_rena Link encap:Ethernet HWaddr 00:80:5A:24:8C:FA BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:10 Base address:0xa000 ... With the patch from git and blacklisted eth1394 driver things are=20 working again but is again ugly workarounded. I guess to fix this problem udev need to ignore such /virtual/ devices ? Regards, Gabriel ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel