aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-03-28 22:43:44 -0400
committerDavid S. Miller <davem@davemloft.net>2010-03-29 16:18:37 -0400
commite270299a2f7a3040fe598113f74c2a7d5f63b582 (patch)
tree6962a9b6ba188eb199c828d4e2527e14aff20528 /drivers/net/netxen
parent10c0f2a852a529eacf2f223bbaef47832224a521 (diff)
netxen: fix fw load from file
Rarely: Fw file size can be unaligned to 8. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 141bc4389fec..439f3e859693 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -1019,6 +1019,16 @@ netxen_load_firmware(struct netxen_adapter *adapter)
1019 1019
1020 flashaddr += 8; 1020 flashaddr += 8;
1021 } 1021 }
1022
1023 size = (__force u32)nx_get_fw_size(adapter) % 8;
1024 if (size) {
1025 data = cpu_to_le64(ptr64[i]);
1026
1027 if (adapter->pci_mem_write(adapter,
1028 flashaddr, data))
1029 return -EIO;
1030 }
1031
1022 } else { 1032 } else {
1023 u64 data; 1033 u64 data;
1024 u32 hi, lo; 1034 u32 hi, lo;