diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-03-13 15:52:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-14 22:00:31 +0100 |
commit | fbb52f2272e6265295f0e5f6187b628e4c162eca (patch) | |
tree | f2e124665ad6a3593447f8a89e930c9467aef717 /drivers/net/netxen | |
parent | ixgbe: Add documentation for the driver (diff) | |
download | linux-fbb52f2272e6265295f0e5f6187b628e4c162eca.tar.xz linux-fbb52f2272e6265295f0e5f6187b628e4c162eca.zip |
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')
-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) u32 fw_major, fw_minor, fw_build; char brd_name[NETXEN_MAX_SHORT_NAME]; char serial_num[32]; - int i, addr; + int i, addr, val; int *ptr32; struct pci_dev *pdev = adapter->pdev; @@ -2278,14 +2278,12 @@ void netxen_nic_get_firmware_info(struct netxen_adapter *adapter) addr = NETXEN_USER_START + offsetof(struct netxen_new_user_info, serial_num); for (i = 0; i < 8; i++) { - if (netxen_rom_fast_read(adapter, addr, ptr32) == -1) { - printk("%s: ERROR reading %s board userarea.\n", - netxen_nic_driver_name, - netxen_nic_driver_name); + if (netxen_rom_fast_read(adapter, addr, &val) == -1) { + dev_err(&pdev->dev, "error reading board info\n"); adapter->driver_mismatch = 1; return; } - ptr32++; + ptr32[i] = cpu_to_le32(val); addr += sizeof(u32); } |