Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2019 16:52:51 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
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
Message-ID:  <201904301652.x3UGqpBP057753@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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, &param, &val);
 
+	/* Enable 32b port caps if the firmware supports it. */
+	param = FW_PARAM_PFVF(PORT_CAPS32);
+	val = 1;
+	if (t4vf_set_params(sc, 1, &param, &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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904301652.x3UGqpBP057753>