From owner-svn-src-head@FreeBSD.ORG Tue Mar 17 08:21:32 2015 Return-Path: <owner-svn-src-head@FreeBSD.ORG> Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE8CB5E8; Tue, 17 Mar 2015 08:21:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 B93AE3FD; Tue, 17 Mar 2015 08:21:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2H8LWca051702; Tue, 17 Mar 2015 08:21:32 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2H8LV3R051696; Tue, 17 Mar 2015 08:21:31 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503170821.t2H8LV3R051696@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko <arybchik@FreeBSD.org> Date: Tue, 17 Mar 2015 08:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280162 - in head/sys: dev/sfxge modules/sfxge 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.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current <svn-src-head.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/svn-src-head/> List-Post: <mailto:svn-src-head@freebsd.org> List-Help: <mailto:svn-src-head-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/svn-src-head>, <mailto:svn-src-head-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 17 Mar 2015 08:21:33 -0000 Author: arybchik Date: Tue Mar 17 08:21:31 2015 New Revision: 280162 URL: https://svnweb.freebsd.org/changeset/base/280162 Log: sfxge: adding version info to device description The information is required for NIC update and config tools. Submitted by: Artem V. Andreev <Artem.Andreev at oktetlabs.ru> Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Added: head/sys/dev/sfxge/sfxge_version.h (contents, props changed) Modified: head/sys/dev/sfxge/sfxge.c head/sys/modules/sfxge/Makefile Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Tue Mar 17 08:16:37 2015 (r280161) +++ head/sys/dev/sfxge/sfxge.c Tue Mar 17 08:21:31 2015 (r280162) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" +#include "sfxge_version.h" #define SFXGE_CAP (IFCAP_VLAN_MTU | \ IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ @@ -475,6 +476,12 @@ sfxge_create(struct sfxge_softc *sc) if ((error = efx_nic_probe(enp)) != 0) goto fail5; + SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "version", CTLFLAG_RD, + SFXGE_VERSION_STRING, 0, + "Driver version"); + /* Initialize the NVRAM. */ if ((error = efx_nvram_init(enp)) != 0) goto fail6; Added: head/sys/dev/sfxge/sfxge_version.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/sfxge/sfxge_version.h Tue Mar 17 08:21:31 2015 (r280162) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2015 Solarflare Communications, Inc. + * All rights reserved. + * + * This software was developed in part by OKTET Labs under contract for + * Solarflare Communications, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SFXGE_VERSION_H +#define _SFXGE_VERSION_H + +#define SFXGE_VERSION_STRING "v3.3.4.6363" + +#endif /* _SFXGE_DRIVER_VERSION_H */ Modified: head/sys/modules/sfxge/Makefile ============================================================================== --- head/sys/modules/sfxge/Makefile Tue Mar 17 08:16:37 2015 (r280161) +++ head/sys/modules/sfxge/Makefile Tue Mar 17 08:21:31 2015 (r280162) @@ -11,7 +11,7 @@ SRCS+= opt_inet.h opt_inet6.h opt_sched. SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c SRCS+= sfxge_intr.c sfxge_mcdi.c SRCS+= sfxge_port.c sfxge_rx.c sfxge_tx.c -SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h +SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h .PATH: ${.CURDIR}/../../dev/sfxge/common SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c