Solved Patching igc driver to support Killer E3100G

Hi,

I am trying to make the igc driver (/usr/src/sys/dev/igc) to also support Killer Ethernet E3100G (which is an Intel I225-V chip which is supported by the driver).

This is the status:

1. The device seems to be detected with wrong vendor and device name.
dmesg says:
Code:
none6@pci0:108:0:0: class=0x020000 rev=0x06 hdr=0x00 vendor=0x10ec device=0x3000 subvendor=0x1558 subdevice=0x7715
vendor = 'Realtek Semiconductor Co., Ltd.'
device = 'Killer E3000 2.5GbE Controller'
class = network
subclass = ethernet
I am pretty pretty sure this is wrong, the device runs as E3100G in Windows with the corresponding driver, and also the vendor page says the laptop has a E3100G.

2. I am trying to figure out, how to change the coding in /usr/src/sys/dev/igc/igc_hw.h
Code:
#define IGC_DEV_ID_I225_LM                      0x15F2
#define IGC_DEV_ID_I225_V                       0x15F3
#define IGC_DEV_ID_I225_K                       0x3100
#define IGC_DEV_ID_I225_I                       0x15F8
#define IGC_DEV_ID_I220_V                       0x15F7
#define IGC_DEV_ID_I225_K2                      0x3101
#define IGC_DEV_ID_I225_LMVP                    0x5502
#define IGC_DEV_ID_I226_K                       0x5504
#define IGC_DEV_ID_I225_IT                      0x0D9F
#define IGC_DEV_ID_I226_LM                      0x125B
#define IGC_DEV_ID_I226_V                       0x125C
#define IGC_DEV_ID_I226_IT                      0x125D
#define IGC_DEV_ID_I221_V                       0x125E
#define IGC_DEV_ID_I226_BLANK_NVM               0x125F
#define IGC_DEV_ID_I225_BLANK_NVM               0x15FD

and maybe /usr/src/sys/dev/igc/if_igc.c
Code:
/*********************************************************************
 *  PCI Device ID Table
 *
 *  Used by probe to select devices to load on
 *  Last entry must be all 0s
 *
 *  { Vendor ID, Device ID, String }
 *********************************************************************/

static pci_vendor_info_t igc_vendor_info_array[] =
{
/* Intel(R) PRO/1000 Network Connection - igc */
PVID(0x8086, IGC_DEV_ID_I225_LM, "Intel(R) Ethernet Controller I225-LM"),
PVID(0x8086, IGC_DEV_ID_I225_V, "Intel(R) Ethernet Controller I225-V"),
PVID(0x8086, IGC_DEV_ID_I225_K, "Intel(R) Ethernet Controller I225-K"),
PVID(0x8086, IGC_DEV_ID_I225_I, "Intel(R) Ethernet Controller I225-I"),
PVID(0x8086, IGC_DEV_ID_I220_V, "Intel(R) Ethernet Controller I220-V"),
PVID(0x8086, IGC_DEV_ID_I225_K2, "Intel(R) Ethernet Controller I225-K(2)"),
PVID(0x8086, IGC_DEV_ID_I225_LMVP, "Intel(R) Ethernet Controller I225-LMvP(2)"),
PVID(0x8086, IGC_DEV_ID_I226_K, "Intel(R) Ethernet Controller I226-K"),
PVID(0x8086, IGC_DEV_ID_I225_IT, "Intel(R) Ethernet Controller I225-IT(2)"),
PVID(0x8086, IGC_DEV_ID_I226_LM, "Intel(R) Ethernet Controller I226-LM"),
PVID(0x8086, IGC_DEV_ID_I226_V, "Intel(R) Ethernet Controller I226-V"),
PVID(0x8086, IGC_DEV_ID_I226_IT, "Intel(R) Ethernet Controller I226-IT"),
PVID(0x8086, IGC_DEV_ID_I221_V, "Intel(R) Ethernet Controller I221-V"),
PVID(0x8086, IGC_DEV_ID_I226_BLANK_NVM, "Intel(R) Ethernet Controller I226(blankNVM)"),
PVID(0x8086, IGC_DEV_ID_I225_BLANK_NVM, "Intel(R) Ethernet Controller I225(blankNVM)"),
 /* required last entry */
        PVID_END
};

Im am currently building a test kernel, with simply having added:
Code:
#define IGC_DEV_ID_E3100_G                    0x3000
Code:
PVID(0x10ec, IGC_DEV_ID_E3100_G, "Killer E3000 2.5GbE Controller")
and see what happens. (Intentionally using the wrong device description from dmesg)

Anyhow I am not exactly a kernel hacker, so any input is appreciated.
 
Last edited by a moderator:
Hmmm...
It does something but does not exactly work :(
Code:
device_attach: igc0 attach returned 6
igc0: <Killer E3000 2.5GbE Controller> port 0x3000-0x30ff mem 0xa2200000-0xa220ffff,0xa2210000-0xa2213fff at device 0.0 on pci7
igc0: Setup init failure
igc0: Unable to allocate bus resource: memory
igc0: Allocation of PCI resources failed
igc0: IFDI_ATTACH_PRE failed 6
device_attach: igc0 attach returned 6
 
Update:
Adjusted /usr/src/sys/dev/igc/igc_api.c
Code:
elgrande@elfreebsdo:/usr/src/sys/dev/igc % diff igc_api.c igc_api.c.orig
107d106
<       case IGC_DEV_ID_E3100_G:
elgrande@elfreebsdo:/usr/src/sys/dev/igc %

I hope this does it (currently building) since I found no other obvious things I forgot to change.
 
Last edited by a moderator:
Hi,

I am trying to make the igc driver ( /usr/src/sys/dev/igc) to also support Killer Ethernet E3100G (which is an Intel I225-V chip which is supported by the driver).

This is the status:

1. The device seems to be detected with wrong vendor and device name.
dmesg says:
Code:
none6@pci0:108:0:0: class=0x020000 rev=0x06 hdr=0x00 vendor=0x10ec device=0x3000 subvendor=0x1558 subdevice=0x7715
vendor = 'Realtek Semiconductor Co., Ltd.'
device = 'Killer E3000 2.5GbE Controller'
class = network
subclass = ethernet
I am pretty pretty sure this is wrong, the device runs as E3100G in Windows with the corresponding driver, and also the vendor page says the laptop has a E3100G.
What a shitshow… The numbers come from the device itself. Name is probably self-reported as well. (Never thought much about that, but there is no driver attached, so nowhere to actually get this string, other than the device firmware.)
 
Well obviously VladiBG was right.
I patched the device ID into net/realtek-re-kmod, compiled a kernel without re driver and have a working LAN now. 🥳
Question is why Windows reports it as a different device, but however it works now.

I'll see if this can be patched into the port, but maybe it has to be patched upstream.
 
Back
Top