From owner-svn-src-stable@freebsd.org Mon Mar 9 14:13:41 2020 Return-Path: Delivered-To: svn-src-stable@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 8546326375E; Mon, 9 Mar 2020 14:13:41 +0000 (UTC) (envelope-from emaste@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) server-signature RSA-PSS (4096 bits) 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 48bgF11WZ9z43sV; Mon, 9 Mar 2020 14:13:41 +0000 (UTC) (envelope-from emaste@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 11955C13C; Mon, 9 Mar 2020 14:13:41 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 029EDeXU037544; Mon, 9 Mar 2020 14:13:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 029EDeC2037543; Mon, 9 Mar 2020 14:13:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202003091413.029EDeC2037543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Mar 2020 14:13:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r358809 - stable/12/sys/dev/usb/net X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/sys/dev/usb/net X-SVN-Commit-Revision: 358809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2020 14:13:41 -0000 Author: emaste Date: Mon Mar 9 14:13:40 2020 New Revision: 358809 URL: https://svnweb.freebsd.org/changeset/base/358809 Log: MFC r358299: muge: fix rxcsum enable test if_capabilities indicates capabilities supported by the hardware; if_capenable which are enabled. Note that rx checksum is still disabled in the driver at compile time. Submitted by: Johannes Modified: stable/12/sys/dev/usb/net/if_muge.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/usb/net/if_muge.c ============================================================================== --- stable/12/sys/dev/usb/net/if_muge.c Mon Mar 9 13:44:51 2020 (r358808) +++ stable/12/sys/dev/usb/net/if_muge.c Mon Mar 9 14:13:40 2020 (r358809) @@ -1259,7 +1259,7 @@ muge_bulk_read_callback(struct usb_xfer *xfer, usb_err * Check if RX checksums are computed, and * offload them */ - if ((ifp->if_capabilities & IFCAP_RXCSUM) && + if ((ifp->if_capenable & IFCAP_RXCSUM) && !(rx_cmd_a & RX_CMD_A_ICSM_)) { struct ether_header *eh; eh = mtod(m, struct ether_header *); @@ -1971,7 +1971,7 @@ static int muge_sethwcsum(struct muge_softc *sc) MUGE_LOCK_ASSERT(sc, MA_OWNED); - if (ifp->if_capabilities & IFCAP_RXCSUM) { + if (ifp->if_capenable & IFCAP_RXCSUM) { sc->sc_rfe_ctl |= ETH_RFE_CTL_IGMP_COE_ | ETH_RFE_CTL_ICMP_COE_; sc->sc_rfe_ctl |= ETH_RFE_CTL_TCPUDP_COE_ | ETH_RFE_CTL_IP_COE_; } else {