Skip to content

Commit

Permalink
qlcnic: fix fw load from file
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amit Kumar Salecha authored and David S. Miller committed Apr 3, 2010
1 parent 4e4f10f commit 0bc92b5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/net/qlcnic/qlcnic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0bc92b5

Please sign in to comment.