Deleted Added
full compact
siena_nic.c (279098) siena_nic.c (279141)
1/*-
2 * Copyright 2009 Solarflare Communications Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
1/*-
2 * Copyright 2009 Solarflare Communications Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 10 unchanged lines hidden (view full) ---

19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 */
25
26#include <sys/cdefs.h>
27__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/siena_nic.c 279098 2015-02-21 06:28:31Z arybchik $");
27__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/siena_nic.c 279141 2015-02-22 07:08:57Z arybchik $");
28
29#include "efsys.h"
30#include "efx.h"
31#include "efx_impl.h"
32
33#if EFSYS_OPT_SIENA
34
35static __checkReturn int

--- 437 unchanged lines hidden (view full) ---

473 GET_PHY_CFG_OUT_BIST_CABLE_SHORT))
474 encp->enc_bist_mask |= (1 << EFX_PHY_BIST_TYPE_CABLE_SHORT);
475 if (MCDI_OUT_DWORD_FIELD(req, GET_PHY_CFG_OUT_FLAGS,
476 GET_PHY_CFG_OUT_BIST_CABLE_LONG))
477 encp->enc_bist_mask |= (1 << EFX_PHY_BIST_TYPE_CABLE_LONG);
478 if (MCDI_OUT_DWORD_FIELD(req, GET_PHY_CFG_OUT_FLAGS,
479 GET_PHY_CFG_OUT_BIST))
480 encp->enc_bist_mask |= (1 << EFX_PHY_BIST_TYPE_NORMAL);
28
29#include "efsys.h"
30#include "efx.h"
31#include "efx_impl.h"
32
33#if EFSYS_OPT_SIENA
34
35static __checkReturn int

--- 437 unchanged lines hidden (view full) ---

473 GET_PHY_CFG_OUT_BIST_CABLE_SHORT))
474 encp->enc_bist_mask |= (1 << EFX_PHY_BIST_TYPE_CABLE_SHORT);
475 if (MCDI_OUT_DWORD_FIELD(req, GET_PHY_CFG_OUT_FLAGS,
476 GET_PHY_CFG_OUT_BIST_CABLE_LONG))
477 encp->enc_bist_mask |= (1 << EFX_PHY_BIST_TYPE_CABLE_LONG);
478 if (MCDI_OUT_DWORD_FIELD(req, GET_PHY_CFG_OUT_FLAGS,
479 GET_PHY_CFG_OUT_BIST))
480 encp->enc_bist_mask |= (1 << EFX_PHY_BIST_TYPE_NORMAL);
481#endif /* EFSYS_OPT_BIST */
481#endif /* EFSYS_OPT_PHY_BIST */
482
483 return (0);
484
485fail2:
486 EFSYS_PROBE(fail2);
487fail1:
488 EFSYS_PROBE1(fail1, int, rc);
489

--- 115 unchanged lines hidden (view full) ---

605 __in efx_nic_t *enp)
606{
607 efx_port_t *epp = &(enp->en_port);
608 efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
609 siena_link_state_t sls;
610 unsigned int mask;
611 int rc;
612
482
483 return (0);
484
485fail2:
486 EFSYS_PROBE(fail2);
487fail1:
488 EFSYS_PROBE1(fail1, int, rc);
489

--- 115 unchanged lines hidden (view full) ---

605 __in efx_nic_t *enp)
606{
607 efx_port_t *epp = &(enp->en_port);
608 efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
609 siena_link_state_t sls;
610 unsigned int mask;
611 int rc;
612
613 mask = 0; /* XXX: pacify gcc */
614 EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA);
615
616 /* Read clear any assertion state */
617 if ((rc = siena_nic_read_assertion(enp)) != 0)
618 goto fail1;
619
620 /* Exit the assertion handler */
621 if ((rc = siena_nic_exit_assertion_handler(enp)) != 0)

--- 366 unchanged lines hidden ---
613 EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA);
614
615 /* Read clear any assertion state */
616 if ((rc = siena_nic_read_assertion(enp)) != 0)
617 goto fail1;
618
619 /* Exit the assertion handler */
620 if ((rc = siena_nic_exit_assertion_handler(enp)) != 0)

--- 366 unchanged lines hidden ---