Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Aug 2017 01:28:06 +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: r322034 - head/sys/dev/cxgbe
Message-ID:  <201708040128.v741S6jd049409@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Fri Aug  4 01:28:06 2017
New Revision: 322034
URL: https://svnweb.freebsd.org/changeset/base/322034

Log:
  cxgbe(4): Always use the first and not the last virtual interface
  associated with a port in begin_synchronized_op.
  
  MFC after:	3 days
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Thu Aug  3 22:41:34 2017	(r322033)
+++ head/sys/dev/cxgbe/t4_main.c	Fri Aug  4 01:28:06 2017	(r322034)
@@ -9236,12 +9236,13 @@ t4_os_portmod_changed(struct port_info *pi, int old_pt
 		build_medialist(pi, &vi->media);
 	}
 	PORT_UNLOCK(pi);
+	vi = &pi->vi[0];
 	if (begin_synchronized_op(pi->adapter, vi, HOLD_LOCK, "t4mod") == 0) {
 		init_l1cfg(pi);
 		end_synchronized_op(pi->adapter, LOCK_HELD);
 	}
 
-	ifp = pi->vi[0].ifp;
+	ifp = vi->ifp;
 	if (pi->mod_type == FW_PORT_MOD_TYPE_NONE)
 		if_printf(ifp, "transceiver unplugged.\n");
 	else if (pi->mod_type == FW_PORT_MOD_TYPE_UNKNOWN)



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