Skip to content
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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Hendiadyoin1
Copy link
Contributor

Less defines, more type safety....

Comment on lines 109 to 368
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;
}
}
Copy link
Contributor Author

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...

Comment on lines 323 to 581
// 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);
Copy link
Contributor Author

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....

Comment on lines +357 to +608
// FIXME: This seems odd to me:
// We disable interrupts and then wait for and irq to happen...
Copy link
Contributor Author

Choose a reason for hiding this comment

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

.

// 17-31 Reserved
};
AK_ENUM_BITWISE_OPERATORS(InterruptMask);
// FIXME: This should be the same as the interrupt cause, which is nicer?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

.

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.

1 participant