efx_port.c revision 49ef7e0638c8b771d8a136eae78b1c0f99acc8e0
/*
* Copyright (c) 2009-2015 Solarflare Communications Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of the FreeBSD Project.
*/
#include "efx.h"
#include "efx_impl.h"
{
goto fail1;
}
/* Configure the MAC */
goto fail1;
/* Pick up current phy capababilities */
/*
* Turn on the PHY if available, otherwise reset it, and
* reconfigure it with the current configuration.
*/
goto fail2;
} else {
goto fail2;
}
goto fail3;
return (0);
return (rc);
}
{
if (link_modep == NULL)
goto fail1;
return (0);
return (rc);
}
{
loopback_type) == 0) {
goto fail1;
}
return (0);
goto fail2;
return (0);
return (rc);
}
#if EFSYS_OPT_NAMES
static const char *__efx_loopback_type_name[] = {
"OFF",
"DATA",
"GMAC",
"XGMII",
"XGXS",
"XAUI",
"GMII",
"SGMII",
"XGBR",
"XFI",
"XAUI_FAR",
"GMII_FAR",
"SGMII_FAR",
"XFI_FAR",
"GPHY",
"PHY_XS",
"PCS",
"PMA_PMD",
"XPORT",
"XGMII_WS",
"XAUI_WS",
"XAUI_WS_FAR",
"XAUI_WS_NEAR",
"GMII_WS",
"XFI_WS",
"XFI_WS_FAR",
"PHYXS_WS",
"PMA_INT",
"SD_NEAR",
"SD_FAR",
"PMA_INT_WS",
"SD_FEP2_WS",
"SD_FEP1_5_WS",
"SD_FEP_WS",
"SD_FES_WS",
};
__checkReturn const char *
{
return (__efx_loopback_type_name[type]);
}
#endif /* EFSYS_OPT_NAMES */
#endif /* EFSYS_OPT_LOOPBACK */
void
{
/* Turn off the PHY */
}