From: Linsys Contractor Adhiraj Joshi Date: Fri, 23 Mar 2007 15:21:24 +0000 (-0800) Subject: NetXen: Fix hardware access for ppc architecture. X-Git-Tag: v2.6.21-rc6~47^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d8d79201eb391ae0eca05f9e51f1f94ab42b6b4e;p=karo-tx-linux.git NetXen: Fix hardware access for ppc architecture. NetXen: Fix for hardware access on big endian machine. Signed-off-by: Adhiraj Joshi Signed-off-by: Jeff Garzik --- 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, 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)