1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

cxgbe(4): Use correct port_info in the call to is_bt().

This fixes a panic during configuration if the tx channel of a port
isn't the same as its port id.

Reported by:	Fabrice Bruel
MFC after:	1 week
Sponsored by:	Chelsio Communications
This commit is contained in:
Navdeep Parhar 2019-02-25 15:47:22 +00:00
parent 9a593520b5
commit d18c10d066
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344519

View File

@ -3894,7 +3894,7 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port,
speed = fwcap_top_speed(lc->supported);
/* Force AN on for BT cards. */
if (is_bt(adap->port[port]))
if (is_bt(adap->port[adap->chan_map[port]]))
aneg = lc->supported & FW_PORT_CAP32_ANEG;
rcap = aneg | speed | fc | fec;