From owner-svn-src-head@freebsd.org Tue Jun 20 18:14:57 2017 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 70541D9E7E7; Tue, 20 Jun 2017 18:14:57 +0000 (UTC) (envelope-from loos@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 3ED186A1E4; Tue, 20 Jun 2017 18:14:57 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KIEutO067124; Tue, 20 Jun 2017 18:14:56 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KIEuS4067123; Tue, 20 Jun 2017 18:14:56 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201706201814.v5KIEuS4067123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Tue, 20 Jun 2017 18:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320158 - head/sys/dev/neta 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.23 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: Tue, 20 Jun 2017 18:14:57 -0000 Author: loos Date: Tue Jun 20 18:14:56 2017 New Revision: 320158 URL: https://svnweb.freebsd.org/changeset/base/320158 Log: Allow the use of extended media types with if_mvneta, so it can report 2.5G speeds properly. While here remove a couple of stray white spaces. Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/neta/if_mvneta.c Modified: head/sys/dev/neta/if_mvneta.c ============================================================================== --- head/sys/dev/neta/if_mvneta.c Tue Jun 20 18:11:23 2017 (r320157) +++ head/sys/dev/neta/if_mvneta.c Tue Jun 20 18:14:56 2017 (r320158) @@ -2100,6 +2100,7 @@ mvneta_ioctl(struct ifnet *ifp, u_long cmd, caddr_t da break; } case SIOCGIFMEDIA: /* FALLTHROUGH */ + case SIOCGIFXMEDIA: if (!sc->phy_attached) error = ifmedia_ioctl(ifp, ifr, &sc->mvneta_ifmedia, cmd); @@ -2469,7 +2470,7 @@ mvneta_adjust_link(struct mvneta_softc *sc) mvneta_linkupdate(sc, phy_linkup); /* Don't update media on disabled link */ - if (!phy_linkup ) + if (!phy_linkup) return; /* Check for media type change */ @@ -3547,7 +3548,7 @@ mvneta_update_mib(struct mvneta_softc *sc) if_inc_counter(sc->ifp, IFCOUNTER_IQDROPS, reg); /* TX watchdog. */ - if (sc->counter_watchdog_mib > 0 ) { + if (sc->counter_watchdog_mib > 0) { if_inc_counter(sc->ifp, IFCOUNTER_OERRORS, sc->counter_watchdog_mib); sc->counter_watchdog_mib = 0; }