Skip to content

Commit

Permalink
NetXen: Fix hardware access for ppc architecture.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linsys Contractor Adhiraj Joshi authored and Jeff Garzik committed Mar 29, 2007
1 parent bd7a444 commit d8d7920
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d8d7920

Please sign in to comment.