Author: np
Date: Wed Jun 29 06:55:30 2016
New Revision: 302263
URL: https://svnweb.freebsd.org/changeset/base/302263

Log:
  cxgbe(4):  Do not bring up an interface when IFCAP_TOE is enabled on it.
  The interface's queues are functional after VI_INIT_DONE (which is short
  of interface-up) and that's all that's needed for t4_tom to communicate
  with the chip.
  
  Approved by:  re@ (gjb@)
  Sponsored by: Chelsio Communications

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

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c        Wed Jun 29 06:42:20 2016        
(r302262)
+++ head/sys/dev/cxgbe/t4_main.c        Wed Jun 29 06:55:30 2016        
(r302263)
@@ -8981,12 +8981,12 @@ toe_capability(struct vi_info *vi, int e
                 * port has never been UP'd administratively.
                 */
                if (!(vi->flags & VI_INIT_DONE)) {
-                       rc = cxgbe_init_synchronized(vi);
+                       rc = vi_full_init(vi);
                        if (rc)
                                return (rc);
                }
                if (!(pi->vi[0].flags & VI_INIT_DONE)) {
-                       rc = cxgbe_init_synchronized(&pi->vi[0]);
+                       rc = vi_full_init(&pi->vi[0]);
                        if (rc)
                                return (rc);
                }

Modified: head/sys/dev/cxgbe/tom/t4_listen.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_listen.c  Wed Jun 29 06:42:20 2016        
(r302262)
+++ head/sys/dev/cxgbe/tom/t4_listen.c  Wed Jun 29 06:55:30 2016        
(r302263)
@@ -532,7 +532,7 @@ t4_listen_start(struct toedev *tod, stru
 #endif
 
        /*
-        * Find a running VI with IFCAP_TOE (4 or 6).  We'll use the first
+        * Find an initialized VI with IFCAP_TOE (4 or 6).  We'll use the first
         * such VI's queues to send the passive open and receive the reply to
         * it.
         *
@@ -543,7 +543,7 @@ t4_listen_start(struct toedev *tod, stru
        for_each_port(sc, i) {
                pi = sc->port[i];
                for_each_vi(pi, v, vi) {
-                       if (vi->ifp->if_drv_flags & IFF_DRV_RUNNING &&
+                       if (vi->flags & VI_INIT_DONE &&
                            vi->ifp->if_capenable & IFCAP_TOE)
                                goto found;
                }
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to