\hypertarget{truephy_8c_source}{}\doxysection{truephy.\+c}
\label{truephy_8c_source}\index{dev/mii/truephy.c@{dev/mii/truephy.c}}
\mbox{\hyperlink{truephy_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/3-\/Clause}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2007 The DragonFly Project.  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00005}00005 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00006}00006 \textcolor{comment}{ * This code is derived from software contributed to The DragonFly Project}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00007}00007 \textcolor{comment}{ * by Sepherosa Ziehau <sepherosa@gmail.com>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00008}00008 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00009}00009 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00010}00010 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00011}00011 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00012}00012 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00013}00013 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00015}00015 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00016}00016 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00017}00017 \textcolor{comment}{ *    the documentation and/or other materials provided with the}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00018}00018 \textcolor{comment}{ *    distribution.}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00019}00019 \textcolor{comment}{ * 3. Neither the name of The DragonFly Project nor the names of its}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00020}00020 \textcolor{comment}{ *    contributors may be used to endorse or promote products derived}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00021}00021 \textcolor{comment}{ *    from this software without specific, prior written permission.}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00022}00022 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00023}00023 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00024}00024 \textcolor{comment}{ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00025}00025 \textcolor{comment}{ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00026}00026 \textcolor{comment}{ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00027}00027 \textcolor{comment}{ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00028}00028 \textcolor{comment}{ * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00029}00029 \textcolor{comment}{ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00030}00030 \textcolor{comment}{ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00031}00031 \textcolor{comment}{ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00032}00032 \textcolor{comment}{ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00033}00033 \textcolor{comment}{ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00034}00034 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00035}00035 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00036}00036 \textcolor{comment}{ * \$DragonFly: src/sys/dev/netif/mii\_layer/truephy.c,v 1.3 2008/02/10 07:29:27 sephe Exp \$}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00037}00037 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00038}00038 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00039}00039 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/errno.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <net/if\_arp.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <net/ethernet.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <net/if\_vlan\_var.h>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{mii_8h}{dev/mii/mii.h}}>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{miivar_8h}{dev/mii/miivar.h}}>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00057}00057 \textcolor{preprocessor}{\#include "{}miidevs.h"{}}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{truephyreg_8h}{dev/mii/truephyreg.h}}>}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00061}00061 \textcolor{preprocessor}{\#include "{}miibus\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00063}\mbox{\hyperlink{truephy_8c_a64496f38f405fd54aba61ba4d61ece0b}{00063}} \textcolor{preprocessor}{\#define TRUEPHY\_FRAMELEN(mtu)   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00064}00064 \textcolor{preprocessor}{    (ETHER\_HDR\_LEN + ETHER\_VLAN\_ENCAP\_LEN + (mtu) + ETHER\_CRC\_LEN)}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00066}00066 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{truephy_8c_a0ef47dcd4aca63c0cb90a0e012dc1bf4}{truephy\_service}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structmii__data}{mii\_data}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00067}00067 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{truephy_8c_a54bd12dfdcf9cd13400045e2c924c226}{truephy\_attach}}(device\_t);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00068}00068 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{truephy_8c_a11a8bcbc4f692c0fb35075c9efff3130}{truephy\_probe}}(device\_t);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00069}00069 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{truephy_8c_a6d0c5403a47e2eae4c8f015129f81a25}{truephy\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00070}00070 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{truephy_8c_a45e47179172a6168b8d46305b61676a3}{truephy\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00072}\mbox{\hyperlink{truephy_8c_ab8424d59fdd8450c7fe97d932f2062df}{00072}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{truephy_8c_ab8424d59fdd8450c7fe97d932f2062df}{truephy\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00073}00073         \textcolor{comment}{/* device interface */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00074}00074         DEVMETHOD(device\_probe,         \mbox{\hyperlink{truephy_8c_a11a8bcbc4f692c0fb35075c9efff3130}{truephy\_probe}}),}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00075}00075         DEVMETHOD(device\_attach,        \mbox{\hyperlink{truephy_8c_a54bd12dfdcf9cd13400045e2c924c226}{truephy\_attach}}),}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00076}00076         DEVMETHOD(device\_detach,        \mbox{\hyperlink{mii__physubr_8c_af08a34e3932c19824be61fc41ee1083f}{mii\_phy\_detach}}),}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00077}00077         DEVMETHOD(device\_shutdown,      bus\_generic\_shutdown),}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00078}00078         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00079}00079 \};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00081}\mbox{\hyperlink{truephy_8c_a3e01cf86c6af36ddd415b03e3fcefd2d}{00081}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structmii__phydesc}{mii\_phydesc}} \mbox{\hyperlink{truephy_8c_a3e01cf86c6af36ddd415b03e3fcefd2d}{truephys}}[] = \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00082}00082         \mbox{\hyperlink{miivar_8h_ae87ddbe9ffefd4caca54be68c7b281fc}{MII\_PHY\_DESC}}(AGERE, ET1011),}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00083}00083         \mbox{\hyperlink{miivar_8h_ae87ddbe9ffefd4caca54be68c7b281fc}{MII\_PHY\_DESC}}(AGERE, ET1011C),}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00084}00084         \mbox{\hyperlink{miivar_8h_a4cc657798701d214afbeff2b27c5083d}{MII\_PHY\_END}}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00085}00085 \};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00087}\mbox{\hyperlink{truephy_8c_a79ae17e222c45a3b3f9881894251393c}{00087}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{truephy_8c_a79ae17e222c45a3b3f9881894251393c}{truephy\_devclass}};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00089}\mbox{\hyperlink{truephy_8c_a5f9f00984c5cb26bb042fc60e78fa56c}{00089}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{truephy_8c_a5f9f00984c5cb26bb042fc60e78fa56c}{truephy\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00090}00090         \textcolor{stringliteral}{"{}truephy"{}},}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00091}00091         \mbox{\hyperlink{truephy_8c_ab8424d59fdd8450c7fe97d932f2062df}{truephy\_methods}},}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00092}00092         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structmii__softc}{mii\_softc}})}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00093}00093 \};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00095}\mbox{\hyperlink{truephy_8c_aa6d6b2e737682bd09e6968ef1b64ba65}{00095}} \mbox{\hyperlink{truephy_8c_aa6d6b2e737682bd09e6968ef1b64ba65}{DRIVER\_MODULE}}(truephy, \mbox{\hyperlink{miibus__if_8m_a4cbc1805319b363b9b338406a4b2a683}{miibus}}, \mbox{\hyperlink{truephy_8c_a5f9f00984c5cb26bb042fc60e78fa56c}{truephy\_driver}}, \mbox{\hyperlink{truephy_8c_a79ae17e222c45a3b3f9881894251393c}{truephy\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00097}\mbox{\hyperlink{truephy_8c_aedb42ac74529c116f84ae4a8d32731c0}{00097}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structmii__phy__funcs}{mii\_phy\_funcs}} \mbox{\hyperlink{truephy_8c_aedb42ac74529c116f84ae4a8d32731c0}{truephy\_funcs}} = \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00098}00098         \mbox{\hyperlink{truephy_8c_a0ef47dcd4aca63c0cb90a0e012dc1bf4}{truephy\_service}},}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00099}00099         \mbox{\hyperlink{truephy_8c_a45e47179172a6168b8d46305b61676a3}{truephy\_status}},}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00100}00100         \mbox{\hyperlink{truephy_8c_a6d0c5403a47e2eae4c8f015129f81a25}{truephy\_reset}}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00101}00101 \};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00103}\mbox{\hyperlink{structtruephy__dsp}{00103}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structtruephy__dsp}{truephy\_dsp}} \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00104}\mbox{\hyperlink{structtruephy__dsp_aeb7e391432e3e1640b6f4388cce52eba}{00104}}         uint16\_t        \mbox{\hyperlink{structtruephy__dsp_aeb7e391432e3e1640b6f4388cce52eba}{index}};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00105}\mbox{\hyperlink{structtruephy__dsp_a69f5f8c81316ca0e0a78c5caa2e52ed9}{00105}}         uint16\_t        \mbox{\hyperlink{structtruephy__dsp_a69f5f8c81316ca0e0a78c5caa2e52ed9}{data}};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00106}00106 \} \mbox{\hyperlink{truephy_8c_a7b593500e837cef501e6bcc579500609}{truephy\_dspcode}}[] = \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00107}00107         \{ 0x880b,       0x0926 \},       \textcolor{comment}{/* AfeIfCreg4B1000Msbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00108}00108         \{ 0x880c,       0x0926 \},       \textcolor{comment}{/* AfeIfCreg4B100Msbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00109}00109         \{ 0x880d,       0x0926 \},       \textcolor{comment}{/* AfeIfCreg4B10Msbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00111}00111         \{ 0x880e,       0xb4d3 \},       \textcolor{comment}{/* AfeIfCreg4B1000Lsbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00112}00112         \{ 0x880f,       0xb4d3 \},       \textcolor{comment}{/* AfeIfCreg4B100Lsbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00113}00113         \{ 0x8810,       0xb4d3 \},       \textcolor{comment}{/* AfeIfCreg4B10Lsbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00115}00115         \{ 0x8805,       0xb03e \},       \textcolor{comment}{/* AfeIfCreg3B1000Msbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00116}00116         \{ 0x8806,       0xb03e \},       \textcolor{comment}{/* AfeIfCreg3B100Msbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00117}00117         \{ 0x8807,       0xff00 \},       \textcolor{comment}{/* AfeIfCreg3B10Msbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00119}00119         \{ 0x8808,       0xe090 \},       \textcolor{comment}{/* AfeIfCreg3B1000Lsbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00120}00120         \{ 0x8809,       0xe110 \},       \textcolor{comment}{/* AfeIfCreg3B100Lsbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00121}00121         \{ 0x880a,       0x0000 \},       \textcolor{comment}{/* AfeIfCreg3B10Lsbs */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00123}00123         \{ 0x300d,       1      \},       \textcolor{comment}{/* DisableNorm */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00125}00125         \{ 0x280c,       0x0180 \},       \textcolor{comment}{/* LinkHoldEnd */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00127}00127         \{ 0x1c21,       0x0002 \},       \textcolor{comment}{/* AlphaM */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00129}00129         \{ 0x3821,       6      \},       \textcolor{comment}{/* FfeLkgTx0 */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00130}00130         \{ 0x381d,       1      \},       \textcolor{comment}{/* FfeLkg1g4 */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00131}00131         \{ 0x381e,       1      \},       \textcolor{comment}{/* FfeLkg1g5 */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00132}00132         \{ 0x381f,       1      \},       \textcolor{comment}{/* FfeLkg1g6 */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00133}00133         \{ 0x3820,       1      \},       \textcolor{comment}{/* FfeLkg1g7 */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00135}00135         \{ 0x8402,       0x01f0 \},       \textcolor{comment}{/* Btinact */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00136}00136         \{ 0x800e,       20     \},       \textcolor{comment}{/* LftrainTime */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00137}00137         \{ 0x800f,       24     \},       \textcolor{comment}{/* DvguardTime */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00138}00138         \{ 0x8010,       46     \}        \textcolor{comment}{/* IdlguardTime */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00139}\mbox{\hyperlink{truephy_8c_a7b593500e837cef501e6bcc579500609}{00139}} \};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00141}00141 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00142}\mbox{\hyperlink{truephy_8c_a11a8bcbc4f692c0fb35075c9efff3130}{00142}} \mbox{\hyperlink{truephy_8c_a11a8bcbc4f692c0fb35075c9efff3130}{truephy\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00143}00143 \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00144}00144 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00145}00145         \textcolor{keywordflow}{return} (\mbox{\hyperlink{mii__physubr_8c_a6eae4dd21de85ca536b06467bf0a5f88}{mii\_phy\_dev\_probe}}(dev, \mbox{\hyperlink{truephy_8c_a3e01cf86c6af36ddd415b03e3fcefd2d}{truephys}}, BUS\_PROBE\_DEFAULT));}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00146}00146 \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00148}00148 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00149}\mbox{\hyperlink{truephy_8c_a54bd12dfdcf9cd13400045e2c924c226}{00149}} \mbox{\hyperlink{truephy_8c_a54bd12dfdcf9cd13400045e2c924c226}{truephy\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00150}00150 \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00151}00151         \textcolor{keyword}{struct }\mbox{\hyperlink{structmii__softc}{mii\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00153}00153         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00155}00155         \mbox{\hyperlink{mii__physubr_8c_a50acf7ba3fab73b23c13fe7da8c93f1d}{mii\_phy\_dev\_attach}}(dev, \mbox{\hyperlink{miivar_8h_ab5201dd2953a06a0ea2cd36a4332d82a}{MIIF\_NOISOLATE}} | \mbox{\hyperlink{miivar_8h_a8d2d38c2ee2b3eb2ccd1f0a3da5fed03}{MIIF\_NOMANPAUSE}},}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00156}00156            \&\mbox{\hyperlink{truephy_8c_aedb42ac74529c116f84ae4a8d32731c0}{truephy\_funcs}}, 0);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00158}00158         \mbox{\hyperlink{miivar_8h_aa355e0359542ffc84e9060ab4556f4d8}{PHY\_RESET}}(sc);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00160}00160         sc-\/>\mbox{\hyperlink{structmii__softc_ac3b545baf912e9bd14af8df8bb388050}{mii\_capabilities}} = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_aa2f632686d6298a7c898b1c805586aab}{MII\_BMSR}}) \& sc-\/>\mbox{\hyperlink{structmii__softc_a157af3d80c80b4529458f07886f72a38}{mii\_capmask}};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00161}00161         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structmii__softc_ac3b545baf912e9bd14af8df8bb388050}{mii\_capabilities}} \& \mbox{\hyperlink{mii_8h_ab4f6d84420322e12fccdd4647cdcce3e}{BMSR\_EXTSTAT}}) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00162}00162                 sc-\/>\mbox{\hyperlink{structmii__softc_a9e880a089e764bf319ae80abfa6e2daa}{mii\_extcapabilities}} = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_a615063b2b7e3d314ccf5a8adeb86ffb7}{MII\_EXTSR}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00163}00163                 \textcolor{comment}{/* No 1000baseT half-\/duplex support */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00164}00164                 sc-\/>\mbox{\hyperlink{structmii__softc_a9e880a089e764bf319ae80abfa6e2daa}{mii\_extcapabilities}} \&= \string~EXTSR\_1000THDX;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00165}00165         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00166}00166 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00167}00167         device\_printf(dev, \textcolor{stringliteral}{"{} "{}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00168}00168         \mbox{\hyperlink{mii__physubr_8c_ac6dc37c9b11e82962dbe7800afdda4cd}{mii\_phy\_add\_media}}(sc);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00169}00169         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00171}00171         MIIBUS\_MEDIAINIT(sc-\/>\mbox{\hyperlink{structmii__softc_a621f3e4b95682f9f64ffeacf496e9a22}{mii\_dev}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00172}00172         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00173}00173 \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00175}00175 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00176}\mbox{\hyperlink{truephy_8c_a0ef47dcd4aca63c0cb90a0e012dc1bf4}{00176}} \mbox{\hyperlink{truephy_8c_a0ef47dcd4aca63c0cb90a0e012dc1bf4}{truephy\_service}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structmii__data}{mii\_data}} *mii, \textcolor{keywordtype}{int} cmd)}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00177}00177 \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00178}00178         \textcolor{keyword}{struct }ifmedia\_entry *ife = mii-\/>\mbox{\hyperlink{structmii__data_ac0e7ceb0ad8cc3eb2e55a6947d4c6fd0}{mii\_media}}.ifm\_cur;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00179}00179         \textcolor{keywordtype}{int} bmcr;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00180}00180 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00181}00181         \textcolor{keywordflow}{switch} (cmd) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00182}00182         \textcolor{keywordflow}{case} \mbox{\hyperlink{miivar_8h_a5ee687df11441661206e4d2922ab5a52}{MII\_POLLSTAT}}:}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00183}00183                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00185}00185         \textcolor{keywordflow}{case} \mbox{\hyperlink{miivar_8h_a6c5cb4a5233e6b1e8a8542636e8ba4c8}{MII\_MEDIACHG}}:}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00186}00186                 \textcolor{keywordflow}{if} (IFM\_SUBTYPE(ife-\/>ifm\_media) != IFM\_AUTO) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00187}00187                         bmcr = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}}) \& \string~BMCR\_AUTOEN;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00188}00188                         \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}}, bmcr);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00189}00189                         \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}}, bmcr | \mbox{\hyperlink{mii_8h_a268f2a026617b4490ae48826b4af8a7b}{BMCR\_PDOWN}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00190}00190                 \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00191}00191 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00192}00192                 \mbox{\hyperlink{mii__physubr_8c_afac2ea5f0d036a16125e01fc48a41457}{mii\_phy\_setmedia}}(sc);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00194}00194                 \textcolor{keywordflow}{if} (IFM\_SUBTYPE(ife-\/>ifm\_media) != IFM\_AUTO) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00195}00195                         bmcr = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}}) \& \string~BMCR\_PDOWN;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00196}00196                         \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}}, bmcr);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00197}00197 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00198}00198                         \textcolor{keywordflow}{if} (IFM\_SUBTYPE(ife-\/>ifm\_media) == IFM\_1000\_T) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00199}00199                                 \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}},}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00200}00200                                     bmcr | \mbox{\hyperlink{mii_8h_a8d92e7dc8997005e43add732fba16a0d}{BMCR\_AUTOEN}} | \mbox{\hyperlink{mii_8h_a2ed0562d5bde5bf56ec01a2e0b9a12a7}{BMCR\_STARTNEG}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00201}00201                         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00202}00202                 \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00203}00203                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00205}00205         \textcolor{keywordflow}{case} \mbox{\hyperlink{miivar_8h_a7aba758235b2d688fc41842a167187e5}{MII\_TICK}}:}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00206}00206                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{mii__physubr_8c_aee0c2c158db70e66816d5c1269e83290}{mii\_phy\_tick}}(sc) == EJUSTRETURN)}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00207}00207                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00208}00208                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00209}00209         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00211}00211         \textcolor{comment}{/* Update the media status. */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00212}00212         \mbox{\hyperlink{miivar_8h_a1c1cdb714bf40ba701256727dd6a73c5}{PHY\_STATUS}}(sc);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00214}00214         \textcolor{comment}{/* Callback if something changed. */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00215}00215         \mbox{\hyperlink{mii__physubr_8c_ac5a93e41e086c93143a04d9d4548b251}{mii\_phy\_update}}(sc, cmd);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00216}00216         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00217}00217 \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00219}00219 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00220}\mbox{\hyperlink{truephy_8c_a6d0c5403a47e2eae4c8f015129f81a25}{00220}} \mbox{\hyperlink{truephy_8c_a6d0c5403a47e2eae4c8f015129f81a25}{truephy\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00221}00221 \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00222}00222         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00224}00224         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structmii__softc_a78f933ccf4c00044756002bdd88e4836}{mii\_mpd\_model}} == MII\_MODEL\_AGERE\_ET1011) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00225}00225                 \mbox{\hyperlink{mii__physubr_8c_ac21db38f2acb040663be6eac5468eaa2}{mii\_phy\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00226}00226                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00227}00227         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00229}00229         \textcolor{keywordflow}{for} (i = 0; i < 2; ++i) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00230}00230                 \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_af7a1cd475d2a72a786f36d48b2c5480f}{MII\_PHYIDR1}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00231}00231                 \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_a80bda47504fdbd67890af22b70b8863d}{MII\_PHYIDR2}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00233}00233                 \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{truephyreg_8h_a4470e9e51a1b90775995de7414a0ef4f}{TRUEPHY\_CTRL}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00234}00234                 \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_a4470e9e51a1b90775995de7414a0ef4f}{TRUEPHY\_CTRL}},}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00235}00235                           \mbox{\hyperlink{truephyreg_8h_a839debf9985649d7fd33aadc59f20dff}{TRUEPHY\_CTRL\_DIAG}} | \mbox{\hyperlink{truephyreg_8h_a465dfba2565c6589c30bbdab6ab41381}{TRUEPHY\_CTRL\_RSV1}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00237}00237                 \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_affb8d8874a266c90ac0bc5cb72147b54}{TRUEPHY\_INDEX}}, \mbox{\hyperlink{truephyreg_8h_a5aa0095fdeeb074aa8584ce505db4f1f}{TRUEPHY\_INDEX\_MAGIC}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00238}00238                 \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{truephyreg_8h_a6cc22504dc1fa50ac9eaa5b99d5ee628}{TRUEPHY\_DATA}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00239}00239 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00240}00240                 \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_a4470e9e51a1b90775995de7414a0ef4f}{TRUEPHY\_CTRL}}, \mbox{\hyperlink{truephyreg_8h_a465dfba2565c6589c30bbdab6ab41381}{TRUEPHY\_CTRL\_RSV1}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00241}00241         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00243}00243         \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00244}00244         \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{truephyreg_8h_a4470e9e51a1b90775995de7414a0ef4f}{TRUEPHY\_CTRL}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00245}00245         \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}}, \mbox{\hyperlink{mii_8h_a8d92e7dc8997005e43add732fba16a0d}{BMCR\_AUTOEN}} | \mbox{\hyperlink{mii_8h_a268f2a026617b4490ae48826b4af8a7b}{BMCR\_PDOWN}} | \mbox{\hyperlink{mii_8h_ab1181844d269db0df0962f4a7be0ceee}{BMCR\_S1000}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00246}00246         \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_a4470e9e51a1b90775995de7414a0ef4f}{TRUEPHY\_CTRL}},}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00247}00247                   \mbox{\hyperlink{truephyreg_8h_a839debf9985649d7fd33aadc59f20dff}{TRUEPHY\_CTRL\_DIAG}} | \mbox{\hyperlink{truephyreg_8h_a465dfba2565c6589c30bbdab6ab41381}{TRUEPHY\_CTRL\_RSV1}} | \mbox{\hyperlink{truephyreg_8h_ae098e1e842fbc23b0bd270d2f5df9822}{TRUEPHY\_CTRL\_RSV0}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00249}00249         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{truephy_8c_a7b593500e837cef501e6bcc579500609}{truephy\_dspcode}}); ++i) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00250}00250                 \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structtruephy__dsp}{truephy\_dsp}} *dsp = \&\mbox{\hyperlink{truephy_8c_a7b593500e837cef501e6bcc579500609}{truephy\_dspcode}}[i];}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00252}00252                 \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_affb8d8874a266c90ac0bc5cb72147b54}{TRUEPHY\_INDEX}}, dsp-\/>\mbox{\hyperlink{structtruephy__dsp_aeb7e391432e3e1640b6f4388cce52eba}{index}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00253}00253                 \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_a6cc22504dc1fa50ac9eaa5b99d5ee628}{TRUEPHY\_DATA}}, dsp-\/>\mbox{\hyperlink{structtruephy__dsp_a69f5f8c81316ca0e0a78c5caa2e52ed9}{data}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00255}00255                 \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_affb8d8874a266c90ac0bc5cb72147b54}{TRUEPHY\_INDEX}}, dsp-\/>\mbox{\hyperlink{structtruephy__dsp_aeb7e391432e3e1640b6f4388cce52eba}{index}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00256}00256                 \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{truephyreg_8h_a6cc22504dc1fa50ac9eaa5b99d5ee628}{TRUEPHY\_DATA}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00257}00257         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00259}00259         \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00260}00260         \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{truephyreg_8h_a4470e9e51a1b90775995de7414a0ef4f}{TRUEPHY\_CTRL}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00261}00261         \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}}, \mbox{\hyperlink{mii_8h_a8d92e7dc8997005e43add732fba16a0d}{BMCR\_AUTOEN}} |  \mbox{\hyperlink{mii_8h_ab1181844d269db0df0962f4a7be0ceee}{BMCR\_S1000}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00262}00262         \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_a4470e9e51a1b90775995de7414a0ef4f}{TRUEPHY\_CTRL}}, \mbox{\hyperlink{truephyreg_8h_a465dfba2565c6589c30bbdab6ab41381}{TRUEPHY\_CTRL\_RSV1}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00264}00264         \mbox{\hyperlink{mii__physubr_8c_ac21db38f2acb040663be6eac5468eaa2}{mii\_phy\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00266}00266         \textcolor{keywordflow}{if} (\mbox{\hyperlink{truephy_8c_a64496f38f405fd54aba61ba4d61ece0b}{TRUEPHY\_FRAMELEN}}((if\_getmtu(sc-\/>\mbox{\hyperlink{structmii__softc_a12011aec864a92fb63b711b43e6b4356}{mii\_pdata}}-\/>\mbox{\hyperlink{structmii__data_a89e7b0f6538968080eb8f89d67b23760}{mii\_ifp}})) > 2048)) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00267}00267                 \textcolor{keywordtype}{int} conf;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00269}00269                 conf = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{truephyreg_8h_a7892386d662f2ab3da0b692a8fbbab47}{TRUEPHY\_CONF}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00270}00270                 conf \&= \string~TRUEPHY\_CONF\_TXFIFO\_MASK;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00271}00271                 conf |= \mbox{\hyperlink{truephyreg_8h_a48de4d701c393b62e35db1754416ed08}{TRUEPHY\_CONF\_TXFIFO\_24}};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00272}00272                 \mbox{\hyperlink{miivar_8h_af302bd91f8177e3ca317b822f00680b5}{PHY\_WRITE}}(sc, \mbox{\hyperlink{truephyreg_8h_a7892386d662f2ab3da0b692a8fbbab47}{TRUEPHY\_CONF}}, conf);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00273}00273         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00274}00274 \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00276}00276 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00277}\mbox{\hyperlink{truephy_8c_a45e47179172a6168b8d46305b61676a3}{00277}} \mbox{\hyperlink{truephy_8c_a45e47179172a6168b8d46305b61676a3}{truephy\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00278}00278 \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00279}00279         \textcolor{keyword}{struct }\mbox{\hyperlink{structmii__data}{mii\_data}} *mii = sc-\/>\mbox{\hyperlink{structmii__softc_a12011aec864a92fb63b711b43e6b4356}{mii\_pdata}};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00280}00280         \textcolor{keywordtype}{int} bmsr, bmcr, sr;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00282}00282         mii-\/>\mbox{\hyperlink{structmii__data_a15c66b8658a144ac3294603a8146ac09}{mii\_media\_status}} = IFM\_AVALID;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00283}00283         mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} = IFM\_ETHER;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00285}00285         sr = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{truephyreg_8h_af8785a479c8223ec93b25dde9ecea6d1}{TRUEPHY\_SR}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00286}00286         bmcr = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00288}00288         bmsr = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_aa2f632686d6298a7c898b1c805586aab}{MII\_BMSR}}) | \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(sc, \mbox{\hyperlink{mii_8h_aa2f632686d6298a7c898b1c805586aab}{MII\_BMSR}});}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00289}00289         \textcolor{keywordflow}{if} (bmsr \& \mbox{\hyperlink{mii_8h_aca42eb005e0fdbae038bd7c9f12a1035}{BMSR\_LINK}})}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00290}00290                 mii-\/>\mbox{\hyperlink{structmii__data_a15c66b8658a144ac3294603a8146ac09}{mii\_media\_status}} |= IFM\_ACTIVE;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00291}00291 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00292}00292         \textcolor{keywordflow}{if} (bmcr \& \mbox{\hyperlink{mii_8h_a8d92e7dc8997005e43add732fba16a0d}{BMCR\_AUTOEN}}) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00293}00293                 \textcolor{keywordflow}{if} ((bmsr \& \mbox{\hyperlink{mii_8h_aa602b8728f35b021f27e9db3b06a7e55}{BMSR\_ACOMP}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00294}00294                         mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00295}00295                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00296}00296                 \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00297}00297         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00299}00299         \textcolor{keywordflow}{switch} (sr \& \mbox{\hyperlink{truephyreg_8h_a91662c3baf4ac8f365f8954285ac5b45}{TRUEPHY\_SR\_SPD\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00300}00300         \textcolor{keywordflow}{case} \mbox{\hyperlink{truephyreg_8h_ae21482e9ed878a44466e7574bfb1a10a}{TRUEPHY\_SR\_SPD\_1000T}}:}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00301}00301                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_1000\_T;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00302}00302                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00303}00303         \textcolor{keywordflow}{case} \mbox{\hyperlink{truephyreg_8h_a2db566fd881fd00c6ffd5f1398ba4ba1}{TRUEPHY\_SR\_SPD\_100TX}}:}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00304}00304                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_100\_TX;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00305}00305                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00306}00306         \textcolor{keywordflow}{case} \mbox{\hyperlink{truephyreg_8h_a1ce26601268e38d9ac52547196d08e07}{TRUEPHY\_SR\_SPD\_10T}}:}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00307}00307                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_10\_T;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00308}00308                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00309}00309         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00310}00310                 \textcolor{comment}{/* XXX will this ever happen? */}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00311}00311                 printf(\textcolor{stringliteral}{"{}invalid media SR \%\#x\(\backslash\)n"{}}, sr);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00312}00312                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00313}00313                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00314}00314         \}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00315}00315 }
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00316}00316         \textcolor{keywordflow}{if} (sr \& \mbox{\hyperlink{truephyreg_8h_acf71121405d991585cce405e2a244607}{TRUEPHY\_SR\_FDX}})}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00317}00317                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_FDX | \mbox{\hyperlink{mii__physubr_8c_a02a13013ccece7f7569fce9ab65424d3}{mii\_phy\_flowstatus}}(sc);}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00318}00318         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00319}00319                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_HDX;}
\DoxyCodeLine{\Hypertarget{truephy_8c_source_l00320}00320 \}}

\end{DoxyCode}
