summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarybchik <arybchik@FreeBSD.org>2016-06-04 16:25:18 +0000
committerarybchik <arybchik@FreeBSD.org>2016-06-04 16:25:18 +0000
commiteb82ace472d75a342f5719dee528cdf6078bb253 (patch)
tree98d6a9876fdcdc066eb572e531c98ddcbd64271d
parent34b153c0b92fcf216577b74ead65250ef1e86821 (diff)
downloadFreeBSD-src-eb82ace472d75a342f5719dee528cdf6078bb253.zip
FreeBSD-src-eb82ace472d75a342f5719dee528cdf6078bb253.tar.gz
MFC r299901
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 <rhouldsworth at solarflare.com> Sponsored by: Solarflare Communications, Inc.
-rw-r--r--sys/dev/sfxge/common/ef10_vpd.c5
-rw-r--r--sys/dev/sfxge/common/efx_vpd.c6
-rw-r--r--sys/dev/sfxge/common/siena_vpd.c6
3 files changed, 14 insertions, 3 deletions
diff --git a/sys/dev/sfxge/common/ef10_vpd.c b/sys/dev/sfxge/common/ef10_vpd.c
index 8eef3ad..ce5efcc 100644
--- a/sys/dev/sfxge/common/ef10_vpd.c
+++ b/sys/dev/sfxge/common/ef10_vpd.c
@@ -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);
diff --git a/sys/dev/sfxge/common/efx_vpd.c b/sys/dev/sfxge/common/efx_vpd.c
index 419c6f1..992b8b0 100644
--- a/sys/dev/sfxge/common/efx_vpd.c
+++ b/sys/dev/sfxge/common/efx_vpd.c
@@ -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);
diff --git a/sys/dev/sfxge/common/siena_vpd.c b/sys/dev/sfxge/common/siena_vpd.c
index 7a7ce67..ba3eddd 100644
--- a/sys/dev/sfxge/common/siena_vpd.c
+++ b/sys/dev/sfxge/common/siena_vpd.c
@@ -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);
OpenPOWER on IntegriCloud