dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Amit Kumar Salecha 2010-04-01 19:01:28 +00:00 committed by David S. Miller
parent 4e4f10f649
commit 0bc92b5b49
1 changed files with 10 additions and 0 deletions

View File

@ -949,6 +949,16 @@ qlcnic_load_firmware(struct qlcnic_adapter *adapter)
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 {
u64 data;
u32 hi, lo;