diff options
author | Linsys Contractor Adhiraj Joshi <adhiraj@netxen.com> | 2007-03-23 11:21:24 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-29 08:26:05 -0400 |
commit | d8d79201eb391ae0eca05f9e51f1f94ab42b6b4e (patch) | |
tree | e2e535768962388e02809a13b9693aa8a0e82f9b /drivers/net/netxen | |
parent | bd7a44488975759da10b5f25bcebec19930a5328 (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>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 3 |
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 229aa1c4fb79..eff965dc5fff 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, | |||
438 | 438 | ||
439 | for (addridx = addr; addridx < (addr + size); addridx += 4) { | 439 | for (addridx = addr; addridx < (addr + size); addridx += 4) { |
440 | ret = do_rom_fast_read(adapter, addridx, (int *)bytes); | 440 | ret = do_rom_fast_read(adapter, addridx, (int *)bytes); |
441 | *(int *)bytes = cpu_to_le32(*(int *)bytes); | ||
441 | if (ret != 0) | 442 | if (ret != 0) |
442 | break; | 443 | break; |
443 | bytes += 4; | 444 | bytes += 4; |
@@ -497,7 +498,7 @@ static inline int do_rom_fast_write_words(struct netxen_adapter *adapter, | |||
497 | int timeout = 0; | 498 | int timeout = 0; |
498 | int data; | 499 | int data; |
499 | 500 | ||
500 | data = *(u32*)bytes; | 501 | data = le32_to_cpu((*(u32*)bytes)); |
501 | 502 | ||
502 | ret = do_rom_fast_write(adapter, addridx, data); | 503 | ret = do_rom_fast_write(adapter, addridx, data); |
503 | if (ret < 0) | 504 | if (ret < 0) |