From owner-svn-src-all@freebsd.org Tue Sep 1 21:50:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D711D37C177; Tue, 1 Sep 2020 21:50:22 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bh12k5PcZz4Tqr; Tue, 1 Sep 2020 21:50:22 +0000 (UTC) (envelope-from mjg@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9D6FC2022B; Tue, 1 Sep 2020 21:50:22 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 081LoMlr040848; Tue, 1 Sep 2020 21:50:22 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081LoMqj040847; Tue, 1 Sep 2020 21:50:22 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012150.081LoMqj040847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 1 Sep 2020 21:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365143 - head/sys/dev/tsec X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/tsec X-SVN-Commit-Revision: 365143 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 21:50:22 -0000 Author: mjg Date: Tue Sep 1 21:50:21 2020 New Revision: 365143 URL: https://svnweb.freebsd.org/changeset/base/365143 Log: tsec: clean up empty lines in .c and .h files Modified: head/sys/dev/tsec/if_tsec.c head/sys/dev/tsec/if_tsec.h Modified: head/sys/dev/tsec/if_tsec.c ============================================================================== --- head/sys/dev/tsec/if_tsec.c Tue Sep 1 21:50:00 2020 (r365142) +++ head/sys/dev/tsec/if_tsec.c Tue Sep 1 21:50:21 2020 (r365143) @@ -269,7 +269,7 @@ tsec_attach(struct tsec_softc *sc) /* Advertise that polling is supported */ ifp->if_capabilities |= IFCAP_POLLING; #endif - + /* Attach PHY(s) */ error = mii_attach(sc->dev, &sc->tsec_miibus, ifp, tsec_ifmedia_upd, tsec_ifmedia_sts, BMSR_DEFCAPMASK, sc->phyaddr, MII_OFFSET_ANY, @@ -373,7 +373,6 @@ tsec_mii_wait(struct tsec_softc *sc, uint32_t flags) return (timeout == 0); } - static void tsec_init_locked(struct tsec_softc *sc) { @@ -556,7 +555,7 @@ tsec_init_locked(struct tsec_softc *sc) /* Step 26: Setup multicast filters */ tsec_setup_multicast(sc); - + /* Step 27: Activate network interface */ ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; @@ -742,7 +741,6 @@ tsec_start_locked(struct ifnet *ifp) BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); for (;;) { - if (TSEC_FREE_TX_DESC(sc) < TSEC_TX_MAX_DMA_SEGS) { /* No free descriptors */ ifp->if_drv_flags |= IFF_DRV_OACTIVE; @@ -806,7 +804,7 @@ tsec_encap(struct ifnet *ifp, struct tsec_softc *sc, s tx_idx = sc->tx_idx_head; tx_bufmap = &sc->tx_bufmap[tx_idx]; - + /* Create mapping in DMA memory */ error = bus_dmamap_load_mbuf_sg(sc->tsec_tx_mtag, tx_bufmap->map, m0, segs, &nsegs, BUS_DMA_NOWAIT); @@ -831,7 +829,7 @@ tsec_encap(struct ifnet *ifp, struct tsec_softc *sc, s bus_dmamap_sync(sc->tsec_tx_mtag, tx_bufmap->map, BUS_DMASYNC_PREWRITE); tx_bufmap->mbuf = m0; - + /* * Fill in the TX descriptors back to front so that READY bit in first * descriptor is set last. @@ -1328,7 +1326,6 @@ tsec_receive_intr_locked(struct tsec_softc *sc, int co if (flags & (TSEC_RXBD_LG | TSEC_RXBD_SH | TSEC_RXBD_NO | TSEC_RXBD_CR | TSEC_RXBD_OV | TSEC_RXBD_TR)) { - rx_desc->length = 0; rx_desc->flags = (rx_desc->flags & ~TSEC_RXBD_ZEROONINIT) | TSEC_RXBD_E | TSEC_RXBD_I; @@ -1847,7 +1844,6 @@ tsec_offload_setup(struct tsec_softc *sc) TSEC_WRITE(sc, TSEC_REG_RCTRL, reg); } - static void tsec_offload_process_frame(struct tsec_softc *sc, struct mbuf *m) { @@ -1871,7 +1867,6 @@ tsec_offload_process_frame(struct tsec_softc *sc, stru if ((protocol == IPPROTO_TCP || protocol == IPPROTO_UDP) && TSEC_RX_FCB_TCP_UDP_CSUM_CHECKED(flags) && (flags & TSEC_RX_FCB_TCP_UDP_CSUM_ERROR) == 0) { - csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; m->m_pkthdr.csum_data = 0xFFFF; } Modified: head/sys/dev/tsec/if_tsec.h ============================================================================== --- head/sys/dev/tsec/if_tsec.h Tue Sep 1 21:50:00 2020 (r365142) +++ head/sys/dev/tsec/if_tsec.h Tue Sep 1 21:50:21 2020 (r365143) @@ -56,7 +56,7 @@ struct tsec_bufmap { struct tsec_softc { /* XXX MII bus requires that struct ifnet is first!!! */ struct ifnet *tsec_ifp; - + struct mtx transmit_lock; /* transmitter lock */ struct mtx receive_lock; /* receiver lock */