From owner-svn-src-head@freebsd.org Wed Jun 29 06:55:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B560B86AC3; Wed, 29 Jun 2016 06:55:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5258726CB; Wed, 29 Jun 2016 06:55:31 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5T6tUM4076810; Wed, 29 Jun 2016 06:55:30 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5T6tUEe076808; Wed, 29 Jun 2016 06:55:30 GMT (envelope-from np@FreeBSD.org) Message-Id: <201606290655.u5T6tUEe076808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 29 Jun 2016 06:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302263 - in head/sys/dev/cxgbe: . tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2016 06:55:31 -0000 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; }