From owner-svn-src-all@freebsd.org Mon May 16 06:26:20 2016 Return-Path: Delivered-To: svn-src-all@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 07229B3D257; Mon, 16 May 2016 06:26:20 +0000 (UTC) (envelope-from arybchik@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 B2E581166; Mon, 16 May 2016 06:26:19 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4G6QIoN060506; Mon, 16 May 2016 06:26:18 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4G6QIK7060503; Mon, 16 May 2016 06:26:18 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201605160626.u4G6QIK7060503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 16 May 2016 06:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299901 - head/sys/dev/sfxge/common X-SVN-Group: head 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.22 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: Mon, 16 May 2016 06:26:20 -0000 Author: arybchik Date: Mon May 16 06:26:18 2016 New Revision: 299901 URL: https://svnweb.freebsd.org/changeset/base/299901 Log: sfxge(4): cleanup: make VPD lookups quieter A lookup on a VPD entry which is missing reports several failure messages as it propagates through wrapper functions. Restructured the wrappers to treat this gracefully as an expected case. Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6366 Modified: head/sys/dev/sfxge/common/ef10_vpd.c head/sys/dev/sfxge/common/efx_vpd.c head/sys/dev/sfxge/common/siena_vpd.c Modified: head/sys/dev/sfxge/common/ef10_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/ef10_vpd.c Mon May 16 06:24:04 2016 (r299900) +++ head/sys/dev/sfxge/common/ef10_vpd.c Mon May 16 06:26:18 2016 (r299901) @@ -332,8 +332,11 @@ ef10_vpd_get( /* And then from the provided data buffer */ if ((rc = efx_vpd_hunk_get(data, size, evvp->evv_tag, - evvp->evv_keyword, &offset, &length)) != 0) + evvp->evv_keyword, &offset, &length)) != 0) { + if (rc == ENOENT) + return (rc); goto fail2; + } evvp->evv_length = length; memcpy(evvp->evv_value, data + offset, length); Modified: head/sys/dev/sfxge/common/efx_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/efx_vpd.c Mon May 16 06:24:04 2016 (r299900) +++ head/sys/dev/sfxge/common/efx_vpd.c Mon May 16 06:26:18 2016 (r299901) @@ -253,8 +253,12 @@ efx_vpd_get( EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VPD); - if ((rc = evpdop->evpdo_get(enp, data, size, evvp)) != 0) + if ((rc = evpdop->evpdo_get(enp, data, size, evvp)) != 0) { + if (rc == ENOENT) + return (rc); + goto fail1; + } return (0); Modified: head/sys/dev/sfxge/common/siena_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/siena_vpd.c Mon May 16 06:24:04 2016 (r299900) +++ head/sys/dev/sfxge/common/siena_vpd.c Mon May 16 06:26:18 2016 (r299901) @@ -436,8 +436,12 @@ siena_vpd_get( /* And then from the provided data buffer */ if ((rc = efx_vpd_hunk_get(data, size, evvp->evv_tag, - evvp->evv_keyword, &offset, &length)) != 0) + evvp->evv_keyword, &offset, &length)) != 0) { + if (rc == ENOENT) + return (rc); + goto fail2; + } evvp->evv_length = length; memcpy(evvp->evv_value, data + offset, length);