mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
cxgbe(4): Refuse to install T5 firmwares on a T4 card (and vice versa).
MFC after: 1 week
This commit is contained in:
parent
2c5b403e2d
commit
3cc7ae06fd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249629
@ -1136,6 +1136,13 @@ int t4_load_fw(struct adapter *adap, const u8 *fw_data, unsigned int size)
|
||||
FLASH_FW_MAX_SIZE);
|
||||
return -EFBIG;
|
||||
}
|
||||
if ((is_t4(adap) && hdr->chip != FW_HDR_CHIP_T4) ||
|
||||
(is_t5(adap) && hdr->chip != FW_HDR_CHIP_T5)) {
|
||||
CH_ERR(adap,
|
||||
"FW image (%d) is not suitable for this adapter (%d)\n",
|
||||
hdr->chip, chip_id(adap));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
for (csum = 0, i = 0; i < size / sizeof(csum); i++)
|
||||
csum += ntohl(p[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user