From: Ron Mercer <ron.mercer@qlogic.com>
To: netdev@vger.kernel.org
Cc: ron.mercer@qlogic.com
Subject: [PATCH 3/5] qlge: bugfix: Fix endian issue regarding shadow registers.
Date: Wed, 24 Dec 2008 10:21:34 -0800 [thread overview]
Message-ID: <1230142896-15533-3-git-send-email-ron.mercer@qlogic.com> (raw)
In-Reply-To: <20081224181834.GA15470@susedev.qlogic.org>
Shadow registers are host memory locations that the chip echos queue indexes to.
The chip does this in little endian values, so they need to be swapped before referencing.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
drivers/net/qlge/qlge.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
mode change 100644 => 100755 drivers/net/qlge/qlge.h
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h
old mode 100644
new mode 100755
index ba2e1c5..f1751a2
--- a/drivers/net/qlge/qlge.h
+++ b/drivers/net/qlge/qlge.h
@@ -1477,9 +1477,9 @@ static inline void ql_write_db_reg(u32 val, void __iomem *addr)
* update the relevant index register and then copy the value to the
* shadow register in host memory.
*/
-static inline unsigned int ql_read_sh_reg(const volatile void *addr)
+static inline u32 ql_read_sh_reg(const volatile void *addr)
{
- return *(volatile unsigned int __force *)addr;
+ return le32_to_cpu(*(volatile unsigned int __force *)addr);
}
extern char qlge_driver_name[];
--
1.6.0
next prev parent reply other threads:[~2008-12-24 18:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-24 18:18 [PATCH 0/5] qlge: Fixes for powerpc platform Ron Mercer
2008-12-24 18:21 ` [PATCH 1/5] qlge: bugfux: Add missing pci_mapping_err checking Ron Mercer
2008-12-24 18:21 ` [PATCH 2/5] qlge: bugfix: Add missing pci_unmap_page call in receive path Ron Mercer
2008-12-24 18:21 ` Ron Mercer [this message]
2008-12-24 18:35 ` [PATCH 3/5] qlge: bugfix: Fix endian issue regarding shadow registers Ben Hutchings
2008-12-24 18:42 ` Ron Mercer
2008-12-24 21:15 ` Christoph Hellwig
2008-12-24 21:29 ` Ron Mercer
2008-12-24 21:57 ` Harvey Harrison
2008-12-24 18:21 ` [PATCH 4/5] qlge: bugfix: Fix rx ring and large and small rx buffer length settings Ron Mercer
2008-12-24 18:21 ` [PATCH 5/5] qlge: bugfix: Fix register access error checking Ron Mercer
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=1230142896-15533-3-git-send-email-ron.mercer@qlogic.com \
--to=ron.mercer@qlogic.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).