Date: Thu, 18 Apr 2013 22:54:42 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249629 - head/sys/dev/cxgbe/common Message-ID: <201304182254.r3IMsgHt041609@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu Apr 18 22:54:41 2013 New Revision: 249629 URL: http://svnweb.freebsd.org/changeset/base/249629 Log: cxgbe(4): Refuse to install T5 firmwares on a T4 card (and vice versa). MFC after: 1 week Modified: head/sys/dev/cxgbe/common/t4_hw.c Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Thu Apr 18 20:13:33 2013 (r249628) +++ head/sys/dev/cxgbe/common/t4_hw.c Thu Apr 18 22:54:41 2013 (r249629) @@ -1136,6 +1136,13 @@ int t4_load_fw(struct adapter *adap, con 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]);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304182254.r3IMsgHt041609>