Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e270299a authored by Amit Kumar Salecha's avatar Amit Kumar Salecha Committed by David S. Miller
Browse files

netxen: 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 10c0f2a8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1019,6 +1019,16 @@ netxen_load_firmware(struct netxen_adapter *adapter)

			flashaddr += 8;
		}

		size = (__force u32)nx_get_fw_size(adapter) % 8;
		if (size) {
			data = cpu_to_le64(ptr64[i]);

			if (adapter->pci_mem_write(adapter,
						flashaddr, data))
				return -EIO;
		}

	} else {
		u64 data;
		u32 hi, lo;