aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchik@FreeBSD.org>2018-11-28 06:53:51 +0000
committerAndrew Rybchenko <arybchik@FreeBSD.org>2018-11-28 06:53:51 +0000
commit481943395d97a7002582ad91c2f69fe293a22eb4 (patch)
tree63902bd83d6323d86c3db97100b948d3ba982d91
parent8bff5a20fba9837fdf5dcdd6427b7b16762105ca (diff)
downloadsrc-481943395d97a7002582ad91c2f69fe293a22eb4.tar.gz
src-481943395d97a7002582ad91c2f69fe293a22eb4.zip
sfxge(4): add ef10 NIC board config method
Submitted by: Andy Moreton <amoreton at solarflare.com> Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D18182
Notes
Notes: svn path=/head/; revision=341106
-rw-r--r--sys/dev/sfxge/common/ef10_nic.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys/dev/sfxge/common/ef10_nic.c b/sys/dev/sfxge/common/ef10_nic.c
index 124185ecef2a..a436e4b284fa 100644
--- a/sys/dev/sfxge/common/ef10_nic.c
+++ b/sys/dev/sfxge/common/ef10_nic.c
@@ -1568,12 +1568,29 @@ fail1:
return (rc);
}
+static __checkReturn efx_rc_t
+ef10_nic_board_cfg(
+ __in efx_nic_t *enp)
+{
+ const efx_nic_ops_t *enop = enp->en_enop;
+ efx_rc_t rc;
+
+ if ((rc = enop->eno_board_cfg(enp)) != 0)
+ if (rc != EACCES)
+ goto fail1;
+
+ return (0);
+
+fail1:
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
+
+ return (rc);
+}
__checkReturn efx_rc_t
ef10_nic_probe(
__in efx_nic_t *enp)
{
- const efx_nic_ops_t *enop = enp->en_enop;
efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
efx_drv_cfg_t *edcp = &(enp->en_drv_cfg);
efx_rc_t rc;
@@ -1594,9 +1611,8 @@ ef10_nic_probe(
if ((rc = efx_mcdi_drv_attach(enp, B_TRUE)) != 0)
goto fail3;
- if ((rc = enop->eno_board_cfg(enp)) != 0)
- if (rc != EACCES)
- goto fail4;
+ if ((rc = ef10_nic_board_cfg(enp)) != 0)
+ goto fail4;
/*
* Set default driver config limits (based on board config).