Hello Auke, On Fri, 2008-01-11 at 10:41 -0800, Kok, Auke wrote: > > Even hw structure has not been used, why it has been passed into > > e1000_io_write function? > > 2.6.12.3? why do you care? that code is probably long gone... was that > function > even used?
I noticed that this also happens on upstream netdev-2.6 branch. Moreover the function e1000_write_reg_io() from e1000_hw.c is the only function that calls e1000_io_write(). I write a small patch that fixes it. diff -uNp e1000.old/e1000_hw.c e1000/e1000_hw.c --- e1000.old/e1000_hw.c 2008-01-11 14:14:36.000000000 -0500 +++ e1000/e1000_hw.c 2008-01-11 14:13:36.000000000 -0500 @@ -6654,8 +6654,8 @@ e1000_write_reg_io(struct e1000_hw *hw, unsigned long io_addr = hw->io_base; unsigned long io_data = hw->io_base + 4; - e1000_io_write(hw, io_addr, offset); - e1000_io_write(hw, io_data, value); + e1000_io_write(io_addr, offset); + e1000_io_write(io_data, value); } /****************************************************************************** diff -uNp e1000.old/e1000_hw.h e1000/e1000_hw.h --- e1000.old/e1000_hw.h 2008-01-11 14:13:00.000000000 -0500 +++ e1000/e1000_hw.h 2008-01-11 14:15:47.000000000 -0500 @@ -427,7 +427,7 @@ int32_t e1000_read_pcie_cap_reg(struct e void e1000_pcix_set_mmrbc(struct e1000_hw *hw, int mmrbc); int e1000_pcix_get_mmrbc(struct e1000_hw *hw); /* Port I/O is only supported on 82544 and newer */ -void e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value); +void e1000_io_write(unsigned long port, uint32_t value); int32_t e1000_disable_pciex_master(struct e1000_hw *hw); int32_t e1000_check_phy_reset_block(struct e1000_hw *hw); diff -uNp e1000.old/e1000_main.c e1000/e1000_main.c --- e1000.old/e1000_main.c 2008-01-11 14:14:36.000000000 -0500 +++ e1000/e1000_main.c 2008-01-11 14:13:23.000000000 -0500 @@ -4919,7 +4919,7 @@ e1000_read_pcie_cap_reg(struct e1000_hw } void -e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value) +e1000_io_write(unsigned long port, uint32_t value) { outl(value, port); } Signed-off-by: Breno Leitao <[EMAIL PROTECTED]> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html