* doubt in e1000_io_write()
@ 2008-01-11 15:13 Jeba Anandhan
2008-01-11 18:41 ` Kok, Auke
0 siblings, 1 reply; 3+ messages in thread
From: Jeba Anandhan @ 2008-01-11 15:13 UTC (permalink / raw)
To: netdev
Hi all,
i have doubt in e1000_io_write().
void
e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value)
{
outl(value, port);
}
kernel version: 2.6.12.3
Even hw structure has not been used, why it has been passed into
e1000_io_write function?
Thanks
Jeba
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: doubt in e1000_io_write()
2008-01-11 15:13 doubt in e1000_io_write() Jeba Anandhan
@ 2008-01-11 18:41 ` Kok, Auke
2008-01-11 19:35 ` Breno Leitao
0 siblings, 1 reply; 3+ messages in thread
From: Kok, Auke @ 2008-01-11 18:41 UTC (permalink / raw)
To: Jeba Anandhan; +Cc: netdev
Jeba Anandhan wrote:
> Hi all,
> i have doubt in e1000_io_write().
>
> void
> e1000_io_write(struct e1000_hw *hw, unsigned long port, uint32_t value)
> {
> outl(value, port);
> }
>
>
> kernel version: 2.6.12.3
>
>
> 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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: doubt in e1000_io_write()
2008-01-11 18:41 ` Kok, Auke
@ 2008-01-11 19:35 ` Breno Leitao
0 siblings, 0 replies; 3+ messages in thread
From: Breno Leitao @ 2008-01-11 19:35 UTC (permalink / raw)
To: Kok, Auke; +Cc: Jeba Anandhan, netdev
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 <leitao@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-11 19:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-11 15:13 doubt in e1000_io_write() Jeba Anandhan
2008-01-11 18:41 ` Kok, Auke
2008-01-11 19:35 ` Breno Leitao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).