Skip to content

Add e1000 driver (8254x Intel NiCs)#36

Open
jackiedinh8 wants to merge 3 commits into
emmericp:masterfrom
jackiedinh8:master
Open

Add e1000 driver (8254x Intel NiCs)#36
jackiedinh8 wants to merge 3 commits into
emmericp:masterfrom
jackiedinh8:master

Conversation

@jackiedinh8
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Owner

@emmericp emmericp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, thank you!

I'll see if I can go find some real hardware to test this with :)

Comment thread src/driver/device.c Outdated
}
if (vendor_id == 0x1af4 && device_id >= 0x1000) {
return virtio_init(pci_addr, rx_queues, tx_queues);
} else if (vendor_id == 0x8086 && device_id >= 0x1000) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That won't work because it would also match all of the ixgbe NICs (Vendor 8086 is Intel) :/

And it's probably also not feasible to hard-code all the IDs here. Not sure if I have a good solution here beside maybe hard-coding some good device IDs? Include that pci database and do a string search? Meh.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe each driver has a function like is_e1000(vendor_id, device_id) or is_ixgbe(vendor_id, device_id) to check whether it supports a NIC? If it supports, then proceed to init the driver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants