Commit 0bc92b5b authored by Amit Kumar Salecha's avatar Amit Kumar Salecha Committed by David S. Miller

qlcnic: fix fw load from file

Rarely: Fw file size can be unaligned to 8.
Signed-off-by: default avatarAmit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4e4f10f6
...@@ -949,6 +949,16 @@ qlcnic_load_firmware(struct qlcnic_adapter *adapter) ...@@ -949,6 +949,16 @@ qlcnic_load_firmware(struct qlcnic_adapter *adapter)
flashaddr += 8; flashaddr += 8;
} }
size = (__force u32)qlcnic_get_fw_size(adapter) % 8;
if (size) {
data = cpu_to_le64(ptr64[i]);
if (qlcnic_pci_mem_write_2M(adapter,
flashaddr, data))
return -EIO;
}
} else { } else {
u64 data; u64 data;
u32 hi, lo; u32 hi, lo;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment