diff options
author | Amit Kumar Salecha <amit.salecha@qlogic.com> | 2010-04-01 15:01:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-03 17:19:12 -0400 |
commit | 0bc92b5b4987ab55f2b75ef42251476b2e049e3d (patch) | |
tree | 7e0ee140c0723651f47fc8d8536099215e84ee9a /drivers | |
parent | 4e4f10f6498bc5038c0a110b5f21682fcb5578d7 (diff) |
qlcnic: 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')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c index 7c34e4e29b3f..0a424e038cff 100644 --- a/drivers/net/qlcnic/qlcnic_init.c +++ b/drivers/net/qlcnic/qlcnic_init.c | |||
@@ -949,6 +949,16 @@ qlcnic_load_firmware(struct qlcnic_adapter *adapter) | |||
949 | 949 | ||
950 | flashaddr += 8; | 950 | flashaddr += 8; |
951 | } | 951 | } |
952 | |||
953 | size = (__force u32)qlcnic_get_fw_size(adapter) % 8; | ||
954 | if (size) { | ||
955 | data = cpu_to_le64(ptr64[i]); | ||
956 | |||
957 | if (qlcnic_pci_mem_write_2M(adapter, | ||
958 | flashaddr, data)) | ||
959 | return -EIO; | ||
960 | } | ||
961 | |||
952 | } else { | 962 | } else { |
953 | u64 data; | 963 | u64 data; |
954 | u32 hi, lo; | 964 | u32 hi, lo; |