From: Breno Leitao <leitao@linux.vnet.ibm.com>
To: "Kok, Auke" <auke-jan.h.kok@intel.com>
Cc: Jeba Anandhan <jeba.anandhan@vaioni.com>, netdev@vger.kernel.org
Subject: Re: doubt in e1000_io_write()
Date: Fri, 11 Jan 2008 17:35:05 -0200 [thread overview]
Message-ID: <1200080105.9349.47.camel@cafe> (raw)
In-Reply-To: <4787B861.9060203@intel.com>
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>
prev parent reply other threads:[~2008-01-11 19:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1200080105.9349.47.camel@cafe \
--to=leitao@linux.vnet.ibm.com \
--cc=auke-jan.h.kok@intel.com \
--cc=jeba.anandhan@vaioni.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).