\hypertarget{siena__phy_8c_source}{}\doxysection{siena\+\_\+phy.\+c}
\label{siena__phy_8c_source}\index{dev/sfxge/common/siena\_phy.c@{dev/sfxge/common/siena\_phy.c}}
\mbox{\hyperlink{siena__phy_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2009-\/2016 Solarflare Communications Inc.}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions are met:}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright notice,}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00011}00011 \textcolor{comment}{ *    this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright notice,}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00013}00013 \textcolor{comment}{ *    this list of conditions and the following disclaimer in the documentation}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00014}00014 \textcolor{comment}{ *    and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "{}AS IS"{}}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00017}00017 \textcolor{comment}{ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00018}00018 \textcolor{comment}{ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00019}00019 \textcolor{comment}{ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00020}00020 \textcolor{comment}{ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00021}00021 \textcolor{comment}{ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00022}00022 \textcolor{comment}{ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00023}00023 \textcolor{comment}{ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00024}00024 \textcolor{comment}{ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00025}00025 \textcolor{comment}{ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00026}00026 \textcolor{comment}{ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00027}00027 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00028}00028 \textcolor{comment}{ * The views and conclusions contained in the software and documentation are}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00029}00029 \textcolor{comment}{ * those of the authors and should not be interpreted as representing official}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00030}00030 \textcolor{comment}{ * policies, either expressed or implied, of the FreeBSD Project.}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00031}00031 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00034}\mbox{\hyperlink{siena__phy_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00034}} \mbox{\hyperlink{siena__phy_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00036}00036 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{efx_8h}{efx.h}}"{}}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00037}00037 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{efx__impl_8h}{efx\_impl.h}}"{}}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00039}00039 \textcolor{preprocessor}{\#if EFSYS\_OPT\_SIENA}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00041}00041 \textcolor{keyword}{static}                  \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00042}\mbox{\hyperlink{siena__phy_8c_a64f305d50c1173ec87bcfd18b76c8508}{00042}} \mbox{\hyperlink{siena__phy_8c_a64f305d50c1173ec87bcfd18b76c8508}{siena\_phy\_decode\_cap}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00043}00043         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                uint32\_t mcdi\_cap,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00044}00044         \mbox{\hyperlink{efx__annote_8h_abb4c3c1135aab6c47cff22e7c16efb74}{\_\_out}}              uint32\_t *maskp)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00045}00045 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00046}00046         uint32\_t mask;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00048}00048         mask = 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00049}00049         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_ab263eb6e9e1f060a25e8373795f0ad1f}{MC\_CMD\_PHY\_CAP\_10HDX\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00050}00050                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8ab3d1bd5875f9bc13b2564a926d197570}{EFX\_PHY\_CAP\_10HDX}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00051}00051         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_a1d9aaa749844ef0fb20bdfe08a76b483}{MC\_CMD\_PHY\_CAP\_10FDX\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00052}00052                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a46821b6b19a2fe8054da4fa723d37c5f}{EFX\_PHY\_CAP\_10FDX}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00053}00053         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_acddb6b2ed8fb966fc8a2a1081b3ad36c}{MC\_CMD\_PHY\_CAP\_100HDX\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00054}00054                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8aec02e77e6bdcccb6d20085a464fc9319}{EFX\_PHY\_CAP\_100HDX}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00055}00055         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_a473daab992bc3747aca3986a7b2cedea}{MC\_CMD\_PHY\_CAP\_100FDX\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00056}00056                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a28c9705ae7452f121ea4b1ad564ba2f2}{EFX\_PHY\_CAP\_100FDX}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00057}00057         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_abe512ab9806f9eeb0b15c4f17f9fa103}{MC\_CMD\_PHY\_CAP\_1000HDX\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00058}00058                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8aad8e44f724f07639e14c89a1fa7f34fd}{EFX\_PHY\_CAP\_1000HDX}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00059}00059         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_a96d8f86ef1827d502265a224fe969cc3}{MC\_CMD\_PHY\_CAP\_1000FDX\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00060}00060                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a39e20cd8bb8bef19dc643dbb34cf29c5}{EFX\_PHY\_CAP\_1000FDX}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00061}00061         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_ab983d9ee205ccc42920697fddfa4ae90}{MC\_CMD\_PHY\_CAP\_10000FDX\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00062}00062                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a28efc6c18109e6a2ef1a856e5d6a4c47}{EFX\_PHY\_CAP\_10000FDX}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00063}00063         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_a9be4a68601f9fddb6b11cf00bd73eacf}{MC\_CMD\_PHY\_CAP\_PAUSE\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00064}00064                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a47d9f422384afde8f83bcf017f55af8f}{EFX\_PHY\_CAP\_PAUSE}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00065}00065         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_ae0c5d23a19bc6f81f95c4eb9af2c4dd4}{MC\_CMD\_PHY\_CAP\_ASYM\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00066}00066                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a219715fae78147b29ec1f77339840606}{EFX\_PHY\_CAP\_ASYM}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00067}00067         \textcolor{keywordflow}{if} (mcdi\_cap \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_a2fb31025d0f5d777c25990c1fa21b3b0}{MC\_CMD\_PHY\_CAP\_AN\_LBN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00068}00068                 mask |= (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8ac16e1da55a478c07d4a30663703051d1}{EFX\_PHY\_CAP\_AN}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00070}00070         *maskp = mask;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00071}00071 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00073}00073 \textcolor{keyword}{static}                  \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00074}\mbox{\hyperlink{siena__phy_8c_aabac15b8a7a355bba6d4d94a7f32c0f1}{00074}} \mbox{\hyperlink{siena__phy_8c_aabac15b8a7a355bba6d4d94a7f32c0f1}{siena\_phy\_decode\_link\_mode}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00075}00075         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00076}00076         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                uint32\_t link\_flags,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00077}00077         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} speed,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00078}00078         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} fcntl,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00079}00079         \mbox{\hyperlink{efx__annote_8h_abb4c3c1135aab6c47cff22e7c16efb74}{\_\_out}}              \mbox{\hyperlink{efx_8h_aed2709286a82d3e768f57d038ac1614d}{efx\_link\_mode\_t}} *link\_modep,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00080}00080         \mbox{\hyperlink{efx__annote_8h_abb4c3c1135aab6c47cff22e7c16efb74}{\_\_out}}              \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} *fcntlp)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00081}00081 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00082}00082         boolean\_t fd = !!(link\_flags \&}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00083}00083                     (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_a041078ccc1eea6c4fec5805d426ddcaa}{MC\_CMD\_GET\_LINK\_OUT\_FULL\_DUPLEX\_LBN}}));}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00084}00084         boolean\_t up = !!(link\_flags \&}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00085}00085                     (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_ac3c9b01c3da9779f55921cc09ee8d49c}{MC\_CMD\_GET\_LINK\_OUT\_LINK\_UP\_LBN}}));}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00087}00087         \mbox{\hyperlink{efx__annote_8h_ae03ef6fb71111351051fef6f5072287d}{\_NOTE}}(ARGUNUSED(enp))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00089}00089         \textcolor{keywordflow}{if} (!up)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00090}00090                 *link\_modep = \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827da8cc1940b863cdd2472995dc09acf3bb6}{EFX\_LINK\_DOWN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00091}00091         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (speed == 10000 \&\& fd)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00092}00092                 *link\_modep = \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827dae07c2c59b8b873764e6687e1ea7d5fc7}{EFX\_LINK\_10000FDX}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00093}00093         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (speed == 1000)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00094}00094                 *link\_modep = fd ? \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827daa22b31b76ebffa15f97f3bc3df6e40d9}{EFX\_LINK\_1000FDX}} : \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827dac57cd8aafb6e70dc60f2d7329285895c}{EFX\_LINK\_1000HDX}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00095}00095         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (speed == 100)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00096}00096                 *link\_modep = fd ? \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827dac6f926bc8128461d45ed72c396653c41}{EFX\_LINK\_100FDX}} : \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827daf4a84f03c361a2fee03f1cf4670363ee}{EFX\_LINK\_100HDX}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00097}00097         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (speed == 10)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00098}00098                 *link\_modep = fd ? \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827daff35c7e487a19d7a12ec5b59b8c9bb79}{EFX\_LINK\_10FDX}} : \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827da74774d6bdc5bdcc75dd35aeddeed9b4f}{EFX\_LINK\_10HDX}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00099}00099         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00100}00100                 *link\_modep = \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827da5642a524f33d719787bed0af4152fe8f}{EFX\_LINK\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00102}00102         \textcolor{keywordflow}{if} (fcntl == \mbox{\hyperlink{efx__regs__mcdi_8h_a46369639332493f6f6cf47df4adb2ee4}{MC\_CMD\_FCNTL\_OFF}})}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00103}00103                 *fcntlp = 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00104}00104         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (fcntl == \mbox{\hyperlink{efx__regs__mcdi_8h_aeea2acb0ad355980a651652918e397f3}{MC\_CMD\_FCNTL\_RESPOND}})}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00105}00105                 *fcntlp = \mbox{\hyperlink{efx_8h_a0b7b04960320f9f1af2e0473d0cd9f6c}{EFX\_FCNTL\_RESPOND}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00106}00106         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (fcntl == \mbox{\hyperlink{efx__regs__mcdi_8h_a2fdcfdef288756a2985b9c9c38bfb753}{MC\_CMD\_FCNTL\_BIDIR}})}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00107}00107                 *fcntlp = \mbox{\hyperlink{efx_8h_a0b7b04960320f9f1af2e0473d0cd9f6c}{EFX\_FCNTL\_RESPOND}} | \mbox{\hyperlink{efx_8h_a1c6e1793d78b5fee030eadba4af645a5}{EFX\_FCNTL\_GENERATE}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00108}00108         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00109}00109                 \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(mc\_pcol\_error, \textcolor{keywordtype}{int}, fcntl);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00110}00110                 *fcntlp = 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00111}00111         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00112}00112 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00114}00114                         \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00115}\mbox{\hyperlink{siena__impl_8h_a5dfe9ecc69c017b66e4e949d9666be9e}{00115}} \mbox{\hyperlink{siena__phy_8c_a5dfe9ecc69c017b66e4e949d9666be9e}{siena\_phy\_link\_ev}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00116}00116         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00117}00117         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{unionefx__qword__u}{efx\_qword\_t}} *eqp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00118}00118         \mbox{\hyperlink{efx__annote_8h_abb4c3c1135aab6c47cff22e7c16efb74}{\_\_out}}              \mbox{\hyperlink{efx_8h_aed2709286a82d3e768f57d038ac1614d}{efx\_link\_mode\_t}} *link\_modep)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00119}00119 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00120}00120         \mbox{\hyperlink{structefx__port__s}{efx\_port\_t}} *epp = \&(enp-\/>en\_port);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00121}00121         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} link\_flags;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00122}00122         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} speed;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00123}00123         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} fcntl;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00124}00124         \mbox{\hyperlink{efx_8h_aed2709286a82d3e768f57d038ac1614d}{efx\_link\_mode\_t}} link\_mode;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00125}00125         uint32\_t lp\_cap\_mask;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00127}00127         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00128}00128 \textcolor{comment}{         * Convert the LINKCHANGE speed enumeration into mbit/s, in the}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00129}00129 \textcolor{comment}{         * same way as GET\_LINK encodes the speed}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00130}00130 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00131}00131         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{efx__mcdi_8h_afc99dc9e815fa9cabef3914657a0795c}{MCDI\_EV\_FIELD}}(eqp, LINKCHANGE\_SPEED)) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00132}00132         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx__regs__mcdi_8h_a95a21c483f58c5bd8a1226e8566d4984}{MCDI\_EVENT\_LINKCHANGE\_SPEED\_100M}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00133}00133                 speed = 100;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00134}00134                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00135}00135         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx__regs__mcdi_8h_a3001a4f2519871df1bfcc326c9d521e9}{MCDI\_EVENT\_LINKCHANGE\_SPEED\_1G}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00136}00136                 speed = 1000;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00137}00137                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00138}00138         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx__regs__mcdi_8h_aa4d9ee5a9fdb186299cf2fad097b5bf3}{MCDI\_EVENT\_LINKCHANGE\_SPEED\_10G}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00139}00139                 speed = 10000;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00140}00140                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00141}00141         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00142}00142                 speed = 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00143}00143                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00144}00144         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00146}00146         link\_flags = \mbox{\hyperlink{efx__mcdi_8h_afc99dc9e815fa9cabef3914657a0795c}{MCDI\_EV\_FIELD}}(eqp, LINKCHANGE\_LINK\_FLAGS);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00147}00147         \mbox{\hyperlink{siena__phy_8c_aabac15b8a7a355bba6d4d94a7f32c0f1}{siena\_phy\_decode\_link\_mode}}(enp, link\_flags, speed,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00148}00148                                     \mbox{\hyperlink{efx__mcdi_8h_afc99dc9e815fa9cabef3914657a0795c}{MCDI\_EV\_FIELD}}(eqp, LINKCHANGE\_FCNTL),}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00149}00149                                     \&link\_mode, \&fcntl);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00150}00150         \mbox{\hyperlink{siena__phy_8c_a64f305d50c1173ec87bcfd18b76c8508}{siena\_phy\_decode\_cap}}(\mbox{\hyperlink{efx__mcdi_8h_afc99dc9e815fa9cabef3914657a0795c}{MCDI\_EV\_FIELD}}(eqp, LINKCHANGE\_LP\_CAP),}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00151}00151                             \&lp\_cap\_mask);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00153}00153         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00154}00154 \textcolor{comment}{         * It's safe to update ep\_lp\_cap\_mask without the driver's port lock}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00155}00155 \textcolor{comment}{         * because presumably any concurrently running efx\_port\_poll() is}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00156}00156 \textcolor{comment}{         * only going to arrive at the same value.}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00157}00157 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00158}00158 \textcolor{comment}{         * ep\_fcntl has two meanings. It's either the link common fcntl}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00159}00159 \textcolor{comment}{         * (if the PHY supports AN), or it's the forced link state. If}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00160}00160 \textcolor{comment}{         * the former, it's safe to update the value for the same reason as}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00161}00161 \textcolor{comment}{         * for ep\_lp\_cap\_mask. If the latter, then just ignore the value,}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00162}00162 \textcolor{comment}{         * because we can race with efx\_mac\_fcntl\_set().}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00163}00163 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00164}00164         epp-\/>\mbox{\hyperlink{structefx__port__s_a2ad23b5eeefe21edd11b61f4c2455920}{ep\_lp\_cap\_mask}} = lp\_cap\_mask;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00165}00165         \textcolor{keywordflow}{if} (epp-\/>\mbox{\hyperlink{structefx__port__s_ab686d3803ddd8bd3df35a55e87a68684}{ep\_phy\_cap\_mask}} \& (1 << \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8ac16e1da55a478c07d4a30663703051d1}{EFX\_PHY\_CAP\_AN}}))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00166}00166                 epp-\/>\mbox{\hyperlink{structefx__port__s_aa8b34cdee8ef03ad25e1d5f1369e5053}{ep\_fcntl}} = fcntl;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00167}00167 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00168}00168         *link\_modep = link\_mode;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00169}00169 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00171}00171         \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}      efx\_rc\_t}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00172}\mbox{\hyperlink{siena__impl_8h_a70a949728e00395ce6e4da1f9e513532}{00172}} \mbox{\hyperlink{siena__phy_8c_a235663f3f51d06a66d586dba730d00ee}{siena\_phy\_power}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00173}00173         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00174}00174         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                boolean\_t power)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00175}00175 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00176}00176         efx\_rc\_t rc;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00178}00178         \textcolor{keywordflow}{if} (!power)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00179}00179                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00180}00180 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00181}00181         \textcolor{comment}{/* Check if the PHY is a zombie */}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00182}00182         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{siena__phy_8c_a597ba6fcf56e8d36c052422a49b03d08}{siena\_phy\_verify}}(enp)) != 0)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00183}00183                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00185}00185         enp-\/>en\_reset\_flags |= \mbox{\hyperlink{efx__impl_8h_a8cbe4f0b2d87254a681c70ef81a4a074}{EFX\_RESET\_PHY}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00186}00186 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00187}00187         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00189}00189 fail1:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00190}00190         \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(fail1, efx\_rc\_t, rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00191}00191 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00192}00192         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00193}00193 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00195}00195         \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}      efx\_rc\_t}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00196}\mbox{\hyperlink{siena__impl_8h_a822aaf6f8673044c554d88f1a06120cb}{00196}} \mbox{\hyperlink{siena__phy_8c_a822aaf6f8673044c554d88f1a06120cb}{siena\_phy\_get\_link}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00197}00197         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00198}00198         \mbox{\hyperlink{efx__annote_8h_abb4c3c1135aab6c47cff22e7c16efb74}{\_\_out}}              \mbox{\hyperlink{structsiena__link__state__s}{siena\_link\_state\_t}} *slsp)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00199}00199 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00200}00200         \mbox{\hyperlink{structefx__mcdi__req__s}{efx\_mcdi\_req\_t}} req;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00201}00201         \mbox{\hyperlink{efx__mcdi_8h_afcfc07afd6008ccd8bfe0b540ed458a3}{EFX\_MCDI\_DECLARE\_BUF}}(payload, \mbox{\hyperlink{efx__regs__mcdi_8h_aad53cca9ff76de0366615846e6d2a0a1}{MC\_CMD\_GET\_LINK\_IN\_LEN}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00202}00202                 \mbox{\hyperlink{efx__regs__mcdi_8h_a4c093ff5fae51d4611651e5aea293bbd}{MC\_CMD\_GET\_LINK\_OUT\_LEN}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00203}00203         efx\_rc\_t rc;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00205}00205         req.\mbox{\hyperlink{structefx__mcdi__req__s_ae4934504d3ae8c8ef927f198d7892439}{emr\_cmd}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a96d75d1a48fb6ccd9b14b2105abd0318}{MC\_CMD\_GET\_LINK}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00206}00206         req.\mbox{\hyperlink{structefx__mcdi__req__s_a99dca3fe228afca3c49fd38c1de2bd5d}{emr\_in\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00207}00207         req.\mbox{\hyperlink{structefx__mcdi__req__s_a78cc338785647f6751f9982f41739956}{emr\_in\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_aad53cca9ff76de0366615846e6d2a0a1}{MC\_CMD\_GET\_LINK\_IN\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00208}00208         req.\mbox{\hyperlink{structefx__mcdi__req__s_affa8e8fa0aa069fc7381815459f11379}{emr\_out\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00209}00209         req.\mbox{\hyperlink{structefx__mcdi__req__s_a14891db4ed2f65a50768072f2c556a99}{emr\_out\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a4c093ff5fae51d4611651e5aea293bbd}{MC\_CMD\_GET\_LINK\_OUT\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00211}00211         \mbox{\hyperlink{efx__mcdi_8c_a6cd8d16ca5ade1e0ac974cac9d362306}{efx\_mcdi\_execute}}(enp, \&req);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00213}00213         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}} != 0) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00214}00214                 rc = req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00215}00215                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00216}00216         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00218}00218         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a63e1a7469bec54a246321f9ee45acf13}{emr\_out\_length\_used}} < \mbox{\hyperlink{efx__regs__mcdi_8h_a4c093ff5fae51d4611651e5aea293bbd}{MC\_CMD\_GET\_LINK\_OUT\_LEN}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00219}00219                 rc = EMSGSIZE;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00220}00220                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00221}00221         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00223}00223         \mbox{\hyperlink{siena__phy_8c_a64f305d50c1173ec87bcfd18b76c8508}{siena\_phy\_decode\_cap}}(\mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, GET\_LINK\_OUT\_CAP),}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00224}00224                             \&slsp-\/>sls\_adv\_cap\_mask);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00225}00225         \mbox{\hyperlink{siena__phy_8c_a64f305d50c1173ec87bcfd18b76c8508}{siena\_phy\_decode\_cap}}(\mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, GET\_LINK\_OUT\_LP\_CAP),}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00226}00226                             \&slsp-\/>sls\_lp\_cap\_mask);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00228}00228         \mbox{\hyperlink{siena__phy_8c_aabac15b8a7a355bba6d4d94a7f32c0f1}{siena\_phy\_decode\_link\_mode}}(enp, \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, GET\_LINK\_OUT\_FLAGS),}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00229}00229                             \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, GET\_LINK\_OUT\_LINK\_SPEED),}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00230}00230                             \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, GET\_LINK\_OUT\_FCNTL),}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00231}00231                             \&slsp-\/>sls\_link\_mode, \&slsp-\/>sls\_fcntl);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00233}00233 \textcolor{preprocessor}{\#if EFSYS\_OPT\_LOOPBACK}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00234}00234         \textcolor{comment}{/* Assert the MC\_CMD\_LOOPBACK and EFX\_LOOPBACK namespace agree */}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00235}00235         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_aacad818389a0719c3c0e0c5a400c0ffe}{MC\_CMD\_LOOPBACK\_NONE}} == EFX\_LOOPBACK\_OFF);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00236}00236         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_af9d7d7bd504dfbd56efaff0a09f8ad28}{MC\_CMD\_LOOPBACK\_DATA}} == EFX\_LOOPBACK\_DATA);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00237}00237         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_ab03ecd2463f53b8ea805b27fab6d6b7f}{MC\_CMD\_LOOPBACK\_GMAC}} == EFX\_LOOPBACK\_GMAC);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00238}00238         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_a554b5414da1d9d4395cf2db3363dc6c9}{MC\_CMD\_LOOPBACK\_XGMII}} == EFX\_LOOPBACK\_XGMII);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00239}00239         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_ad0d89ab515ff33bdc8c25e9387f44cc8}{MC\_CMD\_LOOPBACK\_XGXS}} == EFX\_LOOPBACK\_XGXS);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00240}00240         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_acb0b24ec8ede0a1acffca79dd45bde3d}{MC\_CMD\_LOOPBACK\_XAUI}} == EFX\_LOOPBACK\_XAUI);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00241}00241         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_a3abc7c12fd9aa9d7853f2d75ffc16d8d}{MC\_CMD\_LOOPBACK\_GMII}} == EFX\_LOOPBACK\_GMII);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00242}00242         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_af7df8641e84628693b6d858c8026bb13}{MC\_CMD\_LOOPBACK\_SGMII}} == EFX\_LOOPBACK\_SGMII);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00243}00243         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_a02fcbaa4935d8456a92a1845c902abb8}{MC\_CMD\_LOOPBACK\_XGBR}} == EFX\_LOOPBACK\_XGBR);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00244}00244         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_a4902cd4b6e3f262e846356c21603a5da}{MC\_CMD\_LOOPBACK\_XFI}} == EFX\_LOOPBACK\_XFI);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00245}00245         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_afd6f5f0eba9c67b41eae053f84ea93ef}{MC\_CMD\_LOOPBACK\_XAUI\_FAR}} == EFX\_LOOPBACK\_XAUI\_FAR);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00246}00246         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_aba17beedb9f7af128968fc00a1b07d95}{MC\_CMD\_LOOPBACK\_GMII\_FAR}} == EFX\_LOOPBACK\_GMII\_FAR);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00247}00247         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_ab56dd9f446e8ad081b5b1b188124ed9f}{MC\_CMD\_LOOPBACK\_SGMII\_FAR}} == EFX\_LOOPBACK\_SGMII\_FAR);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00248}00248         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_a75158ed9d963e3cce506d3fa7fb43148}{MC\_CMD\_LOOPBACK\_XFI\_FAR}} == EFX\_LOOPBACK\_XFI\_FAR);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00249}00249         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_abd845eece6f91bb607e7cd53e8993f1e}{MC\_CMD\_LOOPBACK\_GPHY}} == EFX\_LOOPBACK\_GPHY);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00250}00250         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_a3d6e2555dfbbe3d7ed37ef9f5182587e}{MC\_CMD\_LOOPBACK\_PHYXS}} == EFX\_LOOPBACK\_PHY\_XS);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00251}00251         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_ad85155ba281a6bb663d5bd62e2e94e67}{MC\_CMD\_LOOPBACK\_PCS}} == EFX\_LOOPBACK\_PCS);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00252}00252         \mbox{\hyperlink{efx_8h_a9b48a380217f137d36b7187c271e4121}{EFX\_STATIC\_ASSERT}}(\mbox{\hyperlink{efx__regs__mcdi_8h_a18ebc2a212ecd506ee0f9d25738f33ec}{MC\_CMD\_LOOPBACK\_PMAPMD}} == EFX\_LOOPBACK\_PMA\_PMD);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00254}00254         slsp-\/>sls\_loopback = \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, GET\_LINK\_OUT\_LOOPBACK\_MODE);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00255}00255 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* EFSYS\_OPT\_LOOPBACK */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00256}00256 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00257}00257         slsp-\/>sls\_mac\_up = \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, GET\_LINK\_OUT\_MAC\_FAULT) == 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00259}00259         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00261}00261 fail2:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00262}00262         \mbox{\hyperlink{efsys_8h_acc330aa922e1eddffecbcf9be25dc21c}{EFSYS\_PROBE}}(fail2);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00263}00263 fail1:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00264}00264         \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(fail1, efx\_rc\_t, rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00266}00266         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00267}00267 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00269}00269         \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}      efx\_rc\_t}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00270}\mbox{\hyperlink{siena__impl_8h_a6d819a2f91bf73d7cc2acf23159bc0c8}{00270}} \mbox{\hyperlink{siena__phy_8c_a6d819a2f91bf73d7cc2acf23159bc0c8}{siena\_phy\_reconfigure}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00271}00271         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00272}00272 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00273}00273         \mbox{\hyperlink{structefx__port__s}{efx\_port\_t}} *epp = \&(enp-\/>en\_port);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00274}00274         \mbox{\hyperlink{structefx__mcdi__req__s}{efx\_mcdi\_req\_t}} req;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00275}00275         \mbox{\hyperlink{efx__mcdi_8h_afcfc07afd6008ccd8bfe0b540ed458a3}{EFX\_MCDI\_DECLARE\_BUF}}(payload,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00276}00276                 MAX(\mbox{\hyperlink{efx__regs__mcdi_8h_aa8c39eae69876409bd8228aea8e0fe09}{MC\_CMD\_SET\_ID\_LED\_IN\_LEN}}, \mbox{\hyperlink{efx__regs__mcdi_8h_a014f1f5f2c5a9413e87694a4780b5b68}{MC\_CMD\_SET\_LINK\_IN\_LEN}}),}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00277}00277                 MAX(\mbox{\hyperlink{efx__regs__mcdi_8h_a640b74fe02878b1ba4319674bb57cc29}{MC\_CMD\_SET\_ID\_LED\_OUT\_LEN}}, \mbox{\hyperlink{efx__regs__mcdi_8h_ae83e9f826ec24b0aace363f26a4646a7}{MC\_CMD\_SET\_LINK\_OUT\_LEN}}));}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00278}00278         uint32\_t cap\_mask;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00279}00279 \textcolor{preprocessor}{\#if EFSYS\_OPT\_PHY\_LED\_CONTROL}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00280}00280         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} led\_mode;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00281}00281 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00282}00282         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} speed;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00283}00283         efx\_rc\_t rc;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00285}00285         req.\mbox{\hyperlink{structefx__mcdi__req__s_ae4934504d3ae8c8ef927f198d7892439}{emr\_cmd}} = \mbox{\hyperlink{efx__regs__mcdi_8h_adc9060ce38848d3ea68df586766547fc}{MC\_CMD\_SET\_LINK}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00286}00286         req.\mbox{\hyperlink{structefx__mcdi__req__s_a99dca3fe228afca3c49fd38c1de2bd5d}{emr\_in\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00287}00287         req.\mbox{\hyperlink{structefx__mcdi__req__s_a78cc338785647f6751f9982f41739956}{emr\_in\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a014f1f5f2c5a9413e87694a4780b5b68}{MC\_CMD\_SET\_LINK\_IN\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00288}00288         req.\mbox{\hyperlink{structefx__mcdi__req__s_affa8e8fa0aa069fc7381815459f11379}{emr\_out\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00289}00289         req.\mbox{\hyperlink{structefx__mcdi__req__s_a14891db4ed2f65a50768072f2c556a99}{emr\_out\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_ae83e9f826ec24b0aace363f26a4646a7}{MC\_CMD\_SET\_LINK\_OUT\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00291}00291         cap\_mask = epp-\/>\mbox{\hyperlink{structefx__port__s_affbe3e964cb955d0d40f3848555410e4}{ep\_adv\_cap\_mask}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00292}00292         \mbox{\hyperlink{efx__mcdi_8h_a51d1280c02eb821c9e1d9bf1e086a79a}{MCDI\_IN\_POPULATE\_DWORD\_10}}(req, SET\_LINK\_IN\_CAP,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00293}00293                 PHY\_CAP\_10HDX, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8ab3d1bd5875f9bc13b2564a926d197570}{EFX\_PHY\_CAP\_10HDX}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00294}00294                 PHY\_CAP\_10FDX, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a46821b6b19a2fe8054da4fa723d37c5f}{EFX\_PHY\_CAP\_10FDX}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00295}00295                 PHY\_CAP\_100HDX, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8aec02e77e6bdcccb6d20085a464fc9319}{EFX\_PHY\_CAP\_100HDX}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00296}00296                 PHY\_CAP\_100FDX, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a28c9705ae7452f121ea4b1ad564ba2f2}{EFX\_PHY\_CAP\_100FDX}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00297}00297                 PHY\_CAP\_1000HDX, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8aad8e44f724f07639e14c89a1fa7f34fd}{EFX\_PHY\_CAP\_1000HDX}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00298}00298                 PHY\_CAP\_1000FDX, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a39e20cd8bb8bef19dc643dbb34cf29c5}{EFX\_PHY\_CAP\_1000FDX}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00299}00299                 PHY\_CAP\_10000FDX, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a28efc6c18109e6a2ef1a856e5d6a4c47}{EFX\_PHY\_CAP\_10000FDX}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00300}00300                 PHY\_CAP\_PAUSE, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a47d9f422384afde8f83bcf017f55af8f}{EFX\_PHY\_CAP\_PAUSE}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00301}00301                 PHY\_CAP\_ASYM, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8a219715fae78147b29ec1f77339840606}{EFX\_PHY\_CAP\_ASYM}}) \& 0x1,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00302}00302                 PHY\_CAP\_AN, (cap\_mask >> \mbox{\hyperlink{efx_8h_a3b1638fa17f3ae0cd62a5986000028d8ac16e1da55a478c07d4a30663703051d1}{EFX\_PHY\_CAP\_AN}}) \& 0x1);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00304}00304 \textcolor{preprocessor}{\#if EFSYS\_OPT\_LOOPBACK}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00305}00305         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, SET\_LINK\_IN\_LOOPBACK\_MODE,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00306}00306                     epp-\/>ep\_loopback\_type);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00307}00307         \textcolor{keywordflow}{switch} (epp-\/>ep\_loopback\_link\_mode) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00308}00308         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827dac6f926bc8128461d45ed72c396653c41}{EFX\_LINK\_100FDX}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00309}00309                 speed = 100;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00310}00310                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00311}00311         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827daa22b31b76ebffa15f97f3bc3df6e40d9}{EFX\_LINK\_1000FDX}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00312}00312                 speed = 1000;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00313}00313                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00314}00314         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx_8h_a2f5d9bce9530ac2d3a7be034582c827dae07c2c59b8b873764e6687e1ea7d5fc7}{EFX\_LINK\_10000FDX}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00315}00315                 speed = 10000;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00316}00316                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00317}00317         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00318}00318                 speed = 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00319}00319         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00320}00320 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00321}00321         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, SET\_LINK\_IN\_LOOPBACK\_MODE, \mbox{\hyperlink{efx__regs__mcdi_8h_aacad818389a0719c3c0e0c5a400c0ffe}{MC\_CMD\_LOOPBACK\_NONE}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00322}00322         speed = 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00323}00323 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* EFSYS\_OPT\_LOOPBACK */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00324}00324         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, SET\_LINK\_IN\_LOOPBACK\_SPEED, speed);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00326}00326 \textcolor{preprocessor}{\#if EFSYS\_OPT\_PHY\_FLAGS}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00327}00327         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, SET\_LINK\_IN\_FLAGS, epp-\/>ep\_phy\_flags);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00328}00328 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00329}00329         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, SET\_LINK\_IN\_FLAGS, 0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00330}00330 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* EFSYS\_OPT\_PHY\_FLAGS */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00331}00331 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00332}00332         \mbox{\hyperlink{efx__mcdi_8c_a6cd8d16ca5ade1e0ac974cac9d362306}{efx\_mcdi\_execute}}(enp, \&req);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00334}00334         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}} != 0) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00335}00335                 rc = req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00336}00336                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00337}00337         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00338}00338 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00339}00339         \textcolor{comment}{/* And set the blink mode */}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00340}00340         (void) memset(payload, 0, \textcolor{keyword}{sizeof} (payload));}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00341}00341         req.\mbox{\hyperlink{structefx__mcdi__req__s_ae4934504d3ae8c8ef927f198d7892439}{emr\_cmd}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a4472636213fd96d043421843deeffd44}{MC\_CMD\_SET\_ID\_LED}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00342}00342         req.\mbox{\hyperlink{structefx__mcdi__req__s_a99dca3fe228afca3c49fd38c1de2bd5d}{emr\_in\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00343}00343         req.\mbox{\hyperlink{structefx__mcdi__req__s_a78cc338785647f6751f9982f41739956}{emr\_in\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_aa8c39eae69876409bd8228aea8e0fe09}{MC\_CMD\_SET\_ID\_LED\_IN\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00344}00344         req.\mbox{\hyperlink{structefx__mcdi__req__s_affa8e8fa0aa069fc7381815459f11379}{emr\_out\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00345}00345         req.\mbox{\hyperlink{structefx__mcdi__req__s_a14891db4ed2f65a50768072f2c556a99}{emr\_out\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a640b74fe02878b1ba4319674bb57cc29}{MC\_CMD\_SET\_ID\_LED\_OUT\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00347}00347 \textcolor{preprocessor}{\#if EFSYS\_OPT\_PHY\_LED\_CONTROL}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00348}00348         \textcolor{keywordflow}{switch} (epp-\/>\mbox{\hyperlink{structefx__port__s_acbcf3e93553003abdb387c9249f8b8c9}{ep\_phy\_led\_mode}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00349}00349         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx_8h_a259344227f7772df47db060da2c7664ca31094a51c2eace4b876cc74bb40e4a80}{EFX\_PHY\_LED\_DEFAULT}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00350}00350                 led\_mode = \mbox{\hyperlink{efx__regs__mcdi_8h_a2f795d79a6c0a8c7ab98979029c6f12a}{MC\_CMD\_LED\_DEFAULT}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00351}00351                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00352}00352         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx_8h_a259344227f7772df47db060da2c7664caac89a6235c701502b8ef76a09aca5703}{EFX\_PHY\_LED\_OFF}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00353}00353                 led\_mode = \mbox{\hyperlink{efx__regs__mcdi_8h_a48e5bc00f712430cbddb7195d0861bc7}{MC\_CMD\_LED\_OFF}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00354}00354                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00355}00355         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx_8h_a259344227f7772df47db060da2c7664caa9b4a1f8d9c3c5fa26d39903086d80ea}{EFX\_PHY\_LED\_ON}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00356}00356                 led\_mode = \mbox{\hyperlink{efx__regs__mcdi_8h_ae7700bdc9a62a73d31e1a37339e59452}{MC\_CMD\_LED\_ON}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00357}00357                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00358}00358         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00359}00359                 \mbox{\hyperlink{efsys_8h_ac29b6d01c2cee5333e4feb4da0441b14}{EFSYS\_ASSERT}}(0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00360}00360                 led\_mode = \mbox{\hyperlink{efx__regs__mcdi_8h_a2f795d79a6c0a8c7ab98979029c6f12a}{MC\_CMD\_LED\_DEFAULT}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00361}00361         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00362}00362 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00363}00363         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, SET\_ID\_LED\_IN\_STATE, led\_mode);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00364}00364 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00365}00365         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, SET\_ID\_LED\_IN\_STATE, \mbox{\hyperlink{efx__regs__mcdi_8h_a2f795d79a6c0a8c7ab98979029c6f12a}{MC\_CMD\_LED\_DEFAULT}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00366}00366 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* EFSYS\_OPT\_PHY\_LED\_CONTROL */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00368}00368         \mbox{\hyperlink{efx__mcdi_8c_a6cd8d16ca5ade1e0ac974cac9d362306}{efx\_mcdi\_execute}}(enp, \&req);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00370}00370         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}} != 0) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00371}00371                 rc = req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00372}00372                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00373}00373         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00374}00374 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00375}00375         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00377}00377 fail2:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00378}00378         \mbox{\hyperlink{efsys_8h_acc330aa922e1eddffecbcf9be25dc21c}{EFSYS\_PROBE}}(fail2);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00379}00379 fail1:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00380}00380         \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(fail1, efx\_rc\_t, rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00382}00382         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00383}00383 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00384}00384 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00385}00385         \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}      efx\_rc\_t}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00386}\mbox{\hyperlink{siena__impl_8h_a597ba6fcf56e8d36c052422a49b03d08}{00386}} \mbox{\hyperlink{siena__phy_8c_a597ba6fcf56e8d36c052422a49b03d08}{siena\_phy\_verify}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00387}00387         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00388}00388 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00389}00389         \mbox{\hyperlink{structefx__mcdi__req__s}{efx\_mcdi\_req\_t}} req;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00390}00390         \mbox{\hyperlink{efx__mcdi_8h_afcfc07afd6008ccd8bfe0b540ed458a3}{EFX\_MCDI\_DECLARE\_BUF}}(payload, \mbox{\hyperlink{efx__regs__mcdi_8h_ae5e7bc2d58dcf6dbc5db8a42607a960c}{MC\_CMD\_GET\_PHY\_STATE\_IN\_LEN}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00391}00391                 \mbox{\hyperlink{efx__regs__mcdi_8h_a257f3df15aa302cf9486cc457672fa4f}{MC\_CMD\_GET\_PHY\_STATE\_OUT\_LEN}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00392}00392         uint32\_t state;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00393}00393         efx\_rc\_t rc;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00394}00394 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00395}00395         req.\mbox{\hyperlink{structefx__mcdi__req__s_ae4934504d3ae8c8ef927f198d7892439}{emr\_cmd}} = \mbox{\hyperlink{efx__regs__mcdi_8h_aeec7e8f26fe4b0712b1088e29a020d69}{MC\_CMD\_GET\_PHY\_STATE}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00396}00396         req.\mbox{\hyperlink{structefx__mcdi__req__s_a99dca3fe228afca3c49fd38c1de2bd5d}{emr\_in\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00397}00397         req.\mbox{\hyperlink{structefx__mcdi__req__s_a78cc338785647f6751f9982f41739956}{emr\_in\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_ae5e7bc2d58dcf6dbc5db8a42607a960c}{MC\_CMD\_GET\_PHY\_STATE\_IN\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00398}00398         req.\mbox{\hyperlink{structefx__mcdi__req__s_affa8e8fa0aa069fc7381815459f11379}{emr\_out\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00399}00399         req.\mbox{\hyperlink{structefx__mcdi__req__s_a14891db4ed2f65a50768072f2c556a99}{emr\_out\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a257f3df15aa302cf9486cc457672fa4f}{MC\_CMD\_GET\_PHY\_STATE\_OUT\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00400}00400 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00401}00401         \mbox{\hyperlink{efx__mcdi_8c_a6cd8d16ca5ade1e0ac974cac9d362306}{efx\_mcdi\_execute}}(enp, \&req);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00402}00402 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00403}00403         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}} != 0) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00404}00404                 rc = req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00405}00405                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00406}00406         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00408}00408         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a63e1a7469bec54a246321f9ee45acf13}{emr\_out\_length\_used}} < \mbox{\hyperlink{efx__regs__mcdi_8h_a257f3df15aa302cf9486cc457672fa4f}{MC\_CMD\_GET\_PHY\_STATE\_OUT\_LEN}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00409}00409                 rc = EMSGSIZE;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00410}00410                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00411}00411         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00413}00413         state = \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, GET\_PHY\_STATE\_OUT\_STATE);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00414}00414         \textcolor{keywordflow}{if} (state != \mbox{\hyperlink{efx__regs__mcdi_8h_a5658ec2b684f07219d679b34faaca92b}{MC\_CMD\_PHY\_STATE\_OK}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00415}00415                 \textcolor{keywordflow}{if} (state != \mbox{\hyperlink{efx__regs__mcdi_8h_a735804a218642158b95b1dc12dd9ba7c}{MC\_CMD\_PHY\_STATE\_ZOMBIE}})}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00416}00416                         \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(mc\_pcol\_error, \textcolor{keywordtype}{int}, state);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00417}00417                 rc = \mbox{\hyperlink{efsys_8h_aec13651fe580296095c11b38379b4277}{ENOTACTIVE}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00418}00418                 \textcolor{keywordflow}{goto} fail3;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00419}00419         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00421}00421         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00422}00422 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00423}00423 fail3:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00424}00424         \mbox{\hyperlink{efsys_8h_acc330aa922e1eddffecbcf9be25dc21c}{EFSYS\_PROBE}}(fail3);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00425}00425 fail2:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00426}00426         \mbox{\hyperlink{efsys_8h_acc330aa922e1eddffecbcf9be25dc21c}{EFSYS\_PROBE}}(fail2);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00427}00427 fail1:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00428}00428         \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(fail1, efx\_rc\_t, rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00429}00429 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00430}00430         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00431}00431 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00432}00432 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00433}00433         \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}      efx\_rc\_t}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00434}\mbox{\hyperlink{siena__impl_8h_a91fa008596a200d2f74ac16ab4775ee9}{00434}} \mbox{\hyperlink{siena__phy_8c_a91fa008596a200d2f74ac16ab4775ee9}{siena\_phy\_oui\_get}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00435}00435         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00436}00436         \mbox{\hyperlink{efx__annote_8h_abb4c3c1135aab6c47cff22e7c16efb74}{\_\_out}}              uint32\_t *ouip)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00437}00437 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00438}00438         \mbox{\hyperlink{efx__annote_8h_ae03ef6fb71111351051fef6f5072287d}{\_NOTE}}(ARGUNUSED(enp, ouip))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00440}00440         \textcolor{keywordflow}{return} (ENOTSUP);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00441}00441 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00443}00443 \textcolor{preprocessor}{\#if EFSYS\_OPT\_PHY\_STATS}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00444}00444 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00445}\mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{00445}} \textcolor{preprocessor}{\#define SIENA\_SIMPLE\_STAT\_SET(\_vmask, \_esmp, \_smask, \_stat,             \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00446}00446 \textcolor{preprocessor}{                            \_mc\_record, \_efx\_record)                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00447}00447 \textcolor{preprocessor}{        if ((\_vmask) \& (1ULL << (\_mc\_record))) \{                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00448}00448 \textcolor{preprocessor}{                (\_smask) |= (1ULL << (\_efx\_record));                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00449}00449 \textcolor{preprocessor}{                if ((\_stat) != NULL \&\& !EFSYS\_MEM\_IS\_NULL(\_esmp)) \{     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00450}00450 \textcolor{preprocessor}{                        efx\_dword\_t dword;                              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00451}00451 \textcolor{preprocessor}{                        EFSYS\_MEM\_READD(\_esmp, (\_mc\_record) * 4, \&dword);\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00452}00452 \textcolor{preprocessor}{                        (\_stat)[\_efx\_record] =                          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00453}00453 \textcolor{preprocessor}{                                EFX\_DWORD\_FIELD(dword, EFX\_DWORD\_0);    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00454}00454 \textcolor{preprocessor}{                \}                                                       \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00455}00455 \textcolor{preprocessor}{        \}}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00456}00456 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00457}\mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{00457}} \textcolor{preprocessor}{\#define SIENA\_SIMPLE\_STAT\_SET2(\_vmask, \_esmp, \_smask, \_stat, \_record)   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00458}00458 \textcolor{preprocessor}{        SIENA\_SIMPLE\_STAT\_SET(\_vmask, \_esmp, \_smask, \_stat,             \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00459}00459 \textcolor{preprocessor}{                            MC\_CMD\_ \#\# \_record,                         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00460}00460 \textcolor{preprocessor}{                            EFX\_PHY\_STAT\_ \#\# \_record)}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00461}00461 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00462}00462                                                 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00463}\mbox{\hyperlink{siena__impl_8h_a334b3815bc043d25ecbdfc6ead8cda00}{00463}} \mbox{\hyperlink{siena__phy_8c_a334b3815bc043d25ecbdfc6ead8cda00}{siena\_phy\_decode\_stats}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00464}00464         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                                        \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00465}00465         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                                        uint32\_t vmask,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00466}00466         \mbox{\hyperlink{efx__annote_8h_a9c2d0f2980e51b51bb405ee2a31a3353}{\_\_in\_opt}}                                \mbox{\hyperlink{structefsys__mem__s}{efsys\_mem\_t}} *esmp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00467}00467         \mbox{\hyperlink{efx__annote_8h_a1ab4597e9d0c9bcc3f676c58b25019fe}{\_\_out\_opt}}                              uint64\_t *smaskp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00468}00468         \mbox{\hyperlink{efx__annote_8h_a96ff63b8cdaa7ebaa07197fc12863d7c}{\_\_inout\_ecount\_opt}}(\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca06661a6ef61cdaf467282e27ceb15d9a}{EFX\_PHY\_NSTATS}})      uint32\_t *stat)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00469}00469 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00470}00470         uint64\_t smask = 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00471}00471 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00472}00472         \mbox{\hyperlink{efx__annote_8h_ae03ef6fb71111351051fef6f5072287d}{\_NOTE}}(ARGUNUSED(enp))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00473}00473 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00474}00474         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, OUI);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00475}00475         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, PMA\_PMD\_LINK\_UP);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00476}00476         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, PMA\_PMD\_RX\_FAULT);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00477}00477         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, PMA\_PMD\_TX\_FAULT);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00479}00479         \textcolor{keywordflow}{if} (vmask \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_a877ebff25136570c873d434d45ec0a40}{MC\_CMD\_PMA\_PMD\_SIGNAL}})) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00480}00480                 smask |=   ((1ULL << \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74caa3e3ceb356fc1a78339508bcf08466e9}{EFX\_PHY\_STAT\_PMA\_PMD\_SIGNAL\_A}}) |}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00481}00481                             (1ULL << \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca81fe532fa0376e8c9542db5f5271219e}{EFX\_PHY\_STAT\_PMA\_PMD\_SIGNAL\_B}}) |}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00482}00482                             (1ULL << \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca1b368c17a1e18af37b9f4659098ab338}{EFX\_PHY\_STAT\_PMA\_PMD\_SIGNAL\_C}}) |}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00483}00483                             (1ULL << \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca42c891aab3f3f8a1ffa64c67fa1a641a}{EFX\_PHY\_STAT\_PMA\_PMD\_SIGNAL\_D}}));}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00484}00484                 \textcolor{keywordflow}{if} (stat != NULL \&\& esmp != NULL \&\& !\mbox{\hyperlink{efsys_8h_aaa903f6710f5e1de00e0d2df4eebfeb0}{EFSYS\_MEM\_IS\_NULL}}(esmp)) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00485}00485                         \mbox{\hyperlink{unionefx__dword__u}{efx\_dword\_t}} dword;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00486}00486                         uint32\_t sig;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00487}00487                         \mbox{\hyperlink{efsys_8h_a663db022ece2def5221019448d84b9ac}{EFSYS\_MEM\_READD}}(esmp, 4 * \mbox{\hyperlink{efx__regs__mcdi_8h_a877ebff25136570c873d434d45ec0a40}{MC\_CMD\_PMA\_PMD\_SIGNAL}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00488}00488                                         \&dword);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00489}00489                         sig = \mbox{\hyperlink{efx__types_8h_a327ed568b1dd5b3bf38a2f0f6bfb70dc}{EFX\_DWORD\_FIELD}}(dword, EFX\_DWORD\_0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00490}00490                         stat[\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74caa3e3ceb356fc1a78339508bcf08466e9}{EFX\_PHY\_STAT\_PMA\_PMD\_SIGNAL\_A}}] = (sig >> 1) \& 1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00491}00491                         stat[\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca81fe532fa0376e8c9542db5f5271219e}{EFX\_PHY\_STAT\_PMA\_PMD\_SIGNAL\_B}}] = (sig >> 2) \& 1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00492}00492                         stat[\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca1b368c17a1e18af37b9f4659098ab338}{EFX\_PHY\_STAT\_PMA\_PMD\_SIGNAL\_C}}] = (sig >> 3) \& 1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00493}00493                         stat[\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca42c891aab3f3f8a1ffa64c67fa1a641a}{EFX\_PHY\_STAT\_PMA\_PMD\_SIGNAL\_D}}] = (sig >> 4) \& 1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00494}00494                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00495}00495         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00497}00497         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_acc1d705f87dabbc0899fcf1ed30c8928}{MC\_CMD\_PMA\_PMD\_SNR\_A}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00498}00498                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74cac33903032665a1779f8182da9be52c4e}{EFX\_PHY\_STAT\_SNR\_A}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00499}00499         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_a84cc4caafcb6e7364f406aeaea8918c6}{MC\_CMD\_PMA\_PMD\_SNR\_B}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00500}00500                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca95885d922bcc79613516eaaa37f7879e}{EFX\_PHY\_STAT\_SNR\_B}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00501}00501         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_a1188714d379a64719c4ee0a9ad7b9c9b}{MC\_CMD\_PMA\_PMD\_SNR\_C}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00502}00502                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74cabb2a109cfca409cc875d9b07257228f7}{EFX\_PHY\_STAT\_SNR\_C}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00503}00503         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_adeda9f0eab48118f177895cc6a29cd6b}{MC\_CMD\_PMA\_PMD\_SNR\_D}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00504}00504                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74cadf621d500e53275ec54a7fda923bbb07}{EFX\_PHY\_STAT\_SNR\_D}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00506}00506         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, PCS\_LINK\_UP);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00507}00507         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, PCS\_RX\_FAULT);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00508}00508         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, PCS\_TX\_FAULT);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00509}00509         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, PCS\_BER);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00510}00510         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, PCS\_BLOCK\_ERRORS);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00511}00511 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00512}00512         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_a1e7b7fdb0c23bbc0afb8d6d3d66e9bc6}{MC\_CMD\_PHYXS\_LINK\_UP}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00513}00513                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca2377e2f0baeaf624997052dfe9a326c2}{EFX\_PHY\_STAT\_PHY\_XS\_LINK\_UP}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00514}00514         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_ab649f8f1dbd881de0e64c56b6815da2e}{MC\_CMD\_PHYXS\_RX\_FAULT}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00515}00515                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca1ce49a9cf2b5d7bca7062e617384dea0}{EFX\_PHY\_STAT\_PHY\_XS\_RX\_FAULT}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00516}00516         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_afa1bc2850255ff304ce1fc7d956c1424}{MC\_CMD\_PHYXS\_TX\_FAULT}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00517}00517                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca5c4b973e17ddb7a14c0ed6c858a2aef1}{EFX\_PHY\_STAT\_PHY\_XS\_TX\_FAULT}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00518}00518         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_adcc01f25fdb0cb677494b8768938dc01}{MC\_CMD\_PHYXS\_ALIGN}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00519}00519                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca384248214f63267b0491e6f4686a0ae8}{EFX\_PHY\_STAT\_PHY\_XS\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00520}00520 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00521}00521         \textcolor{keywordflow}{if} (vmask \& (1 << \mbox{\hyperlink{efx__regs__mcdi_8h_a62f10f8e04a49e48556b9dbbf9d40efd}{MC\_CMD\_PHYXS\_SYNC}})) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00522}00522                 smask |=   ((1 << \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca353ed3dc08934bb2c7f34b061cb6456f}{EFX\_PHY\_STAT\_PHY\_XS\_SYNC\_A}}) |}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00523}00523                             (1 << \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca49dfac1d7d3d5b3bf261d5cf1f9ed889}{EFX\_PHY\_STAT\_PHY\_XS\_SYNC\_B}}) |}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00524}00524                             (1 << \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74cac4ee2f28ac5da38fe1101962faf4ed32}{EFX\_PHY\_STAT\_PHY\_XS\_SYNC\_C}}) |}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00525}00525                             (1 << \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74cab351fd9539780cd7cc72db77db321535}{EFX\_PHY\_STAT\_PHY\_XS\_SYNC\_D}}));}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00526}00526                 \textcolor{keywordflow}{if} (stat != NULL \&\& !\mbox{\hyperlink{efsys_8h_aaa903f6710f5e1de00e0d2df4eebfeb0}{EFSYS\_MEM\_IS\_NULL}}(esmp)) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00527}00527                         \mbox{\hyperlink{unionefx__dword__u}{efx\_dword\_t}} dword;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00528}00528                         uint32\_t sync;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00529}00529                         \mbox{\hyperlink{efsys_8h_a663db022ece2def5221019448d84b9ac}{EFSYS\_MEM\_READD}}(esmp, 4 * \mbox{\hyperlink{efx__regs__mcdi_8h_a62f10f8e04a49e48556b9dbbf9d40efd}{MC\_CMD\_PHYXS\_SYNC}}, \&dword);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00530}00530                         sync = \mbox{\hyperlink{efx__types_8h_a327ed568b1dd5b3bf38a2f0f6bfb70dc}{EFX\_DWORD\_FIELD}}(dword, EFX\_DWORD\_0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00531}00531                         stat[\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca353ed3dc08934bb2c7f34b061cb6456f}{EFX\_PHY\_STAT\_PHY\_XS\_SYNC\_A}}] = (sync >> 0) \& 1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00532}00532                         stat[\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca49dfac1d7d3d5b3bf261d5cf1f9ed889}{EFX\_PHY\_STAT\_PHY\_XS\_SYNC\_B}}] = (sync >> 1) \& 1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00533}00533                         stat[\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74cac4ee2f28ac5da38fe1101962faf4ed32}{EFX\_PHY\_STAT\_PHY\_XS\_SYNC\_C}}] = (sync >> 2) \& 1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00534}00534                         stat[\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74cab351fd9539780cd7cc72db77db321535}{EFX\_PHY\_STAT\_PHY\_XS\_SYNC\_D}}] = (sync >> 3) \& 1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00535}00535                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00536}00536         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00538}00538         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, AN\_LINK\_UP);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00539}00539         \mbox{\hyperlink{siena__phy_8c_a0025df8f23bf2d91ff0b52442bea1ce4}{SIENA\_SIMPLE\_STAT\_SET2}}(vmask, esmp, smask, stat, AN\_COMPLETE);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00541}00541         \mbox{\hyperlink{siena__phy_8c_a3514852f2ac551809c55a23b3982b237}{SIENA\_SIMPLE\_STAT\_SET}}(vmask, esmp, smask, stat, \mbox{\hyperlink{efx__regs__mcdi_8h_ab3d777f45bd9a6bf0c21eebabfd1d52b}{MC\_CMD\_CL22\_LINK\_UP}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00542}00542                             \mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca4679a6a5744e358c2995789b5aea8183}{EFX\_PHY\_STAT\_CL22EXT\_LINK\_UP}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00543}00543 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00544}00544         \textcolor{keywordflow}{if} (smaskp != NULL)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00545}00545                 *smaskp = smask;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00546}00546 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00547}00547 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00548}00548         \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}                              efx\_rc\_t}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00549}\mbox{\hyperlink{siena__impl_8h_a5c65c564585b29f5f57244fb9289d5d8}{00549}} \mbox{\hyperlink{siena__phy_8c_a5c65c564585b29f5f57244fb9289d5d8}{siena\_phy\_stats\_update}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00550}00550         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                                        \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00551}00551         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                                        \mbox{\hyperlink{structefsys__mem__s}{efsys\_mem\_t}} *esmp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00552}00552         \mbox{\hyperlink{efx__annote_8h_a558eebaf695b2df2f0c53bf98486e5ec}{\_\_inout\_ecount}}(\mbox{\hyperlink{efx_8h_a5c81ed72285009445f140ead012cf74ca06661a6ef61cdaf467282e27ceb15d9a}{EFX\_PHY\_NSTATS}})              uint32\_t *stat)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00553}00553 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00554}00554         \mbox{\hyperlink{structefx__nic__cfg__s}{efx\_nic\_cfg\_t}} *encp = \&(enp-\/>en\_nic\_cfg);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00555}00555         uint32\_t vmask = encp-\/>\mbox{\hyperlink{structefx__nic__cfg__s_a9e6deae271854097fb65da7e079889e8}{enc\_mcdi\_phy\_stat\_mask}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00556}00556         uint64\_t smask;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00557}00557         \mbox{\hyperlink{structefx__mcdi__req__s}{efx\_mcdi\_req\_t}} req;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00558}00558         \mbox{\hyperlink{efx__mcdi_8h_afcfc07afd6008ccd8bfe0b540ed458a3}{EFX\_MCDI\_DECLARE\_BUF}}(payload, \mbox{\hyperlink{efx__regs__mcdi_8h_a5a5fea45dd37750cb8a3915f9b501721}{MC\_CMD\_PHY\_STATS\_IN\_LEN}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00559}00559                 \mbox{\hyperlink{efx__regs__mcdi_8h_af3fd91be333197cad2b0406922242f3d}{MC\_CMD\_PHY\_STATS\_OUT\_DMA\_LEN}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00560}00560         efx\_rc\_t rc;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00561}00561 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00562}00562         \textcolor{keywordflow}{if} ((esmp == NULL) || (\mbox{\hyperlink{efsys_8h_a56fbc743655361b6b7d62c6cd5cf7f3f}{EFSYS\_MEM\_SIZE}}(esmp) < \mbox{\hyperlink{efx_8h_ac5a7b87ac8ae8a197741f20c3c61f64b}{EFX\_PHY\_STATS\_SIZE}})) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00563}00563                 rc = EINVAL;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00564}00564                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00565}00565         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00566}00566 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00567}00567         req.\mbox{\hyperlink{structefx__mcdi__req__s_ae4934504d3ae8c8ef927f198d7892439}{emr\_cmd}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a84922ba476df055e4e143067fc688884}{MC\_CMD\_PHY\_STATS}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00568}00568         req.\mbox{\hyperlink{structefx__mcdi__req__s_a99dca3fe228afca3c49fd38c1de2bd5d}{emr\_in\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00569}00569         req.\mbox{\hyperlink{structefx__mcdi__req__s_a78cc338785647f6751f9982f41739956}{emr\_in\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a5a5fea45dd37750cb8a3915f9b501721}{MC\_CMD\_PHY\_STATS\_IN\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00570}00570         req.\mbox{\hyperlink{structefx__mcdi__req__s_affa8e8fa0aa069fc7381815459f11379}{emr\_out\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00571}00571         req.\mbox{\hyperlink{structefx__mcdi__req__s_a14891db4ed2f65a50768072f2c556a99}{emr\_out\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_af3fd91be333197cad2b0406922242f3d}{MC\_CMD\_PHY\_STATS\_OUT\_DMA\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00572}00572 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00573}00573         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, PHY\_STATS\_IN\_DMA\_ADDR\_LO,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00574}00574                             \mbox{\hyperlink{efsys_8h_a42b236481677e877720f836dc50e26cf}{EFSYS\_MEM\_ADDR}}(esmp) \& 0xffffffff);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00575}00575         \mbox{\hyperlink{efx__mcdi_8h_a99f9450564b701864b7cfa44e5a162a6}{MCDI\_IN\_SET\_DWORD}}(req, PHY\_STATS\_IN\_DMA\_ADDR\_HI,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00576}00576                             \mbox{\hyperlink{efsys_8h_a42b236481677e877720f836dc50e26cf}{EFSYS\_MEM\_ADDR}}(esmp) >> 32);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00578}00578         \mbox{\hyperlink{efx__mcdi_8c_a6cd8d16ca5ade1e0ac974cac9d362306}{efx\_mcdi\_execute}}(enp, \&req);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00579}00579 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00580}00580         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}} != 0) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00581}00581                 rc = req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00582}00582                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00583}00583         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00584}00584         \mbox{\hyperlink{efsys_8h_aeaff23ca745974626dbd91943931a6bf}{EFSYS\_ASSERT3U}}(req.\mbox{\hyperlink{structefx__mcdi__req__s_a14891db4ed2f65a50768072f2c556a99}{emr\_out\_length}}, ==, \mbox{\hyperlink{efx__regs__mcdi_8h_af3fd91be333197cad2b0406922242f3d}{MC\_CMD\_PHY\_STATS\_OUT\_DMA\_LEN}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00585}00585 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00586}00586         \mbox{\hyperlink{siena__phy_8c_a334b3815bc043d25ecbdfc6ead8cda00}{siena\_phy\_decode\_stats}}(enp, vmask, esmp, \&smask, stat);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00587}00587         \mbox{\hyperlink{efsys_8h_ac29b6d01c2cee5333e4feb4da0441b14}{EFSYS\_ASSERT}}(smask == encp-\/>\mbox{\hyperlink{structefx__nic__cfg__s_ac4b9aaa27344e843d7604ebbdc219468}{enc\_phy\_stat\_mask}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00588}00588 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00589}00589         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00590}00590 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00591}00591 fail2:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00592}00592         \mbox{\hyperlink{efsys_8h_acc330aa922e1eddffecbcf9be25dc21c}{EFSYS\_PROBE}}(fail2);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00593}00593 fail1:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00594}00594         \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(fail1, efx\_rc\_t, rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00595}00595 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00596}00596         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00597}00597 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00599}00599 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* EFSYS\_OPT\_PHY\_STATS */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00600}00600 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00601}00601 \textcolor{preprocessor}{\#if EFSYS\_OPT\_BIST}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00602}00602 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00603}00603         \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}              efx\_rc\_t}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00604}\mbox{\hyperlink{siena__impl_8h_a5d7e3b98333d1d0ca4a998e081197d14}{00604}} \mbox{\hyperlink{siena__phy_8c_a5d7e3b98333d1d0ca4a998e081197d14}{siena\_phy\_bist\_start}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00605}00605         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                        \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00606}00606         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                        \mbox{\hyperlink{efx_8h_acbf594e517fcaa0aaf8ad502818efd96}{efx\_bist\_type\_t}} type)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00607}00607 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00608}00608         efx\_rc\_t rc;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00610}00610         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{efx__mcdi_8c_a7195e2b8e8d914c2ad6f0b5dfa31a833}{efx\_mcdi\_bist\_start}}(enp, type)) != 0)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00611}00611                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00612}00612 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00613}00613         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00614}00614 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00615}00615 fail1:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00616}00616         \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(fail1, efx\_rc\_t, rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00617}00617 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00618}00618         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00619}00619 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00620}00620 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00621}00621 \textcolor{keyword}{static}  \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}              \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00622}\mbox{\hyperlink{siena__phy_8c_a74319f16087cbed01a06859dc62b5061}{00622}} \mbox{\hyperlink{siena__phy_8c_a74319f16087cbed01a06859dc62b5061}{siena\_phy\_sft9001\_bist\_status}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00623}00623         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                        uint16\_t code)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00624}00624 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00625}00625         \textcolor{keywordflow}{switch} (code) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00626}00626         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx__regs__mcdi_8h_a6824102889d3b05a3a14b2ab633e1d44}{MC\_CMD\_POLL\_BIST\_SFT9001\_PAIR\_BUSY}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00627}00627                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{efx_8h_a137220a528a5c55a2861ef91c65312c6a1ba15adc5d760c9c1b79eb0863197b26}{EFX\_PHY\_CABLE\_STATUS\_BUSY}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00628}00628         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx__regs__mcdi_8h_a9fd15d4b68378f5985301775763c7679}{MC\_CMD\_POLL\_BIST\_SFT9001\_INTER\_PAIR\_SHORT}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00629}00629                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{efx_8h_a137220a528a5c55a2861ef91c65312c6a4cb1aef726c8ac70d996278fa90c3e96}{EFX\_PHY\_CABLE\_STATUS\_INTERPAIRSHORT}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00630}00630         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx__regs__mcdi_8h_a0a5d19d6f1549ce6823955f1a56a47f2}{MC\_CMD\_POLL\_BIST\_SFT9001\_INTRA\_PAIR\_SHORT}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00631}00631                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{efx_8h_a137220a528a5c55a2861ef91c65312c6a4eba75fefa1ba0e7d922278cf8df1c9a}{EFX\_PHY\_CABLE\_STATUS\_INTRAPAIRSHORT}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00632}00632         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx__regs__mcdi_8h_a13c7f3a679704f4288e9815f231eed38}{MC\_CMD\_POLL\_BIST\_SFT9001\_PAIR\_OPEN}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00633}00633                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{efx_8h_a137220a528a5c55a2861ef91c65312c6a2622443a4ffd17e9dfb8c64c0045a8d6}{EFX\_PHY\_CABLE\_STATUS\_OPEN}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00634}00634         \textcolor{keywordflow}{case} \mbox{\hyperlink{efx__regs__mcdi_8h_a5b0b601fbbd6f41d71ebd4df7ce6b8dc}{MC\_CMD\_POLL\_BIST\_SFT9001\_PAIR\_OK}}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00635}00635                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{efx_8h_a137220a528a5c55a2861ef91c65312c6ad63ec7915f7bd5e386bd416316b4eb63}{EFX\_PHY\_CABLE\_STATUS\_OK}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00636}00636         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00637}00637                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{efx_8h_a137220a528a5c55a2861ef91c65312c6ac807df04fcde41dda2424c02dead58d5}{EFX\_PHY\_CABLE\_STATUS\_INVALID}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00638}00638         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00639}00639 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00640}00640 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00641}00641         \mbox{\hyperlink{efx__annote_8h_a1f1031c250d4a2092f48ae69723d66d7}{\_\_checkReturn}}              efx\_rc\_t}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00642}\mbox{\hyperlink{siena__impl_8h_a489f679953defe7612cb88c9d328fb11}{00642}} \mbox{\hyperlink{siena__phy_8c_a489f679953defe7612cb88c9d328fb11}{siena\_phy\_bist\_poll}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00643}00643         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                        \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00644}00644         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                        \mbox{\hyperlink{efx_8h_acbf594e517fcaa0aaf8ad502818efd96}{efx\_bist\_type\_t}} type,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00645}00645         \mbox{\hyperlink{efx__annote_8h_abb4c3c1135aab6c47cff22e7c16efb74}{\_\_out}}                      \mbox{\hyperlink{efx_8h_a3c744c313218d5fc1392acb5c8a4f102}{efx\_bist\_result\_t}} *resultp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00646}00646         \mbox{\hyperlink{efx__annote_8h_a1ab4597e9d0c9bcc3f676c58b25019fe}{\_\_out\_opt}} \mbox{\hyperlink{efx__annote_8h_ae1b1819573568dd12d0579a61f8cbaca}{\_\_drv\_when}}(count > 0, \_\_notnull)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00647}00647         uint32\_t *value\_maskp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00648}00648         \mbox{\hyperlink{efx__annote_8h_af8f76e3836b453db4d0a90d49946716a}{\_\_out\_ecount\_opt}}(count) \mbox{\hyperlink{efx__annote_8h_ae1b1819573568dd12d0579a61f8cbaca}{\_\_drv\_when}}(count > 0, \_\_notnull)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00649}00649         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *valuesp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00650}00650         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                        \textcolor{keywordtype}{size\_t} count)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00651}00651 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00652}00652         \mbox{\hyperlink{structefx__nic__cfg__s}{efx\_nic\_cfg\_t}} *encp = \&(enp-\/>en\_nic\_cfg);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00653}00653         \mbox{\hyperlink{efx__mcdi_8h_afcfc07afd6008ccd8bfe0b540ed458a3}{EFX\_MCDI\_DECLARE\_BUF}}(payload, \mbox{\hyperlink{efx__regs__mcdi_8h_a698121840a88caa7838235075583f9c3}{MC\_CMD\_POLL\_BIST\_IN\_LEN}},}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00654}00654                 \mbox{\hyperlink{efx__regs__mcdi_8h_a58a05ea4f9ef858b113eac432a1f3f12}{MCDI\_CTL\_SDU\_LEN\_MAX}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00655}00655         uint32\_t value\_mask = 0;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00656}00656         \mbox{\hyperlink{structefx__mcdi__req__s}{efx\_mcdi\_req\_t}} req;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00657}00657         uint32\_t result;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00658}00658         efx\_rc\_t rc;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00659}00659 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00660}00660         req.\mbox{\hyperlink{structefx__mcdi__req__s_ae4934504d3ae8c8ef927f198d7892439}{emr\_cmd}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a1e63b40ff280cf36aa32e70dc6e19d70}{MC\_CMD\_POLL\_BIST}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00661}00661         req.\mbox{\hyperlink{structefx__mcdi__req__s_a99dca3fe228afca3c49fd38c1de2bd5d}{emr\_in\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00662}00662         req.\mbox{\hyperlink{structefx__mcdi__req__s_a78cc338785647f6751f9982f41739956}{emr\_in\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a698121840a88caa7838235075583f9c3}{MC\_CMD\_POLL\_BIST\_IN\_LEN}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00663}00663         req.\mbox{\hyperlink{structefx__mcdi__req__s_affa8e8fa0aa069fc7381815459f11379}{emr\_out\_buf}} = payload;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00664}00664         req.\mbox{\hyperlink{structefx__mcdi__req__s_a14891db4ed2f65a50768072f2c556a99}{emr\_out\_length}} = \mbox{\hyperlink{efx__regs__mcdi_8h_a58a05ea4f9ef858b113eac432a1f3f12}{MCDI\_CTL\_SDU\_LEN\_MAX}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00665}00665 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00666}00666         \mbox{\hyperlink{efx__mcdi_8c_a6cd8d16ca5ade1e0ac974cac9d362306}{efx\_mcdi\_execute}}(enp, \&req);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00667}00667 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00668}00668         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}} != 0) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00669}00669                 rc = req.\mbox{\hyperlink{structefx__mcdi__req__s_a0dd3bc7f4c306f0f263d22bc7dd873f2}{emr\_rc}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00670}00670                 \textcolor{keywordflow}{goto} fail1;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00671}00671         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00672}00672 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00673}00673         \textcolor{keywordflow}{if} (req.\mbox{\hyperlink{structefx__mcdi__req__s_a63e1a7469bec54a246321f9ee45acf13}{emr\_out\_length\_used}} < \mbox{\hyperlink{efx__regs__mcdi_8h_a5c9eed79edb567631c7c07de8fa9aea2}{MC\_CMD\_POLL\_BIST\_OUT\_RESULT\_OFST}} + 4) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00674}00674                 rc = EMSGSIZE;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00675}00675                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00676}00676         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00677}00677 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00678}00678         \textcolor{keywordflow}{if} (count > 0)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00679}00679                 (void) memset(valuesp, \textcolor{charliteral}{'\(\backslash\)0'}, count * \textcolor{keyword}{sizeof} (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}));}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00680}00680 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00681}00681         result = \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, POLL\_BIST\_OUT\_RESULT);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00682}00682 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00683}00683         \textcolor{comment}{/* Extract PHY specific results */}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00684}00684         \textcolor{keywordflow}{if} (result == \mbox{\hyperlink{efx__regs__mcdi_8h_a91a7b097031a8000f4fb2a9947667fbd}{MC\_CMD\_POLL\_BIST\_PASSED}} \&\&}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00685}00685             encp-\/>\mbox{\hyperlink{structefx__nic__cfg__s_afab70e7c9acb1e6f0854d182b30e4b5d}{enc\_phy\_type}} == \mbox{\hyperlink{efx__phy__ids_8h_ae07c25616fa4286f6b78f43390af50f8a832452c7caea66cd74d7e031520cd893}{EFX\_PHY\_SFT9001B}} \&\&}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00686}00686             req.\mbox{\hyperlink{structefx__mcdi__req__s_a63e1a7469bec54a246321f9ee45acf13}{emr\_out\_length\_used}} >= \mbox{\hyperlink{efx__regs__mcdi_8h_aaac208b75a5560d73374ac97d43e34b1}{MC\_CMD\_POLL\_BIST\_OUT\_SFT9001\_LEN}} \&\&}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00687}00687             (type == \mbox{\hyperlink{efx_8h_ab8a21350d2b9531f33feb331a655275fa6a5674857e448ed07e9527830f8794ff}{EFX\_BIST\_TYPE\_PHY\_CABLE\_SHORT}} ||}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00688}00688             type == \mbox{\hyperlink{efx_8h_ab8a21350d2b9531f33feb331a655275fafbe2cee42c6b643f1d42862a5694775a}{EFX\_BIST\_TYPE\_PHY\_CABLE\_LONG}})) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00689}00689                 uint16\_t word;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00690}00690 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00691}00691                 \textcolor{keywordflow}{if} (count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076af53459b189e748eaf8bcfe39cc171362}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_A}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00692}00692                         \textcolor{keywordflow}{if} (valuesp != NULL)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00693}00693                                 valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076af53459b189e748eaf8bcfe39cc171362}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_A}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00694}00694                                     \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00695}00695                                     POLL\_BIST\_OUT\_SFT9001\_CABLE\_LENGTH\_A);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00696}00696                         value\_mask |= (1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076af53459b189e748eaf8bcfe39cc171362}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_A}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00697}00697                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00698}00698 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00699}00699                 \textcolor{keywordflow}{if} (count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a0ca38b77e679f02e78c06e47a0770d7e}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_B}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00700}00700                         \textcolor{keywordflow}{if} (valuesp != NULL)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00701}00701                                 valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a0ca38b77e679f02e78c06e47a0770d7e}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_B}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00702}00702                                     \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00703}00703                                     POLL\_BIST\_OUT\_SFT9001\_CABLE\_LENGTH\_B);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00704}00704                         value\_mask |= (1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a0ca38b77e679f02e78c06e47a0770d7e}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_B}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00705}00705                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00706}00706 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00707}00707                 \textcolor{keywordflow}{if} (count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a3b6dd0c125483feff5dbac6ff21c6b6f}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_C}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00708}00708                         \textcolor{keywordflow}{if} (valuesp != NULL)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00709}00709                                 valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a3b6dd0c125483feff5dbac6ff21c6b6f}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_C}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00710}00710                                     \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00711}00711                                     POLL\_BIST\_OUT\_SFT9001\_CABLE\_LENGTH\_C);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00712}00712                         value\_mask |= (1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a3b6dd0c125483feff5dbac6ff21c6b6f}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_C}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00713}00713                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00714}00714 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00715}00715                 \textcolor{keywordflow}{if} (count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a145e96b4a299209feaf45fdc3696dad1}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_D}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00716}00716                         \textcolor{keywordflow}{if} (valuesp != NULL)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00717}00717                                 valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a145e96b4a299209feaf45fdc3696dad1}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_D}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00718}00718                                     \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00719}00719                                     POLL\_BIST\_OUT\_SFT9001\_CABLE\_LENGTH\_D);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00720}00720                         value\_mask |= (1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a145e96b4a299209feaf45fdc3696dad1}{EFX\_BIST\_PHY\_CABLE\_LENGTH\_D}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00721}00721                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00722}00722 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00723}00723                 \textcolor{keywordflow}{if} (count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a78e8d0423beb85f83ce820814154ea10}{EFX\_BIST\_PHY\_CABLE\_STATUS\_A}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00724}00724                         \textcolor{keywordflow}{if} (valuesp != NULL) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00725}00725                                 word = \mbox{\hyperlink{efx__mcdi_8h_a074f3161aa2d7c6d0772ebcb7c5ffbda}{MCDI\_OUT\_WORD}}(req,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00726}00726                                     POLL\_BIST\_OUT\_SFT9001\_CABLE\_STATUS\_A);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00727}00727                                 valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a78e8d0423beb85f83ce820814154ea10}{EFX\_BIST\_PHY\_CABLE\_STATUS\_A}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00728}00728                                     \mbox{\hyperlink{siena__phy_8c_a74319f16087cbed01a06859dc62b5061}{siena\_phy\_sft9001\_bist\_status}}(word);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00729}00729                         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00730}00730                         value\_mask |= (1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a78e8d0423beb85f83ce820814154ea10}{EFX\_BIST\_PHY\_CABLE\_STATUS\_A}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00731}00731                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00732}00732 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00733}00733                 \textcolor{keywordflow}{if} (count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a78492539c70e94f55d0f0c09c868ffa7}{EFX\_BIST\_PHY\_CABLE\_STATUS\_B}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00734}00734                         \textcolor{keywordflow}{if} (valuesp != NULL) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00735}00735                                 word = \mbox{\hyperlink{efx__mcdi_8h_a074f3161aa2d7c6d0772ebcb7c5ffbda}{MCDI\_OUT\_WORD}}(req,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00736}00736                                     POLL\_BIST\_OUT\_SFT9001\_CABLE\_STATUS\_B);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00737}00737                                 valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a78492539c70e94f55d0f0c09c868ffa7}{EFX\_BIST\_PHY\_CABLE\_STATUS\_B}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00738}00738                                     \mbox{\hyperlink{siena__phy_8c_a74319f16087cbed01a06859dc62b5061}{siena\_phy\_sft9001\_bist\_status}}(word);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00739}00739                         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00740}00740                         value\_mask |= (1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a78492539c70e94f55d0f0c09c868ffa7}{EFX\_BIST\_PHY\_CABLE\_STATUS\_B}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00741}00741                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00742}00742 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00743}00743                 \textcolor{keywordflow}{if} (count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a386660820c938b540cbf334374644632}{EFX\_BIST\_PHY\_CABLE\_STATUS\_C}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00744}00744                         \textcolor{keywordflow}{if} (valuesp != NULL) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00745}00745                                 word = \mbox{\hyperlink{efx__mcdi_8h_a074f3161aa2d7c6d0772ebcb7c5ffbda}{MCDI\_OUT\_WORD}}(req,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00746}00746                                     POLL\_BIST\_OUT\_SFT9001\_CABLE\_STATUS\_C);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00747}00747                                 valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a386660820c938b540cbf334374644632}{EFX\_BIST\_PHY\_CABLE\_STATUS\_C}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00748}00748                                     \mbox{\hyperlink{siena__phy_8c_a74319f16087cbed01a06859dc62b5061}{siena\_phy\_sft9001\_bist\_status}}(word);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00749}00749                         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00750}00750                         value\_mask |= (1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076a386660820c938b540cbf334374644632}{EFX\_BIST\_PHY\_CABLE\_STATUS\_C}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00751}00751                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00752}00752 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00753}00753                 \textcolor{keywordflow}{if} (count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076aedb9c223741323d6b8176a9572b58b7b}{EFX\_BIST\_PHY\_CABLE\_STATUS\_D}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00754}00754                         \textcolor{keywordflow}{if} (valuesp != NULL) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00755}00755                                 word = \mbox{\hyperlink{efx__mcdi_8h_a074f3161aa2d7c6d0772ebcb7c5ffbda}{MCDI\_OUT\_WORD}}(req,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00756}00756                                     POLL\_BIST\_OUT\_SFT9001\_CABLE\_STATUS\_D);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00757}00757                                 valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076aedb9c223741323d6b8176a9572b58b7b}{EFX\_BIST\_PHY\_CABLE\_STATUS\_D}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00758}00758                                     \mbox{\hyperlink{siena__phy_8c_a74319f16087cbed01a06859dc62b5061}{siena\_phy\_sft9001\_bist\_status}}(word);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00759}00759                         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00760}00760                         value\_mask |= (1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076aedb9c223741323d6b8176a9572b58b7b}{EFX\_BIST\_PHY\_CABLE\_STATUS\_D}});}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00761}00761                 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00763}00763         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (result == \mbox{\hyperlink{efx__regs__mcdi_8h_ae5af4c481bc46f4f4e1811f33bca6401}{MC\_CMD\_POLL\_BIST\_FAILED}} \&\&}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00764}00764                     encp-\/>\mbox{\hyperlink{structefx__nic__cfg__s_afab70e7c9acb1e6f0854d182b30e4b5d}{enc\_phy\_type}} == \mbox{\hyperlink{efx__phy__ids_8h_ae07c25616fa4286f6b78f43390af50f8a3b4c2a1f8ef578f02c38ba7880601f08}{EFX\_PHY\_QLX111V}} \&\&}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00765}00765                     req.\mbox{\hyperlink{structefx__mcdi__req__s_a14891db4ed2f65a50768072f2c556a99}{emr\_out\_length}} >= \mbox{\hyperlink{efx__regs__mcdi_8h_abc59986befb218a26acef931a4c653e8}{MC\_CMD\_POLL\_BIST\_OUT\_MRSFP\_LEN}} \&\&}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00766}00766                     count > \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076aaa5e32abc648a96cea0cb3ed980f3883}{EFX\_BIST\_FAULT\_CODE}}) \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00767}00767                 \textcolor{keywordflow}{if} (valuesp != NULL)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00768}00768                         valuesp[\mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076aaa5e32abc648a96cea0cb3ed980f3883}{EFX\_BIST\_FAULT\_CODE}}] =}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00769}00769                             \mbox{\hyperlink{efx__mcdi_8h_a648a38b8b5e3ac86e10976cb97944969}{MCDI\_OUT\_DWORD}}(req, POLL\_BIST\_OUT\_MRSFP\_TEST);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00770}00770                 value\_mask |= 1 << \mbox{\hyperlink{efx_8h_afbd1e95f77084a17ed2d649c57766076aaa5e32abc648a96cea0cb3ed980f3883}{EFX\_BIST\_FAULT\_CODE}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00771}00771         \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00772}00772 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00773}00773         \textcolor{keywordflow}{if} (value\_maskp != NULL)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00774}00774                 *value\_maskp = value\_mask;}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00775}00775 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00776}00776         \mbox{\hyperlink{efsys_8h_ac29b6d01c2cee5333e4feb4da0441b14}{EFSYS\_ASSERT}}(resultp != NULL);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00777}00777         \textcolor{keywordflow}{if} (result == \mbox{\hyperlink{efx__regs__mcdi_8h_a29897cd343e9bd91a4102e2a0f63e27a}{MC\_CMD\_POLL\_BIST\_RUNNING}})}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00778}00778                 *resultp = \mbox{\hyperlink{efx_8h_ae1a23c1c498beb94a3792d933f490ba0adc4c655d6155855a64636de1929b4735}{EFX\_BIST\_RESULT\_RUNNING}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00779}00779         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (result == \mbox{\hyperlink{efx__regs__mcdi_8h_a91a7b097031a8000f4fb2a9947667fbd}{MC\_CMD\_POLL\_BIST\_PASSED}})}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00780}00780                 *resultp = \mbox{\hyperlink{efx_8h_ae1a23c1c498beb94a3792d933f490ba0abe4abebca9a4ddf0e608b8197cd0371b}{EFX\_BIST\_RESULT\_PASSED}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00781}00781         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00782}00782                 *resultp = \mbox{\hyperlink{efx_8h_ae1a23c1c498beb94a3792d933f490ba0a2ada4b2c7959d780c1b2fa70a3254399}{EFX\_BIST\_RESULT\_FAILED}};}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00783}00783 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00784}00784         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00785}00785 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00786}00786 fail2:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00787}00787         \mbox{\hyperlink{efsys_8h_acc330aa922e1eddffecbcf9be25dc21c}{EFSYS\_PROBE}}(fail2);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00788}00788 fail1:}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00789}00789         \mbox{\hyperlink{efsys_8h_aa4843943221a3571f3b2b9f12f87d5f5}{EFSYS\_PROBE1}}(fail1, efx\_rc\_t, rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00790}00790 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00791}00791         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00792}00792 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00793}00793 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00794}00794                         \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00795}\mbox{\hyperlink{siena__impl_8h_a74b02ebf7f0503bb9e2b2642194da8c3}{00795}} \mbox{\hyperlink{siena__phy_8c_a74b02ebf7f0503bb9e2b2642194da8c3}{siena\_phy\_bist\_stop}}(}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00796}00796         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *enp,}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00797}00797         \mbox{\hyperlink{efx__annote_8h_a3f6b8655e1aa9dfc15a9029f0343009e}{\_\_in}}                \mbox{\hyperlink{efx_8h_acbf594e517fcaa0aaf8ad502818efd96}{efx\_bist\_type\_t}} type)}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00798}00798 \{}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00799}00799         \textcolor{comment}{/* There is no way to stop BIST on Siena */}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00800}00800         \mbox{\hyperlink{efx__annote_8h_ae03ef6fb71111351051fef6f5072287d}{\_NOTE}}(ARGUNUSED(enp, type))}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00801}00801 \}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00802}00802 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00803}00803 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* EFSYS\_OPT\_BIST */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00804}00804 }
\DoxyCodeLine{\Hypertarget{siena__phy_8c_source_l00805}00805 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* EFSYS\_OPT\_SIENA */}\textcolor{preprocessor}{}}

\end{DoxyCode}
