4

From here: http://www.xenomai.org/index.php/RTnet:Installation_%26_Testing#Debugging_RTnet

The Linux driver for the real-time network device was built into the kernel and blocks the hardware.

When I execute rmmod 8139too it says the module does not exist in /proc/modules.

Kernel is 2.6.38.8 (64 bit).

What other information should I provide for the question?


linux-y3pi:~ # uname -a
Linux linux-y3pi 2.6.38.8-12-desktop #2 SMP PREEMPT Fri Jun 1 17:27:16 IST 2012 x86_64 x86_64 x86_64 GNU/Linux

linux-y3pi:~ # ifconfig
eth0      Link encap:Ethernet  HWaddr 00:24:8C:D9:D6:2E  
          inet addr:192.168.16.86  Bcast:192.168.16.255  Mask:255.255.255.0
          inet6 addr: fe80::224:8cff:fed9:d62e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:414 errors:0 dropped:0 overruns:0 frame:0
          TX packets:261 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:118971 (116.1 Kb)  TX bytes:35156 (34.3 Kb)
          Interrupt:17 Base address:0x4000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:68 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:4720 (4.6 Kb)  TX bytes:4720 (4.6 Kb)

linux-y3pi:~ # ethtool -i eth0
driver: r8169
version: 2.3LK-NAPI
firmware-version: 
bus-info: 0000:01:00.0

linux-y3pi:~ # rmmod r8169

linux-y3pi:~ # ethtool eth0
Settings for eth0:
Cannot get device settings: No such device
Cannot get wake-on-lan settings: No such device
Cannot get message level: No such device
Cannot get link status: No such device
No data available

linux-y3pi:~ #  lsmod|grep 8169

linux-y3pi:~ #  lsmod|grep 8139

linux-y3pi:~ #                                              

.config from /usr/src/linux-2.6.38.8

CONFIG_R8169=m
CONFIG_R8169_VLAN=y


CONFIG_8139CP=m
CONFIG_8139TOO=m
#CONFIG_8139TOO_PIO is not set                                                                                                                                                   
#CONFIG_8139TOO_TUNE_TWISTER is not set                                                                                                                                          
CONFIG_8139TOO_8129=y
#CONFIG_8139_OLD_RX_RESET is not set 
Aquarius_Girl
  • 1,235
  • 6
  • 27
  • 48

1 Answers1

3

rmmod 8139too doesn't work because either:

  • 8139 support is built into the kernel, and the driver can't be unloaded because it's not a module. On many systems, there's a /boot/config-2.6.38.8 file (or similar). You can grep it for something like ‘8139TOO’. If you see something like CONFIG_8139TOO=m, then the 8139too driver is compiled as a module. If it's CONFIG_8139TOO=y, then the driver is built into the kernel. If it says something along the lines of # CONFIG_8139TOO is not set, then the driver has not been compiled at all.
  • Your ethernet card doesn't use the RTL8139 chip, so its driver isn't loaded. You must find your intended ethernet port's driver and unload that one instead. If you have lshw, say sudo lshw | less and look for eth0: the driver module will be listed. If you have systool, try sudo systool -c net -A uevent eth0 and look for the DRIVER= part. The right hand side should show the driver loaded to handle the device. dmesg | grep eth0 may also work, but it's not 100% reliable, especially if your system has been on for a while (if there's a /var/log/dmesg, you may want to grep eth0 /var/log/dmesg too).
Alexios
  • 18,757
  • 3
  • 57
  • 74
  • actually I tried insmod 8139too, and that worked. Then I removed it, and it also worked. **What is the way to find my "ethernet port's driver"?** – Aquarius_Girl Jun 06 '12 at 10:52
  • 1
    Try `dmesg | grep eth0` – jippie Jun 06 '12 at 10:54
  • I updated the answer to cover that, including the `dmesg` hack. – Alexios Jun 06 '12 at 11:03
  • Thanks for your help. Edited the question. It seems that the driver's name was r8139, not r81349too. There isn't a config file for the 2.6.38.8 (compiled myself), but the file was for 2.6.34-12 (default Suse). So, I did rmmod r8139, and that worked. what to do about the config file? – Aquarius_Girl Jun 06 '12 at 11:56
  • If you compiled it yourself, the config file is in the root kernel build directory (e.g. `/usr/src/linux`), usually named `.config`. As for the `dmesg`/`ethtool` part: did `rmmod r8169` succeed in removing the driver? (try `lsmod|grep 8169`). `ethtool eth0` should *fail* with the driver removed! – Alexios Jun 06 '12 at 12:04
  • @AnishaKaul jftr to determine the driver for an ethernet device you can use `ethtool -i $DEVICE` which will return, besides other things, the used driver – Ulrich Dangel Jun 06 '12 at 14:09
  • Alexio - I've again edited the first post, removed the previous info and added new one. It is 8169 that is getting removed , not 8139. Now, with that output is it clear that finally "Linux driver for the real-time network device" has actually been removed? Besides @UlrichDangel Is `ethtool -i $DEVICE` to be used as it is? – Aquarius_Girl Jun 07 '12 at 07:03
  • 1
    @AnishaKaul yes `ethtool -i $DEVICE` should return the driver for the specific device, e.g. `ethtool -i eth0` returns for me (besides other information) `driver: e1000e` – Ulrich Dangel Jun 07 '12 at 07:08
  • @UlrichDangel This worked now, I ran `ethtool -i eth0` and it returned me `r8169`. So, that's the driver's name. See `CONFIG_R8169_VLAN=y` in my .config. What does that represent? – Aquarius_Girl Jun 07 '12 at 07:43
  • @AnishaKaul it enables support for the vlan/802.1Q code in the r8169 driver. For more information about vlans see http://en.wikipedia.org/wiki/IEEE_802.1Q – Ulrich Dangel Jun 07 '12 at 07:47
  • @UlrichDangel Please post your "answer" here: http://unix.stackexchange.com/questions/40199/whats-the-difference-between-config-r8169-and-config-r8169-vlan – Aquarius_Girl Jun 07 '12 at 07:48
  • @UlrichDangel Now, with that output in first post is it clear that Linux driver for the real-time network device has actually been removed? – Aquarius_Girl Jun 07 '12 at 08:06
  • @AnishaKaul yes the driver was removed though this probably wasn't the rt driver, the rt driver is probably named `rt_8169`. To ensure no other driver is loaded check `lsmod` as well as `ifconfig -a` – Ulrich Dangel Jun 07 '12 at 08:11
  • @UlrichDangel Forgive me, I am not getting the point here. I was supposed to remove the rt driver `rt_8169`? So, what was the point in removing the `r8169`? Pardon my ignoarnce. – Aquarius_Girl Jun 07 '12 at 08:16
  • 1
    @AnishaKaul you asked if the driver for the rt network device was removed and i said it wasn't as you removed the normal driver but i also don't know what you want to achieve. Your debugging link just says that you have to remove the normal linux driver in order to be able to load the rt one. – Ulrich Dangel Jun 07 '12 at 08:18
  • @UlrichDangel `Your debugging link just says that you have to remove the normal linux driver in order to be able to load the rt one` Ah, so that's done at least. The title isn't very clear actually. – Aquarius_Girl Jun 07 '12 at 08:22