]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
NetXen: Fix hardware access for ppc architecture.
authorLinsys Contractor Adhiraj Joshi <adhiraj@netxen.com>
Fri, 23 Mar 2007 15:21:24 +0000 (07:21 -0800)
committerJeff Garzik <jeff@garzik.org>
Thu, 29 Mar 2007 12:26:05 +0000 (08:26 -0400)
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>
drivers/net/netxen/netxen_nic_init.c

index 229aa1c4fb7973d8312b06ac0114908ad7dc0924..eff965dc5ffff8fec3da1734182d7d2c8c63de80 100644 (file)
@@ -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)