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)));
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to