PCI legacy I/O port free driver - Making Intel e1000 driver legacy I/O port free
Subsystems (2)
PATCH 1/1 PCI legacy I/O port free driver - Making Intel e1000 driver legacy I/O port free
Dear Auke
http://lkml.org/lkml/2007/5/16/275
Quoted 10 lines
I'm ok with the bottom part of the patch, but I do not like the modification of the pci device ID table in this way. As Arjan van der Ven previously commented as well, this makes it hard for future device ID's to be bound to the driver.
On top of that, there is no logical correlation between the mapping and chipsets, so a lot of information is lost in that table. It really does not show which _chipsets_ support this functionality.
I think if we want to work with this, we need some way of mapping the device ID's back to chipsets, and enable the feature on that basis.
This patches will meet your need in the way that it shows correlation between their device IDs and the chipsets. It does not use the existing macro INTEL_E1000_ETHERNET_DEVICE() to see whether the device uses I/O port or not. Instead of modifying the PCI device table, I've added another function called e1000_test_legacy_ioport() which tells you whether the PCI device uses legacy I/O port or not by checking its chipset.
But one thing I want to say is that I am not sure about the chipsets that require legacy I/O port. I found the following code in e1000 driver code and it seems to be the only part that is using I/O port. So I thought the following chipsets are the only ones using legacy I/O port. I might be wrong, so any comments would be helpful.
drivers/net/e1000/e1000_hw.c
524 int32_t
525 e1000_reset_hw(struct e1000_hw *hw)
526 {
...
618 switch (hw->mac_type) {
619 case e1000_82544:
620 case e1000_82540:
621 case e1000_82545:
622 case e1000_82546:
623 case e1000_82541:
624 case e1000_82541_rev_2:
625 /* These controllers can't ack the 64-bit write when issuing the
626 * reset, so use IO-mapping as a workaround to issue the reset */
627 E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST));Quoted 2 lines
I also would like this option to be non-default, IOW use legacy IO by default, and allow the user to specify a module load option to disable use of this feature:
I've also added the module parameter so that the user can select whether he or she wants to enable the legacy I/O port free. The legacy I/O port free option is non-default.
Rest of the part has not been changed since my previous patch. Any comments would be helpful.
Tomohiro Kusumi
---
drivers/net/e1000/e1000.h +3 -0
@@ -342,6 +342,9 @@ struct e1000_adapter {boolean_t quad_port_a;unsigned long flags;uint32_t eeprom_wol; + +int use_ioport; +int bars; };enum e1000_state_t {
drivers/net/e1000/e1000_main.c +83 -11
147 lines not on this page · raw message
Dear Auke
Sorry I sent the wrong patch.
I resubmit the patch.
Tomohiro Kusumi
---
drivers/net/e1000/e1000.h +3 -0
@@ -342,6 +342,9 @@ struct e1000_adapter {boolean_t quad_port_a;unsigned long flags;uint32_t eeprom_wol; + +int use_ioport; +int bars; };enum e1000_state_t {
drivers/net/e1000/e1000_main.c +86 -11
150 lines not on this page · raw message