From owner-svn-src-all@freebsd.org Tue Apr 30 16:52:52 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BB001597CCD; Tue, 30 Apr 2019 16:52:52 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 021A183453; Tue, 30 Apr 2019 16:52:52 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CDE5CC9CF; Tue, 30 Apr 2019 16:52:51 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x3UGqpmg057756; Tue, 30 Apr 2019 16:52:51 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x3UGqpBP057753; Tue, 30 Apr 2019 16:52:51 GMT (envelope-from np@FreeBSD.org) Message-Id: <201904301652.x3UGqpBP057753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 30 Apr 2019 16:52:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r346964 - in stable/11/sys/dev/cxgbe: . common X-SVN-Group: stable-11 X-SVN-Commit-Author: np X-SVN-Commit-Paths: in stable/11/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 346964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 021A183453 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2019 16:52:52 -0000 Author: np Date: Tue Apr 30 16:52:50 2019 New Revision: 346964 URL: https://svnweb.freebsd.org/changeset/base/346964 Log: MFC r343889, r344519, r344682, r344719 r343889: cxgbev(4): Initialize debug_flags from the environment like in the PF driver. 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/11/sys/dev/cxgbe/common/t4_hw.c stable/11/sys/dev/cxgbe/t4_main.c stable/11/sys/dev/cxgbe/t4_vf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- stable/11/sys/dev/cxgbe/common/t4_hw.c Tue Apr 30 16:41:27 2019 (r346963) +++ stable/11/sys/dev/cxgbe/common/t4_hw.c Tue Apr 30 16:52:50 2019 (r346964) @@ -3892,7 +3892,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/11/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_main.c Tue Apr 30 16:41:27 2019 (r346963) +++ stable/11/sys/dev/cxgbe/t4_main.c Tue Apr 30 16:52:50 2019 (r346964) @@ -5002,6 +5002,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/11/sys/dev/cxgbe/t4_vf.c ============================================================================== --- stable/11/sys/dev/cxgbe/t4_vf.c Tue Apr 30 16:41:27 2019 (r346963) +++ stable/11/sys/dev/cxgbe/t4_vf.c Tue Apr 30 16:52:50 2019 (r346964) @@ -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); } @@ -479,6 +485,7 @@ t4vf_attach(device_t dev) sc->params.pci.mps = pci_get_max_payload(dev); sc->flags |= IS_VF; + TUNABLE_INT_FETCH("hw.cxgbe.dflags", &sc->debug_flags); sc->sge_gts_reg = VF_SGE_REG(A_SGE_VF_GTS); sc->sge_kdoorbell_reg = VF_SGE_REG(A_SGE_VF_KDOORBELL);