aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinsys Contractor Adhiraj Joshi <adhiraj@netxen.com>2007-03-23 07:21:24 -0800
committerJeff Garzik <jeff@garzik.org>2007-03-29 08:26:05 -0400
commitd8d79201eb391ae0eca05f9e51f1f94ab42b6b4e (patch)
treee2e535768962388e02809a13b9693aa8a0e82f9b
parentbd7a44488975759da10b5f25bcebec19930a5328 (diff)
NetXen: Fix hardware access for ppc architecture.
NetXen: Fix for hardware access on big endian machine. Signed-off-by: Adhiraj Joshi <adhiraj@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/net/netxen/netxen_nic_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 229aa1c4fb7..eff965dc5ff 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -438,6 +438,7 @@ do_rom_fast_read_words(struct netxen_adapter *adapter, int addr,
for (addridx = addr; addridx < (addr + size); addridx += 4) {
ret = do_rom_fast_read(adapter, addridx, (int *)bytes);
+ *(int *)bytes = cpu_to_le32(*(int *)bytes);
if (ret != 0)
break;
bytes += 4;
@@ -497,7 +498,7 @@ static inline int do_rom_fast_write_words(struct netxen_adapter *adapter,
int timeout = 0;
int data;
- data = *(u32*)bytes;
+ data = le32_to_cpu((*(u32*)bytes));
ret = do_rom_fast_write(adapter, addridx, data);
if (ret < 0)