diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-03-13 10:52:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-14 17:00:31 -0400 |
commit | fbb52f2272e6265295f0e5f6187b628e4c162eca (patch) | |
tree | f2e124665ad6a3593447f8a89e930c9467aef717 /drivers/net/netxen/netxen_nic_hw.c | |
parent | 09e1c061484005aa26264c3f82f2c83a273c4094 (diff) |
netxen: fix endianness in serial number
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index a93ab589d9ce..8db4ac344146 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -2268,7 +2268,7 @@ void netxen_nic_get_firmware_info(struct netxen_adapter *adapter) | |||
2268 | u32 fw_major, fw_minor, fw_build; | 2268 | u32 fw_major, fw_minor, fw_build; |
2269 | char brd_name[NETXEN_MAX_SHORT_NAME]; | 2269 | char brd_name[NETXEN_MAX_SHORT_NAME]; |
2270 | char serial_num[32]; | 2270 | char serial_num[32]; |
2271 | int i, addr; | 2271 | int i, addr, val; |
2272 | int *ptr32; | 2272 | int *ptr32; |
2273 | struct pci_dev *pdev = adapter->pdev; | 2273 | struct pci_dev *pdev = adapter->pdev; |
2274 | 2274 | ||
@@ -2278,14 +2278,12 @@ void netxen_nic_get_firmware_info(struct netxen_adapter *adapter) | |||
2278 | addr = NETXEN_USER_START + | 2278 | addr = NETXEN_USER_START + |
2279 | offsetof(struct netxen_new_user_info, serial_num); | 2279 | offsetof(struct netxen_new_user_info, serial_num); |
2280 | for (i = 0; i < 8; i++) { | 2280 | for (i = 0; i < 8; i++) { |
2281 | if (netxen_rom_fast_read(adapter, addr, ptr32) == -1) { | 2281 | if (netxen_rom_fast_read(adapter, addr, &val) == -1) { |
2282 | printk("%s: ERROR reading %s board userarea.\n", | 2282 | dev_err(&pdev->dev, "error reading board info\n"); |
2283 | netxen_nic_driver_name, | ||
2284 | netxen_nic_driver_name); | ||
2285 | adapter->driver_mismatch = 1; | 2283 | adapter->driver_mismatch = 1; |
2286 | return; | 2284 | return; |
2287 | } | 2285 | } |
2288 | ptr32++; | 2286 | ptr32[i] = cpu_to_le32(val); |
2289 | addr += sizeof(u32); | 2287 | addr += sizeof(u32); |
2290 | } | 2288 | } |
2291 | 2289 | ||