You are not logged in.

#1 2020-04-02 15:39:55

zutruth
Member
Registered: 2017-10-08
Posts: 13

Intel ethernet device on a Thinkpad X200 not recognized

On a Thinkpad X200 running an up-to-date Arch Linux, my ethernet device is not recognized by ‘ip link’. It only finds the loopback and a wireless device.

 $ ip link
1: lo: …
2: wls1: …

I followed https://wiki.archlinux.org/index.php/Ne … n/Ethernet to troubleshoot the problem, but didn’t progress far.

The kernel recognizes the ethernet controller:

 $ lspci -v | grep -i ethernet -A7
00:19.0 Ethernet controller: Intel Corporation 82567LM Gigabit Network Connection (rev 03)
    …
    Kernel modules: e1000e

However, I noticed that the output of ‘lspci’ misses a “Kernel driver in use: …” line. Does that mean anything? See the full output of ‘lspci -v | grep -i ethernet -A7’: https://pastebin.com/Ym51PPG1

My journal also gives also some lines regarding the corresponding kernel module, but it does in fact never say that the ethernet device has actually been set up.

 $ journalctl -b | grep e1000e
Apr 02 17:04:31 operad kernel: e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
Apr 02 17:04:31 operad kernel: e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
Apr 02 17:04:31 operad kernel: e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode

See the full output of ‘journalctl -b’: https://pastebin.com/0vsTuF2Z

What is going on here? How can I enable my ethernet device?

Last edited by zutruth (2020-04-02 15:40:40)

Offline

#2 2020-04-02 19:37:24

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Intel ethernet device on a Thinkpad X200 not recognized

Can you eliminate hardware failure? X200s are rather old now.

I see that you tried to load the module manually, were there any errors?

# modprobe -v e1000e

EDIT: typo.

Last edited by Head_on_a_Stick (2020-04-02 19:37:56)

Offline

#3 2020-04-03 22:26:03

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

Head_on_a_Stick wrote:

Can you eliminate hardware failure? X200s are rather old now.

Possibly. I could change the system drive later on and see if my very old Debian system sees an ethernet device; I will report back in 12 hours or so.

I see that you tried to load the module manually, were there any errors?

# modprobe -v e1000e

No, loading ‘e1000e’ gives no errors, verbosely or not.

(Sorry for responding so late, I thought I had already replied.)

Last edited by zutruth (2020-04-03 22:26:31)

Offline

#4 2020-04-04 00:01:52

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

Appears to be the same issue in https://bbs.archlinux.org/viewtopic.php?id=246219

Online

#5 2020-04-04 07:40:19

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

zutruth wrote:

I could change the system drive later on and see if my very old Debian system sees an ethernet device; I will report back in 12 hours or so.

The ethernet device is recognized by a live system, ‘ip link’ shows it as ‘enp0s25’ as expected.

Thanks, loqs, for the reference.

Offline

#6 2020-04-04 10:49:07

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

If you add the module parameter debug=16 is any more output produced?

Online

#7 2020-04-04 12:33:17

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

loqs wrote:

If you add the module parameter debug=16 is any more output produced?

No. hmm

Offline

#8 2020-04-04 13:23:20

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 7c5b18d87b49..36bb3d6d0885 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7265,11 +7265,15 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = pci_enable_device_mem(pdev);
 	if (err)
+	{
+		pr_info("pci_enable_device_mem returned err");
 		return err;
+	}
 
 	pci_using_dac = 0;
 	err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
 	if (!err) {
+		pr_info("dma_set_mask_and_coherent returned err");
 		pci_using_dac = 1;
 	} else {
 		err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
@@ -7284,7 +7288,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = pci_request_selected_regions_exclusive(pdev, bars,
 						     e1000e_driver_name);
 	if (err)
+	{
+		pr_info("pci_request_selected_regions_exclusive returned err");
 		goto err_pci_reg;
+	}
 
 	/* AER (Advanced Error Reporting) hooks */
 	pci_enable_pcie_error_reporting(pdev);
@@ -7298,7 +7305,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = -ENOMEM;
 	netdev = alloc_etherdev(sizeof(struct e1000_adapter));
 	if (!netdev)
+	{
+		pr_info("alloc_etherdev failed");
 		goto err_alloc_etherdev;
+	}
 
 	SET_NETDEV_DEV(netdev, &pdev->dev);
 
@@ -7324,7 +7334,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = -EIO;
 	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);
 	if (!adapter->hw.hw_addr)
+	{
+		pr_info("ioremap failed");
 		goto err_ioremap;
+	}
 
 	if ((adapter->flags & FLAG_HAS_FLASH) &&
 	    (pci_resource_flags(pdev, 1) & IORESOURCE_MEM) &&
@@ -7333,7 +7346,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		flash_len = pci_resource_len(pdev, 1);
 		adapter->hw.flash_address = ioremap(flash_start, flash_len);
 		if (!adapter->hw.flash_address)
+		{
+			pr_info("ioremap for flash failed");
 			goto err_flashmap;
+		}
 	}
 
 	/* Set default EEE advertisement */
@@ -7352,12 +7368,16 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	adapter->bd_number = cards_found++;
 
+	pr_info("calling e1000e_check_options");
 	e1000e_check_options(adapter);
 
 	/* setup adapter struct */
 	err = e1000_sw_init(adapter);
 	if (err)
+	{
+		pr_info("e1000_sw_init failed");
 		goto err_sw_init;
+	}
 
 	memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops));
 	memcpy(&hw->nvm.ops, ei->nvm_ops, sizeof(hw->nvm.ops));
@@ -7365,7 +7385,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = ei->get_variants(adapter);
 	if (err)
+	{
+		pr_info("get_variants failed");
 		goto err_hw_init;
+	}
 
 	if ((adapter->flags & FLAG_IS_ICH) &&
 	    (adapter->flags & FLAG_READ_ONLY_NVM) &&
@@ -7444,6 +7467,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		}
 	}
 
+
+	pr_info("calling e1000_eeprom_checks");
 	e1000_eeprom_checks(adapter);
 
 	/* copy the MAC address */
@@ -7543,7 +7568,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	strlcpy(netdev->name, "eth%d", sizeof(netdev->name));
 	err = register_netdev(netdev);
 	if (err)
+	{
+		pr_info("register_netdev failed");
 		goto err_register;
+	}
 
 	/* carrier off reporting is important to ethtool even BEFORE open */
 	netif_carrier_off(netdev);

What about after building the driver with this patch?

Online

#9 2020-04-04 16:17:48

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

loqs wrote:

What about after building the driver with this patch?

Sorry, I need a bit of help here. I have never built a kernel module before. This what I have done based on https://wiki.archlinux.org/index.php/Co … nel_module:

  • Clone the git repository of the linux kernel.

  • Check out the tag korresponding to my kernel version as seen in ‘uname -a’.

  • Try to apply the patch you pasted.

However, the last step gives a ‘corrupt patch at line 112’ error.

$ git clone https://github.com/torvalds/linux && cd linux
$ git checkout v5.5
$ git apply loqs-patch.diff
error: corrupt patch at line 112

Should I do something different?

Update: Sorry – it was a simple newline error! Patch is applied. Will update when done!

Last edited by zutruth (2020-04-04 16:23:03)

Offline

#10 2020-04-04 17:08:16

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

Okay, so now I’ve downloaded the linux git repository, checked to tag ‘v5.5’, applied your patch, loqs, and compiled the kernel module with it. But without forcing an insertion of it, it gives an ‘Exec fomat error’. With a forced insertion, the ethernet device still isn’t recognized.

$ sudo modprobe e1000e
modprobe: ERROR: could not insert 'e1000e': Exec format error
$ sudo modprobe -f e1000e
$ ip link
1: lo: …
2: wls1: …

I didn’t know how to checkout to the exact version ‘5.5.13’ , since ‘git log | grep '5\.5\.13'’ doesn’t find anything and I don’t know how kernel version numbers work in detail. Maybe this is the issue?

Offline

#11 2020-04-04 19:47:57

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

You use 5.5 while arch is using 5.5.13.arch2-1 which 5.5.13 stable plus a few other patches.
You can either try the following which will build e1000e as an out of tree module or you would need to use apply the patch to https://git.archlinux.org/linux.git/log … 5.13-arch2
PKGBUILD

pkgname=e1000e-dkms
_modname=e1000e
pkgver=5.5.13
_tag=v5.5.13
pkgrel=1
pkgdesc=""
license=('GPL2')
arch=('any')
depends=('dkms' 'linux' 'linux-headers')
makedepends=('git')
url=''
source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#tag=${_tag}?signed"
        'dkms.conf.in'
        'test.patch')
sha256sums=('SKIP'
            '96595e678b4f1fe92e0388212706bac1baf76568cb13ebb029a03f8b73217819'
            '87fc6137b3d33a2dd49f7c01dc7a964e9be982f9b2dc48b544db225d7cda620a')
validpgpkeys=(
              '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
             )

prepare() {
  cd linux
  git apply -v ../test.patch 
}

package() {
  install -dm755 "${pkgdir}/usr/src/${_modname}-${pkgver}/"
  install -Dm644 dkms.conf.in "${pkgdir}/usr/src/${_modname}-${pkgver}/"dkms.conf
  sed -e "s/@MODNAME@/$_modname/" \
      -e "s/@PKGVER@/$pkgver/" \
      -i "${pkgdir}/usr/src/${_modname}-${pkgver}/"dkms.conf
  cd linux/drivers/net/ethernet/intel/e1000e
  find . -exec install -Dm644 '{}' "${pkgdir}/usr/src/${_modname}-${pkgver}/"'{}' \;
  sed -i 's/DRV_EXTRAVERSION "-k"/DRV_EXTRAVERSION "-l"/' "${pkgdir}/usr/src/${_modname}-${pkgver}/netdev.c"
}

dkms.conf.in

PACKAGE_NAME="@MODNAME@"
PACKAGE_VERSION="@PKGVER@"
MAKE[0]="make -C /usr/lib/modules/$kernelver/build M=$dkms_tree/@MODNAME@/@PKGVER@/build"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="@MODNAME@"
DEST_MODULE_LOCATION[0]="/updates"
AUTOINSTALL="yes"

test.patch is the patch from my previous post.

Last edited by loqs (2020-04-04 20:04:56)

Online

#12 2020-04-05 09:14:00

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

: / It still didn’t work.

I built a package with the patch as you described, installed it and inserted the new out-of-tree kernel module, but ‘ip link’ still shows no ethernet device. I highly appreciate your efforts in solving this, by the way! Shame the patch didn’t work.

Offline

#13 2020-04-05 11:25:00

nouman8
Member
Registered: 2018-10-04
Posts: 5

Re: Intel ethernet device on a Thinkpad X200 not recognized

just upgraded kernel 5.5.13 to 5.6.2 and my e1000e ethernet is now broken

Last edited by nouman8 (2020-04-05 11:58:59)

Offline

#14 2020-04-05 12:11:41

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

zutruth wrote:

: / It still didn’t work.

The patch adds more diagnostic messages.  It is not intended to fix the issue.  There were no additional entries in dmesg with the patched version?

Online

#15 2020-04-05 17:33:17

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

loqs wrote:

The patch adds more diagnostic messages.  It is not intended to fix the issue.  There were no additional entries in dmesg with the patched version?

No, no new messages.

# insmod /lib/modules/5.5.13-arch2-1/updates/e1000e.ko.xz 
# dmesg | tail -n 2
[122399.358113] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-l
[122399.358116] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.

Offline

#16 2020-04-05 18:22:36

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

Added info message at the top of the probe function.  Replace test.patch and update the checksum rebuild the package and retest please.

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 7c5b18d87b49..40ea074d9025 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7256,6 +7256,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	u16 eeprom_apme_mask = E1000_EEPROM_APME;
 	s32 ret_val = 0;
 
+	pr_info("e1000_probe reached");
+
 	if (ei->flags2 & FLAG2_DISABLE_ASPM_L0S)
 		aspm_disable_flag = PCIE_LINK_STATE_L0S;
 	if (ei->flags2 & FLAG2_DISABLE_ASPM_L1)
@@ -7265,11 +7267,15 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = pci_enable_device_mem(pdev);
 	if (err)
+	{
+		pr_info("pci_enable_device_mem returned err");
 		return err;
+	}
 
 	pci_using_dac = 0;
 	err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
 	if (!err) {
+		pr_info("dma_set_mask_and_coherent returned err");
 		pci_using_dac = 1;
 	} else {
 		err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
@@ -7284,7 +7290,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = pci_request_selected_regions_exclusive(pdev, bars,
 						     e1000e_driver_name);
 	if (err)
+	{
+		pr_info("pci_request_selected_regions_exclusive returned err");
 		goto err_pci_reg;
+	}
 
 	/* AER (Advanced Error Reporting) hooks */
 	pci_enable_pcie_error_reporting(pdev);
@@ -7298,7 +7307,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = -ENOMEM;
 	netdev = alloc_etherdev(sizeof(struct e1000_adapter));
 	if (!netdev)
+	{
+		pr_info("alloc_etherdev failed");
 		goto err_alloc_etherdev;
+	}
 
 	SET_NETDEV_DEV(netdev, &pdev->dev);
 
@@ -7324,7 +7336,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = -EIO;
 	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);
 	if (!adapter->hw.hw_addr)
+	{
+		pr_info("ioremap failed");
 		goto err_ioremap;
+	}
 
 	if ((adapter->flags & FLAG_HAS_FLASH) &&
 	    (pci_resource_flags(pdev, 1) & IORESOURCE_MEM) &&
@@ -7333,7 +7348,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		flash_len = pci_resource_len(pdev, 1);
 		adapter->hw.flash_address = ioremap(flash_start, flash_len);
 		if (!adapter->hw.flash_address)
+		{
+			pr_info("ioremap for flash failed");
 			goto err_flashmap;
+		}
 	}
 
 	/* Set default EEE advertisement */
@@ -7352,12 +7370,16 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	adapter->bd_number = cards_found++;
 
+	pr_info("calling e1000e_check_options");
 	e1000e_check_options(adapter);
 
 	/* setup adapter struct */
 	err = e1000_sw_init(adapter);
 	if (err)
+	{
+		pr_info("e1000_sw_init failed");
 		goto err_sw_init;
+	}
 
 	memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops));
 	memcpy(&hw->nvm.ops, ei->nvm_ops, sizeof(hw->nvm.ops));
@@ -7365,7 +7387,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = ei->get_variants(adapter);
 	if (err)
+	{
+		pr_info("get_variants failed");
 		goto err_hw_init;
+	}
 
 	if ((adapter->flags & FLAG_IS_ICH) &&
 	    (adapter->flags & FLAG_READ_ONLY_NVM) &&
@@ -7444,6 +7469,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		}
 	}
 
+
+	pr_info("calling e1000_eeprom_checks");
 	e1000_eeprom_checks(adapter);
 
 	/* copy the MAC address */
@@ -7543,7 +7570,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	strlcpy(netdev->name, "eth%d", sizeof(netdev->name));
 	err = register_netdev(netdev);
 	if (err)
+	{
+		pr_info("register_netdev failed");
 		goto err_register;
+	}
 
 	/* carrier off reporting is important to ethtool even BEFORE open */
 	netif_carrier_off(netdev);

Online

#17 2020-04-05 20:45:28

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

loqs wrote:

Added info message at the top of the probe function.  Replace test.patch and update the checksum rebuild the package and retest please.

Still nothing.

# dkms status
e1000e, 5.5.13, 5.5.13-arch2-1, x86_64: installed (original_module exists)
…
# modprobe e1000e
# dmesg | tail -n 2
[132386.855870] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-l
[132386.855872] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.

I feel unsure about whether I’m installing and loading the correct module. After updating ‘test.patch’ and its checksum in ‘PKGBUILD’, I built the package, installed it via ‘pacman -U’ and then run the commands above as root. To my understanding, that should do it, but as I said – I feel unsure.

Last edited by zutruth (2020-04-05 20:48:20)

Offline

#18 2020-04-05 21:54:42

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

I think you are installing it correctly.  However it appears the probe function is never reached.  I have added an additional message to e1000_init_module which prints the two messages from the driver on your system so it must be being called.

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 7c5b18d87b49..287352a981db 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7256,6 +7256,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	u16 eeprom_apme_mask = E1000_EEPROM_APME;
 	s32 ret_val = 0;
 
+	pr_info("e1000_probe reached");
+
 	if (ei->flags2 & FLAG2_DISABLE_ASPM_L0S)
 		aspm_disable_flag = PCIE_LINK_STATE_L0S;
 	if (ei->flags2 & FLAG2_DISABLE_ASPM_L1)
@@ -7265,11 +7267,15 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = pci_enable_device_mem(pdev);
 	if (err)
+	{
+		pr_info("pci_enable_device_mem returned err");
 		return err;
+	}
 
 	pci_using_dac = 0;
 	err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
 	if (!err) {
+		pr_info("dma_set_mask_and_coherent returned err");
 		pci_using_dac = 1;
 	} else {
 		err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
@@ -7284,7 +7290,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = pci_request_selected_regions_exclusive(pdev, bars,
 						     e1000e_driver_name);
 	if (err)
+	{
+		pr_info("pci_request_selected_regions_exclusive returned err");
 		goto err_pci_reg;
+	}
 
 	/* AER (Advanced Error Reporting) hooks */
 	pci_enable_pcie_error_reporting(pdev);
@@ -7298,7 +7307,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = -ENOMEM;
 	netdev = alloc_etherdev(sizeof(struct e1000_adapter));
 	if (!netdev)
+	{
+		pr_info("alloc_etherdev failed");
 		goto err_alloc_etherdev;
+	}
 
 	SET_NETDEV_DEV(netdev, &pdev->dev);
 
@@ -7324,7 +7336,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = -EIO;
 	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);
 	if (!adapter->hw.hw_addr)
+	{
+		pr_info("ioremap failed");
 		goto err_ioremap;
+	}
 
 	if ((adapter->flags & FLAG_HAS_FLASH) &&
 	    (pci_resource_flags(pdev, 1) & IORESOURCE_MEM) &&
@@ -7333,7 +7348,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		flash_len = pci_resource_len(pdev, 1);
 		adapter->hw.flash_address = ioremap(flash_start, flash_len);
 		if (!adapter->hw.flash_address)
+		{
+			pr_info("ioremap for flash failed");
 			goto err_flashmap;
+		}
 	}
 
 	/* Set default EEE advertisement */
@@ -7352,12 +7370,16 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	adapter->bd_number = cards_found++;
 
+	pr_info("calling e1000e_check_options");
 	e1000e_check_options(adapter);
 
 	/* setup adapter struct */
 	err = e1000_sw_init(adapter);
 	if (err)
+	{
+		pr_info("e1000_sw_init failed");
 		goto err_sw_init;
+	}
 
 	memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops));
 	memcpy(&hw->nvm.ops, ei->nvm_ops, sizeof(hw->nvm.ops));
@@ -7365,7 +7387,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = ei->get_variants(adapter);
 	if (err)
+	{
+		pr_info("get_variants failed");
 		goto err_hw_init;
+	}
 
 	if ((adapter->flags & FLAG_IS_ICH) &&
 	    (adapter->flags & FLAG_READ_ONLY_NVM) &&
@@ -7444,6 +7469,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		}
 	}
 
+
+	pr_info("calling e1000_eeprom_checks");
 	e1000_eeprom_checks(adapter);
 
 	/* copy the MAC address */
@@ -7543,7 +7570,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	strlcpy(netdev->name, "eth%d", sizeof(netdev->name));
 	err = register_netdev(netdev);
 	if (err)
+	{
+		pr_info("register_netdev failed");
 		goto err_register;
+	}
 
 	/* carrier off reporting is important to ethtool even BEFORE open */
 	netif_carrier_off(netdev);
@@ -7798,11 +7828,14 @@ static struct pci_driver e1000_driver = {
  **/
 static int __init e1000_init_module(void)
 {
+	int result;
 	pr_info("Intel(R) PRO/1000 Network Driver - %s\n",
 		e1000e_driver_version);
 	pr_info("Copyright(c) 1999 - 2015 Intel Corporation.\n");
 
-	return pci_register_driver(&e1000_driver);
+	result = pci_register_driver(&e1000_driver);
+	pr_info("pci_register_driver returned %i.\n",result);
+	return result;
 }
 module_init(e1000_init_module);
 

Edit:
Also the output of lscpi -nnk for the device.

Last edited by loqs (2020-04-05 21:58:58)

Online

#19 2020-04-06 01:20:22

zutruth
Member
Registered: 2017-10-08
Posts: 13

Re: Intel ethernet device on a Thinkpad X200 not recognized

With the newest patch:

# modprobe e1000e
# dmesg | tail -n 2
[149466.689635] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-l
[149466.689638] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.

Still no new messages.

# lspci -nnk | grep -i ethernet -A 2
00:19.0 Ethernet controller [0200]: Intel Corporation Device [8086:baad] (rev 03)
	Subsystem: Lenovo Device [17aa:20ee]
00:1a.0 …

Only these two lines. No ‘kernel module’ line anymore (but ‘lsmod | grep e1000e’ does list it).

Offline

#20 2020-04-06 02:11:46

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

I can not explain why a new message is not produced.  The PID is also unexpected,  it does not match https://github.com/torvalds/linux/blob/ … e/hw.h#L35 or any ID in that file.

Online

#21 2020-04-06 05:35:36

nouman8
Member
Registered: 2018-10-04
Posts: 5

Re: Intel ethernet device on a Thinkpad X200 not recognized

dmesg | grep e1000e
[   11.238469] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[   11.238470] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[   11.238643] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[   12.269594] e1000e: probe of 0000:00:19.0 failed with error -3

lspci -nnk | grep -i ethernet -A 2
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:1502] (rev 04)
DeviceName:  Onboard LAN
Subsystem: Dell 82579LM Gigabit Network Connection (Lewisville) [1028:0498]

on linux 5.6.2.arch1-2

Last edited by nouman8 (2020-04-06 05:37:42)

Offline

#22 2020-04-06 17:56:35

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

@nouman8 your issue looks somewhat different.  The PID is different and the failure is different,  the probe fails rather than never being called.
Please try the updated test.patch with the PKGBUILD from post #11 the additional output should indicate what in the probe failed.

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 7c5b18d87b49..a90da841df5f 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7256,6 +7256,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	u16 eeprom_apme_mask = E1000_EEPROM_APME;
 	s32 ret_val = 0;
 
+	pr_info("e1000_probe reached");
+
 	if (ei->flags2 & FLAG2_DISABLE_ASPM_L0S)
 		aspm_disable_flag = PCIE_LINK_STATE_L0S;
 	if (ei->flags2 & FLAG2_DISABLE_ASPM_L1)
@@ -7265,7 +7267,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = pci_enable_device_mem(pdev);
 	if (err)
+	{
+		pr_info("pci_enable_device_mem returned:%i.\n",err);
 		return err;
+	}
 
 	pci_using_dac = 0;
 	err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
@@ -7284,7 +7289,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = pci_request_selected_regions_exclusive(pdev, bars,
 						     e1000e_driver_name);
 	if (err)
+	{
+		pr_info("pci_request_selected_regions_exclusive returned:%i.\n",err);
 		goto err_pci_reg;
+	}
 
 	/* AER (Advanced Error Reporting) hooks */
 	pci_enable_pcie_error_reporting(pdev);
@@ -7293,12 +7301,18 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	/* PCI config space info */
 	err = pci_save_state(pdev);
 	if (err)
+	{
+		pr_info("pci_save_state returned:%i.\n",err);
 		goto err_alloc_etherdev;
+	}
 
 	err = -ENOMEM;
 	netdev = alloc_etherdev(sizeof(struct e1000_adapter));
 	if (!netdev)
+	{
+		pr_info("alloc_etherdev failed");
 		goto err_alloc_etherdev;
+	}
 
 	SET_NETDEV_DEV(netdev, &pdev->dev);
 
@@ -7324,7 +7338,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	err = -EIO;
 	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);
 	if (!adapter->hw.hw_addr)
+	{
+		pr_info("ioremap failed");
 		goto err_ioremap;
+	}
 
 	if ((adapter->flags & FLAG_HAS_FLASH) &&
 	    (pci_resource_flags(pdev, 1) & IORESOURCE_MEM) &&
@@ -7333,7 +7350,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		flash_len = pci_resource_len(pdev, 1);
 		adapter->hw.flash_address = ioremap(flash_start, flash_len);
 		if (!adapter->hw.flash_address)
+		{
+			pr_info("ioremap for flash failed");
 			goto err_flashmap;
+		}
 	}
 
 	/* Set default EEE advertisement */
@@ -7352,12 +7372,16 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	adapter->bd_number = cards_found++;
 
+	pr_info("calling e1000e_check_options");
 	e1000e_check_options(adapter);
 
 	/* setup adapter struct */
 	err = e1000_sw_init(adapter);
 	if (err)
+	{
+		pr_info("e1000_sw_init returned:%i.\n",err);
 		goto err_sw_init;
+	}
 
 	memcpy(&hw->mac.ops, ei->mac_ops, sizeof(hw->mac.ops));
 	memcpy(&hw->nvm.ops, ei->nvm_ops, sizeof(hw->nvm.ops));
@@ -7365,7 +7389,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	err = ei->get_variants(adapter);
 	if (err)
+	{
+		pr_info("get_variants returned:%i.\n",err);
 		goto err_hw_init;
+	}
 
 	if ((adapter->flags & FLAG_IS_ICH) &&
 	    (adapter->flags & FLAG_READ_ONLY_NVM) &&
@@ -7444,6 +7471,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		}
 	}
 
+
+	pr_info("calling e1000_eeprom_checks");
 	e1000_eeprom_checks(adapter);
 
 	/* copy the MAC address */
@@ -7543,7 +7572,10 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	strlcpy(netdev->name, "eth%d", sizeof(netdev->name));
 	err = register_netdev(netdev);
 	if (err)
+	{
+		pr_info("register_netdev returned:%i.\n",err);
 		goto err_register;
+	}
 
 	/* carrier off reporting is important to ethtool even BEFORE open */
 	netif_carrier_off(netdev);
@@ -7798,11 +7830,14 @@ static struct pci_driver e1000_driver = {
  **/
 static int __init e1000_init_module(void)
 {
+	int result;
 	pr_info("Intel(R) PRO/1000 Network Driver - %s\n",
 		e1000e_driver_version);
 	pr_info("Copyright(c) 1999 - 2015 Intel Corporation.\n");
 
-	return pci_register_driver(&e1000_driver);
+	result = pci_register_driver(&e1000_driver);
+	pr_info("pci_register_driver returned %i.\n",result);
+	return result;
 }
 module_init(e1000_init_module);
 

Online

#23 2020-08-26 09:38:34

flacks
Member
From: ::1
Registered: 2019-06-10
Posts: 3

Re: Intel ethernet device on a Thinkpad X200 not recognized

@loqs, with that patch I get:

[ 1284.849078] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 1284.849080] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1284.849111] e1000e: e1000_probe reached
[ 1284.849352] e1000e: calling e1000e_check_options
[ 1284.849356] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 1300.610021] e1000e: get_variants returned:-6.
[ 1300.624994] e1000e: pci_register_driver returned 0.

Jean

Offline

#24 2020-08-29 04:35:34

flacks
Member
From: ::1
Registered: 2019-06-10
Posts: 3

Re: Intel ethernet device on a Thinkpad X200 not recognized

I am still researching this issue, but it's worth mentioning 2 things, including a solution (or workaround, depending on your perspective).

First is that, in my case, the NIC works perfectly from an archiso environment. It is only from a real install that the NIC fails to ever properly initialize, with e1000e timing out from this environment. I'm researching the differences between both environments that cause the NIC to work in one but not the other.

Second is that the X200 is a very much supported corebootable machine, which is the firmware I choose to use with it. As such, my testing has been done from that perspective, and OP's symptoms I can replicate from it. My configuration before a working NIC from a real install was coreboot master (since ~Aug 26th), and the ME, IFD, and GbE blobs/configs extracted from the stock firmware. I'm happy to report that using an FD & GbE config generated using libreboot's ich9gen (with no ME, as was discovered that the chipset does not need it to completely initialize) with coreboot results in a working NIC from a real install.

I'm still curious as to why the NIC works with the blobbed/extracted configuration from the archiso environment, so I'll continue researching this on my free time, but for now, there is an identified workaround, which, although somewhat involved in setup, is quite robust and very much free software friendly. FWIW and HTH.

Last edited by flacks (2020-08-29 04:39:19)


Jean

Offline

#25 2020-08-29 14:46:14

loqs
Member
Registered: 2014-03-06
Posts: 17,363

Re: Intel ethernet device on a Thinkpad X200 not recognized

You could try ignoring the return value and see if the driver can continue.

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 6f6479ca1267..d1f86635237b 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7460,8 +7460,6 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        memcpy(&hw->phy.ops, ei->phy_ops, sizeof(hw->phy.ops));
 
        err = ei->get_variants(adapter);
-       if (err)
-               goto err_hw_init;
 
        if ((adapter->flags & FLAG_IS_ICH) &&
            (adapter->flags & FLAG_READ_ONLY_NVM) &&

Online

Board footer

Powered by FluxBB