\hypertarget{e1000__base_8c_source}{}\doxysection{e1000\+\_\+base.\+c}
\label{e1000__base_8c_source}\index{dev/e1000/e1000\_base.c@{dev/e1000/e1000\_base.c}}
\mbox{\hyperlink{e1000__base_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00001}00001 \textcolor{comment}{/******************************************************************************}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00002}00002 \textcolor{comment}{  SPDX-\/License-\/Identifier: BSD-\/3-\/Clause}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00003}00003 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00004}00004 \textcolor{comment}{  Copyright (c) 2001-\/2020, Intel Corporation}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00005}00005 \textcolor{comment}{  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00006}00006 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00007}00007 \textcolor{comment}{  Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00008}00008 \textcolor{comment}{  modification, are permitted provided that the following conditions are met:}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00009}00009 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00010}00010 \textcolor{comment}{   1. Redistributions of source code must retain the above copyright notice,}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00011}00011 \textcolor{comment}{      this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00012}00012 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00013}00013 \textcolor{comment}{   2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00014}00014 \textcolor{comment}{      notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00015}00015 \textcolor{comment}{      documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00016}00016 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00017}00017 \textcolor{comment}{   3. Neither the name of the Intel Corporation nor the names of its}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00018}00018 \textcolor{comment}{      contributors may be used to endorse or promote products derived from}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00019}00019 \textcolor{comment}{      this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00020}00020 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00021}00021 \textcolor{comment}{  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "{}AS IS"{}}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00022}00022 \textcolor{comment}{  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00023}00023 \textcolor{comment}{  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00024}00024 \textcolor{comment}{  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00025}00025 \textcolor{comment}{  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00026}00026 \textcolor{comment}{  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00027}00027 \textcolor{comment}{  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00028}00028 \textcolor{comment}{  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00029}00029 \textcolor{comment}{  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00030}00030 \textcolor{comment}{  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00031}00031 \textcolor{comment}{  POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00032}00032 \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00033}00033 \textcolor{comment}{******************************************************************************/}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00034}00034 \textcolor{comment}{/*\$FreeBSD\$*/}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00036}00036 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{e1000__hw_8h}{e1000\_hw.h}}"{}}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00037}00037 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{e1000__82575_8h}{e1000\_82575.h}}"{}}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00038}00038 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{e1000__mac_8h}{e1000\_mac.h}}"{}}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00039}00039 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{e1000__base_8h}{e1000\_base.h}}"{}}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00040}00040 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{e1000__manage_8h}{e1000\_manage.h}}"{}}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00041}00041 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00048}\mbox{\hyperlink{e1000__base_8c_ab6889cd50ff191f1811bf49334a1316c}{00048}} \mbox{\hyperlink{e1000__osdep_8h_ae9b1af5c037e57a98884758875d3a7c4}{s32}} \mbox{\hyperlink{e1000__base_8c_ab6889cd50ff191f1811bf49334a1316c}{e1000\_acquire\_phy\_base}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structe1000__hw}{e1000\_hw}} *hw)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00049}00049 \{}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00050}00050         \mbox{\hyperlink{e1000__osdep_8h_ace9d960e74685e2cd84b36132dbbf8aa}{u16}} mask = \mbox{\hyperlink{e1000__defines_8h_a757580bb7384de7a8ccec383e3a15277}{E1000\_SWFW\_PHY0\_SM}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00052}00052         \mbox{\hyperlink{e1000__osdep_8h_aa7aa4601bde10555b6aa50cd14dba16d}{DEBUGFUNC}}(\textcolor{stringliteral}{"{}e1000\_acquire\_phy\_base"{}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00054}00054         \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{structe1000__hw_a54dfe65b05ea7457cd47b9c2a011d779}{bus}}.\mbox{\hyperlink{structe1000__bus__info_ac7dfcdcfb9d9c5a7272764c1c8cd5716}{func}} == \mbox{\hyperlink{e1000__hw_8h_a12995a92e6042a7d1f4aa51dd90c1c78}{E1000\_FUNC\_1}})}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00055}00055                 mask = \mbox{\hyperlink{e1000__defines_8h_a442109c33a085a0ad5d5096a51fe4303}{E1000\_SWFW\_PHY1\_SM}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00056}00056         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{structe1000__hw_a54dfe65b05ea7457cd47b9c2a011d779}{bus}}.\mbox{\hyperlink{structe1000__bus__info_ac7dfcdcfb9d9c5a7272764c1c8cd5716}{func}} == \mbox{\hyperlink{e1000__hw_8h_aebe262318579b1a662a9d7f8566d3095}{E1000\_FUNC\_2}})}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00057}00057                 mask = \mbox{\hyperlink{e1000__defines_8h_aeedbefe063fb7d305fa5cbc78cb10a2f}{E1000\_SWFW\_PHY2\_SM}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00058}00058         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{structe1000__hw_a54dfe65b05ea7457cd47b9c2a011d779}{bus}}.\mbox{\hyperlink{structe1000__bus__info_ac7dfcdcfb9d9c5a7272764c1c8cd5716}{func}} == \mbox{\hyperlink{e1000__hw_8h_a275467ee091473418a52903414c109c2}{E1000\_FUNC\_3}})}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00059}00059                 mask = \mbox{\hyperlink{e1000__defines_8h_ab9dfc36b755c9b49bcd49554662e3033}{E1000\_SWFW\_PHY3\_SM}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00061}00061         \textcolor{keywordflow}{return} hw-\/>\mbox{\hyperlink{structe1000__hw_a6a1fb05566cea375c7ae3abdee093ad6}{mac}}.\mbox{\hyperlink{structe1000__mac__info_ad4dc5e9b487b5986db47069021017e37}{ops}}.\mbox{\hyperlink{structe1000__mac__operations_ac9bb313a4e1d3e740cd2fecc5cf7e059}{acquire\_swfw\_sync}}(hw, mask);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00062}00062 \}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00070}\mbox{\hyperlink{e1000__base_8c_ac791eb15bd89261ef2bee5f53865d81a}{00070}} \textcolor{keywordtype}{void} \mbox{\hyperlink{e1000__base_8c_ac791eb15bd89261ef2bee5f53865d81a}{e1000\_release\_phy\_base}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structe1000__hw}{e1000\_hw}} *hw)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00071}00071 \{}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00072}00072         \mbox{\hyperlink{e1000__osdep_8h_ace9d960e74685e2cd84b36132dbbf8aa}{u16}} mask = \mbox{\hyperlink{e1000__defines_8h_a757580bb7384de7a8ccec383e3a15277}{E1000\_SWFW\_PHY0\_SM}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00074}00074         \mbox{\hyperlink{e1000__osdep_8h_aa7aa4601bde10555b6aa50cd14dba16d}{DEBUGFUNC}}(\textcolor{stringliteral}{"{}e1000\_release\_phy\_base"{}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00076}00076         \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{structe1000__hw_a54dfe65b05ea7457cd47b9c2a011d779}{bus}}.\mbox{\hyperlink{structe1000__bus__info_ac7dfcdcfb9d9c5a7272764c1c8cd5716}{func}} == \mbox{\hyperlink{e1000__hw_8h_a12995a92e6042a7d1f4aa51dd90c1c78}{E1000\_FUNC\_1}})}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00077}00077                 mask = \mbox{\hyperlink{e1000__defines_8h_a442109c33a085a0ad5d5096a51fe4303}{E1000\_SWFW\_PHY1\_SM}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00078}00078         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{structe1000__hw_a54dfe65b05ea7457cd47b9c2a011d779}{bus}}.\mbox{\hyperlink{structe1000__bus__info_ac7dfcdcfb9d9c5a7272764c1c8cd5716}{func}} == \mbox{\hyperlink{e1000__hw_8h_aebe262318579b1a662a9d7f8566d3095}{E1000\_FUNC\_2}})}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00079}00079                 mask = \mbox{\hyperlink{e1000__defines_8h_aeedbefe063fb7d305fa5cbc78cb10a2f}{E1000\_SWFW\_PHY2\_SM}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00080}00080         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{structe1000__hw_a54dfe65b05ea7457cd47b9c2a011d779}{bus}}.\mbox{\hyperlink{structe1000__bus__info_ac7dfcdcfb9d9c5a7272764c1c8cd5716}{func}} == \mbox{\hyperlink{e1000__hw_8h_a275467ee091473418a52903414c109c2}{E1000\_FUNC\_3}})}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00081}00081                 mask = \mbox{\hyperlink{e1000__defines_8h_ab9dfc36b755c9b49bcd49554662e3033}{E1000\_SWFW\_PHY3\_SM}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00082}00082 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00083}00083         hw-\/>\mbox{\hyperlink{structe1000__hw_a6a1fb05566cea375c7ae3abdee093ad6}{mac}}.\mbox{\hyperlink{structe1000__mac__info_ad4dc5e9b487b5986db47069021017e37}{ops}}.\mbox{\hyperlink{structe1000__mac__operations_a013bebb2132423f4fe9e15a8eb3b6b5c}{release\_swfw\_sync}}(hw, mask);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00084}00084 \}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00092}\mbox{\hyperlink{e1000__base_8c_a3df37a2342ca82900dea1931d283d189}{00092}} \mbox{\hyperlink{e1000__osdep_8h_ae9b1af5c037e57a98884758875d3a7c4}{s32}} \mbox{\hyperlink{e1000__base_8c_a3df37a2342ca82900dea1931d283d189}{e1000\_init\_hw\_base}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structe1000__hw}{e1000\_hw}} *hw)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00093}00093 \{}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00094}00094         \textcolor{keyword}{struct }\mbox{\hyperlink{structe1000__mac__info}{e1000\_mac\_info}} *mac = \&hw-\/>\mbox{\hyperlink{structe1000__hw_a6a1fb05566cea375c7ae3abdee093ad6}{mac}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00095}00095         \mbox{\hyperlink{e1000__osdep_8h_ae9b1af5c037e57a98884758875d3a7c4}{s32}} ret\_val;}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00096}00096         \mbox{\hyperlink{e1000__osdep_8h_ace9d960e74685e2cd84b36132dbbf8aa}{u16}} i, rar\_count = mac-\/>\mbox{\hyperlink{structe1000__mac__info_acd8ecd2ef5218e3d2752ec289062425e}{rar\_entry\_count}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00098}00098         \mbox{\hyperlink{e1000__osdep_8h_aa7aa4601bde10555b6aa50cd14dba16d}{DEBUGFUNC}}(\textcolor{stringliteral}{"{}e1000\_init\_hw\_base"{}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00100}00100         \textcolor{comment}{/* Setup the receive address */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00101}00101         \mbox{\hyperlink{e1000__mac_8c_ac66011043796f80bdbdcb9fce94edd1a}{e1000\_init\_rx\_addrs\_generic}}(hw, rar\_count);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00103}00103         \textcolor{comment}{/* Zero out the Multicast HASH table */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00104}00104         \mbox{\hyperlink{e1000__osdep_8h_acf358ee75cab3e9eb271e46bf983aaff}{DEBUGOUT}}(\textcolor{stringliteral}{"{}Zeroing the MTA\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00105}00105         \textcolor{keywordflow}{for} (i = 0; i < mac-\/>\mbox{\hyperlink{structe1000__mac__info_aaeb73d6a1af630e29c2e3b6382e8568a}{mta\_reg\_count}}; i++)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00106}00106                 \mbox{\hyperlink{e1000__osdep_8h_a51d00d7b9d0972918fda9e17dc2fc9ce}{E1000\_WRITE\_REG\_ARRAY}}(hw, \mbox{\hyperlink{e1000__regs_8h_ae141b163a88a0184b8c5cfaf88205c4c}{E1000\_MTA}}, i, 0);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00107}00107 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00108}00108         \textcolor{comment}{/* Zero out the Unicast HASH table */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00109}00109         \mbox{\hyperlink{e1000__osdep_8h_acf358ee75cab3e9eb271e46bf983aaff}{DEBUGOUT}}(\textcolor{stringliteral}{"{}Zeroing the UTA\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00110}00110         \textcolor{keywordflow}{for} (i = 0; i < mac-\/>\mbox{\hyperlink{structe1000__mac__info_ac2dc58b8cbdd5c8a0442e82390ba11c0}{uta\_reg\_count}}; i++)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00111}00111                 \mbox{\hyperlink{e1000__osdep_8h_a51d00d7b9d0972918fda9e17dc2fc9ce}{E1000\_WRITE\_REG\_ARRAY}}(hw, \mbox{\hyperlink{e1000__regs_8h_aad546a085308adb1a3310044e9afac59}{E1000\_UTA}}, i, 0);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00113}00113         \textcolor{comment}{/* Setup link and flow control */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00114}00114         ret\_val = mac-\/>\mbox{\hyperlink{structe1000__mac__info_ad4dc5e9b487b5986db47069021017e37}{ops}}.\mbox{\hyperlink{structe1000__mac__operations_aa21cc0eac51a6475a947d5887febcd18}{setup\_link}}(hw);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00116}00116         \textcolor{comment}{/* Clear all of the statistics registers (clear on read).  It is}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00117}00117 \textcolor{comment}{         * important that we do this after we have tried to establish link}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00118}00118 \textcolor{comment}{         * because the symbol error count will increment wildly if there}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00119}00119 \textcolor{comment}{         * is no link.}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00120}00120 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00121}00121         \mbox{\hyperlink{e1000__mac_8c_a87c274dd49cf4dde219aa23dbbc42b2e}{e1000\_clear\_hw\_cntrs\_base\_generic}}(hw);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00123}00123         \textcolor{keywordflow}{return} ret\_val;}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00124}00124 \}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00133}\mbox{\hyperlink{e1000__base_8c_abdda6cd82c7f9a9c8eee6b1984290671}{00133}} \textcolor{keywordtype}{void} \mbox{\hyperlink{e1000__base_8c_abdda6cd82c7f9a9c8eee6b1984290671}{e1000\_power\_down\_phy\_copper\_base}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structe1000__hw}{e1000\_hw}} *hw)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00134}00134 \{}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00135}00135         \textcolor{keyword}{struct }\mbox{\hyperlink{structe1000__phy__info}{e1000\_phy\_info}} *phy = \&hw-\/>\mbox{\hyperlink{structe1000__hw_aea1c0d5f50dd587c46f0828fb1fe1055}{phy}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00137}00137         \textcolor{keywordflow}{if} (!(phy-\/>\mbox{\hyperlink{structe1000__phy__info_a9f72e5ea9a53134dca331d957d8d65a9}{ops}}.\mbox{\hyperlink{structe1000__phy__operations_a70c59fd9d029dd43ea2a10ba9e64c738}{check\_reset\_block}}))}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00138}00138                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00140}00140         \textcolor{comment}{/* If the management interface is not enabled, then power down */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00141}00141         \textcolor{keywordflow}{if} (phy-\/>\mbox{\hyperlink{structe1000__phy__info_a9f72e5ea9a53134dca331d957d8d65a9}{ops}}.\mbox{\hyperlink{structe1000__phy__operations_a70c59fd9d029dd43ea2a10ba9e64c738}{check\_reset\_block}}(hw))}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00142}00142                 \mbox{\hyperlink{e1000__phy_8c_a3cc194604f139a17ee603f3aa9937adf}{e1000\_power\_down\_phy\_copper}}(hw);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00143}00143 \}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00144}00144 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00154}\mbox{\hyperlink{e1000__base_8c_a0af4755a20a79eae685455409ecace64}{00154}} \textcolor{keywordtype}{void} \mbox{\hyperlink{e1000__base_8c_a0af4755a20a79eae685455409ecace64}{e1000\_rx\_fifo\_flush\_base}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structe1000__hw}{e1000\_hw}} *hw)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00155}00155 \{}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00156}00156         \mbox{\hyperlink{e1000__osdep_8h_afaa62991928fb9fb18ff0db62a040aba}{u32}} rctl, rlpml, rxdctl[4], rfctl, temp\_rctl, rx\_enabled;}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00157}00157         \textcolor{keywordtype}{int} i, ms\_wait;}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00159}00159         \mbox{\hyperlink{e1000__osdep_8h_aa7aa4601bde10555b6aa50cd14dba16d}{DEBUGFUNC}}(\textcolor{stringliteral}{"{}e1000\_rx\_fifo\_flush\_base"{}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00161}00161         \textcolor{comment}{/* disable IPv6 options as per hardware errata */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00162}00162         rfctl = \mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_afc4dee594c4da8fa56b31d56aaabbbdb}{E1000\_RFCTL}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00163}00163         rfctl |= \mbox{\hyperlink{e1000__defines_8h_afd792b1ee753681145f036ab75cb6b9c}{E1000\_RFCTL\_IPV6\_EX\_DIS}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00164}00164         \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_afc4dee594c4da8fa56b31d56aaabbbdb}{E1000\_RFCTL}}, rfctl);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00166}00166         \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a38d332375e6bce664caef1ceed6c6a60}{E1000\_MANC}}) \& \mbox{\hyperlink{e1000__defines_8h_a6a7f0be24deca5fc3d95eccb85e0c052}{E1000\_MANC\_RCV\_TCO\_EN}}))}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00167}00167                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00169}00169         \textcolor{comment}{/* Disable all Rx queues */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00170}00170         \textcolor{keywordflow}{for} (i = 0; i < 4; i++) \{}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00171}00171                 rxdctl[i] = \mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a9563ac19965d3bd0892fd15f0c3a1dbd}{E1000\_RXDCTL}}(i));}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00172}00172                 \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a9563ac19965d3bd0892fd15f0c3a1dbd}{E1000\_RXDCTL}}(i),}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00173}00173                                 rxdctl[i] \& \string~\mbox{\hyperlink{e1000__82575_8h_a9260450cfb7c0bcfb1efc9c6ee010d85}{E1000\_RXDCTL\_QUEUE\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00174}00174         \}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00175}00175         \textcolor{comment}{/* Poll all queues to verify they have shut down */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00176}00176         \textcolor{keywordflow}{for} (ms\_wait = 0; ms\_wait < 10; ms\_wait++) \{}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00177}00177                 \mbox{\hyperlink{e1000__osdep_8h_a112d66cf3347afa4dcb69db64604682f}{msec\_delay}}(1);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00178}00178                 rx\_enabled = 0;}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00179}00179                 \textcolor{keywordflow}{for} (i = 0; i < 4; i++)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00180}00180                         rx\_enabled |= \mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a9563ac19965d3bd0892fd15f0c3a1dbd}{E1000\_RXDCTL}}(i));}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00181}00181                 \textcolor{keywordflow}{if} (!(rx\_enabled \& \mbox{\hyperlink{e1000__82575_8h_a9260450cfb7c0bcfb1efc9c6ee010d85}{E1000\_RXDCTL\_QUEUE\_ENABLE}}))}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00182}00182                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00183}00183         \}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00185}00185         \textcolor{keywordflow}{if} (ms\_wait == 10)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00186}00186                 \mbox{\hyperlink{e1000__osdep_8h_acf358ee75cab3e9eb271e46bf983aaff}{DEBUGOUT}}(\textcolor{stringliteral}{"{}Queue disable timed out after 10ms\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00188}00188         \textcolor{comment}{/* Clear RLPML, RCTL.SBP, RFCTL.LEF, and set RCTL.LPE so that all}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00189}00189 \textcolor{comment}{         * incoming packets are rejected.  Set enable and wait 2ms so that}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00190}00190 \textcolor{comment}{         * any packet that was coming in as RCTL.EN was set is flushed}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00191}00191 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00192}00192         \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_afc4dee594c4da8fa56b31d56aaabbbdb}{E1000\_RFCTL}}, rfctl \& \string~\mbox{\hyperlink{e1000__defines_8h_adff00eedd78ca180d8351d6b989b9b24}{E1000\_RFCTL\_LEF}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00194}00194         rlpml = \mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_ae4e925fb3af27221a58fadf2c72dd109}{E1000\_RLPML}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00195}00195         \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_ae4e925fb3af27221a58fadf2c72dd109}{E1000\_RLPML}}, 0);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00197}00197         rctl = \mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a5f1910b475d9e03e92a2500b9b15923d}{E1000\_RCTL}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00198}00198         temp\_rctl = rctl \& \string~(\mbox{\hyperlink{e1000__defines_8h_aa97177426e645aa60186848bf1e307f9}{E1000\_RCTL\_EN}} | \mbox{\hyperlink{e1000__defines_8h_a58fe79a2b6dad8db9fba18dd88eb37b5}{E1000\_RCTL\_SBP}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00199}00199         temp\_rctl |= \mbox{\hyperlink{e1000__defines_8h_a971c5121d62f10f50fafb91ed135319d}{E1000\_RCTL\_LPE}};}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00201}00201         \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a5f1910b475d9e03e92a2500b9b15923d}{E1000\_RCTL}}, temp\_rctl);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00202}00202         \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a5f1910b475d9e03e92a2500b9b15923d}{E1000\_RCTL}}, temp\_rctl | \mbox{\hyperlink{e1000__defines_8h_aa97177426e645aa60186848bf1e307f9}{E1000\_RCTL\_EN}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00203}00203         \mbox{\hyperlink{e1000__osdep_8h_abd4ee915cc9a2dadc190fa88437f8792}{E1000\_WRITE\_FLUSH}}(hw);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00204}00204         \mbox{\hyperlink{e1000__osdep_8h_a112d66cf3347afa4dcb69db64604682f}{msec\_delay}}(2);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00206}00206         \textcolor{comment}{/* Enable Rx queues that were previously enabled and restore our}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00207}00207 \textcolor{comment}{         * previous state}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00208}00208 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00209}00209         \textcolor{keywordflow}{for} (i = 0; i < 4; i++)}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00210}00210                 \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a9563ac19965d3bd0892fd15f0c3a1dbd}{E1000\_RXDCTL}}(i), rxdctl[i]);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00211}00211         \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a5f1910b475d9e03e92a2500b9b15923d}{E1000\_RCTL}}, rctl);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00212}00212         \mbox{\hyperlink{e1000__osdep_8h_abd4ee915cc9a2dadc190fa88437f8792}{E1000\_WRITE\_FLUSH}}(hw);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00214}00214         \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_ae4e925fb3af27221a58fadf2c72dd109}{E1000\_RLPML}}, rlpml);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00215}00215         \mbox{\hyperlink{e1000__osdep_8h_ac145012091e766065f03f1caf81dda69}{E1000\_WRITE\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_afc4dee594c4da8fa56b31d56aaabbbdb}{E1000\_RFCTL}}, rfctl);}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00217}00217         \textcolor{comment}{/* Flush receive errors generated by workaround */}}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00218}00218         \mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_add928b77e5aed31a7ca5f49c316952ef}{E1000\_ROC}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00219}00219         \mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_a618534386d791f82c0ad904de33349a9}{E1000\_RNBC}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00220}00220         \mbox{\hyperlink{e1000__osdep_8h_adf44652e7ae409a70af12a085510c0b0}{E1000\_READ\_REG}}(hw, \mbox{\hyperlink{e1000__regs_8h_acc249eca8b4015cb4aaa56731de6ddff}{E1000\_MPC}});}
\DoxyCodeLine{\Hypertarget{e1000__base_8c_source_l00221}00221 \}}

\end{DoxyCode}
