diff options
author | Mithlesh Thukral <mithlesh@netxen.com> | 2007-04-20 10:56:42 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-04-28 11:01:06 -0400 |
commit | 6d1495f29a59aad464024693a413a945e274c1ed (patch) | |
tree | c48b6250c92f81ad5383573b65ef0f2265df97d4 /drivers/net | |
parent | 6c80b18df3537d1221ab34555c150bccbfd90260 (diff) |
NetXen: Fixes for Power PC architecture
NetXen: Fix PPC architecture specific bugs
Fixes some issues seen on Big endian machines.
Signed-off by: Milan Bag <mbag@netxen.com>
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/netxen/netxen_nic.h | 6 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 3 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 1e944d5eb45b..5095a3f5666d 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -64,9 +64,9 @@ | |||
64 | #include "netxen_nic_hw.h" | 64 | #include "netxen_nic_hw.h" |
65 | 65 | ||
66 | #define _NETXEN_NIC_LINUX_MAJOR 3 | 66 | #define _NETXEN_NIC_LINUX_MAJOR 3 |
67 | #define _NETXEN_NIC_LINUX_MINOR 3 | 67 | #define _NETXEN_NIC_LINUX_MINOR 4 |
68 | #define _NETXEN_NIC_LINUX_SUBVERSION 3 | 68 | #define _NETXEN_NIC_LINUX_SUBVERSION 2 |
69 | #define NETXEN_NIC_LINUX_VERSIONID "3.3.3" | 69 | #define NETXEN_NIC_LINUX_VERSIONID "3.4.2" |
70 | 70 | ||
71 | #define NUM_FLASH_SECTORS (64) | 71 | #define NUM_FLASH_SECTORS (64) |
72 | #define FLASH_SECTOR_SIZE (64 * 1024) | 72 | #define FLASH_SECTOR_SIZE (64 * 1024) |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 3f4853fdba7b..baff17a24d63 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -1116,7 +1116,7 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
1116 | char brd_name[NETXEN_MAX_SHORT_NAME]; | 1116 | char brd_name[NETXEN_MAX_SHORT_NAME]; |
1117 | struct netxen_new_user_info user_info; | 1117 | struct netxen_new_user_info user_info; |
1118 | int i, addr = USER_START; | 1118 | int i, addr = USER_START; |
1119 | u32 *ptr32; | 1119 | __le32 *ptr32; |
1120 | 1120 | ||
1121 | struct netxen_board_info *board_info = &(adapter->ahw.boardcfg); | 1121 | struct netxen_board_info *board_info = &(adapter->ahw.boardcfg); |
1122 | if (board_info->magic != NETXEN_BDINFO_MAGIC) { | 1122 | if (board_info->magic != NETXEN_BDINFO_MAGIC) { |
@@ -1142,7 +1142,6 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
1142 | netxen_nic_driver_name); | 1142 | netxen_nic_driver_name); |
1143 | return; | 1143 | return; |
1144 | } | 1144 | } |
1145 | *ptr32 = le32_to_cpu(*ptr32); | ||
1146 | ptr32++; | 1145 | ptr32++; |
1147 | addr += sizeof(u32); | 1146 | addr += sizeof(u32); |
1148 | } | 1147 | } |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 3cd7e35bfbc7..cf0e96adfe44 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -439,6 +439,7 @@ do_rom_fast_read_words(struct netxen_adapter *adapter, int addr, | |||
439 | ret = do_rom_fast_read(adapter, addridx, (int *)bytes); | 439 | ret = do_rom_fast_read(adapter, addridx, (int *)bytes); |
440 | if (ret != 0) | 440 | if (ret != 0) |
441 | break; | 441 | break; |
442 | *(int *)bytes = cpu_to_le32(*(int *)bytes); | ||
442 | bytes += 4; | 443 | bytes += 4; |
443 | } | 444 | } |
444 | 445 | ||
@@ -496,8 +497,7 @@ static inline int do_rom_fast_write_words(struct netxen_adapter *adapter, | |||
496 | int timeout = 0; | 497 | int timeout = 0; |
497 | int data; | 498 | int data; |
498 | 499 | ||
499 | data = *(u32*)bytes; | 500 | data = le32_to_cpu((*(u32*)bytes)); |
500 | |||
501 | ret = do_rom_fast_write(adapter, addridx, data); | 501 | ret = do_rom_fast_write(adapter, addridx, data); |
502 | if (ret < 0) | 502 | if (ret < 0) |
503 | return ret; | 503 | return ret; |