LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 09-25-2012, 10:45 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
forcing e1000e driver on new device (old kernel... old everything)


Hi!

I've got this box that (for whatever reason, can't really tell why) got a ubuntu 10.04 installed on it. The problem is that it's got an intel ethernet card that's not got registered to use e1000e driver (and I check in my updated kubuntu box and it uses e1000e by modules.pcimap).

The card has PCI id 8086:1503.

Now, we hacked modules.pcimap and added a line like the one I have in my computer, then modprobed e1000e, the module got loaded but no new device.

Then rebooted, just in case, and the module didn't get loaded... so I bet there's something missing.

So, how can I force e1000e to use this device? I checked with modinfo and I don't see a parameter to tell e1000e which PCI id to use. Thanks in advance.
 
Old 09-25-2012, 11:17 AM   #2
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,169

Rep: Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013
Yes e1000e is the driver for this card and it *should* be automatically loaded.

Maybe it's conflicting with another one, loaded first.

To find out, please send output of following command:
Code:
lspci -k | grep -A3 net
And attach to your next post the file lsmod.txt that you will write this way:
Code:
lsmod | sort > lsmod.txt
PS And please give us the output of
Code:
uname -r
as well so we know how old is your kernel. That could help determine how the modules are supposed to be selected then loaded.

Last edited by Didier Spaier; 09-25-2012 at 11:28 AM.
 
Old 09-25-2012, 11:30 AM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
It's an old kernel.... but I don't have the computer in front of me. Just asked the guys in front of the computer to do it... hold on a second. Just keep in mind that the device is not (was not, anyways) in modules.pcimap.... So there has to be a way to force the module to try to work on the device even if it thinks it shouldn't.
 
Old 09-25-2012, 12:05 PM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
First command:
Code:
00:19.0 Ethernet controller: Intel Corporation Device 1503 (rev 05)
	Kernel modules: e1000e
00:1a.0 USB Controller: Intel Corporation Cougar Point USB Enhanced Host Controller #2 (rev 05)
	Kernel driver in use: ehci_hcd
Second
Code:
ahci                   32232  1 
bitblit                 4707  1 fbcon
fbcon                  35102  71 
font                    7557  1 fbcon
hid                    67032  1 usbhid
lp                      7028  0 
Module                  Size  Used by
parport                32635  3 ppdev,parport_pc,lp
parport_pc             26250  1 
ppdev                   5259  0 
psmouse                63245  0 
serio_raw               3978  0 
shpchp                 28884  0 
snd                    54148  6 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
snd_hda_codec          74201  2 snd_hda_codec_realtek,snd_hda_intel
snd_hda_codec_realtek   203312  0 
snd_hda_intel          22037  0 
snd_hwdep               5412  1 snd_hda_codec
snd_page_alloc          7172  2 snd_hda_intel,snd_pcm
snd_pcm                70886  2 snd_hda_intel,snd_hda_codec
snd_timer              19098  1 snd_pcm
softcursor              1189  1 bitblit
soundcore               6620  1 snd
tileblit                2031  1 fbcon
usbhid                 36174  0 
usb_storage            39457  0 
vga16fb                11385  1 
vgastate                8961  1 vga16fb
uname:
Code:
2.6.32-24-generic-pae
I guess in the first command, the module that shows up is because of the line we hacked in pcimap.
 
Old 09-25-2012, 12:41 PM   #5
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,169

Rep: Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013
What puzzles me is ther be no driver in use. My Ethernet card needs the same driver and this is what I get as output of the first command:
Code:
00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)
	Subsystem: Lenovo ThinkPad T61
	Kernel driver in use: e1000e
	Kernel modules: e1000e
So:
(1) Does e1000e shows in lsmod after you issue the"modprobe e1000e" command?
(2) Type as root "tail -f /var/log/messages in a terminal", then:
(a) unplug the Ethernet wire then
(b) plug it in
What do you see in the log?
(3) same as (2) but type as root
(a) "ifconfig eth0 up" then
(b) "ifconfig eth0 down"

Anyway, 2.6.32 is not that old and your card is supposed to be supported.
 
Old 09-25-2012, 01:29 PM   #6
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I just checked in vanilla 2.6.32 and it's not supported from what I can see.

In 3.6-rc5
http://git.kernel.org/?p=linux/kerne...1a24195dd08217 Line 412:
Code:
#define E1000_DEV_ID_PCH2_LV_V                  0x1503
Not so in 2.6.32. Take a look: http://git.kernel.org/?p=linux/kerne...d34d935308c8d7
 
Old 09-25-2012, 02:16 PM   #7
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,169

Rep: Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013
That's right.

So I suggest you simply upgrade your e1000e driver to the most recent version that you will find here.

In the tarball, named e100e-2.1.4.tar.gz you will find a README including instructions to compile and install it. Of course your card is supported in it, I just checked

Last edited by Didier Spaier; 09-25-2012 at 02:18 PM.
 
1 members found this post helpful.
Old 09-25-2012, 03:08 PM   #8
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
Dude, you rock. :-)
 
Old 09-25-2012, 03:20 PM   #9
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
The guys in maracaibo are checking if it works with the ubuntu server (I just tested compiling it on my updated laptop).

Now, let's suppose it works.... I dare making the same question: Is it possible to force a module to use a device? Perhaps with something generic like

Code:
modprobe e1000e pciid=8086:1503
Thanks in advance.
 
Old 09-25-2012, 04:24 PM   #10
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,169

Rep: Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013Reputation: 1013
Your command won't bind the kernel module to the device. To do that "modprobe e1000e" is sufficient, provided the device be not yet claimed by another driver.

But don't bother to do manually what udev is supposed to do automatically for you.

If I understand correctly:
(1) After installing a module, run as root the command "modprobe -a". This will update the modules dependencies (needed by modprobe to work properly) and in addition update the file /lib/modules<kernel version>/modules.alias. To do that the command "modinfo <kernel module>" is automatically run for all installed modules and the lines beginning with "alias:" of the command's output are written in the aforementioned file, followed by the module's name.
(2) an udev rule like this one:
Code:
ACTION=="add", SUBSYSTEM=="pci", MODALIAS=="*", RUN+="/sbin/modprobe $modalias"
is usually triggered by a "udevadm trigger <options>" command, included in a startup script, which request device events from the kernel and apply the rule to theses events.

In our example the "modinfo e1000e" command's output includes, among others, following line:
Code:
alias:          pci:v00008086d00001503sv*sd*bc*sc*i*
which says "this is an alias for pci id 8086:1503".
So after running "depmod -a" we will see in /lib/modules<kernel version>/modules.alias following line:
Code:
alias pci:v00008086d00001503sv*sd*bc*sc*i* e1000e
When the "udevadm trigger <options>" command will be run at startup, the kernel will say "Eh, I've found the pci device 8086:1503", then the udev rule will be applied, which after reading the relevant line of modules.alias, will trigger the "/sbin/modprobe e1000e" command for you.

Of course, all that process takes much less time to be executed than it took me to write it down

To know more, see here.

Last edited by Didier Spaier; 09-25-2012 at 04:37 PM.
 
Old 09-25-2012, 04:38 PM   #11
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
Pretty insightful.
 
  


Reply

Tags
e1000e, linux, mdules.pcimap, pci, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Forcing a specific driver for a device, through udev indienick Linux - Hardware 2 10-06-2010 11:46 AM
Problems with Intel Gigabit Adapter/e1000e Driver rjlohman Linux - Hardware 6 04-10-2010 11:45 PM
Ethernet e1000e(on PCI express) driver - with kernel 2.2.12, please help... vico3000 Programming 1 11-22-2009 08:02 AM
e1000e driver does not work after gentoo installation. LrH Linux - Newbie 2 07-05-2009 10:46 AM
CentOS 5.2 Linux Kernel 2.6.18-92.1.10.el5 - Cannot Load e1000e driver jreige Linux - Hardware 1 09-18-2008 12:57 PM


All times are GMT -5. The time now is 01:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration