Date: Tue, 03 Sep 2019 14:05:55 -0000 From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345619 - in stable/12/sys/dev/cxgbe: . common Message-ID: <201903272227.x2RMRPbZ073028@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Wed Mar 27 22:27:25 2019 New Revision: 345619 URL: https://svnweb.freebsd.org/changeset/base/345619 Log: MFC r344519, r344682, and r344719. r344519: 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 Sponsored by: Chelsio Communications r344682: cxgbe(4): Don't forget to report link state to the kernel if the link is already up at attach. Reported by: Fabrice Bruel @ Orange Business Service Sponsored by: Chelsio Communications r344719: cxgbev(4): Enable 32b port capabilities in the VF driver. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c stable/12/sys/dev/cxgbe/t4_main.c stable/12/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 22:21:09 2019 (r345618) +++ stable/12/sys/dev/cxgbe/common/t4_hw.c Wed Mar 27 22:27:25 2019 (r345619) @@ -3910,7 +3910,7 @@ int t4_link_l1cfg(struct adapter *adap, unsigned int m 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; Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 22:21:09 2019 (r345618) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 22:27:25 2019 (r345619) @@ -4970,6 +4970,8 @@ cxgbe_init_synchronized(struct vi_info *vi) callout_reset(&vi->tick, hz, vi_tick, vi); else callout_reset(&pi->tick, hz, cxgbe_tick, pi); + if (pi->link_cfg.link_ok) + t4_os_link_changed(pi); PORT_UNLOCK(pi); done: if (rc != 0) Modified: stable/12/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_vf.c Wed Mar 27 22:21:09 2019 (r345618) +++ stable/12/sys/dev/cxgbe/t4_vf.c Wed Mar 27 22:27:25 2019 (r345619) @@ -295,6 +295,12 @@ set_params__post_init(struct adapter *sc) val = 1; (void)t4vf_set_params(sc, 1, ¶m, &val); + /* Enable 32b port caps if the firmware supports it. */ + param = FW_PARAM_PFVF(PORT_CAPS32); + val = 1; + if (t4vf_set_params(sc, 1, ¶m, &val) == 0) + sc->params.port_caps32 = 1; + return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903272227.x2RMRPbZ073028>