\hypertarget{rlphy_8c_source}{}\doxysection{rlphy.\+c}
\label{rlphy_8c_source}\index{dev/mii/rlphy.c@{dev/mii/rlphy.c}}
\mbox{\hyperlink{rlphy_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/4-\/Clause}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1997, 1998, 1999}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00005}00005 \textcolor{comment}{ *      Bill Paul <wpaul@ctr.columbia.edu>.  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00015}00015 \textcolor{comment}{ * 3. All advertising materials mentioning features or use of this software}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00016}00016 \textcolor{comment}{ *    must display the following acknowledgement:}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00017}00017 \textcolor{comment}{ *      This product includes software developed by Bill Paul.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00018}00018 \textcolor{comment}{ * 4. Neither the name of the author nor the names of any co-\/contributors}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00019}00019 \textcolor{comment}{ *    may be used to endorse or promote products derived from this software}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00020}00020 \textcolor{comment}{ *    without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00021}00021 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00022}00022 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00023}00023 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00024}00024 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00025}00025 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00026}00026 \textcolor{comment}{ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00027}00027 \textcolor{comment}{ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00028}00028 \textcolor{comment}{ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00029}00029 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00030}00030 \textcolor{comment}{ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00031}00031 \textcolor{comment}{ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00032}00032 \textcolor{comment}{ * THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00033}00033 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00036}\mbox{\hyperlink{rlphy_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00036}} \mbox{\hyperlink{rlphy_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00038}00038 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00039}00039 \textcolor{comment}{ * driver for RealTek 8139 internal PHYs}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00040}00040 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}      \textcolor{comment}{/* XXXGL: if\_rlreg.h contamination */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <net/if\_arp.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{mii_8h}{dev/mii/mii.h}}>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{miivar_8h}{dev/mii/miivar.h}}>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00056}00056 \textcolor{preprocessor}{\#include "{}miidevs.h"{}}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <dev/rl/if\_rlreg.h>}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00061}00061 \textcolor{preprocessor}{\#include "{}miibus\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00063}00063 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{rlphy_8c_a8680f756f4b8bcff4ac141e3b765ead4}{rlphy\_probe}}(device\_t);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00064}00064 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{rlphy_8c_a6743e22c39e52de4ba044acc6eee57d9}{rlphy\_attach}}(device\_t);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00066}\mbox{\hyperlink{rlphy_8c_af098ad6676057f949a77fb7d5e45425d}{00066}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{rlphy_8c_af098ad6676057f949a77fb7d5e45425d}{rlphy\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00067}00067         \textcolor{comment}{/* device interface */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00068}00068         DEVMETHOD(device\_probe,         \mbox{\hyperlink{rlphy_8c_a8680f756f4b8bcff4ac141e3b765ead4}{rlphy\_probe}}),}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00069}00069         DEVMETHOD(device\_attach,        \mbox{\hyperlink{rlphy_8c_a6743e22c39e52de4ba044acc6eee57d9}{rlphy\_attach}}),}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00070}00070         DEVMETHOD(device\_detach,        \mbox{\hyperlink{mii__physubr_8c_af08a34e3932c19824be61fc41ee1083f}{mii\_phy\_detach}}),}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00071}00071         DEVMETHOD(device\_shutdown,      bus\_generic\_shutdown),}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00072}00072         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00073}00073 \};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00075}\mbox{\hyperlink{rlphy_8c_a0a08e72e3c5db5e139bbab0027d5e96d}{00075}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{rlphy_8c_a0a08e72e3c5db5e139bbab0027d5e96d}{rlphy\_devclass}};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00077}\mbox{\hyperlink{rlphy_8c_a02fb6c916c91bfe1126288ebb45532f8}{00077}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{rlphy_8c_a02fb6c916c91bfe1126288ebb45532f8}{rlphy\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00078}00078         \textcolor{stringliteral}{"{}rlphy"{}},}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00079}00079         \mbox{\hyperlink{rlphy_8c_af098ad6676057f949a77fb7d5e45425d}{rlphy\_methods}},}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00080}00080         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structmii__softc}{mii\_softc}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00081}00081 \};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00083}\mbox{\hyperlink{rlphy_8c_a276f0905fd8e33c6cd85be90bf207bcb}{00083}} \mbox{\hyperlink{rlphy_8c_a276f0905fd8e33c6cd85be90bf207bcb}{DRIVER\_MODULE}}(rlphy, \mbox{\hyperlink{miibus__if_8m_a4cbc1805319b363b9b338406a4b2a683}{miibus}}, \mbox{\hyperlink{rlphy_8c_a02fb6c916c91bfe1126288ebb45532f8}{rlphy\_driver}}, \mbox{\hyperlink{rlphy_8c_a0a08e72e3c5db5e139bbab0027d5e96d}{rlphy\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00085}00085 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{rlphy_8c_a88d8baf2bb2c8337414523f812a7e084}{rlphy\_service}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structmii__data}{mii\_data}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00086}00086 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{rlphy_8c_a5bf653b820588a849355d389e55a707b}{rlphy\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00088}00088 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00089}00089 \textcolor{comment}{ * RealTek internal PHYs don't have vendor/device ID registers;}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00090}00090 \textcolor{comment}{ * re(4) and rl(4) fake up a return value of all zeros.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00091}00091 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00092}\mbox{\hyperlink{rlphy_8c_a5bca19cb50b4426d5c522ea322d2c6e8}{00092}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structmii__phydesc}{mii\_phydesc}} \mbox{\hyperlink{rlphy_8c_a5bca19cb50b4426d5c522ea322d2c6e8}{rlintphys}}[] = \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00093}00093         \{ 0, 0, \textcolor{stringliteral}{"{}RealTek internal media interface"{}} \},}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00094}00094         \mbox{\hyperlink{miivar_8h_a4cc657798701d214afbeff2b27c5083d}{MII\_PHY\_END}}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00095}00095 \};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00097}\mbox{\hyperlink{rlphy_8c_a241a31a1066c04b0cabef6edf62f2112}{00097}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structmii__phydesc}{mii\_phydesc}} \mbox{\hyperlink{rlphy_8c_a241a31a1066c04b0cabef6edf62f2112}{rlphys}}[] = \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00098}00098         \mbox{\hyperlink{miivar_8h_ae87ddbe9ffefd4caca54be68c7b281fc}{MII\_PHY\_DESC}}(yyREALTEK, RTL8201L),}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00099}00099         \mbox{\hyperlink{miivar_8h_ae87ddbe9ffefd4caca54be68c7b281fc}{MII\_PHY\_DESC}}(REALTEK, RTL8201E),}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00100}00100         \mbox{\hyperlink{miivar_8h_ae87ddbe9ffefd4caca54be68c7b281fc}{MII\_PHY\_DESC}}(xxICPLUS, IP101),}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00101}00101         \mbox{\hyperlink{miivar_8h_a4cc657798701d214afbeff2b27c5083d}{MII\_PHY\_END}}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00102}00102 \};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00104}\mbox{\hyperlink{rlphy_8c_aa92e336fbdb60d6220ff91eead5d1a3c}{00104}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structmii__phy__funcs}{mii\_phy\_funcs}} \mbox{\hyperlink{rlphy_8c_aa92e336fbdb60d6220ff91eead5d1a3c}{rlphy\_funcs}} = \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00105}00105         \mbox{\hyperlink{rlphy_8c_a88d8baf2bb2c8337414523f812a7e084}{rlphy\_service}},}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00106}00106         \mbox{\hyperlink{rlphy_8c_a5bf653b820588a849355d389e55a707b}{rlphy\_status}},}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00107}00107         \mbox{\hyperlink{mii__physubr_8c_ac21db38f2acb040663be6eac5468eaa2}{mii\_phy\_reset}}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00108}00108 \};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00110}00110 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00111}\mbox{\hyperlink{rlphy_8c_a8680f756f4b8bcff4ac141e3b765ead4}{00111}} \mbox{\hyperlink{rlphy_8c_a8680f756f4b8bcff4ac141e3b765ead4}{rlphy\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00112}00112 \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00113}00113         \textcolor{keywordtype}{int} rv;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00115}00115         rv = \mbox{\hyperlink{mii__physubr_8c_a6eae4dd21de85ca536b06467bf0a5f88}{mii\_phy\_dev\_probe}}(dev, \mbox{\hyperlink{rlphy_8c_a241a31a1066c04b0cabef6edf62f2112}{rlphys}}, BUS\_PROBE\_DEFAULT);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00116}00116         \textcolor{keywordflow}{if} (rv <= 0)}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00117}00117                 \textcolor{keywordflow}{return} (rv);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00119}00119         \textcolor{keywordflow}{if} (\mbox{\hyperlink{mii_8c_a35bcd1b02f42ca5891e8cb303f431285}{mii\_dev\_mac\_match}}(dev, \textcolor{stringliteral}{"{}rl"{}}) || \mbox{\hyperlink{mii_8c_a35bcd1b02f42ca5891e8cb303f431285}{mii\_dev\_mac\_match}}(dev, \textcolor{stringliteral}{"{}re"{}}))}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00120}00120                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{mii__physubr_8c_a6eae4dd21de85ca536b06467bf0a5f88}{mii\_phy\_dev\_probe}}(dev, \mbox{\hyperlink{rlphy_8c_a5bca19cb50b4426d5c522ea322d2c6e8}{rlintphys}}, BUS\_PROBE\_DEFAULT));}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00121}00121         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00122}00122 \}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00124}00124 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00125}\mbox{\hyperlink{rlphy_8c_a6743e22c39e52de4ba044acc6eee57d9}{00125}} \mbox{\hyperlink{rlphy_8c_a6743e22c39e52de4ba044acc6eee57d9}{rlphy\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00126}00126 \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00128}00128         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00129}00129 \textcolor{comment}{         * The RealTek PHY can never be isolated.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00130}00130 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00131}00131         \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{rlphy_8c_source_l00132}00132             \&\mbox{\hyperlink{rlphy_8c_aa92e336fbdb60d6220ff91eead5d1a3c}{rlphy\_funcs}}, 1);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00133}00133         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00134}00134 \}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00136}00136 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00137}\mbox{\hyperlink{rlphy_8c_a88d8baf2bb2c8337414523f812a7e084}{00137}} \mbox{\hyperlink{rlphy_8c_a88d8baf2bb2c8337414523f812a7e084}{rlphy\_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{rlphy_8c_source_l00138}00138 \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00140}00140         \textcolor{keywordflow}{switch} (cmd) \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00141}00141         \textcolor{keywordflow}{case} \mbox{\hyperlink{miivar_8h_a5ee687df11441661206e4d2922ab5a52}{MII\_POLLSTAT}}:}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00142}00142                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00143}00143 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00144}00144         \textcolor{keywordflow}{case} \mbox{\hyperlink{miivar_8h_a6c5cb4a5233e6b1e8a8542636e8ba4c8}{MII\_MEDIACHG}}:}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00145}00145                 \mbox{\hyperlink{mii__physubr_8c_afac2ea5f0d036a16125e01fc48a41457}{mii\_phy\_setmedia}}(sc);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00146}00146                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00148}00148         \textcolor{keywordflow}{case} \mbox{\hyperlink{miivar_8h_a7aba758235b2d688fc41842a167187e5}{MII\_TICK}}:}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00149}00149                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00150}00150 \textcolor{comment}{                 * The RealTek PHY's autonegotiation doesn't need to be}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00151}00151 \textcolor{comment}{                 * kicked; it continues in the background.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00152}00152 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00153}00153                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00154}00154         \}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00156}00156         \textcolor{comment}{/* Update the media status. */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00157}00157         \mbox{\hyperlink{miivar_8h_a1c1cdb714bf40ba701256727dd6a73c5}{PHY\_STATUS}}(sc);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00159}00159         \textcolor{comment}{/* Callback if something changed. */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00160}00160         \mbox{\hyperlink{mii__physubr_8c_ac5a93e41e086c93143a04d9d4548b251}{mii\_phy\_update}}(sc, cmd);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00161}00161         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00162}00162 \}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00163}00163 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00164}00164 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00165}\mbox{\hyperlink{rlphy_8c_a5bf653b820588a849355d389e55a707b}{00165}} \mbox{\hyperlink{rlphy_8c_a5bf653b820588a849355d389e55a707b}{rlphy\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmii__softc}{mii\_softc}} *\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00166}00166 \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00167}00167         \textcolor{keyword}{struct }\mbox{\hyperlink{structmii__data}{mii\_data}} *mii = \mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}-\/>mii\_pdata;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00168}00168         \textcolor{keyword}{struct }ifmedia\_entry *ife = mii-\/>\mbox{\hyperlink{structmii__data_ac0e7ceb0ad8cc3eb2e55a6947d4c6fd0}{mii\_media}}.ifm\_cur;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00169}00169         \textcolor{keywordtype}{int} bmsr, bmcr, anlpar;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00171}00171         mii-\/>\mbox{\hyperlink{structmii__data_a15c66b8658a144ac3294603a8146ac09}{mii\_media\_status}} = IFM\_AVALID;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00172}00172         mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} = IFM\_ETHER;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00173}00173 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00174}00174         bmsr = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}, \mbox{\hyperlink{mii_8h_aa2f632686d6298a7c898b1c805586aab}{MII\_BMSR}}) | \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}, \mbox{\hyperlink{mii_8h_aa2f632686d6298a7c898b1c805586aab}{MII\_BMSR}});}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00175}00175         \textcolor{keywordflow}{if} (bmsr \& \mbox{\hyperlink{mii_8h_aca42eb005e0fdbae038bd7c9f12a1035}{BMSR\_LINK}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00176}00176                 mii-\/>\mbox{\hyperlink{structmii__data_a15c66b8658a144ac3294603a8146ac09}{mii\_media\_status}} |= IFM\_ACTIVE;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00178}00178         bmcr = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}, \mbox{\hyperlink{mii_8h_a9137acedc42ff140f244da7473cff29e}{MII\_BMCR}});}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00179}00179         \textcolor{keywordflow}{if} (bmcr \& \mbox{\hyperlink{mii_8h_a28b8dcb818bc18a079b39b5517c27e3a}{BMCR\_ISO}}) \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00180}00180                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00181}00181                 mii-\/>\mbox{\hyperlink{structmii__data_a15c66b8658a144ac3294603a8146ac09}{mii\_media\_status}} = 0;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00182}00182                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00183}00183         \}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00185}00185         \textcolor{keywordflow}{if} (bmcr \& \mbox{\hyperlink{mii_8h_aafd596a9125ddece08d5a9798dce42d6}{BMCR\_LOOP}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00186}00186                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_LOOP;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00188}00188         \textcolor{keywordflow}{if} (bmcr \& \mbox{\hyperlink{mii_8h_a8d92e7dc8997005e43add732fba16a0d}{BMCR\_AUTOEN}}) \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00189}00189                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00190}00190 \textcolor{comment}{                 * NWay autonegotiation takes the highest-\/order common}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00191}00191 \textcolor{comment}{                 * bit of the ANAR and ANLPAR (i.e. best media advertised}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00192}00192 \textcolor{comment}{                 * both by us and our link partner).}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00193}00193 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00194}00194                 \textcolor{keywordflow}{if} ((bmsr \& \mbox{\hyperlink{mii_8h_aa602b8728f35b021f27e9db3b06a7e55}{BMSR\_ACOMP}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00195}00195                         \textcolor{comment}{/* Erg, still trying, I guess... */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00196}00196                         mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00197}00197                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00198}00198                 \}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00200}00200                 \textcolor{keywordflow}{if} ((anlpar = \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}, \mbox{\hyperlink{mii_8h_aacb2ab0ea5579b5d9e30b075991add1d}{MII\_ANAR}}) \&}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00201}00201                     \mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}, \mbox{\hyperlink{mii_8h_a445e8381a9ea9724054bfacc10bb4c81}{MII\_ANLPAR}}))) \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00202}00202                         \textcolor{keywordflow}{if} (anlpar \& \mbox{\hyperlink{mii_8h_afed6c4132ca2f6712fbc773549bb950f}{ANLPAR\_TX\_FD}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00203}00203                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_100\_TX|IFM\_FDX;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00204}00204                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (anlpar \& \mbox{\hyperlink{mii_8h_a56e31c4268bc062a0c70dead5951fee4}{ANLPAR\_T4}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00205}00205                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_100\_T4|IFM\_HDX;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00206}00206                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (anlpar \& \mbox{\hyperlink{mii_8h_a6a5ed387031b7f1754b0d6ccd7e7af60}{ANLPAR\_TX}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00207}00207                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_100\_TX|IFM\_HDX;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00208}00208                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (anlpar \& \mbox{\hyperlink{mii_8h_aa8b1fa07c5222efe44ab300818410867}{ANLPAR\_10\_FD}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00209}00209                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_10\_T|IFM\_FDX;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00210}00210                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (anlpar \& \mbox{\hyperlink{mii_8h_acdff237c9d804e262e2b68f413748e30}{ANLPAR\_10}})}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00211}00211                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_10\_T|IFM\_HDX;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00212}00212                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00213}00213                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00214}00214                         \textcolor{keywordflow}{if} ((mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} \& IFM\_FDX) != 0)}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00215}00215                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |=}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00216}00216                                     \mbox{\hyperlink{mii__physubr_8c_a02a13013ccece7f7569fce9ab65424d3}{mii\_phy\_flowstatus}}(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}});}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00217}00217                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00218}00218                 \}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00219}00219                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00220}00220 \textcolor{comment}{                 * If the other side doesn't support NWAY, then the}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00221}00221 \textcolor{comment}{                 * best we can do is determine if we have a 10Mbps or}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00222}00222 \textcolor{comment}{                 * 100Mbps link. There's no way to know if the link}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00223}00223 \textcolor{comment}{                 * is full or half duplex, so we default to half duplex}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00224}00224 \textcolor{comment}{                 * and hope that the user is clever enough to manually}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00225}00225 \textcolor{comment}{                 * change the media settings if we're wrong.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00226}00226 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00228}00228                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00229}00229 \textcolor{comment}{                 * The RealTek PHY supports non-\/NWAY link speed}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00230}00230 \textcolor{comment}{                 * detection, however it does not report the link}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00231}00231 \textcolor{comment}{                 * detection results via the ANLPAR or BMSR registers.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00232}00232 \textcolor{comment}{                 * (What? RealTek doesn't do things the way everyone}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00233}00233 \textcolor{comment}{                 * else does? I'm just shocked, shocked I tell you.)}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00234}00234 \textcolor{comment}{                 * To determine the link speed, we have to do one}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00235}00235 \textcolor{comment}{                 * of two things:}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00236}00236 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00237}00237 \textcolor{comment}{                 * -\/ If this is a standalone RealTek RTL8201(L) or}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00238}00238 \textcolor{comment}{                 *   workalike PHY, we can determine the link speed by}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00239}00239 \textcolor{comment}{                 *   testing bit 0 in the magic, vendor-\/specific register}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00240}00240 \textcolor{comment}{                 *   at offset 0x19.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00241}00241 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00242}00242 \textcolor{comment}{                 * -\/ If this is a RealTek MAC with integrated PHY, we}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00243}00243 \textcolor{comment}{                 *   can test the 'SPEED10' bit of the MAC's media status}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00244}00244 \textcolor{comment}{                 *   register.}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00245}00245 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00246}00246                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}-\/>mii\_mpd\_model == 0 \&\& \mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}-\/>mii\_mpd\_rev == 0)) \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00247}00247                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}, 0x0019) \& 0x01)}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00248}00248                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_100\_TX;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00249}00249                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00250}00250                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_10\_T;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00251}00251                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00252}00252                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{miivar_8h_a4f9acdc044cd8d94bd80432e4f01bcd2}{PHY\_READ}}(\mbox{\hyperlink{miibus__if_8m_a5a9bb95881c089e261771c35775eeaf9}{phy}}, RL\_MEDIASTAT) \&}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00253}00253                             RL\_MEDIASTAT\_SPEED10)}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00254}00254                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_10\_T;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00255}00255                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00256}00256                                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_100\_TX;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00257}00257                 \}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00258}00258                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} |= IFM\_HDX;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00259}00259         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00260}00260                 mii-\/>\mbox{\hyperlink{structmii__data_a374b422968b2e4f40959161a1f6ed490}{mii\_media\_active}} = ife-\/>ifm\_media;}
\DoxyCodeLine{\Hypertarget{rlphy_8c_source_l00261}00261 \}}

\end{DoxyCode}
