summaryrefslogtreecommitdiffstats
path: root/sys/dev/sfxge/common/hunt_phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sfxge/common/hunt_phy.c')
-rw-r--r--sys/dev/sfxge/common/hunt_phy.c53
1 files changed, 26 insertions, 27 deletions
diff --git a/sys/dev/sfxge/common/hunt_phy.c b/sys/dev/sfxge/common/hunt_phy.c
index 1cffea2..c25e820 100644
--- a/sys/dev/sfxge/common/hunt_phy.c
+++ b/sys/dev/sfxge/common/hunt_phy.c
@@ -31,7 +31,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "efsys.h"
#include "efx.h"
#include "efx_impl.h"
@@ -191,14 +190,14 @@ hunt_phy_link_ev(
*link_modep = link_mode;
}
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_phy_power(
__in efx_nic_t *enp,
__in boolean_t power)
{
/* TBD: consider common Siena/Hunt function: essentially identical */
- int rc;
+ efx_rc_t rc;
if (!power)
return (0);
@@ -212,12 +211,12 @@ hunt_phy_power(
return (0);
fail1:
- EFSYS_PROBE1(fail1, int, rc);
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_phy_get_link(
__in efx_nic_t *enp,
__out hunt_link_state_t *hlsp)
@@ -231,7 +230,7 @@ hunt_phy_get_link(
efx_mcdi_req_t req;
uint8_t payload[MAX(MC_CMD_GET_LINK_IN_LEN,
MC_CMD_GET_LINK_OUT_LEN)];
- int rc;
+ efx_rc_t rc;
(void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_GET_LINK;
@@ -293,12 +292,12 @@ hunt_phy_get_link(
fail2:
EFSYS_PROBE(fail2);
fail1:
- EFSYS_PROBE1(fail1, int, rc);
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_phy_reconfigure(
__in efx_nic_t *enp)
{
@@ -316,7 +315,7 @@ hunt_phy_reconfigure(
uint32_t cap_mask;
unsigned int led_mode;
unsigned int speed;
- int rc;
+ efx_rc_t rc;
if (~encp->enc_func_flags & EFX_NIC_FUNC_LINKCTRL)
goto out;
@@ -423,12 +422,12 @@ out:
fail2:
EFSYS_PROBE(fail2);
fail1:
- EFSYS_PROBE1(fail1, int, rc);
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_phy_verify(
__in efx_nic_t *enp)
{
@@ -438,7 +437,7 @@ hunt_phy_verify(
uint8_t payload[MAX(MC_CMD_GET_PHY_STATE_IN_LEN,
MC_CMD_GET_PHY_STATE_OUT_LEN)];
uint32_t state;
- int rc;
+ efx_rc_t rc;
(void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_GET_PHY_STATE;
@@ -474,12 +473,12 @@ fail3:
fail2:
EFSYS_PROBE(fail2);
fail1:
- EFSYS_PROBE1(fail1, int, rc);
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_phy_oui_get(
__in efx_nic_t *enp,
__out uint32_t *ouip)
@@ -491,11 +490,11 @@ hunt_phy_oui_get(
#if EFSYS_OPT_PHY_STATS
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_phy_stats_update(
__in efx_nic_t *enp,
__in efsys_mem_t *esmp,
- __out_ecount(EFX_PHY_NSTATS) uint32_t *stat)
+ __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat)
{
/* TBD: no stats support in firmware yet */
_NOTE(ARGUNUSED(enp, esmp))
@@ -522,7 +521,7 @@ hunt_phy_prop_name(
#endif /* EFSYS_OPT_NAMES */
-extern __checkReturn int
+extern __checkReturn efx_rc_t
hunt_phy_prop_get(
__in efx_nic_t *enp,
__in unsigned int id,
@@ -534,7 +533,7 @@ hunt_phy_prop_get(
return (ENOTSUP);
}
-extern __checkReturn int
+extern __checkReturn efx_rc_t
hunt_phy_prop_set(
__in efx_nic_t *enp,
__in unsigned int id,
@@ -549,11 +548,11 @@ hunt_phy_prop_set(
#if EFSYS_OPT_BIST
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_bist_enable_offline(
__in efx_nic_t *enp)
{
- int rc;
+ efx_rc_t rc;
if ((rc = efx_mcdi_bist_enable_offline(enp)) != 0)
goto fail1;
@@ -561,17 +560,17 @@ hunt_bist_enable_offline(
return (0);
fail1:
- EFSYS_PROBE1(fail1, int, rc);
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_bist_start(
__in efx_nic_t *enp,
__in efx_bist_type_t type)
{
- int rc;
+ efx_rc_t rc;
if ((rc = efx_mcdi_bist_start(enp, type)) != 0)
goto fail1;
@@ -579,12 +578,12 @@ hunt_bist_start(
return (0);
fail1:
- EFSYS_PROBE1(fail1, int, rc);
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
- __checkReturn int
+ __checkReturn efx_rc_t
hunt_bist_poll(
__in efx_nic_t *enp,
__in efx_bist_type_t type,
@@ -601,7 +600,7 @@ hunt_bist_poll(
MCDI_CTL_SDU_LEN_MAX)];
uint32_t value_mask = 0;
uint32_t result;
- int rc;
+ efx_rc_t rc;
(void) memset(payload, 0, sizeof (payload));
req.emr_cmd = MC_CMD_POLL_BIST;
@@ -682,7 +681,7 @@ hunt_bist_poll(
fail2:
EFSYS_PROBE(fail2);
fail1:
- EFSYS_PROBE1(fail1, int, rc);
+ EFSYS_PROBE1(fail1, efx_rc_t, rc);
return (rc);
}
OpenPOWER on IntegriCloud