Bug 270929 - Intel LAN card I219LM (23) error load when boot
Summary: Intel LAN card I219LM (23) error load when boot
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.2-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Intel FreeBSD
URL: https://reviews.freebsd.org/D39977
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2023-04-19 06:04 UTC by David Durieux
Modified: 2023-05-17 18:30 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Durieux 2023-04-19 06:04:44 UTC
Hi, 

I had a new Dell laptop and the Intel LAN card I219_LM (23) not works.
So I have got the kernel branch 'stable/13' and compiled the kernel on the laptop.

When I boot, I have this lines of error:

em0: <Intel(R) I219-LM RPL(23)> mem 0x9df00000-0x9df1ffff at device 31.6 on pci0
em0: Setup init failure
em0: Setup of Shared code failed, error -5
em0: IFDI_ATTACH_PRE failed 6
device_attach: em0 attach returned 6


The information of my LAN card: 

none9@pci0:0:31:6: class=0x020000 rev=0x01 hdr=0x00 vendor=0x8086 device=0x0dc5 subvendor=0x1028 subdevice=0x0c00
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2023-04-20 18:37:31 UTC
> 13.1-STABLE

Reproducible with 13.2-RELEASE or 13.2-STABLE?

<https://www.freebsd.org/where/#_freebsd_13_2_stable>
Comment 2 David Durieux 2023-04-20 18:55:40 UTC
I used the stable/13 branch of the freebsd-src (https://github.com/freebsd/freebsd-src/tree/stable/13) and have compiled + installed the complete kernel.
I don't know what version it is in the version dropdown of this bug, I put 13.1-stable but it's not really it.
Comment 3 David Durieux 2023-04-20 20:09:15 UTC
I have installed the 13.2-RELEASE without any modifications and the kernel not find the driver for the LAN card
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2023-04-21 00:48:08 UTC
Thanks, 

(In reply to David Durieux from comment #2)

13.2-STABLE is missing from the menu; bug 262494 comment 6.
Comment 5 David Durieux 2023-04-27 07:00:54 UTC
How can I help to fix and resolve this problem?
Comment 6 Piotr Kubaj freebsd_committer freebsd_triage 2023-05-04 16:21:57 UTC
Can you check the following patch:
diff --git a/sys/dev/e1000/e1000_api.c b/sys/dev/e1000/e1000_api.c
index 9442dd26651b..0cfb62e8c6b7 100644
--- a/sys/dev/e1000/e1000_api.c
+++ b/sys/dev/e1000/e1000_api.c
@@ -333,12 +333,12 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
        case E1000_DEV_ID_PCH_TGP_I219_V14:
        case E1000_DEV_ID_PCH_TGP_I219_LM15:
        case E1000_DEV_ID_PCH_TGP_I219_V15:
+               mac->type = e1000_pch_tgp;
+               break;
        case E1000_DEV_ID_PCH_ADL_I219_LM16:
        case E1000_DEV_ID_PCH_ADL_I219_V16:
        case E1000_DEV_ID_PCH_RPL_I219_LM23:
        case E1000_DEV_ID_PCH_RPL_I219_V23:
-               mac->type = e1000_pch_tgp;
-               break;
        case E1000_DEV_ID_PCH_ADL_I219_LM17:
        case E1000_DEV_ID_PCH_ADL_I219_V17:
        case E1000_DEV_ID_PCH_RPL_I219_LM22:


?
Comment 7 Piotr Kubaj freebsd_committer freebsd_triage 2023-05-04 16:23:37 UTC
Oh, note that you will need to use the main branch, 13.2-RELEASE won't work.
Comment 8 David Durieux 2023-05-04 17:35:59 UTC
The patch fix the problem, thank you ;)
Comment 9 commit-hook freebsd_committer freebsd_triage 2023-05-17 10:14:58 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=d0cdec7a20422bf48dfe9b2118a3d776e8202c57

commit d0cdec7a20422bf48dfe9b2118a3d776e8202c57
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-05-17 10:14:02 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-05-17 10:14:02 +0000

    em: sync platform detection with Linux

    Switch 16 and 23 adapters from tgp to adp.

    PR:     270929
    Differential revision:  https://reviews.freebsd.org/D39977
    Approved by:    erj, kbowling

 sys/dev/e1000/e1000_api.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Comment 10 Piotr Kubaj freebsd_committer freebsd_triage 2023-05-17 18:30:24 UTC
Patch committed, closing.