Writing ethernet driver for i219 (e1000e)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
ri
Posts: 9
Joined: Mon Feb 05, 2018 11:18 am

Writing ethernet driver for i219 (e1000e)

Post by ri »

Hi,

I'm trying to write a driver for the i219. My basic driver works on QEMU with th e1000 card. I've now shifted to real hardware and I've made the changes mentioned in the i217 page (https://wiki.osdev.org/Intel_Ethernet_i217), but the driver doesn't seem to be working. I'm trying to look a the i219 datasheet to see how it differs from older cards but the datasheet is very different. There's no reference to a receive descriptor address register or a transmission control register. Even the numbering of the registers is different. Does anyone know how to use the datasheet?
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: Writing ethernet driver for i219 (e1000e)

Post by Kazinsal »

The I219 is just the PHY, unlike the 825xx series of combination MAC/PHY chips. The MAC is actually in the PCH. You'll need to figure out what PCH you have, then grab the datasheets for it and figure out how to access the MAC in it and configure it.
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Writing ethernet driver for i219 (e1000e)

Post by iansjack »

Why are you following instructions for the i217 when writing a driver for the i219? They are not the same.
anatolik
Posts: 16
Joined: Sun Jul 07, 2013 7:29 pm

Re: Writing ethernet driver for i219 (e1000e)

Post by anatolik »

Kazinsal wrote:The I219 is just the PHY, unlike the 825xx series of combination MAC/PHY chips. The MAC is actually in the PCH. You'll need to figure out what PCH you have, then grab the datasheets for it and figure out how to access the MAC in it and configure it.
I also found confusing finding out exact network hardware.

`lshw` shows I have a 'Ethernet Connection (2) I219-LM' connected to my PCI bus and Linux kernel driver e1000e is used. Neither `dmidecode` nor `lshw` shows my chipset version. So I opened my purchase invoice and it says it is `ASUS Q170M-C/CSM` motherboard based on `Intel Q170` chipset. Its spec says that it has integrated MAC but does not specify what version https://ark.intel.com/products/90587/Intel-Q170-Chipset

Q170 chipset is based on Intel 100 series. The specification PCH https://www.intel.com/content/www/us/en ... vol-1.html mentions gigabit ethernet controller (chapter 21) but I did not find anything about exact nomenclature that can be used to determine datasheet for my network controller.

So how do you guys find HW chip version/datasheet for your PCH based network controller?
ri
Posts: 9
Joined: Mon Feb 05, 2018 11:18 am

Re: Writing ethernet driver for i219 (e1000e)

Post by ri »

I started with the e1000 as the base line and then I looked at the i217 osdev page as there are no resources for the i219 that I can find. and they both use the e1000e driver.
The transmission part of my driver is working but not my receive. Any ideas as to why?
ri
Posts: 9
Joined: Mon Feb 05, 2018 11:18 am

Re: Writing ethernet driver for i219 (e1000e)

Post by ri »

I also know that my processor is the Intel® Core™ i7-6770HQ, and the datasheets for the 6th generation intel core processor can be found here:
https://www.intel.com/content/www/us/en ... vol-1.html
https://www.intel.com/content/www/us/en ... vol-2.html

they mention that the Ethernet controller used is the i219 but again, I can't make out how to program the driver from these.
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: Writing ethernet driver for i219 (e1000e)

Post by Korona »

The PCI vendor and device IDs should exactly tell you which controller you have. Find the datasheet corresponding to your PCI IDs.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
ri
Posts: 9
Joined: Mon Feb 05, 2018 11:18 am

Re: Writing ethernet driver for i219 (e1000e)

Post by ri »

They do. I know I have the i219-LM
ri
Posts: 9
Joined: Mon Feb 05, 2018 11:18 am

Re: Writing ethernet driver for i219 (e1000e)

Post by ri »

What I'm looking for is a datasheet or manual that explains the driver programming interface... which as I mentioned in the first post, the i219s datasheet doesn't
Post Reply