-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel: New IO mapped Register API and a rework of the E1000 drivers #25521
base: master
Are you sure you want to change the base?
Conversation
UNMAP_AFTER_INIT void E1000NetworkAdapter::check_quirks() | ||
{ | ||
|
||
u16 device_id = device_identifier().hardware_id().device_id; | ||
// The 82541xx and 82547GI/EI have a different EEPROM access method | ||
switch (device_id) { | ||
case 0x1019: // 82547EI-A0, 82547EI-A1, 82547EI-B0, 82547GI-B0 | ||
case 0x101A: // 82547EI-B0 | ||
case 0x1013: // 82541EI-A0, 82541EI-B0 | ||
case 0x1018: // 82541EI-B0 | ||
case 0x1076: // 82541GI-B1, 82541PI-C0 | ||
case 0x1077: // 82541GI-B1 | ||
case 0x1078: // 82541ER-C0 | ||
m_is_82541xx_82547GI_EI.set(); | ||
break; | ||
default: | ||
break; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be cool if someone who has this HW can check one of these...
// FIXME: Do this properly | ||
// IPGT:= 10 (8/6 for the 82544GC/EI) - IPG Transmit Time (10 bit) | ||
// The 82544GC/EI has a different value for IPGT depending if it is in IEEE 802.3 mode or 10/100/1000BASE-T mode | ||
// IPGR1:= 8 - IPG Receive Time 1 (half duplex only) ~= 2/3 of IPGR2 (10 bit) | ||
// IPGR2:= 6 (+6) - IPG Receive Time 2 (half duplex only) (10 bit) | ||
// Recommendation are for "IEEE 802.3 minimum IPG value of 96-bit time" | ||
// The magic value here has: | ||
// 10, 8, 6 so it should be fine for now | ||
m_registers.write<Register::TIPG>(0x0060200A); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no clue what half of this means....
// FIXME: This seems odd to me: | ||
// We disable interrupts and then wait for and irq to happen... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
Kernel/Net/Intel/E1000Registers.h
Outdated
// 17-31 Reserved | ||
}; | ||
AK_ENUM_BITWISE_OPERATORS(InterruptMask); | ||
// FIXME: This should be the same as the interrupt cause, which is nicer? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
This also adds some quirk handling, and 64 bit DMA support, which where previously missing.
Less defines, more type safety....