aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-12-05 12:01:28 -0500
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-12-05 12:01:28 -0500
commit9db73724453a9350e1c22dbe732d427e2939a5c9 (patch)
tree15e3ead6413ae97398a54292acc199bee0864d42 /drivers/net/spider_net.c
parent4c1ac1b49122b805adfa4efc620592f68dccf5db (diff)
parente62438630ca37539c8cc1553710bbfaa3cf960a7 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/ata/libata-scsi.c include/linux/libata.h Futher merge of Linus's head and compilation fixups. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r--drivers/net/spider_net.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index f16f696c1ff2..ebb6aa39f9c7 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -88,12 +88,11 @@ MODULE_DEVICE_TABLE(pci, spider_net_pci_tbl);
88static inline u32 88static inline u32
89spider_net_read_reg(struct spider_net_card *card, u32 reg) 89spider_net_read_reg(struct spider_net_card *card, u32 reg)
90{ 90{
91 u32 value; 91 /* We use the powerpc specific variants instead of readl_be() because
92 92 * we know spidernet is not a real PCI device and we can thus avoid the
93 value = readl(card->regs + reg); 93 * performance hit caused by the PCI workarounds.
94 value = le32_to_cpu(value); 94 */
95 95 return in_be32(card->regs + reg);
96 return value;
97} 96}
98 97
99/** 98/**
@@ -105,8 +104,11 @@ spider_net_read_reg(struct spider_net_card *card, u32 reg)
105static inline void 104static inline void
106spider_net_write_reg(struct spider_net_card *card, u32 reg, u32 value) 105spider_net_write_reg(struct spider_net_card *card, u32 reg, u32 value)
107{ 106{
108 value = cpu_to_le32(value); 107 /* We use the powerpc specific variants instead of writel_be() because
109 writel(value, card->regs + reg); 108 * we know spidernet is not a real PCI device and we can thus avoid the
109 * performance hit caused by the PCI workarounds.
110 */
111 out_be32(card->regs + reg, value);
110} 112}
111 113
112/** spider_net_write_phy - write to phy register 114/** spider_net_write_phy - write to phy register