Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Aug 2017 07:50:54 +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: r322964 - head/sys/dev/cxgbe
Message-ID:  <201708280750.v7S7ostW014185@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Mon Aug 28 07:50:54 2017
New Revision: 322964
URL: https://svnweb.freebsd.org/changeset/base/322964

Log:
  cxgbe(4): vi_mac_funcs should include the base Ethernet function.  It is
  already used in the driver as if it does.
  
  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	Mon Aug 28 06:17:04 2017	(r322963)
+++ head/sys/dev/cxgbe/t4_main.c	Mon Aug 28 07:50:54 2017	(r322964)
@@ -467,8 +467,9 @@ TUNABLE_INT("hw.cxl.write_combine", &t5_write_combine)
 static int t4_num_vis = 1;
 TUNABLE_INT("hw.cxgbe.num_vis", &t4_num_vis);
 
-/* Functions used by extra VIs to obtain unique MAC addresses for each VI. */
+/* Functions used by VIs to obtain unique MAC addresses for each VI. */
 static int vi_mac_funcs[] = {
+	FW_VI_FUNC_ETH,
 	FW_VI_FUNC_OFLD,
 	FW_VI_FUNC_IWARP,
 	FW_VI_FUNC_OPENISCSI,
@@ -2146,6 +2147,7 @@ vcxgbe_attach(device_t dev)
 	sc = pi->adapter;
 
 	index = vi - pi->vi;
+	MPASS(index > 0);	/* This function deals with _extra_ VIs only */
 	KASSERT(index < nitems(vi_mac_funcs),
 	    ("%s: VI %s doesn't have a MAC func", __func__,
 	    device_get_nameunit(dev)));



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