Commit d8d79201 authored by Linsys Contractor Adhiraj Joshi's avatar Linsys Contractor Adhiraj Joshi Committed by Jeff Garzik

NetXen: Fix hardware access for ppc architecture.

NetXen: Fix for hardware access on big endian machine.
Signed-off-by: default avatarAdhiraj Joshi <adhiraj@netxen.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent bd7a4448
...@@ -438,6 +438,7 @@ do_rom_fast_read_words(struct netxen_adapter *adapter, int addr, ...@@ -438,6 +438,7 @@ do_rom_fast_read_words(struct netxen_adapter *adapter, int addr,
for (addridx = addr; addridx < (addr + size); addridx += 4) { for (addridx = addr; addridx < (addr + size); addridx += 4) {
ret = do_rom_fast_read(adapter, addridx, (int *)bytes); ret = do_rom_fast_read(adapter, addridx, (int *)bytes);
*(int *)bytes = cpu_to_le32(*(int *)bytes);
if (ret != 0) if (ret != 0)
break; break;
bytes += 4; bytes += 4;
...@@ -497,7 +498,7 @@ static inline int do_rom_fast_write_words(struct netxen_adapter *adapter, ...@@ -497,7 +498,7 @@ static inline int do_rom_fast_write_words(struct netxen_adapter *adapter,
int timeout = 0; int timeout = 0;
int data; int data;
data = *(u32*)bytes; data = le32_to_cpu((*(u32*)bytes));
ret = do_rom_fast_write(adapter, addridx, data); ret = do_rom_fast_write(adapter, addridx, data);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment