From owner-svn-src-user@freebsd.org Thu May 12 20:14:45 2016 Return-Path: Delivered-To: svn-src-user@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 829DBB39427 for ; Thu, 12 May 2016 20:14:45 +0000 (UTC) (envelope-from ngie@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 3B74B1CD1; Thu, 12 May 2016 20:14:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4CKEinb041044; Thu, 12 May 2016 20:14:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4CKEif0041043; Thu, 12 May 2016 20:14:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201605122014.u4CKEif0041043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 12 May 2016 20:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r299565 - user/ngie/ntb-hacking/sys/dev/ntb/if_ntb X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2016 20:14:45 -0000 Author: ngie Date: Thu May 12 20:14:44 2016 New Revision: 299565 URL: https://svnweb.freebsd.org/changeset/base/299565 Log: Pass net_softc into ntb_transport_probe instead of passing in the instance variable and using the global value stored in net_softc in ntb_transport_probe(..) This has been this way since the initial import to head@r250079 Sponsored by: EMC / Isilon Storage Division Modified: user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c Modified: user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c Thu May 12 20:13:16 2016 (r299564) +++ user/ngie/ntb-hacking/sys/dev/ntb/if_ntb/if_ntb.c Thu May 12 20:14:44 2016 (r299565) @@ -303,8 +303,8 @@ static void ntb_net_tx_handler(struct nt static void ntb_net_rx_handler(struct ntb_transport_qp *qp, void *qp_data, void *data, int len); static void ntb_net_event_handler(void *data, enum ntb_link_event status); -static int ntb_transport_probe(struct ntb_softc *ntb); -static void ntb_transport_free(struct ntb_transport_ctx *); +static int ntb_transport_probe(struct ntb_transport_ctx *nt); +static void ntb_transport_free(struct ntb_transport_ctx *nt); static void ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num); static void ntb_transport_free_queue(struct ntb_transport_qp *qp); @@ -416,7 +416,7 @@ ntb_setup_interface(void) } if_initname(ifp, "ntb", 0); - rc = ntb_transport_probe(net_softc.ntb); + rc = ntb_transport_probe(&net_softc); if (rc != 0) { printf("ntb: Cannot init transport: %d\n", rc); return (rc); @@ -595,14 +595,15 @@ xeon_link_watchdog_hb(void *arg) } static int -ntb_transport_probe(struct ntb_softc *ntb) +ntb_transport_probe(struct ntb_transport_ctx *nt) { - struct ntb_transport_ctx *nt = &net_softc; + struct ntb_softc *ntb; struct ntb_transport_mw *mw; uint64_t qp_bitmap; int rc; unsigned i; + ntb = nt->ntb; nt->mw_count = ntb_mw_count(ntb); for (i = 0; i < nt->mw_count; i++) { mw = &nt->mw_vec[i];