LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 10-16-2008, 06:06 PM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,241

Rep: Reputation: 196Reputation: 196
eth0: ERROR while getting interface flags: No such device


I reopen that thread because I resolved the problem described below. If you don't want to read the entire thread jump straight to the post ``The solution''. The problem concerns ThinkPad T60 with e1000 Ethernet card.

***

I can't run network on my ThinkPad T60 with Slackware 12.1 and generic kernel 2.6.24.5-smp (all network devices are enabled in BIOS). Here are my attempts to establish the reason of that problem...

# ifconfig eth0 192.168.1.3 broadcast 192.168.2.255 netmask 255.255.255.0

SIOCSIADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIBRDADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device

# ifconfig eth0

eth0: error fetching interface information: Device not found

# ifconfig

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:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2960 (2.8 KiB) TX bytes:2960 (2.8 KiB)

# lspci -v

02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller
Subsystem: Lenovo ThinkPad T60
Flags: fast devsel, IRQ 16
Memory at ee000000 (32-bit, non-prefetchable) [size=128K]
I/O ports at 3000 [size=32]
Capabilities: [c8] Power Management version 2
Capabilities: [d0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
Capabilities: [e0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting <?>
Capabilities: [140] Device Serial Number <mac-address>
Kernel modules: e1000

<remark: there is no ``Kernel driver in use: e1000'' message above>

# cat /etc/udev/rules.d/70-persistent-net.rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<mac-address>", ATTR{type}=="1", NAME="eth0"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<mac-address>", ATTR{type}=="1", NAME="wlan0"

# lsmod | grep e1000

e1000 121536 0

# dmesg | grep eth

<null output>

Then I tried to create eth0 file in /etc/modprobe.d/ directory...

# echo "alias eth0 e1000" > /etc/modprobe.d/eth0

# reboot

After two last operations network started to work and ifconfig as well as dmesg showed eth0 device.

# dmesg | grep eth

e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_UP): eth0: link is not ready

But it was't the end of the problem...

After a few consecutive reboots ifconfig and dmesg stopped to recognize eth0. Now everything looks like at the beginning: ifconfig shows sometimes only lo interface and sometimes also wlan0 and wmaster0 (in ``all'' mode it shows also irda0). I don't understand why it works in that strange manner and why eth0 disappeared again.

When I tried to remove the content of 70-persistent-net.rules file from /etc/udev/rules.d/ directory after reboot udev restored only wlan0 rule so I restored eth0 rule manually.


***

I can't figure out what should I do in such situation to access network through eth0 interface. Any help will be welcomed.

Have a nice day...

Last edited by w1k0; 10-21-2008 at 09:31 AM.
 
Old 10-16-2008, 09:04 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
Did you try netconfig ?
(let's start with simple possible fix )
 
Old 10-16-2008, 09:20 PM   #3
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
also 'ifconfig eth0 up' If the interface is down because there was no connection on start up then this will bring it up.
 
Old 10-16-2008, 09:50 PM   #4
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,298

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
Just a note. `ifconfig -a` will show ALL devices found, regardless of whether it is active (as long as the correct module is loaded, of course).
 
Old 10-17-2008, 02:53 PM   #5
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,241

Original Poster
Rep: Reputation: 196Reputation: 196
Yesterday my new machine recognized eth0 interface at the beginning and after some configuration of the newly installed system but after a few reboots it stopped to recognize it. I rebooted that machine yesterday for a few further times but it couldn't still recognize that interface.

Today I turned my machine on and it recognized eth0 interface without problem. I simply can't understand it because as I remember I didn't change the configuration after I noticed the problem with eth0 interface.

To take the advantage of the successful start of the system I done a lot of tests and then rebooted my machine. It worked properly after reboot. I rebooted it then for a few consecutive times. It still recognizes eth0 interface. It looks like a miracle or I did something yesterday and now I can't remember what I did.

***

keefaz: yesterday I configured network manually -- today I used netconfig but it was after the system started to recognize eth0 interface.

C-Sniper: I tried ifconfig eth0 down and ifconfig eth0 up today but it was after the system started to recognize eth0 interface.

T3slider: yesterday ifconfig -a didn't show eth0 interface -- today it shows it.

***

I close that thread assuming the problem was solved by itself. If it will return in the future again I will open that thread once again.

Last edited by w1k0; 10-17-2008 at 03:04 PM.
 
Old 10-17-2008, 06:52 PM   #6
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,298

Rep: Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722Reputation: 722
If it happens again, check the `lsmod` output and compare it to the `lsmod` output when it is working. It is possible that a module is conflicting with the correct module, and is sometimes getting loaded first -- and others second/not at all. If that is the problem, then you could blacklist the offending module in /etc/modprobe.d/blacklist.
 
Old 10-17-2008, 11:18 PM   #7
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,241

Original Poster
Rep: Reputation: 196Reputation: 196
Thank you T3slider for the valuable hint.

I just removed eth0 file containing ``alias eth0 e1000'' phrase from /etc/modprobe.d/ directory and rebooted my machine. It recognized eth0 interface without any problem. That alias has nothing to the problem I described in the first post. Yesterday it was getting late and I was slightly tired. I suspect I changed something in the system configuration and I don't remember it. Or alternatively you're right and this is the problem with some suspicious module. I'll observe the behavior of my new machine.

Last edited by w1k0; 10-17-2008 at 11:35 PM.
 
Old 10-18-2008, 02:19 PM   #8
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,241

Original Poster
Rep: Reputation: 196Reputation: 196
The solution

Preface

I noticed the problem with ThinkPad T60 with e1000 Ethernet card and Slackware 12.1 with generic kernel 2.6.24.5-smp. Sometimes the system recognized eth0 interface but sometimes it displayed errors as follows...

# ifconfig eth0 192.168.1.3 broadcast 192.168.2.255 netmask 255.255.255.0

SIOCSIADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIBRDADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device

# ifconfig eth0

eth0: error fetching interface information: Device not found

# ifconfig

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:56 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2960 (2.8 KiB) TX bytes:2960 (2.8 KiB)

That problem appeared after some reboots of the machine. In the other words sometimes it occurred and sometimes it didn't occur...


Investigations

I waited until the problem will appear and then started to check various system information. I found something interesting in dmesg...

# dmesg | grep e1000

e1000: 0000:02:00.0: e1000_probe: The EEPROM Checksum Is Not Valid
ACPI: PCI interrupt for device 0000:02:00.0 disabled
e1000: probe of 0000:02:00.0 failed with error -5

I googled for ``The EEPROM Checksum Is Not Valid'' phrase and I found http://www.thinkwiki.org/wiki/Proble...m_Is_Not_Valid with an interesting information:

Quote:
On certain ThinkPads, e1000 driver for Intel Gigabit controller fails to load with the following error message in /var/log/messages:

e1000: 0000:02:00.0: e1000_probe: The EEPROM Checksum Is Not Valid
e1000: probe of 0000:02:00.0 failed with error -5

The problem is caused by a power savings feature obstructing normal operation, and causes the first bytes read from the EEPROM to be corrupt, resulting in a random or invalid MAC address (but no other data corruption). The EEPROM checksum test traps the problem and the driver refuses to load.
On that page there are enumerated four possible solutions of that problem. I checked three of them...


Unsuccessful attempt (1)

In ``From Lenovo'' section there is mentioned Lenovo vidalia-eeprom-mod-script available on http://www-307.ibm.com/pc/support/si...cid=MIGR-67166. Maybe it's harmless but as yet I didn't dare to run it.

I just tried one safe command from that script...

When eth0 interface don't work that command gives the information about an error.

# ethtool -e eth0

Cannot get driver information: No such device

When eth0 interface works that command gives more relevant information.

# ethtool -e eth0

Offset Values
------ ------
0x0000 xx xx xx xx xx xx 30 0b b2 ff 51 00 ff ff ff ff
0x0010 53 00 03 01 6b 02 01 20 aa 17 9a 10 86 80 df 80
0x0020 00 00 00 20 54 7e 00 00 14 00 da 00 04 00 00 27
0x0030 c9 6c 50 31 3e 07 0b 04 8b 29 00 00 00 f0 02 0f
0x0040 08 10 00 00 04 0f ff 7f 01 4d ff ff ff ff ff ff
0x0050 14 00 1d 00 14 00 1d 00 af aa 1e 00 00 00 1d 00
0x0060 00 01 00 40 32 12 07 40 ff ff ff ff ff ff ff ff
0x0070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff 8f a2

(I commented MAC address of my Ethernet card using ``xx''.)

Just for your convenience I attach that script...

vidalia-eeprom-mod-script:
Code:
#!/bin/bash  

if [ -z "$1" ]; then
        echo "Usage: $0 \<interface\>"
        echo "       i.e. $0 eth0"
        exit 1
fi

if ! ifconfig $1 > /dev/null; then
        exit 1
fi

dev=$(ethtool -e $1 | grep 0x0010 | awk '{print "0x"$13$12$15$14}')

case $dev in
        0x109a8086)
                echo "$1: is a \"82573L Gigabit Ethernet Controller\""
                ;;
        *)
                echo "No appropriate hardware found for this fixup"
                exit 1
                ;;
esac

echo "This fixup is applicable to your hardware"

var=$(ethtool -e $1 | grep 0x0020 | awk '{print $17}')
new1=$(echo ${var:0:1} | tr '2367abef' '014589cd')
new2=$(echo ${var:1})
new=$new1$new2
if [ ${var:0:1}${var:1} == $new ]; then
        echo "Your eeprom is up to date, no changes were made"
        exit 2
fi

echo "executing command: ethtool -E $1 magic $dev offset 0x2f value 0x$new"
ethtool -E $1 magic $dev offset 0x2f value 0x$new
echo "Please reboot for the change to take effect."
After that weekend I will phone to Lenovo service and ask them if that script is secure enough to run it on my machine.


Unsuccessful attempt (2)

First I tried ``Via module parameter'' method...

# echo "e1000 eeprom_bad_csum_allow=1" > /etc/modprobe.d/eth0

# modprobe e1000

FATAL: Error inserting e1000 (/lib/modules/2.6.24.5-smp/kernel/drivers/net/e1000/e1000.ko): Unknown symbol in module, or unknown parameter (see dmesg)

# dmesg | grep e1000

e1000: Unknown parameter `eeprom_bad_csum_allow'

# rm /etc/modprobe.d/eth0


Successful attempt

Then I tried ``Use e1000e -- Kernel Patch'' method...

On the mentioned page there are two links to Auke Kok's patches to some kernel modules: http://kerneltrap.org/mailarchive/li...7/10/31/374579 and http://kerneltrap.org/mailarchive/li...7/10/31/374573.

I stored these patches in files patch1 and patch2. Because the paths to the kernel modules in those two patches were invalid I made two small corrections:

# cat patch1 | sed 's/[ab]\/drivers\/net/drivers\/net/g' > patch_e1000-e1000e

# cat patch2 | sed 's/[ab]\/drivers\/net/drivers\/net/g' > patch_e1000e

Just for your convenience I attach here both modified patches...

patch_e1000-e1000e:
Code:
diff --git drivers/net/e1000/e1000_main.c drivers/net/e1000/e1000_main.c
index 72deff0..d1b88e4 100644
--- drivers/net/e1000/e1000_main.c
+++ drivers/net/e1000/e1000_main.c
@@ -73,14 +73,6 @@ static struct pci_device_id e1000_pci_tbl[] = {
 	INTEL_E1000_ETHERNET_DEVICE(0x1026),
 	INTEL_E1000_ETHERNET_DEVICE(0x1027),
 	INTEL_E1000_ETHERNET_DEVICE(0x1028),
-	INTEL_E1000_ETHERNET_DEVICE(0x1049),
-	INTEL_E1000_ETHERNET_DEVICE(0x104A),
-	INTEL_E1000_ETHERNET_DEVICE(0x104B),
-	INTEL_E1000_ETHERNET_DEVICE(0x104C),
-	INTEL_E1000_ETHERNET_DEVICE(0x104D),
-	INTEL_E1000_ETHERNET_DEVICE(0x105E),
-	INTEL_E1000_ETHERNET_DEVICE(0x105F),
-	INTEL_E1000_ETHERNET_DEVICE(0x1060),
 	INTEL_E1000_ETHERNET_DEVICE(0x1075),
 	INTEL_E1000_ETHERNET_DEVICE(0x1076),
 	INTEL_E1000_ETHERNET_DEVICE(0x1077),
@@ -89,28 +81,9 @@ static struct pci_device_id e1000_pci_tbl[] = {
 	INTEL_E1000_ETHERNET_DEVICE(0x107A),
 	INTEL_E1000_ETHERNET_DEVICE(0x107B),
 	INTEL_E1000_ETHERNET_DEVICE(0x107C),
-	INTEL_E1000_ETHERNET_DEVICE(0x107D),
-	INTEL_E1000_ETHERNET_DEVICE(0x107E),
-	INTEL_E1000_ETHERNET_DEVICE(0x107F),
 	INTEL_E1000_ETHERNET_DEVICE(0x108A),
-	INTEL_E1000_ETHERNET_DEVICE(0x108B),
-	INTEL_E1000_ETHERNET_DEVICE(0x108C),
-	INTEL_E1000_ETHERNET_DEVICE(0x1096),
-	INTEL_E1000_ETHERNET_DEVICE(0x1098),
 	INTEL_E1000_ETHERNET_DEVICE(0x1099),
-	INTEL_E1000_ETHERNET_DEVICE(0x109A),
-	INTEL_E1000_ETHERNET_DEVICE(0x10A4),
-	INTEL_E1000_ETHERNET_DEVICE(0x10A5),
 	INTEL_E1000_ETHERNET_DEVICE(0x10B5),
-	INTEL_E1000_ETHERNET_DEVICE(0x10B9),
-	INTEL_E1000_ETHERNET_DEVICE(0x10BA),
-	INTEL_E1000_ETHERNET_DEVICE(0x10BB),
-	INTEL_E1000_ETHERNET_DEVICE(0x10BC),
-	INTEL_E1000_ETHERNET_DEVICE(0x10C4),
-	INTEL_E1000_ETHERNET_DEVICE(0x10C5),
-	INTEL_E1000_ETHERNET_DEVICE(0x10D5),
-	INTEL_E1000_ETHERNET_DEVICE(0x10D9),
-	INTEL_E1000_ETHERNET_DEVICE(0x10DA),
 	/* required last entry */
 	{0,}
 };
diff --git drivers/net/e1000e/82571.c drivers/net/e1000e/82571.c
index 45f5ee2..3beace5 100644
--- drivers/net/e1000e/82571.c
+++ drivers/net/e1000e/82571.c
@@ -194,6 +194,8 @@ static s32 e1000_init_mac_params_82571(struct e1000_adapter *adapter)
 		break;
 	case E1000_DEV_ID_82571EB_SERDES:
 	case E1000_DEV_ID_82572EI_SERDES:
+	case E1000_DEV_ID_82571EB_SERDES_DUAL:
+	case E1000_DEV_ID_82571EB_SERDES_QUAD:
 		hw->media_type = e1000_media_type_internal_serdes;
 		break;
 	default:
@@ -260,6 +262,7 @@ static s32 e1000_get_invariants_82571(struct e1000_adapter *adapter)
 	case E1000_DEV_ID_82571EB_QUAD_COPPER:
 	case E1000_DEV_ID_82571EB_QUAD_FIBER:
 	case E1000_DEV_ID_82571EB_QUAD_COPPER_LP:
+	case E1000_DEV_ID_82571PT_QUAD_COPPER:
 		adapter->flags |= FLAG_IS_QUAD_PORT;
 		/* mark the first port */
 		if (global_quad_port_a == 0)
@@ -285,6 +288,9 @@ static s32 e1000_get_invariants_82571(struct e1000_adapter *adapter)
 		if (adapter->flags & FLAG_IS_QUAD_PORT &&
 		    (!(adapter->flags & FLAG_IS_QUAD_PORT_A)))
 			adapter->flags &= ~FLAG_HAS_WOL;
+		/* Does not support WoL on any port */
+		if (pdev->device == E1000_DEV_ID_82571EB_SERDES_QUAD)
+			adapter->flags &= ~FLAG_HAS_WOL;
 		break;
 
 	case e1000_82573:
diff --git drivers/net/e1000e/hw.h drivers/net/e1000e/hw.h
index 1bb2052..71f93ce 100644
--- drivers/net/e1000e/hw.h
+++ drivers/net/e1000e/hw.h
@@ -303,8 +303,11 @@ enum e1e_registers {
 #define E1000_DEV_ID_82571EB_FIBER		0x105F
 #define E1000_DEV_ID_82571EB_SERDES		0x1060
 #define E1000_DEV_ID_82571EB_QUAD_COPPER	0x10A4
+#define E1000_DEV_ID_82571PT_QUAD_COPPER	0x10D5
 #define E1000_DEV_ID_82571EB_QUAD_FIBER		0x10A5
 #define E1000_DEV_ID_82571EB_QUAD_COPPER_LP	0x10BC
+#define E1000_DEV_ID_82571EB_SERDES_DUAL	0x10D9
+#define E1000_DEV_ID_82571EB_SERDES_QUAD	0x10DA
 #define E1000_DEV_ID_82572EI_COPPER		0x107D
 #define E1000_DEV_ID_82572EI_FIBER		0x107E
 #define E1000_DEV_ID_82572EI_SERDES		0x107F
diff --git drivers/net/e1000e/netdev.c drivers/net/e1000e/netdev.c
index ec427e2..a271112 100644
--- drivers/net/e1000e/netdev.c
+++ drivers/net/e1000e/netdev.c
@@ -4088,16 +4088,15 @@ static struct pci_error_handlers e1000_err_handler = {
 };
 
 static struct pci_device_id e1000_pci_tbl[] = {
-	/*
-	 * Support for 82571/2/3, es2lan and ich8 will be phased in
-	 * stepwise.
-
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_COPPER), board_82571 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_FIBER), board_82571 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER), board_82571 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_COPPER_LP), board_82571 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_QUAD_FIBER), board_82571 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES), board_82571 },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES_DUAL), board_82571 },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571EB_SERDES_QUAD), board_82571 },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82571PT_QUAD_COPPER), board_82571 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI), board_82572 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI_COPPER), board_82572 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82572EI_FIBER), board_82572 },
@@ -4120,8 +4119,6 @@ static struct pci_device_id e1000_pci_tbl[] = {
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_C), board_ich8lan },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_M), board_ich8lan },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_M_AMT), board_ich8lan },
-	*/
-
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE), board_ich9lan },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_G), board_ich9lan },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_GT), board_ich9lan },
-
patch_e1000e:
Code:
diff --git drivers/net/e1000e/82571.c drivers/net/e1000e/82571.c
index b6401ab..45f5ee2 100644
--- drivers/net/e1000e/82571.c
+++ drivers/net/e1000e/82571.c
@@ -1343,7 +1343,6 @@ struct e1000_info e1000_82573_info = {
 				  | FLAG_HAS_STATS_ICR_ICT
 				  | FLAG_HAS_SMART_POWER_DOWN
 				  | FLAG_HAS_AMT
-				  | FLAG_HAS_ASPM
 				  | FLAG_HAS_ERT
 				  | FLAG_HAS_SWSM_ON_LOAD,
 	.pba			= 20,
diff --git drivers/net/e1000e/e1000.h drivers/net/e1000e/e1000.h
index 473f78d..8b88c22 100644
--- drivers/net/e1000e/e1000.h
+++ drivers/net/e1000e/e1000.h
@@ -288,7 +288,6 @@ struct e1000_info {
 #define FLAG_HAS_CTRLEXT_ON_LOAD          (1 << 5)
 #define FLAG_HAS_SWSM_ON_LOAD             (1 << 6)
 #define FLAG_HAS_JUMBO_FRAMES             (1 << 7)
-#define FLAG_HAS_ASPM                     (1 << 8)
 #define FLAG_HAS_STATS_ICR_ICT            (1 << 9)
 #define FLAG_HAS_STATS_PTC_PRC            (1 << 10)
 #define FLAG_HAS_SMART_POWER_DOWN         (1 << 11)
diff --git drivers/net/e1000e/netdev.c drivers/net/e1000e/netdev.c
index 4fd2e23..ec427e2 100644
--- drivers/net/e1000e/netdev.c
+++ drivers/net/e1000e/netdev.c
@@ -3511,6 +3511,33 @@ static int e1000_suspend(struct pci_dev *pdev, pm_message_t state)
 	return 0;
 }
 
+static void e1000e_disable_l1aspm(struct pci_dev *pdev)
+{
+	int pos;
+	u32 cap;
+	u16 val;
+
+	/*
+	 * 82573 workaround - disable L1 ASPM on mobile chipsets
+	 *
+	 * L1 ASPM on various mobile (ich7) chipsets do not behave properly
+	 * resulting in lost data or garbage information on the pci-e link
+	 * level. This could result in (false) bad EEPROM checksum errors,
+	 * long ping times (up to 2s) or even a system freeze/hang.
+	 *
+	 * Unfortunately this feature saves about 1W power consumption when
+	 * active.
+	 */
+	pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
+	pci_read_config_dword(pdev, pos + PCI_EXP_LNKCAP, &cap);
+	pci_read_config_word(pdev, pos + PCI_EXP_LNKCTL, &val);
+	if (val & 0x2) {
+		dev_warn(&pdev->dev, "Disabling L1 ASPM\n");
+		val &= ~0x2;
+		pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, val);
+	}
+}
+
 #ifdef CONFIG_PM
 static int e1000_resume(struct pci_dev *pdev)
 {
@@ -3521,6 +3548,7 @@ static int e1000_resume(struct pci_dev *pdev)
 
 	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
+	e1000e_disable_l1aspm(pdev);
 	err = pci_enable_device(pdev);
 	if (err) {
 		dev_err(&pdev->dev,
@@ -3621,6 +3649,7 @@ static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev)
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 	struct e1000_hw *hw = &adapter->hw;
 
+	e1000e_disable_l1aspm(pdev);
 	if (pci_enable_device(pdev)) {
 		dev_err(&pdev->dev,
 			"Cannot re-enable PCI device after reset.\n");
@@ -3722,6 +3751,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
 	u16 eeprom_data = 0;
 	u16 eeprom_apme_mask = E1000_EEPROM_APME;
 
+	e1000e_disable_l1aspm(pdev);
 	err = pci_enable_device(pdev);
 	if (err)
 		return err;
diff --git drivers/net/e1000e/param.c drivers/net/e1000e/param.c
index 3327892..df266c3 100644
--- drivers/net/e1000e/param.c
+++ drivers/net/e1000e/param.c
@@ -262,13 +262,6 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
 					 .max = MAX_RXDELAY } }
 		};
 
-		/* modify min and default if 82573 for slow ping w/a,
-		 * a value greater than 8 needs to be set for RDTR */
-		if (adapter->flags & FLAG_HAS_ASPM) {
-			opt.def = 32;
-			opt.arg.r.min = 8;
-		}
-
 		if (num_RxIntDelay > bd) {
 			adapter->rx_int_delay = RxIntDelay[bd];
 			e1000_validate_option(&adapter->rx_int_delay, &opt,
-
Then I applied those new patches to the kernel...

# cp patch* /usr/src/linux

# cd /usr/src/linux

# patch -p0 < patch_e1000-e1000e

patching file drivers/net/e1000/e1000_main.c
patching file drivers/net/e1000e/82571.c
patching file drivers/net/e1000e/hw.h
patching file drivers/net/e1000e/netdev.c
Hunk #1 succeeded at 4056 (offset -32 lines).

# patch -p0 < patch_e1000e

patching file drivers/net/e1000e/82571.c
Hunk #1 succeeded at 1345 (offset 2 lines).
patching file drivers/net/e1000e/e1000.h
patching file drivers/net/e1000e/netdev.c
Hunk #1 succeeded at 3509 (offset -2 lines).
Hunk #3 succeeded at 3647 (offset -2 lines).
patching file drivers/net/e1000e/param.c

At the end I compiled the kernel and installed it together with the modules. Remember to compile the file system you use in the kernel or to prepare the appropriate initrd and LILO configuration before reboot.

After reboot of the machine eth0 interface started to work properly. I tried to reboot the machine for a few consecutive times. As yet everything works well.


Conclusion

I hope both these patches will be integrated with the future versions of 2.6.x kernel. I wouldn't like to see the future kernel inconsistent with those patches nor the future Slackware version with such kernel which I couldn't use on my ThinkPad T60 with e1000 Ethernet card.

Have a nice day...

Last edited by w1k0; 10-18-2008 at 03:23 PM.
 
Old 10-18-2008, 08:34 PM   #9
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,241

Original Poster
Rep: Reputation: 196Reputation: 196
I considered the question of vidalia-eeprom-mod-script mentioned above and I stated that guys from Lenovo surely know what they do. Moreover that script changes only one byte in Ethernet card EEPROM. I stated that if something will go wrong I will restore that byte using analogous command.

I connected my new machine to an old one using Ethernet cable and I put the battery in its compartment on my new machine. I turned my new machine on. I ran vidalia-eeprom-mod-script and I rebooted the machine using original generic kernel.

Everything went well and my machine recognized eth0 interface. I checked Ethernet card with ethtool -e eth0 command. The script changed the byte with the offset 0x2f from 27 to 07 as well as the last byte. The latter is probably some checksum.

I rebooted my machine for a few consecutive times using generic kernel. It works well. I don't need my patched custom kernel no longer. I can use original generic one.

Last edited by w1k0; 10-21-2008 at 09:29 AM.
 
  


Reply

Tags
eth0, interface


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
Debian - eth0 error: no such device on ifup eth0 svancouw Linux - Hardware 4 09-07-2011 05:32 PM
eth0: ERROR while getting interface flags: No such device ncsuapex Linux - Networking 19 03-17-2008 12:47 PM
eth0: ERROR while getting interface flags: No such device - using Kanotix adodo Linux - Networking 4 04-11-2006 05:04 AM
915gavl--eth0: unknown interface: No such device dgermann Linux - Networking 1 06-25-2005 05:05 PM
Mandrake no such interface, device etc eth0 nforce DijitalX Linux - Networking 3 11-16-2003 11:25 PM


All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
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