\hypertarget{lio__main_8c_source}{}\doxysection{lio\+\_\+main.\+c}
\label{lio__main_8c_source}\index{dev/liquidio/lio\_main.c@{dev/liquidio/lio\_main.c}}
\mbox{\hyperlink{lio__main_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00001}00001 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00002}00002 \textcolor{comment}{ *   BSD LICENSE}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00004}00004 \textcolor{comment}{ *   Copyright(c) 2017 Cavium, Inc.. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00005}00005 \textcolor{comment}{ *   All rights reserved.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00007}00007 \textcolor{comment}{ *   Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00008}00008 \textcolor{comment}{ *   modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00009}00009 \textcolor{comment}{ *   are met:}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00011}00011 \textcolor{comment}{ *     * Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00012}00012 \textcolor{comment}{ *       notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00013}00013 \textcolor{comment}{ *     * Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00014}00014 \textcolor{comment}{ *       notice, this list of conditions and the following disclaimer in}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00015}00015 \textcolor{comment}{ *       the documentation and/or other materials provided with the}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00016}00016 \textcolor{comment}{ *       distribution.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00017}00017 \textcolor{comment}{ *     * Neither the name of Cavium, Inc. nor the names of its}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00018}00018 \textcolor{comment}{ *       contributors may be used to endorse or promote products derived}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00019}00019 \textcolor{comment}{ *       from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00020}00020 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00021}00021 \textcolor{comment}{ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00022}00022 \textcolor{comment}{ *   "{}AS IS"{} AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00023}00023 \textcolor{comment}{ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00024}00024 \textcolor{comment}{ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00025}00025 \textcolor{comment}{ *   OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00026}00026 \textcolor{comment}{ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00027}00027 \textcolor{comment}{ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00028}00028 \textcolor{comment}{ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00029}00029 \textcolor{comment}{ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00030}00030 \textcolor{comment}{ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00031}00031 \textcolor{comment}{ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00033}00033 \textcolor{comment}{/*\$FreeBSD\$*/}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00035}00035 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__bsd_8h}{lio\_bsd.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00036}00036 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__common_8h}{lio\_common.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00038}00038 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__droq_8h}{lio\_droq.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00039}00039 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__iq_8h}{lio\_iq.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00040}00040 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__response__manager_8h}{lio\_response\_manager.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00041}00041 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__device_8h}{lio\_device.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00042}00042 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__ctrl_8h}{lio\_ctrl.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00043}00043 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__main_8h}{lio\_main.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00044}00044 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__network_8h}{lio\_network.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00045}00045 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{cn23xx__pf__device_8h}{cn23xx\_pf\_device.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00046}00046 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__image_8h}{lio\_image.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00047}00047 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__ioctl_8h}{lio\_ioctl.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00048}00048 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__rxtx_8h}{lio\_rxtx.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00049}00049 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__rss_8h}{lio\_rss.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00051}00051 \textcolor{comment}{/* Number of milliseconds to wait for DDR initialization */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00052}\mbox{\hyperlink{lio__main_8c_a82c995e36ed0ccc05a80b00a2323170d}{00052}} \textcolor{preprocessor}{\#define LIO\_DDR\_TIMEOUT 10000}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00053}\mbox{\hyperlink{lio__main_8c_a5ed6c7255b66a41fb9c5cf412e8b5343}{00053}} \textcolor{preprocessor}{\#define LIO\_MAX\_FW\_TYPE\_LEN     8}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00055}\mbox{\hyperlink{lio__main_8c_a0ed528be05d7ba6b80dfc8368f755d1b}{00055}} \textcolor{keyword}{static} \textcolor{keywordtype}{char} \mbox{\hyperlink{lio__main_8c_a0ed528be05d7ba6b80dfc8368f755d1b}{fw\_type}}[\mbox{\hyperlink{lio__main_8c_a5ed6c7255b66a41fb9c5cf412e8b5343}{LIO\_MAX\_FW\_TYPE\_LEN}}];}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00056}\mbox{\hyperlink{lio__main_8c_a5f24567fc212a05186f2279ef899cc17}{00056}} \mbox{\hyperlink{lio__main_8c_a5f24567fc212a05186f2279ef899cc17}{TUNABLE\_STR}}(\textcolor{stringliteral}{"{}hw.lio.fw\_type"{}}, \mbox{\hyperlink{lio__main_8c_a0ed528be05d7ba6b80dfc8368f755d1b}{fw\_type}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{lio__main_8c_a0ed528be05d7ba6b80dfc8368f755d1b}{fw\_type}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00058}00058 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00059}00059 \textcolor{comment}{ * Integers that specify number of queues per PF.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00060}00060 \textcolor{comment}{ * Valid range is 0 to 64.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00061}00061 \textcolor{comment}{ * Use 0 to derive from CPU count.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00062}00062 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00063}\mbox{\hyperlink{lio__main_8c_ad766fbf50d3bcc780c925c9b2d33b07c}{00063}} \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_ad766fbf50d3bcc780c925c9b2d33b07c}{num\_queues\_per\_pf0}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00064}\mbox{\hyperlink{lio__main_8c_a3d16328102f0334297c1aa0727b2e864}{00064}} \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a3d16328102f0334297c1aa0727b2e864}{num\_queues\_per\_pf1}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00065}\mbox{\hyperlink{lio__main_8c_abec76f2b46127434593b960de1b137fa}{00065}} \mbox{\hyperlink{lio__main_8c_abec76f2b46127434593b960de1b137fa}{TUNABLE\_INT}}(\textcolor{stringliteral}{"{}hw.lio.num\_queues\_per\_pf0"{}}, \&\mbox{\hyperlink{lio__main_8c_ad766fbf50d3bcc780c925c9b2d33b07c}{num\_queues\_per\_pf0}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00066}\mbox{\hyperlink{lio__main_8c_a37697dc2fda1f326779e17e6dab9ce38}{00066}} \mbox{\hyperlink{lio__main_8c_abec76f2b46127434593b960de1b137fa}{TUNABLE\_INT}}(\textcolor{stringliteral}{"{}hw.lio.num\_queues\_per\_pf1"{}}, \&\mbox{\hyperlink{lio__main_8c_a3d16328102f0334297c1aa0727b2e864}{num\_queues\_per\_pf1}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00068}00068 \textcolor{preprocessor}{\#ifdef RSS}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00069}00069 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      lio\_rss = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00070}00070 \mbox{\hyperlink{lio__main_8c_abec76f2b46127434593b960de1b137fa}{TUNABLE\_INT}}(\textcolor{stringliteral}{"{}hw.lio.rss"{}}, \&lio\_rss);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00071}00071 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* RSS */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00073}00073 \textcolor{comment}{/* Hardware LRO */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00074}\mbox{\hyperlink{lio__main_8c_a17f570aaf869da2cc2a06e75a1d8bd41}{00074}} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int}    \mbox{\hyperlink{lio__main_8c_a17f570aaf869da2cc2a06e75a1d8bd41}{lio\_hwlro}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00075}\mbox{\hyperlink{lio__main_8c_a5bacf4d6190bf8074984739da2e89676}{00075}} \mbox{\hyperlink{lio__main_8c_abec76f2b46127434593b960de1b137fa}{TUNABLE\_INT}}(\textcolor{stringliteral}{"{}hw.lio.hwlro"{}}, \&\mbox{\hyperlink{lio__main_8c_a17f570aaf869da2cc2a06e75a1d8bd41}{lio\_hwlro}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00077}00077 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00078}00078 \textcolor{comment}{ * Bitmask indicating which consoles have debug}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00079}00079 \textcolor{comment}{ * output redirected to syslog.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00080}00080 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00081}\mbox{\hyperlink{lio__main_8c_a8e305e156f28e27e20586e62dd8c0fba}{00081}} \textcolor{keyword}{static} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}    \mbox{\hyperlink{lio__main_8c_a8e305e156f28e27e20586e62dd8c0fba}{console\_bitmask}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00082}\mbox{\hyperlink{lio__main_8c_a6c7fbffbe758a2e600b3cece80c5ae65}{00082}} \mbox{\hyperlink{lio__main_8c_a6c7fbffbe758a2e600b3cece80c5ae65}{TUNABLE\_ULONG}}(\textcolor{stringliteral}{"{}hw.lio.console\_bitmask"{}}, \&\mbox{\hyperlink{lio__main_8c_a8e305e156f28e27e20586e62dd8c0fba}{console\_bitmask}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00084}00084 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00085}00085 \textcolor{comment}{ * \(\backslash\)brief determines if a given console has debug enabled.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00086}00086 \textcolor{comment}{ * @param console console to check}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00087}00087 \textcolor{comment}{ * @returns  1 = enabled. 0 otherwise}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00088}00088 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00089}00089 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00090}\mbox{\hyperlink{lio__main_8c_a686836c039ede8bae369f1fa1de65051}{00090}} \mbox{\hyperlink{lio__main_8c_a686836c039ede8bae369f1fa1de65051}{lio\_console\_debug\_enabled}}(uint32\_t console)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00091}00091 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00093}00093         \textcolor{keywordflow}{return} (\mbox{\hyperlink{lio__main_8c_a8e305e156f28e27e20586e62dd8c0fba}{console\_bitmask}} >> (console)) \& 0x1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00094}00094 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00096}00096 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a48be08153247b91d562011681525fcbe}{lio\_detach}}(device\_t dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00098}00098 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_ab422f5cb49ea7002de07e9c50c862a9e}{lio\_device\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00099}00099 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_ae36aac10ba190fbdb128eaae9c5dff67}{lio\_chip\_specific\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00100}00100 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{lio__main_8c_aaab62b757225188f0c304f682185a5cd}{lio\_watchdog}}(\textcolor{keywordtype}{void} *param);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00101}00101 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_ae2a9fd9cd1393d27b106fe897d14a89c}{lio\_load\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00102}00102 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_adde549dbb61572058eb2f099be770801}{lio\_nic\_starter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00103}00103 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a80e5d766df3148922d47c88d94fdf3bb}{lio\_init\_nic\_module}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00104}00104 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a900d58dc4ec02ae3b259bc0565ea00d2}{lio\_setup\_nic\_devices}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00105}00105 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a05b8d53e3c501d7b8cf693f37b016abc}{lio\_link\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__recv__info}{lio\_recv\_info}} *recv\_info, \textcolor{keywordtype}{void} *ptr);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00106}00106 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{lio__main_8c_ab0f96ee99fb22f99947299e5d72952a6}{lio\_if\_cfg\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t status,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00107}00107                                     \textcolor{keywordtype}{void} *buf);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00108}00108 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a4166a244b7e359257daf211475b38eac}{lio\_set\_rxcsum\_command}}(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keywordtype}{int} command,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00109}00109                                        uint8\_t rx\_cmd);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00110}00110 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a70bb551396d7e5cae801f34905b0df18}{lio\_setup\_glists}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, \textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00111}00111                                  \textcolor{keywordtype}{int} num\_iqs);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00112}00112 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{lio__main_8c_a07a5ea1710155280e1a92d59481c8c79}{lio\_destroy\_nic\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, \textcolor{keywordtype}{int} ifidx);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00113}00113 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}      \mbox{\hyperlink{lio__main_8c_aaf6d32a7738adb0bde2152c51185d193}{lio\_update\_link\_status}}(\textcolor{keyword}{struct} ifnet *ifp,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00114}00114                                                \textcolor{keyword}{union} \mbox{\hyperlink{unionocteon__link__status}{octeon\_link\_status}} *ls);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00115}00115 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{lio__main_8c_ac389159dbd145c9785dd8469a75929fa}{lio\_send\_rx\_ctrl\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}}, \textcolor{keywordtype}{int} start\_stop);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00116}00116 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a1037bb669fd3259a60dca9660d69a353}{lio\_stop\_nic\_module}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00117}00117 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{lio__main_8c_ae2fd63251d7062351c47d7f5972a3c9a}{lio\_destroy\_resources}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00118}00118 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_a4eb2d301b7cb095b150637f96dbc0578}{lio\_setup\_rx\_oom\_poll\_fn}}(\textcolor{keyword}{struct} ifnet *ifp);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00119}00119 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00120}00120 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{lio__main_8c_a00c89086af7e85c75dc1b8b97b7a73b3}{lio\_vlan\_rx\_add\_vid}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} ifnet *ifp, uint16\_t vid);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00121}00121 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{lio__main_8c_a1bc24e64de3307b31cbd8ae9a8630faf}{lio\_vlan\_rx\_kill\_vid}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} ifnet *ifp,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00122}00122                                      uint16\_t vid);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00123}00123 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}} *}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00124}00124         \mbox{\hyperlink{lio__main_8c_a790cffd3823803623bbf32b926e1389d}{lio\_get\_other\_octeon\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00126}00126 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_af8dbabee6aaa0be6a06dc92703a0bebf}{lio\_wait\_for\_oq\_pkts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00128}\mbox{\hyperlink{lio__main_8c_a32c7b1a3fe039a7abbf8c4bf64f0782f}{00128}} \textcolor{keywordtype}{int}     \mbox{\hyperlink{lio__main_8c_a32c7b1a3fe039a7abbf8c4bf64f0782f}{lio\_send\_rss\_param}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00129}00129 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{lio__main_8c_aa39939fa4f446b0a9e100975b7e6222b}{lio\_dbg\_console\_print}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00130}00130                                       uint32\_t console\_num, \textcolor{keywordtype}{char} *prefix,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00131}00131                                       \textcolor{keywordtype}{char} *suffix);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00133}00133 \textcolor{comment}{/* Polling interval for determining when NIC application is alive */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00134}\mbox{\hyperlink{lio__main_8c_a43e3249b70bd1b48607538c247be159e}{00134}} \textcolor{preprocessor}{\#define LIO\_STARTER\_POLL\_INTERVAL\_MS    100}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00136}00136 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00137}00137 \textcolor{comment}{ * vendor\_info\_array.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00138}00138 \textcolor{comment}{ * This array contains the list of IDs on which the driver should load.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00139}00139 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00140}\mbox{\hyperlink{structlio__vendor__info}{00140}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__vendor__info}{lio\_vendor\_info}} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00141}\mbox{\hyperlink{structlio__vendor__info_a5da3509ed947e4d57eb228e1b7f9bd45}{00141}}         uint16\_t        \mbox{\hyperlink{structlio__vendor__info_a5da3509ed947e4d57eb228e1b7f9bd45}{vendor\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00142}\mbox{\hyperlink{structlio__vendor__info_ae92bd22ce9bb50d1483fee0ea876fc88}{00142}}         uint16\_t        \mbox{\hyperlink{structlio__vendor__info_ae92bd22ce9bb50d1483fee0ea876fc88}{device\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00143}\mbox{\hyperlink{structlio__vendor__info_a23114ab2804c65666b5aed38cfe45723}{00143}}         uint16\_t        \mbox{\hyperlink{structlio__vendor__info_a23114ab2804c65666b5aed38cfe45723}{subdevice\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00144}\mbox{\hyperlink{structlio__vendor__info_ac97d4654747c992a67ef0fb755db2b72}{00144}}         uint8\_t         \mbox{\hyperlink{structlio__vendor__info_ac97d4654747c992a67ef0fb755db2b72}{revision\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00145}\mbox{\hyperlink{structlio__vendor__info_aeeb20e1b8a257f3cfca07141ac756292}{00145}}         uint8\_t         \mbox{\hyperlink{structlio__vendor__info_aeeb20e1b8a257f3cfca07141ac756292}{index}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00146}00146 \};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00148}\mbox{\hyperlink{lio__main_8c_a9b3f424aa6e4353049644c10d4bfa5d1}{00148}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__vendor__info}{lio\_vendor\_info}} \mbox{\hyperlink{lio__main_8c_a9b3f424aa6e4353049644c10d4bfa5d1}{lio\_pci\_tbl}}[] = \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00149}00149         \textcolor{comment}{/* CN2350 10G */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00150}00150         \{\mbox{\hyperlink{lio__bsd_8h_a2eac03904587beaa6694d6dd5bdb8233}{PCI\_VENDOR\_ID\_CAVIUM}}, \mbox{\hyperlink{lio__device_8h_ae2ea3e622af8487735d21cf6c3c5109d}{LIO\_CN23XX\_PF\_VID}}, \mbox{\hyperlink{lio__device_8h_a5c4051f3f2a09a42b950e0fca0dd0632}{LIO\_CN2350\_10G\_SUBDEVICE}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00151}00151                 0x02, 0\},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00153}00153         \textcolor{comment}{/* CN2350 10G */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00154}00154         \{\mbox{\hyperlink{lio__bsd_8h_a2eac03904587beaa6694d6dd5bdb8233}{PCI\_VENDOR\_ID\_CAVIUM}}, \mbox{\hyperlink{lio__device_8h_ae2ea3e622af8487735d21cf6c3c5109d}{LIO\_CN23XX\_PF\_VID}}, \mbox{\hyperlink{lio__device_8h_abf88b43a9f08cbe7d9f191dcf050e494}{LIO\_CN2350\_10G\_SUBDEVICE1}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00155}00155                 0x02, 0\},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00156}00156 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00157}00157         \textcolor{comment}{/* CN2360 10G */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00158}00158         \{\mbox{\hyperlink{lio__bsd_8h_a2eac03904587beaa6694d6dd5bdb8233}{PCI\_VENDOR\_ID\_CAVIUM}}, \mbox{\hyperlink{lio__device_8h_ae2ea3e622af8487735d21cf6c3c5109d}{LIO\_CN23XX\_PF\_VID}}, \mbox{\hyperlink{lio__device_8h_a0b95357422043cb16d72a26d31f69ec9}{LIO\_CN2360\_10G\_SUBDEVICE}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00159}00159                 0x02, 1\},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00161}00161         \textcolor{comment}{/* CN2350 25G */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00162}00162         \{\mbox{\hyperlink{lio__bsd_8h_a2eac03904587beaa6694d6dd5bdb8233}{PCI\_VENDOR\_ID\_CAVIUM}}, \mbox{\hyperlink{lio__device_8h_ae2ea3e622af8487735d21cf6c3c5109d}{LIO\_CN23XX\_PF\_VID}}, \mbox{\hyperlink{lio__device_8h_afb4db2eef19e308c00af3c1e3ab5d8d8}{LIO\_CN2350\_25G\_SUBDEVICE}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00163}00163                 0x02, 2\},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00165}00165         \textcolor{comment}{/* CN2360 25G */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00166}00166         \{\mbox{\hyperlink{lio__bsd_8h_a2eac03904587beaa6694d6dd5bdb8233}{PCI\_VENDOR\_ID\_CAVIUM}}, \mbox{\hyperlink{lio__device_8h_ae2ea3e622af8487735d21cf6c3c5109d}{LIO\_CN23XX\_PF\_VID}}, \mbox{\hyperlink{lio__device_8h_a1bf802c2372a6a00f53ff99331ccae83}{LIO\_CN2360\_25G\_SUBDEVICE}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00167}00167                 0x02, 3\},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00169}00169         \{0, 0, 0, 0, 0\}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00170}00170 \};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00172}\mbox{\hyperlink{lio__main_8c_a27f76d10838e757451ba5fb17517fef1}{00172}} \textcolor{keyword}{static} \textcolor{keywordtype}{char} *\mbox{\hyperlink{lio__main_8c_a27f76d10838e757451ba5fb17517fef1}{lio\_strings}}[] = \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00173}00173         \textcolor{stringliteral}{"{}LiquidIO 2350 10GbE Server Adapter"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00174}00174         \textcolor{stringliteral}{"{}LiquidIO 2360 10GbE Server Adapter"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00175}00175         \textcolor{stringliteral}{"{}LiquidIO 2350 25GbE Server Adapter"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00176}00176         \textcolor{stringliteral}{"{}LiquidIO 2360 25GbE Server Adapter"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00177}00177 \};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00178}00178 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00179}\mbox{\hyperlink{structlio__if__cfg__resp}{00179}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__resp}{lio\_if\_cfg\_resp}} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00180}\mbox{\hyperlink{structlio__if__cfg__resp_a5450cea96b9da541a487ad076cd773fb}{00180}}         uint64\_t        \mbox{\hyperlink{structlio__if__cfg__resp_a5450cea96b9da541a487ad076cd773fb}{rh}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00181}\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{00181}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__if__cfg__info}{octeon\_if\_cfg\_info}} \mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00182}\mbox{\hyperlink{structlio__if__cfg__resp_acf03f3ea82bd6eaa8fae56e15b831f26}{00182}}         uint64\_t        \mbox{\hyperlink{structlio__if__cfg__resp_acf03f3ea82bd6eaa8fae56e15b831f26}{status}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00183}00183 \};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00185}\mbox{\hyperlink{structlio__if__cfg__context}{00185}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__context}{lio\_if\_cfg\_context}} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00186}\mbox{\hyperlink{structlio__if__cfg__context_a1dddda8b7135ac578b2a8dd08faa0ad7}{00186}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structlio__if__cfg__context_a1dddda8b7135ac578b2a8dd08faa0ad7}{octeon\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00187}\mbox{\hyperlink{structlio__if__cfg__context_a8e7cacc99b0518f1431e4ba2540e1833}{00187}}         \textcolor{keyword}{volatile} \textcolor{keywordtype}{int}    \mbox{\hyperlink{structlio__if__cfg__context_a8e7cacc99b0518f1431e4ba2540e1833}{cond}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00188}00188 \};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00190}\mbox{\hyperlink{structlio__rx__ctl__context}{00190}} \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__rx__ctl__context}{lio\_rx\_ctl\_context}} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00191}\mbox{\hyperlink{structlio__rx__ctl__context_acb2f2a20319b7b6937a8f52225f3999e}{00191}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structlio__rx__ctl__context_acb2f2a20319b7b6937a8f52225f3999e}{octeon\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00192}\mbox{\hyperlink{structlio__rx__ctl__context_a4ecf4e0ab888488073b05fccb6f7e07e}{00192}}         \textcolor{keyword}{volatile} \textcolor{keywordtype}{int}    \mbox{\hyperlink{structlio__rx__ctl__context_a4ecf4e0ab888488073b05fccb6f7e07e}{cond}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00193}00193 \};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00195}00195 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00196}\mbox{\hyperlink{lio__main_8c_a1eeb56bb28223ed075a69aea1d263562}{00196}} \mbox{\hyperlink{lio__main_8c_a1eeb56bb28223ed075a69aea1d263562}{lio\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00197}00197 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00198}00198         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__vendor__info}{lio\_vendor\_info}}   *tbl;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00200}00200         uint16\_t        \mbox{\hyperlink{structlio__vendor__info_a5da3509ed947e4d57eb228e1b7f9bd45}{vendor\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00201}00201         uint16\_t        \mbox{\hyperlink{structlio__vendor__info_ae92bd22ce9bb50d1483fee0ea876fc88}{device\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00202}00202         uint16\_t        \mbox{\hyperlink{structlio__vendor__info_a23114ab2804c65666b5aed38cfe45723}{subdevice\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00203}00203         uint8\_t         \mbox{\hyperlink{structlio__vendor__info_ac97d4654747c992a67ef0fb755db2b72}{revision\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00204}00204         \textcolor{keywordtype}{char}            device\_ver[256];}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00206}00206         \mbox{\hyperlink{structlio__vendor__info_a5da3509ed947e4d57eb228e1b7f9bd45}{vendor\_id}} = pci\_get\_vendor(dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00207}00207         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio__vendor__info_a5da3509ed947e4d57eb228e1b7f9bd45}{vendor\_id}} != \mbox{\hyperlink{lio__bsd_8h_a2eac03904587beaa6694d6dd5bdb8233}{PCI\_VENDOR\_ID\_CAVIUM}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00208}00208                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00209}00209 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00210}00210         \mbox{\hyperlink{structlio__vendor__info_ae92bd22ce9bb50d1483fee0ea876fc88}{device\_id}} = pci\_get\_device(dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00211}00211         \mbox{\hyperlink{structlio__vendor__info_a23114ab2804c65666b5aed38cfe45723}{subdevice\_id}} = pci\_get\_subdevice(dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00212}00212         \mbox{\hyperlink{structlio__vendor__info_ac97d4654747c992a67ef0fb755db2b72}{revision\_id}} = pci\_get\_revid(dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00214}00214         tbl = \mbox{\hyperlink{lio__main_8c_a9b3f424aa6e4353049644c10d4bfa5d1}{lio\_pci\_tbl}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00215}00215         \textcolor{keywordflow}{while} (tbl-\/>\mbox{\hyperlink{structlio__vendor__info_a5da3509ed947e4d57eb228e1b7f9bd45}{vendor\_id}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00216}00216                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structlio__vendor__info_a5da3509ed947e4d57eb228e1b7f9bd45}{vendor\_id}} == tbl-\/>\mbox{\hyperlink{structlio__vendor__info_a5da3509ed947e4d57eb228e1b7f9bd45}{vendor\_id}}) \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00217}00217                     (\mbox{\hyperlink{structlio__vendor__info_ae92bd22ce9bb50d1483fee0ea876fc88}{device\_id}} == tbl-\/>\mbox{\hyperlink{structlio__vendor__info_ae92bd22ce9bb50d1483fee0ea876fc88}{device\_id}}) \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00218}00218                     (\mbox{\hyperlink{structlio__vendor__info_a23114ab2804c65666b5aed38cfe45723}{subdevice\_id}} == tbl-\/>\mbox{\hyperlink{structlio__vendor__info_a23114ab2804c65666b5aed38cfe45723}{subdevice\_id}}) \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00219}00219                     (\mbox{\hyperlink{structlio__vendor__info_ac97d4654747c992a67ef0fb755db2b72}{revision\_id}} == tbl-\/>\mbox{\hyperlink{structlio__vendor__info_ac97d4654747c992a67ef0fb755db2b72}{revision\_id}})) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00220}00220                         sprintf(device\_ver, \textcolor{stringliteral}{"{}\%s, Version -\/ \%s"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00221}00221                                 \mbox{\hyperlink{lio__main_8c_a27f76d10838e757451ba5fb17517fef1}{lio\_strings}}[tbl-\/>\mbox{\hyperlink{structlio__vendor__info_aeeb20e1b8a257f3cfca07141ac756292}{index}}], \mbox{\hyperlink{lio__common_8h_a83d9a4603c425dcfa3296b2f48ca0a72}{LIO\_VERSION}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00222}00222                         device\_set\_desc\_copy(dev, device\_ver);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00223}00223                         \textcolor{keywordflow}{return} (BUS\_PROBE\_DEFAULT);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00224}00224                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00226}00226                 tbl++;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00227}00227         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00229}00229         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00230}00230 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00232}00232 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00233}\mbox{\hyperlink{lio__main_8c_aed60a6562031b3c0ab8bd3039dee5af4}{00233}} \mbox{\hyperlink{lio__main_8c_aed60a6562031b3c0ab8bd3039dee5af4}{lio\_attach}}(device\_t device)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00234}00234 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00235}00235         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct\_dev = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00236}00236         uint64\_t        scratch1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00237}00237         uint32\_t        error;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00238}00238         \textcolor{keywordtype}{int}             timeout, ret = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00239}00239         uint8\_t         \mbox{\hyperlink{structocteon__device_adcc404f50005fdb840e6f7fec61b612b}{bus}}, \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}}, function;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00241}00241         oct\_dev = \mbox{\hyperlink{lio__device_8c_a4722d041d53ce89dd4443ac647331e91}{lio\_allocate\_device}}(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00242}00242         \textcolor{keywordflow}{if} (oct\_dev == NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00243}00243                 device\_printf(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}, \textcolor{stringliteral}{"{}Error: Unable to allocate device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00244}00244                 \textcolor{keywordflow}{return} (-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00245}00245         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00246}00246 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00247}00247         oct\_dev-\/>\mbox{\hyperlink{structocteon__device_aace791b16fff0fdf160b522f8bbf72c1}{tx\_budget}} = \mbox{\hyperlink{lio__config_8h_aa64598a58803ddc24b3cdf4aadf84e96}{LIO\_DEFAULT\_TX\_PKTS\_PROCESS\_BUDGET}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00248}00248         oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a5c44ee18a555ca84d4c999d0b9e53595}{rx\_budget}} = \mbox{\hyperlink{lio__config_8h_af53039e27aa6e6fb0c6c59bcdf330a56}{LIO\_DEFAULT\_RX\_PKTS\_PROCESS\_BUDGET}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00249}00249         oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a543cadb3f5a2102e1086b9cb4159ed78}{msix\_on}} = \mbox{\hyperlink{lio__device_8h_a458a78d652461e12fd4af24b4aaeda5e}{LIO\_FLAG\_MSIX\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00250}00250 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00251}00251         oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}} = \mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00252}00252         \mbox{\hyperlink{structocteon__device_adcc404f50005fdb840e6f7fec61b612b}{bus}} = pci\_get\_bus(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00253}00253         \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}} = pci\_get\_slot(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00254}00254         function = pci\_get\_function(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00256}00256         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct\_dev, \textcolor{stringliteral}{"{}Initializing device \%x:\%x \%02x:\%02x.\%01x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00257}00257                      pci\_get\_vendor(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}), pci\_get\_device(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}), \mbox{\hyperlink{structocteon__device_adcc404f50005fdb840e6f7fec61b612b}{bus}}, \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00258}00258                      function);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00259}00259 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00260}00260         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_ab422f5cb49ea7002de07e9c50c862a9e}{lio\_device\_init}}(oct\_dev)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00261}00261                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct\_dev, \textcolor{stringliteral}{"{}Failed to init device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00262}00262                 \mbox{\hyperlink{lio__main_8c_a48be08153247b91d562011681525fcbe}{lio\_detach}}(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00263}00263                 \textcolor{keywordflow}{return} (-\/ENOMEM);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00264}00264         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00266}00266         scratch1 = \mbox{\hyperlink{lio__device_8h_a4989f8b30e3cf276faa3c806a1420f60}{lio\_read\_csr64}}(oct\_dev, \mbox{\hyperlink{cn23xx__pf__regs_8h_a97c16be313ad055386190df62f27dbb7}{LIO\_CN23XX\_SLI\_SCRATCH1}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00267}00267         \textcolor{keywordflow}{if} (!(scratch1 \& 4ULL)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00268}00268                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00269}00269 \textcolor{comment}{                 * Bit 2 of SLI\_SCRATCH\_1 is a flag that indicates that}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00270}00270 \textcolor{comment}{                 * the lio watchdog kernel thread is running for this}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00271}00271 \textcolor{comment}{                 * NIC.  Each NIC gets one watchdog kernel thread.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00272}00272 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00273}00273                 scratch1 |= 4ULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00274}00274                 \mbox{\hyperlink{lio__device_8h_a659d399fb9114de5dcb4805cc7e72acd}{lio\_write\_csr64}}(oct\_dev, \mbox{\hyperlink{cn23xx__pf__regs_8h_a97c16be313ad055386190df62f27dbb7}{LIO\_CN23XX\_SLI\_SCRATCH1}}, scratch1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00276}00276                 error = kproc\_create(\mbox{\hyperlink{lio__main_8c_aaab62b757225188f0c304f682185a5cd}{lio\_watchdog}}, oct\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00277}00277                                      \&oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a9b8a18802b426703b029184812606c63}{watchdog\_task}}, 0, 0,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00278}00278                                      \textcolor{stringliteral}{"{}liowd/\%02hhx:\%02hhx.\%hhx"{}}, \mbox{\hyperlink{structocteon__device_adcc404f50005fdb840e6f7fec61b612b}{bus}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00279}00279                                      \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}}, function);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00280}00280                 \textcolor{keywordflow}{if} (!error) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00281}00281                         kproc\_resume(oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a9b8a18802b426703b029184812606c63}{watchdog\_task}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00282}00282                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00283}00283                         oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a9b8a18802b426703b029184812606c63}{watchdog\_task}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00284}00284                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00285}00285                                     \textcolor{stringliteral}{"{}failed to create kernel\_thread\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00286}00286                         \mbox{\hyperlink{lio__main_8c_a48be08153247b91d562011681525fcbe}{lio\_detach}}(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00287}00287                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00288}00288                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00289}00289         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00290}00290         oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a00248c7332e5ff2b1b2dcd9702aefd02}{rx\_pause}} = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00291}00291         oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a833b54c17ce417c56766cb5c149c02f6}{tx\_pause}} = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00293}00293         timeout = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00294}00294         \textcolor{keywordflow}{while} (timeout < \mbox{\hyperlink{lio__device_8h_adc9cc02bd0ccc0748742e085d4940a83}{LIO\_NIC\_STARTER\_TIMEOUT}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00295}00295                 \mbox{\hyperlink{lio__bsd_8h_a5c47086ad21f04cdc2b7e21dd15c3890}{lio\_mdelay}}(\mbox{\hyperlink{lio__main_8c_a43e3249b70bd1b48607538c247be159e}{LIO\_STARTER\_POLL\_INTERVAL\_MS}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00296}00296                 timeout += \mbox{\hyperlink{lio__main_8c_a43e3249b70bd1b48607538c247be159e}{LIO\_STARTER\_POLL\_INTERVAL\_MS}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00298}00298                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00299}00299 \textcolor{comment}{                 * During the boot process interrupts are not available.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00300}00300 \textcolor{comment}{                 * So polling for first control message from FW.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00301}00301 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00302}00302                 \textcolor{keywordflow}{if} (cold)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00303}00303                         \mbox{\hyperlink{lio__droq_8c_afc56a097d4b8c16de11eab8cd58a0a4b}{lio\_droq\_bh}}(oct\_dev-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[0], 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00305}00305                 \textcolor{keywordflow}{if} (atomic\_load\_acq\_int(\&oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}) == \mbox{\hyperlink{lio__device_8h_af662a032e5cbedf642d0c8f13e871003}{LIO\_DEV\_CORE\_OK}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00306}00306                         ret = \mbox{\hyperlink{lio__main_8c_adde549dbb61572058eb2f099be770801}{lio\_nic\_starter}}(oct\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00307}00307                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00308}00308                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00309}00309         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00310}00310 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00311}00311         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00312}00312                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct\_dev, \textcolor{stringliteral}{"{}Firmware failed to start\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00313}00313                 \mbox{\hyperlink{lio__main_8c_a48be08153247b91d562011681525fcbe}{lio\_detach}}(\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00314}00314                 \textcolor{keywordflow}{return} (-\/EIO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00315}00315         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00316}00316 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00317}00317         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct\_dev, \textcolor{stringliteral}{"{}Device is ready\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00318}00318 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00319}00319         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00320}00320 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00322}00322 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00323}\mbox{\hyperlink{lio__main_8c_a48be08153247b91d562011681525fcbe}{00323}} \mbox{\hyperlink{lio__main_8c_a48be08153247b91d562011681525fcbe}{lio\_detach}}(device\_t \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00324}00324 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00325}00325         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct\_dev = device\_get\_softc(\mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00326}00326 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00327}00327         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct\_dev, \textcolor{stringliteral}{"{}Stopping device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00328}00328         \textcolor{keywordflow}{if} (oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a9b8a18802b426703b029184812606c63}{watchdog\_task}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00329}00329                 uint64\_t        scratch1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00331}00331                 kproc\_suspend(oct\_dev-\/>\mbox{\hyperlink{structocteon__device_a9b8a18802b426703b029184812606c63}{watchdog\_task}}, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00332}00332 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00333}00333                 scratch1 = \mbox{\hyperlink{lio__device_8h_a4989f8b30e3cf276faa3c806a1420f60}{lio\_read\_csr64}}(oct\_dev, \mbox{\hyperlink{cn23xx__pf__regs_8h_a97c16be313ad055386190df62f27dbb7}{LIO\_CN23XX\_SLI\_SCRATCH1}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00334}00334                 scratch1 \&= \string~4ULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00335}00335                 \mbox{\hyperlink{lio__device_8h_a659d399fb9114de5dcb4805cc7e72acd}{lio\_write\_csr64}}(oct\_dev, \mbox{\hyperlink{cn23xx__pf__regs_8h_a97c16be313ad055386190df62f27dbb7}{LIO\_CN23XX\_SLI\_SCRATCH1}}, scratch1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00336}00336         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00337}00337 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00338}00338         \textcolor{keywordflow}{if} (oct\_dev-\/>\mbox{\hyperlink{structocteon__device_af5cd4924859965154259579d74739ee6}{app\_mode}} \&\& (oct\_dev-\/>\mbox{\hyperlink{structocteon__device_af5cd4924859965154259579d74739ee6}{app\_mode}} == \mbox{\hyperlink{lio__common_8h_a878b59df91589ae9cf2ab70e6ca77a3f}{LIO\_DRV\_NIC\_APP}}))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00339}00339                 \mbox{\hyperlink{lio__main_8c_a1037bb669fd3259a60dca9660d69a353}{lio\_stop\_nic\_module}}(oct\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00340}00340 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00341}00341         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00342}00342 \textcolor{comment}{         * Reset the octeon device and cleanup all memory allocated for}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00343}00343 \textcolor{comment}{         * the octeon device by  driver.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00344}00344 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00345}00345         \mbox{\hyperlink{lio__main_8c_ae2fd63251d7062351c47d7f5972a3c9a}{lio\_destroy\_resources}}(oct\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00347}00347         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct\_dev, \textcolor{stringliteral}{"{}Device removed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00349}00349         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00350}00350 \textcolor{comment}{         * This octeon device has been removed. Update the global}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00351}00351 \textcolor{comment}{         * data structure to reflect this. Free the device structure.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00352}00352 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00353}00353         \mbox{\hyperlink{lio__device_8c_a65d96c1e433f10ba7abdd46b77a4b354}{lio\_free\_device\_mem}}(oct\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00354}00354         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00355}00355 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00356}00356 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00357}00357 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00358}\mbox{\hyperlink{lio__main_8c_a14cbb03229f004e20ebc3f654f540e13}{00358}} \mbox{\hyperlink{lio__main_8c_a14cbb03229f004e20ebc3f654f540e13}{lio\_shutdown}}(device\_t \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00359}00359 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00360}00360         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct\_dev = device\_get\_softc(\mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00361}00361         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}}-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a66039d2909b1fbff45e0898d81d515c9}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00362}00362 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00363}00363         \mbox{\hyperlink{lio__main_8c_ac389159dbd145c9785dd8469a75929fa}{lio\_send\_rx\_ctrl\_cmd}}(\mbox{\hyperlink{structlio}{lio}}, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00364}00364 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00365}00365         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00366}00366 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00368}00368 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00369}\mbox{\hyperlink{lio__main_8c_a59d9d567f7b3f26141b03cc7d6234b71}{00369}} \mbox{\hyperlink{lio__main_8c_a59d9d567f7b3f26141b03cc7d6234b71}{lio\_suspend}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00370}00370 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00372}00372         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00373}00373 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00374}00374 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00375}00375 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00376}\mbox{\hyperlink{lio__main_8c_a32b864ea8e47c04ccdc2bf1b268cb574}{00376}} \mbox{\hyperlink{lio__main_8c_a32b864ea8e47c04ccdc2bf1b268cb574}{lio\_resume}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00377}00377 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00378}00378 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00379}00379         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00380}00380 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00382}00382 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00383}\mbox{\hyperlink{lio__main_8c_a766630e6fda34c50af5e89ea5d03a693}{00383}} \mbox{\hyperlink{lio__main_8c_a766630e6fda34c50af5e89ea5d03a693}{lio\_event}}(\textcolor{keyword}{struct} module *mod, \textcolor{keywordtype}{int} event, \textcolor{keywordtype}{void} *junk)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00384}00384 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00385}00385 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00386}00386         \textcolor{keywordflow}{switch} (event) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00387}00387         \textcolor{keywordflow}{case} MOD\_LOAD:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00388}00388                 \mbox{\hyperlink{lio__device_8c_a281cf34fe53557a2ee0073908d6bfbee}{lio\_init\_device\_list}}(\mbox{\hyperlink{lio__device_8h_a05589fbab0657f08285ebdfe93f5ec9eacea40dae3867e1e4e3959ed129317f19}{LIO\_CFG\_TYPE\_DEFAULT}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00389}00389                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00390}00390         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00391}00391                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00392}00392         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00393}00393 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00394}00394         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00395}00395 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00397}00397 \textcolor{comment}{/*********************************************************************}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00398}00398 \textcolor{comment}{ *  FreeBSD Device Interface Entry Points}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00399}00399 \textcolor{comment}{ * *******************************************************************/}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00400}\mbox{\hyperlink{lio__main_8c_a2de336ab2d2a1c5aee5e2ea1ca2013a2}{00400}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{lio__main_8c_a2de336ab2d2a1c5aee5e2ea1ca2013a2}{lio\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00401}00401         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00402}00402         DEVMETHOD(device\_probe, \mbox{\hyperlink{lio__main_8c_a1eeb56bb28223ed075a69aea1d263562}{lio\_probe}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00403}00403         DEVMETHOD(device\_attach, \mbox{\hyperlink{lio__main_8c_aed60a6562031b3c0ab8bd3039dee5af4}{lio\_attach}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00404}00404         DEVMETHOD(device\_detach, \mbox{\hyperlink{lio__main_8c_a48be08153247b91d562011681525fcbe}{lio\_detach}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00405}00405         DEVMETHOD(device\_shutdown, \mbox{\hyperlink{lio__main_8c_a14cbb03229f004e20ebc3f654f540e13}{lio\_shutdown}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00406}00406         DEVMETHOD(device\_suspend, \mbox{\hyperlink{lio__main_8c_a59d9d567f7b3f26141b03cc7d6234b71}{lio\_suspend}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00407}00407         DEVMETHOD(device\_resume, \mbox{\hyperlink{lio__main_8c_a32b864ea8e47c04ccdc2bf1b268cb574}{lio\_resume}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00408}00408         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00409}00409 \};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00410}00410 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00411}\mbox{\hyperlink{lio__main_8c_a87015fac0671807f8177161090e092a6}{00411}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{lio__main_8c_a87015fac0671807f8177161090e092a6}{lio\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00412}00412         \mbox{\hyperlink{lio__main_8h_a320f3d5744e3abdf31c288d04f563c1c}{LIO\_DRV\_NAME}}, \mbox{\hyperlink{lio__main_8c_a2de336ab2d2a1c5aee5e2ea1ca2013a2}{lio\_methods}}, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00413}00413 \};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00414}00414 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00415}\mbox{\hyperlink{lio__main_8c_a877c557d188cf94a4a86317cd03752f0}{00415}} devclass\_t \mbox{\hyperlink{lio__main_8c_a877c557d188cf94a4a86317cd03752f0}{lio\_devclass}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00416}\mbox{\hyperlink{lio__main_8c_a0c1ae4ff8c5daac113ff63b17be21a99}{00416}} \mbox{\hyperlink{lio__main_8c_a0c1ae4ff8c5daac113ff63b17be21a99}{DRIVER\_MODULE}}(\mbox{\hyperlink{structlio}{lio}}, pci, \mbox{\hyperlink{lio__main_8c_a87015fac0671807f8177161090e092a6}{lio\_driver}}, \mbox{\hyperlink{lio__main_8c_a877c557d188cf94a4a86317cd03752f0}{lio\_devclass}}, \mbox{\hyperlink{lio__main_8c_a766630e6fda34c50af5e89ea5d03a693}{lio\_event}}, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00417}00417 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00418}\mbox{\hyperlink{lio__main_8c_a657c6b052e13e6a6cd7182a586a2366a}{00418}} \mbox{\hyperlink{lio__main_8c_a657c6b052e13e6a6cd7182a586a2366a}{MODULE\_DEPEND}}(\mbox{\hyperlink{structlio}{lio}}, pci, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00419}\mbox{\hyperlink{lio__main_8c_aa848127432ffd000d338e9243b626bf3}{00419}} \mbox{\hyperlink{lio__main_8c_a657c6b052e13e6a6cd7182a586a2366a}{MODULE\_DEPEND}}(\mbox{\hyperlink{structlio}{lio}}, ether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00420}\mbox{\hyperlink{lio__main_8c_acbed9141f63a050d4b913609f90b109d}{00420}} \mbox{\hyperlink{lio__main_8c_a657c6b052e13e6a6cd7182a586a2366a}{MODULE\_DEPEND}}(\mbox{\hyperlink{structlio}{lio}}, firmware, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00421}00421 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00422}00422 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00423}\mbox{\hyperlink{lio__main_8c_ae25611500be1d259ddbb569d478c5505}{00423}} \mbox{\hyperlink{lio__main_8c_ae25611500be1d259ddbb569d478c5505}{fw\_type\_is\_none}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00424}00424 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00425}00425         \textcolor{keywordflow}{return} strncmp(\mbox{\hyperlink{lio__main_8c_a0ed528be05d7ba6b80dfc8368f755d1b}{fw\_type}}, \mbox{\hyperlink{lio__image_8h_a0dff9e863e23f34c85889f81803ed882}{LIO\_FW\_NAME\_TYPE\_NONE}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00426}00426                        \textcolor{keyword}{sizeof}(\mbox{\hyperlink{lio__image_8h_a0dff9e863e23f34c85889f81803ed882}{LIO\_FW\_NAME\_TYPE\_NONE}})) == 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00427}00427 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00429}00429 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00430}00430 \textcolor{comment}{ * \(\backslash\)brief Device initialization for each Octeon device that is probed}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00431}00431 \textcolor{comment}{ * @param octeon\_dev  octeon device}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00432}00432 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00433}00433 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00434}\mbox{\hyperlink{lio__main_8c_ab422f5cb49ea7002de07e9c50c862a9e}{00434}} \mbox{\hyperlink{lio__main_8c_ab422f5cb49ea7002de07e9c50c862a9e}{lio\_device\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *octeon\_dev)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00435}00435 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00436}00436         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}   ddr\_timeout = \mbox{\hyperlink{lio__main_8c_a82c995e36ed0ccc05a80b00a2323170d}{LIO\_DDR\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00437}00437         \textcolor{keywordtype}{char}    *dbg\_enb = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00438}00438         \textcolor{keywordtype}{int}     fw\_loaded = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00439}00439         \textcolor{keywordtype}{int}     i, j, ret;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00440}00440         uint8\_t \mbox{\hyperlink{structocteon__device_adcc404f50005fdb840e6f7fec61b612b}{bus}}, \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}}, function;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00441}00441         \textcolor{keywordtype}{char}    bootcmd[] = \textcolor{stringliteral}{"{}\(\backslash\)n"{}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00443}00443         \mbox{\hyperlink{structocteon__device_adcc404f50005fdb840e6f7fec61b612b}{bus}} = pci\_get\_bus(octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00444}00444         \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}} = pci\_get\_slot(octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00445}00445         function = pci\_get\_function(octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00447}00447         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_af19398512ad3f5599c8ec42f48e5f8b2}{LIO\_DEV\_BEGIN\_STATE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00448}00448 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00449}00449         \textcolor{comment}{/* Enable access to the octeon device */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00450}00450         \textcolor{keywordflow}{if} (pci\_enable\_busmaster(octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}})) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00451}00451                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}pci\_enable\_device failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00452}00452                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00453}00453         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00455}00455         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_a39654f765a5a5e326ae965960357b8e2}{LIO\_DEV\_PCI\_ENABLE\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00456}00456 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00457}00457         \textcolor{comment}{/* Identify the Octeon type and map the BAR address space. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00458}00458         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_ae36aac10ba190fbdb128eaae9c5dff67}{lio\_chip\_specific\_setup}}(octeon\_dev)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00459}00459                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Chip specific setup failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00460}00460                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00461}00461         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00462}00462 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00463}00463         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_a5a90413de983e5e6d1a108b0ffcd006e}{LIO\_DEV\_PCI\_MAP\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00465}00465         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00466}00466 \textcolor{comment}{         * Only add a reference after setting status 'OCT\_DEV\_PCI\_MAP\_DONE',}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00467}00467 \textcolor{comment}{         * since that is what is required for the reference to be removed}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00468}00468 \textcolor{comment}{         * during de-\/initialization (see 'octeon\_destroy\_resources').}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00469}00469 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00470}00470         \mbox{\hyperlink{lio__device_8c_aace78a369945d5b037940877f033c9bd}{lio\_register\_device}}(octeon\_dev, \mbox{\hyperlink{structocteon__device_adcc404f50005fdb840e6f7fec61b612b}{bus}}, \mbox{\hyperlink{structocteon__device_a7455f0cdbccd489fa3a09837b4314188}{dev}}, function, \textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00471}00471 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00473}00473         octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_af5cd4924859965154259579d74739ee6}{app\_mode}} = \mbox{\hyperlink{lio__common_8h_a98798fb86630fcfe142a259fb12adca8}{LIO\_DRV\_INVALID\_APP}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00474}00474 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00475}00475         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{cn23xx__pf__device_8c_a795534ec6736ae4b7c6f32ac5e7f3da5}{lio\_cn23xx\_pf\_fw\_loaded}}(octeon\_dev) \&\& !\mbox{\hyperlink{lio__main_8c_ae25611500be1d259ddbb569d478c5505}{fw\_type\_is\_none}}()) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00476}00476                 fw\_loaded = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00477}00477                 \textcolor{comment}{/* Do a soft reset of the Octeon device. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00478}00478                 \textcolor{keywordflow}{if} (octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_a7e40c6321b2849e50746c837931d0dbe}{soft\_reset}}(octeon\_dev))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00479}00479                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00480}00480 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00481}00481                 \textcolor{comment}{/* things might have changed */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00482}00482                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{cn23xx__pf__device_8c_a795534ec6736ae4b7c6f32ac5e7f3da5}{lio\_cn23xx\_pf\_fw\_loaded}}(octeon\_dev))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00483}00483                         fw\_loaded = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00484}00484                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00485}00485                         fw\_loaded = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00486}00486         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00487}00487                 fw\_loaded = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00488}00488         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00489}00489 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00490}00490         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00491}00491 \textcolor{comment}{         * Initialize the dispatch mechanism used to push packets arriving on}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00492}00492 \textcolor{comment}{         * Octeon Output queues.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00493}00493 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00494}00494         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__device_8c_a8ab4a78258d770aaf5fa7e0bc28f7d09}{lio\_init\_dispatch\_list}}(octeon\_dev))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00495}00495                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00497}00497         \mbox{\hyperlink{lio__device_8c_aab7e4b1f30fb3151911652a4ff9a3914}{lio\_register\_dispatch\_fn}}(octeon\_dev, \mbox{\hyperlink{lio__common_8h_a33e94e4d8a48c4f8fcca7f71a4f622c3}{LIO\_OPCODE\_NIC}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00498}00498                                  \mbox{\hyperlink{lio__common_8h_a52604b3607cd4e7184b7b7092fda2503}{LIO\_OPCODE\_NIC\_CORE\_DRV\_ACTIVE}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00499}00499                                  \mbox{\hyperlink{lio__device_8c_a4b72334af3258da41688a23f683b6eb9}{lio\_core\_drv\_init}}, octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00500}00500         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_a73002cc047b242b3bf3804e16a0cf9c7}{LIO\_DEV\_DISPATCH\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00501}00501 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00502}00502         ret = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_a81494bf3c89bb2da1a36103689be9eee}{setup\_device\_regs}}(octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00503}00503         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00504}00504                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00505}00505                             \textcolor{stringliteral}{"{}Failed to configure device registers\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00506}00506                 \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00507}00507         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00508}00508 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00509}00509         \textcolor{comment}{/* Initialize soft command buffer pool */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00510}00510         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__iq_8h_a25bafee1c52d75d9725a7b40406e9990}{lio\_setup\_sc\_buffer\_pool}}(octeon\_dev)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00511}00511                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}sc buffer pool allocation failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00512}00512                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00513}00513         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00514}00514 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00515}00515         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00516}00516                              \mbox{\hyperlink{lio__device_8h_a37ccc736a686e3f96490c6faa5e4840e}{LIO\_DEV\_SC\_BUFF\_POOL\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00517}00517 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00518}00518         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__device_8c_a59bd397453e5b180914fd32d857cae46}{lio\_allocate\_ioq\_vector}}(octeon\_dev)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00519}00519                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00520}00520                             \textcolor{stringliteral}{"{}IOQ vector allocation failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00521}00521                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00522}00522         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00523}00523 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00524}00524         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00525}00525                              \mbox{\hyperlink{lio__device_8h_a9d19683f16520f114a7219901da9d177}{LIO\_DEV\_MSIX\_ALLOC\_VECTOR\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00526}00526 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00527}00527         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{lio__config_8h_abbb185566e0a27e22fe5cdf5d4ee1f14}{LIO\_MAX\_POSSIBLE\_INSTR\_QUEUES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00528}00528                 octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_ad3b9d2c9e6e5c1f264886dcd3f373676}{instr\_queue}}[i] =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00529}00529                         malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__instr__queue}{lio\_instr\_queue}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00530}00530                                M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00531}00531                 \textcolor{keywordflow}{if} (octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_ad3b9d2c9e6e5c1f264886dcd3f373676}{instr\_queue}}[i] == NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00532}00532                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00533}00533         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00534}00534 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00535}00535         \textcolor{comment}{/* Setup the data structures that manage this Octeon's Input queues. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00536}00536         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__device_8c_ab94de2423f85a45e264eb32011f011bc}{lio\_setup\_instr\_queue0}}(octeon\_dev)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00537}00537                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00538}00538                             \textcolor{stringliteral}{"{}Instruction queue initialization failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00539}00539                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00540}00540         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00541}00541 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00542}00542         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00543}00543                              \mbox{\hyperlink{lio__device_8h_af75c59ff974ab81ba86b58ffd2d989dc}{LIO\_DEV\_INSTR\_QUEUE\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00544}00544 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00545}00545         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00546}00546 \textcolor{comment}{         * Initialize lists to manage the requests of different types that}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00547}00547 \textcolor{comment}{         * arrive from user \& kernel applications for this octeon device.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00548}00548 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00549}00549 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00550}00550         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__response__manager_8c_afe976f8f6ea19005fe982ff1326ff68f}{lio\_setup\_response\_list}}(octeon\_dev)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00551}00551                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Response list allocation failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00552}00552                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00553}00553         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00554}00554 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00555}00555         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_ae921661ff4c31ec6536e0fef22044c5b}{LIO\_DEV\_RESP\_LIST\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00556}00556 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00557}00557         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{lio__config_8h_ab48d8ceb766362d8e504757729ea4650}{LIO\_MAX\_POSSIBLE\_OUTPUT\_QUEUES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00558}00558                 octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i] = malloc(\textcolor{keyword}{sizeof}(*octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i]),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00559}00559                                              M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00560}00560                 \textcolor{keywordflow}{if} (octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i] == NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00561}00561                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00562}00562         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00563}00563 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00564}00564         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__device_8c_a54be1cbdc68b2c59aa16f913803f7f0f}{lio\_setup\_output\_queue0}}(octeon\_dev)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00565}00565                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Output queue initialization failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00566}00566                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00567}00567         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00569}00569         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_afe9cfe60b5324223a09523e0616be34c}{LIO\_DEV\_DROQ\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00570}00570 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00571}00571         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00572}00572 \textcolor{comment}{         * Setup the interrupt handler and record the INT SUM register address}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00573}00573 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00574}00574         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__core_8c_a8333172110fc5b71a077c5c6128a82a7}{lio\_setup\_interrupt}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00575}00575                                 octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a54dd68ea6c9623dab80a21f9deeda571}{sriov\_info}}.\mbox{\hyperlink{structlio__sriov__info_ae4a5b1c4e3e62c91c93ca32baf20cf5a}{num\_pf\_rings}}))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00576}00576                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00578}00578         \textcolor{comment}{/* Enable Octeon device interrupts */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00579}00579         octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_a0c77a6b9a69f75cb9e2616979b6e7935}{enable\_interrupt}}(octeon\_dev, \mbox{\hyperlink{lio__device_8h_a02b2b5bff89c9704ffd338aa6068c597}{OCTEON\_ALL\_INTR}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00580}00580 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00581}00581         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_a3916ce9e4e331e57a92d027f5ae2fcbe}{LIO\_DEV\_INTR\_SET\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00582}00582 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00583}00583         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00584}00584 \textcolor{comment}{         * Send Credit for Octeon Output queues. Credits are always sent BEFORE}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00585}00585 \textcolor{comment}{         * the output queue is enabled.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00586}00586 \textcolor{comment}{         * This ensures that we'll receive the f/w CORE DRV\_ACTIVE message in}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00587}00587 \textcolor{comment}{         * case we've configured CN23XX\_SLI\_GBL\_CONTROL[NOPTR\_D] = 0.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00588}00588 \textcolor{comment}{         * Otherwise, it is possible that the DRV\_ACTIVE message will be sent}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00589}00589 \textcolor{comment}{         * before any credits have been issued, causing the ring to be reset}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00590}00590 \textcolor{comment}{         * (and the f/w appear to never have started).}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00591}00591 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00592}00592         \textcolor{keywordflow}{for} (j = 0; j < octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a54c2f2f4558411f501e0f46dab998d52}{num\_oqs}}; j++)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00593}00593                 \mbox{\hyperlink{lio__device_8h_a946180ca969df8cd2d4b2c3eb4e9cb3c}{lio\_write\_csr32}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00594}00594                                 octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[j]-\/>\mbox{\hyperlink{structlio__droq_a6c03b162185dfc04f00630a1acee54c5}{pkts\_credit\_reg}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00595}00595                                 octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[j]-\/>\mbox{\hyperlink{structlio__droq_a04b2786b96b7d2824968691a5f052c26}{max\_count}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00596}00596 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00597}00597         \textcolor{comment}{/* Enable the input and output queues for this Octeon device */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00598}00598         ret = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_a39961d09a6e48a1ae00fab27606c261d}{enable\_io\_queues}}(octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00599}00599         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00600}00600                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Failed to enable input/output queues"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00601}00601                 \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00602}00602         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00603}00603 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00604}00604         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_add5dc61e81daefc7bfa1d89dff5542f6}{LIO\_DEV\_IO\_QUEUES\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00606}00606         \textcolor{keywordflow}{if} (!fw\_loaded) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00607}00607                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(octeon\_dev, \textcolor{stringliteral}{"{}Waiting for DDR initialization...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00608}00608                 \textcolor{keywordflow}{if} (!ddr\_timeout) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00609}00609                         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00610}00610                                      \textcolor{stringliteral}{"{}WAITING. Set ddr\_timeout to non-\/zero value to proceed with initialization.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00611}00611                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00612}00612 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00613}00613                 \mbox{\hyperlink{lio__bsd_8h_a7127c19922ac115d8494a76ae19d0480}{lio\_sleep\_timeout}}(\mbox{\hyperlink{lio__device_8h_ac854e68635e269d4af08de422ca99724}{LIO\_RESET\_MSECS}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00614}00614 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00615}00615                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00616}00616 \textcolor{comment}{                 * Wait for the octeon to initialize DDR after the}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00617}00617 \textcolor{comment}{                 * soft-\/reset.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00618}00618 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00619}00619                 \textcolor{keywordflow}{while} (!ddr\_timeout) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00620}00620                         \textcolor{keywordflow}{if} (pause(\textcolor{stringliteral}{"{}-\/"{}}, \mbox{\hyperlink{lio__bsd_8h_ae6eb6d875a682c72af6de3d0fa0876e5}{lio\_ms\_to\_ticks}}(100))) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00621}00621                                 \textcolor{comment}{/* user probably pressed Control-\/C */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00622}00622                                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00623}00623                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00624}00624                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00625}00625 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00626}00626                 ret = \mbox{\hyperlink{lio__device_8c_a29fd7c7d6e458f62d22a6a13e90f8f73}{lio\_wait\_for\_ddr\_init}}(octeon\_dev, \&ddr\_timeout);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00627}00627                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00628}00628                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00629}00629                                     \textcolor{stringliteral}{"{}DDR not initialized. Please confirm that board is configured to boot from Flash, ret: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00630}00630                                     ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00631}00631                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00632}00632                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00633}00633 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00634}00634                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__console_8c_af4510ca9c7c7627e57ba92f182267c51}{lio\_wait\_for\_bootloader}}(octeon\_dev, 1100)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00635}00635                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Board not responding\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00636}00636                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00637}00637                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00638}00638 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00639}00639                 \textcolor{comment}{/* Divert uboot to take commands from host instead. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00640}00640                 ret = \mbox{\hyperlink{lio__console_8c_ab5366969909f9cce5bd208c1271c4b19}{lio\_console\_send\_cmd}}(octeon\_dev, bootcmd, 50);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00641}00641 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00642}00642                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(octeon\_dev, \textcolor{stringliteral}{"{}Initializing consoles\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00643}00643                 ret = \mbox{\hyperlink{lio__console_8c_aa0d11dee6603e2177f9673230f3ec26b}{lio\_init\_consoles}}(octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00644}00644                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00645}00645                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Could not access board consoles\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00646}00646                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00647}00647                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00648}00648 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00649}00649                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00650}00650 \textcolor{comment}{                 * If console debug enabled, specify empty string to}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00651}00651 \textcolor{comment}{                 * use default enablement ELSE specify NULL string for}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00652}00652 \textcolor{comment}{                 * 'disabled'.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00653}00653 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00654}00654                 dbg\_enb = \mbox{\hyperlink{lio__main_8c_a686836c039ede8bae369f1fa1de65051}{lio\_console\_debug\_enabled}}(0) ? \textcolor{stringliteral}{"{}"{}} : NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00655}00655                 ret = \mbox{\hyperlink{lio__console_8c_ab15c65664cbe0cfdec60f705bc5eba7c}{lio\_add\_console}}(octeon\_dev, 0, dbg\_enb);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00656}00656 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00657}00657                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00658}00658                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Could not access board console\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00659}00659                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00660}00660                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_a686836c039ede8bae369f1fa1de65051}{lio\_console\_debug\_enabled}}(0)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00661}00661                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00662}00662 \textcolor{comment}{                         * If console was added AND we're logging console output}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00663}00663 \textcolor{comment}{                         * then set our console print function.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00664}00664 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00665}00665                         octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_af9094f8dfbf00973939ae87001b9c0db}{console}}[0].\mbox{\hyperlink{structlio__console_a8cc46ef8a99915c4bc9072ce8aeff55b}{print}} = \mbox{\hyperlink{lio__main_8c_aa39939fa4f446b0a9e100975b7e6222b}{lio\_dbg\_console\_print}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00666}00666                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00667}00667 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00668}00668                 atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00669}00669                                      \mbox{\hyperlink{lio__device_8h_aefa97f185807b4dd1078366f8f13146a}{LIO\_DEV\_CONSOLE\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00670}00670 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00671}00671                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(octeon\_dev, \textcolor{stringliteral}{"{}Loading firmware\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00672}00672 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00673}00673                 ret = \mbox{\hyperlink{lio__main_8c_ae2a9fd9cd1393d27b106fe897d14a89c}{lio\_load\_firmware}}(octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00674}00674                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00675}00675                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Could not load firmware to board\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00676}00676                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00677}00677                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00678}00678         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00679}00679 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00680}00680         atomic\_store\_rel\_int(\&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_a54a225945d7ea57434192ef1722929f4}{LIO\_DEV\_HOST\_OK}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00681}00681 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00682}00682         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00683}00683 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00684}00684 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00685}00685 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00686}00686 \textcolor{comment}{ * \(\backslash\)brief PCI FLR for each Octeon device.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00687}00687 \textcolor{comment}{ * @param oct octeon device}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00688}00688 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00689}00689 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00690}\mbox{\hyperlink{lio__main_8c_ae5365457055ebd2f07c217027d7d6c3f}{00690}} \mbox{\hyperlink{lio__main_8c_ae5365457055ebd2f07c217027d7d6c3f}{lio\_pci\_flr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00691}00691 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00692}00692         uint32\_t        exppos, \mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00693}00693 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00694}00694         pci\_find\_cap(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}, PCIY\_EXPRESS, \&exppos);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00695}00695 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00696}00696         pci\_save\_state(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00697}00697 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00698}00698         \textcolor{comment}{/* Quiesce the device completely */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00699}00699         pci\_write\_config(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}, PCIR\_COMMAND, PCIM\_CMD\_INTxDIS, 2);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00700}00700 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00701}00701         \textcolor{comment}{/* Wait for Transaction Pending bit clean */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00702}00702         \mbox{\hyperlink{lio__bsd_8h_a5c47086ad21f04cdc2b7e21dd15c3890}{lio\_mdelay}}(100);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00703}00703 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00704}00704         \mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}} = pci\_read\_config(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}, exppos + PCIER\_DEVICE\_STA, 2);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00705}00705         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}} \& PCIEM\_STA\_TRANSACTION\_PND) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00706}00706                 \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}Function reset incomplete after 100ms, sleeping for 5 seconds\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00707}00707                 \mbox{\hyperlink{lio__bsd_8h_a5c47086ad21f04cdc2b7e21dd15c3890}{lio\_mdelay}}(5);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00708}00708 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00709}00709                 \mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}} = pci\_read\_config(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}, exppos + PCIER\_DEVICE\_STA, 2);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00710}00710                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}} \& PCIEM\_STA\_TRANSACTION\_PND)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00711}00711                         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}Function reset still incomplete after 5s, reset anyway\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00712}00712         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00713}00713 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00714}00714         pci\_write\_config(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}, exppos + PCIER\_DEVICE\_CTL, PCIEM\_CTL\_INITIATE\_FLR, 2);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00715}00715         \mbox{\hyperlink{lio__bsd_8h_a5c47086ad21f04cdc2b7e21dd15c3890}{lio\_mdelay}}(100);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00716}00716 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00717}00717         pci\_restore\_state(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00718}00718 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00720}00720 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00721}00721 \textcolor{comment}{ * \(\backslash\)brief Debug console print function}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00722}00722 \textcolor{comment}{ * @param octeon\_dev  octeon device}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00723}00723 \textcolor{comment}{ * @param console\_num console number}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00724}00724 \textcolor{comment}{ * @param prefix      first portion of line to display}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00725}00725 \textcolor{comment}{ * @param suffix      second portion of line to display}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00726}00726 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00727}00727 \textcolor{comment}{ * The OCTEON debug console outputs entire lines (excluding '\(\backslash\)n').}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00728}00728 \textcolor{comment}{ * Normally, the line will be passed in the 'prefix' parameter.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00729}00729 \textcolor{comment}{ * However, due to buffering, it is possible for a line to be split into two}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00730}00730 \textcolor{comment}{ * parts, in which case they will be passed as the 'prefix' parameter and}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00731}00731 \textcolor{comment}{ * 'suffix' parameter.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00732}00732 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00733}00733 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00734}\mbox{\hyperlink{lio__main_8c_aa39939fa4f446b0a9e100975b7e6222b}{00734}} \mbox{\hyperlink{lio__main_8c_aa39939fa4f446b0a9e100975b7e6222b}{lio\_dbg\_console\_print}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t console\_num,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00735}00735                       \textcolor{keywordtype}{char} *prefix, \textcolor{keywordtype}{char} *suffix)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00736}00736 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00737}00737 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00738}00738         \textcolor{keywordflow}{if} (prefix != NULL \&\& suffix != NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00739}00739                 \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}\%u: \%s\%s\(\backslash\)n"{}}, console\_num, prefix, suffix);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00740}00740         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (prefix != NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00741}00741                 \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}\%u: \%s\(\backslash\)n"{}}, console\_num, prefix);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00742}00742         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (suffix != NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00743}00743                 \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}\%u: \%s\(\backslash\)n"{}}, console\_num, suffix);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00744}00744 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00745}00745         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00746}00746 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00747}00747 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00748}00748 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00749}\mbox{\hyperlink{lio__main_8c_aaab62b757225188f0c304f682185a5cd}{00749}} \mbox{\hyperlink{lio__main_8c_aaab62b757225188f0c304f682185a5cd}{lio\_watchdog}}(\textcolor{keywordtype}{void} *param)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00750}00750 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00751}00751         \textcolor{keywordtype}{int}             core\_num;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00752}00752         uint16\_t        mask\_of\_crashed\_or\_stuck\_cores = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00753}00753         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = param;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00754}00754         \textcolor{keywordtype}{bool}            err\_msg\_was\_printed[12];}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00755}00755 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00756}00756         bzero(err\_msg\_was\_printed, \textcolor{keyword}{sizeof}(err\_msg\_was\_printed));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00757}00757 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00758}00758         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00759}00759                 kproc\_suspend\_check(oct-\/>\mbox{\hyperlink{structocteon__device_a9b8a18802b426703b029184812606c63}{watchdog\_task}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00760}00760                 mask\_of\_crashed\_or\_stuck\_cores =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00761}00761                         (uint16\_t)\mbox{\hyperlink{lio__device_8h_a4989f8b30e3cf276faa3c806a1420f60}{lio\_read\_csr64}}(oct, \mbox{\hyperlink{cn23xx__pf__regs_8h_a48e0c369e62e01fe11801c80b35ac59d}{LIO\_CN23XX\_SLI\_SCRATCH2}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00763}00763                 \textcolor{keywordflow}{if} (mask\_of\_crashed\_or\_stuck\_cores) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00764}00764                         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}} *other\_oct;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00765}00765 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00766}00766                         oct-\/>\mbox{\hyperlink{structocteon__device_ae57f6c4d7268f3f89cfa9f520b48aca8}{cores\_crashed}} = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00767}00767                         other\_oct = \mbox{\hyperlink{lio__main_8c_a790cffd3823803623bbf32b926e1389d}{lio\_get\_other\_octeon\_device}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00768}00768                         \textcolor{keywordflow}{if} (other\_oct != NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00769}00769                                 other\_oct-\/>\mbox{\hyperlink{structocteon__device_ae57f6c4d7268f3f89cfa9f520b48aca8}{cores\_crashed}} = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00770}00770 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00771}00771                         \textcolor{keywordflow}{for} (core\_num = 0; core\_num < \mbox{\hyperlink{lio__network_8h_a7382e4815b3d166ee9678325fa3dfdf9}{LIO\_MAX\_CORES}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00772}00772                              core\_num++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00773}00773                                 \textcolor{keywordtype}{bool} core\_crashed\_or\_got\_stuck;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00774}00774 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00775}00775                                 core\_crashed\_or\_got\_stuck =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00776}00776                                     (mask\_of\_crashed\_or\_stuck\_cores >>}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00777}00777                                      core\_num) \& 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00778}00778                                 \textcolor{keywordflow}{if} (core\_crashed\_or\_got\_stuck \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00779}00779                                     !err\_msg\_was\_printed[core\_num]) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00780}00780                                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00781}00781                                                     \textcolor{stringliteral}{"{}ERROR: Octeon core \%d crashed or got stuck! See oct-\/fwdump for details.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00782}00782                                                     core\_num);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00783}00783                                         err\_msg\_was\_printed[core\_num] = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00784}00784                                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00785}00785                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00786}00786 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00787}00787                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00788}00788 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00789}00789                 \textcolor{comment}{/* sleep for two seconds */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00790}00790                 pause(\textcolor{stringliteral}{"{}-\/"{}}, \mbox{\hyperlink{lio__bsd_8h_ae6eb6d875a682c72af6de3d0fa0876e5}{lio\_ms\_to\_ticks}}(2000));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00791}00791         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00792}00792 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00793}00793 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00794}00794 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00795}\mbox{\hyperlink{lio__main_8c_ae36aac10ba190fbdb128eaae9c5dff67}{00795}} \mbox{\hyperlink{lio__main_8c_ae36aac10ba190fbdb128eaae9c5dff67}{lio\_chip\_specific\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00796}00796 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00797}00797         \textcolor{keywordtype}{char}            *s;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00798}00798         uint32\_t        dev\_id, \mbox{\hyperlink{structocteon__device_a2273b1114e7188179fdd687738adfb78}{rev\_id}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00799}00799         \textcolor{keywordtype}{int}             ret = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00800}00800 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00801}00801         dev\_id = \mbox{\hyperlink{lio__device_8h_afc307b4319b9f0de43d755ab3c7432d4}{lio\_read\_pci\_cfg}}(oct, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00802}00802         \mbox{\hyperlink{structocteon__device_a2273b1114e7188179fdd687738adfb78}{rev\_id}} = pci\_get\_revid(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00803}00803         oct-\/>\mbox{\hyperlink{structocteon__device_a83fc25818638e088aff6f51ebe1ecc62}{subdevice\_id}} = pci\_get\_subdevice(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00804}00804 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00805}00805         \textcolor{keywordflow}{switch} (dev\_id) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00806}00806         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_ac0561142292cf1dc0c4c5f22c6684f32}{LIO\_CN23XX\_PF\_PCIID}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00807}00807                 oct-\/>\mbox{\hyperlink{structocteon__device_a802673a741d5580468a49ebadc729af9}{chip\_id}} = \mbox{\hyperlink{lio__device_8h_ae2ea3e622af8487735d21cf6c3c5109d}{LIO\_CN23XX\_PF\_VID}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00808}00808                 \textcolor{keywordflow}{if} (pci\_get\_function(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00809}00809                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_ad766fbf50d3bcc780c925c9b2d33b07c}{num\_queues\_per\_pf0}} < 0) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00810}00810                                 \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}Invalid num\_queues\_per\_pf0: \%d, Setting it to default\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00811}00811                                              \mbox{\hyperlink{lio__main_8c_ad766fbf50d3bcc780c925c9b2d33b07c}{num\_queues\_per\_pf0}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00812}00812                                 \mbox{\hyperlink{lio__main_8c_ad766fbf50d3bcc780c925c9b2d33b07c}{num\_queues\_per\_pf0}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00813}00813                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00814}00814 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00815}00815                         oct-\/>\mbox{\hyperlink{structocteon__device_a54dd68ea6c9623dab80a21f9deeda571}{sriov\_info}}.\mbox{\hyperlink{structlio__sriov__info_ae4a5b1c4e3e62c91c93ca32baf20cf5a}{num\_pf\_rings}} = \mbox{\hyperlink{lio__main_8c_ad766fbf50d3bcc780c925c9b2d33b07c}{num\_queues\_per\_pf0}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00816}00816                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00817}00817                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_a3d16328102f0334297c1aa0727b2e864}{num\_queues\_per\_pf1}} < 0) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00818}00818                                 \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}Invalid num\_queues\_per\_pf1: \%d, Setting it to default\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00819}00819                                              \mbox{\hyperlink{lio__main_8c_a3d16328102f0334297c1aa0727b2e864}{num\_queues\_per\_pf1}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00820}00820                                 \mbox{\hyperlink{lio__main_8c_a3d16328102f0334297c1aa0727b2e864}{num\_queues\_per\_pf1}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00821}00821                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00822}00822 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00823}00823                         oct-\/>\mbox{\hyperlink{structocteon__device_a54dd68ea6c9623dab80a21f9deeda571}{sriov\_info}}.\mbox{\hyperlink{structlio__sriov__info_ae4a5b1c4e3e62c91c93ca32baf20cf5a}{num\_pf\_rings}} = \mbox{\hyperlink{lio__main_8c_a3d16328102f0334297c1aa0727b2e864}{num\_queues\_per\_pf1}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00824}00824                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00826}00826                 ret = \mbox{\hyperlink{cn23xx__pf__device_8c_a61ecac78842e1fa0630098251995a11f}{lio\_cn23xx\_pf\_setup\_device}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00827}00827                 s = \textcolor{stringliteral}{"{}CN23XX"{}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00828}00828                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00829}00829 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00830}00830         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00831}00831                 s = \textcolor{stringliteral}{"{}?"{}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00832}00832                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}Unknown device found (dev\_id: \%x)\(\backslash\)n"{}}, dev\_id);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00833}00833         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00834}00834 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00835}00835         \textcolor{keywordflow}{if} (!ret)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00836}00836                 \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}\%s PASS\%d.\%d \%s Version: \%s\(\backslash\)n"{}}, s,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00837}00837                              \mbox{\hyperlink{lio__device_8h_af8c0055735b0c142978964bd5269e67f}{OCTEON\_MAJOR\_REV}}(oct), \mbox{\hyperlink{lio__device_8h_ad9541f363f22e37f947372144dcfdc5f}{OCTEON\_MINOR\_REV}}(oct),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00838}00838                              \mbox{\hyperlink{lio__device_8c_a8f946cabd046605ba62dbc2dd068b075}{lio\_get\_conf}}(oct)-\/>card\_name, \mbox{\hyperlink{lio__common_8h_a83d9a4603c425dcfa3296b2f48ca0a72}{LIO\_VERSION}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00839}00839 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00840}00840         \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00841}00841 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00842}00842 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00843}00843 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}} *}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00844}\mbox{\hyperlink{lio__main_8c_a790cffd3823803623bbf32b926e1389d}{00844}} \mbox{\hyperlink{lio__main_8c_a790cffd3823803623bbf32b926e1389d}{lio\_get\_other\_octeon\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00845}00845 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00846}00846         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *other\_oct;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00847}00847 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00848}00848         other\_oct = \mbox{\hyperlink{lio__device_8c_ab6f265f5a5b9dfee70db2c4460a9d538}{lio\_get\_device}}(oct-\/>\mbox{\hyperlink{structocteon__device_a6574a7bba62b9a35337dfe332ac83799}{octeon\_id}} + 1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00849}00849 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00850}00850         \textcolor{keywordflow}{if} ((other\_oct != NULL) \&\& other\_oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00851}00851                 \textcolor{keywordtype}{int}     oct\_busnum, other\_oct\_busnum;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00852}00852 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00853}00853                 oct\_busnum = pci\_get\_bus(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00854}00854                 other\_oct\_busnum = pci\_get\_bus(other\_oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00855}00855 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00856}00856                 \textcolor{keywordflow}{if} (oct\_busnum == other\_oct\_busnum) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00857}00857                         \textcolor{keywordtype}{int}     oct\_slot, other\_oct\_slot;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00858}00858 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00859}00859                         oct\_slot = pci\_get\_slot(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00860}00860                         other\_oct\_slot = pci\_get\_slot(other\_oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00862}00862                         \textcolor{keywordflow}{if} (oct\_slot == other\_oct\_slot)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00863}00863                                 \textcolor{keywordflow}{return} (other\_oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00864}00864                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00865}00865         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00866}00866         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00867}00867 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00868}00868 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00869}00869 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00870}00870 \textcolor{comment}{ * \(\backslash\)brief Load firmware to device}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00871}00871 \textcolor{comment}{ * @param oct octeon device}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00872}00872 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00873}00873 \textcolor{comment}{ * Maps device to firmware filename, requests firmware, and downloads it}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00874}00874 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00875}00875 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00876}\mbox{\hyperlink{lio__main_8c_ae2a9fd9cd1393d27b106fe897d14a89c}{00876}} \mbox{\hyperlink{lio__main_8c_ae2a9fd9cd1393d27b106fe897d14a89c}{lio\_load\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00877}00877 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00878}00878         \textcolor{keyword}{const} \textcolor{keyword}{struct }firmware   *fw;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00879}00879         \textcolor{keywordtype}{char}    *tmp\_fw\_type = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00880}00880         \textcolor{keywordtype}{int}     ret = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00881}00881         \textcolor{keywordtype}{char}    fw\_name[\mbox{\hyperlink{lio__image_8h_aacea370d41a172a6f1259a64292df674}{LIO\_MAX\_FW\_FILENAME\_LEN}}];}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00882}00882 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00883}00883         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_a0ed528be05d7ba6b80dfc8368f755d1b}{fw\_type}}[0] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00884}00884                 tmp\_fw\_type = \mbox{\hyperlink{lio__image_8h_a5c8d1e8ed68aaf89c4b5daf42f903e38}{LIO\_FW\_NAME\_TYPE\_NIC}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00885}00885         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00886}00886                 tmp\_fw\_type = \mbox{\hyperlink{lio__main_8c_a0ed528be05d7ba6b80dfc8368f755d1b}{fw\_type}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00887}00887 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00888}00888         sprintf(fw\_name, \textcolor{stringliteral}{"{}\%s\%s\_\%s\%s"{}}, \mbox{\hyperlink{lio__image_8h_ae1e3e032fdee3ec1224762e2b1469688}{LIO\_FW\_BASE\_NAME}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00889}00889                 \mbox{\hyperlink{lio__device_8c_a8f946cabd046605ba62dbc2dd068b075}{lio\_get\_conf}}(oct)-\/>card\_name, tmp\_fw\_type, \mbox{\hyperlink{lio__image_8h_ad0d86106adda1cb7ac4086b750b9acc0}{LIO\_FW\_NAME\_SUFFIX}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00890}00890 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00891}00891         fw = firmware\_get(fw\_name);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00892}00892         \textcolor{keywordflow}{if} (fw == NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00893}00893                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}Request firmware failed. Could not find file \%s.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00894}00894                             fw\_name);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00895}00895                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00896}00896         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00897}00897 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00898}00898         ret = \mbox{\hyperlink{lio__console_8c_ac0683f2249537b8e2e3153732f7c5fb9}{lio\_download\_firmware}}(oct, fw-\/>data, fw-\/>datasize);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00899}00899 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00900}00900         firmware\_put(fw, FIRMWARE\_UNLOAD);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00901}00901 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00902}00902         \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00903}00903 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00904}00904 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00905}00905 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00906}\mbox{\hyperlink{lio__main_8c_adde549dbb61572058eb2f099be770801}{00906}} \mbox{\hyperlink{lio__main_8c_adde549dbb61572058eb2f099be770801}{lio\_nic\_starter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00907}00907 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00908}00908         \textcolor{keywordtype}{int}     ret = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00909}00909 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00910}00910         atomic\_store\_rel\_int(\&oct-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_a9680c4e9ce767a2c48ed34111b244448}{LIO\_DEV\_RUNNING}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00911}00911 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00912}00912         \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_af5cd4924859965154259579d74739ee6}{app\_mode}} \&\& oct-\/>\mbox{\hyperlink{structocteon__device_af5cd4924859965154259579d74739ee6}{app\_mode}} == \mbox{\hyperlink{lio__common_8h_a878b59df91589ae9cf2ab70e6ca77a3f}{LIO\_DRV\_NIC\_APP}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00913}00913                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_a80e5d766df3148922d47c88d94fdf3bb}{lio\_init\_nic\_module}}(oct)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00914}00914                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}NIC initialization failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00915}00915                         ret = -\/1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00916}00916 \textcolor{preprocessor}{\#ifdef CAVIUM\_ONiLY\_23XX\_VF}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00917}00917                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00918}00918                         \textcolor{keywordflow}{if} (octeon\_enable\_sriov(oct) < 0)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00919}00919                                 ret = -\/1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00920}00920 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00921}00921                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00922}00922         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00923}00923                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00924}00924                             \textcolor{stringliteral}{"{}Unexpected application running on NIC (\%d). Check firmware.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00925}00925                             oct-\/>\mbox{\hyperlink{structocteon__device_af5cd4924859965154259579d74739ee6}{app\_mode}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00926}00926                 ret = -\/1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00927}00927         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00928}00928 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00929}00929         \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00930}00930 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00931}00931 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00932}00932 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00933}\mbox{\hyperlink{lio__main_8c_a80e5d766df3148922d47c88d94fdf3bb}{00933}} \mbox{\hyperlink{lio__main_8c_a80e5d766df3148922d47c88d94fdf3bb}{lio\_init\_nic\_module}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00934}00934 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00935}00935         \textcolor{keywordtype}{int}     num\_nic\_ports = \mbox{\hyperlink{lio__config_8h_a54c4280856bf21b4ed3c3121b9f12750}{LIO\_GET\_NUM\_NIC\_PORTS\_CFG}}(\mbox{\hyperlink{lio__device_8c_a8f946cabd046605ba62dbc2dd068b075}{lio\_get\_conf}}(oct));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00936}00936         \textcolor{keywordtype}{int}     retval = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00937}00937 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00938}00938         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct, \textcolor{stringliteral}{"{}Initializing network interfaces\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00939}00939 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00940}00940         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00941}00941 \textcolor{comment}{         * only default iq and oq were initialized}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00942}00942 \textcolor{comment}{         * initialize the rest as well}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00943}00943 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00944}00944 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00945}00945         \textcolor{comment}{/* run port\_config command for each port */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00946}00946         oct-\/>\mbox{\hyperlink{structocteon__device_a01127f1cf3a4c5980e97c37b77ce4d36}{ifcount}} = num\_nic\_ports;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00947}00947 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00948}00948         bzero(\&oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__if__props}{lio\_if\_props}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00949}00949 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00950}00950         oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a714b40300e1b599c7d4cec238bf3a1f7}{gmxport}} = -\/1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00951}00951 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00952}00952         retval = \mbox{\hyperlink{lio__main_8c_a900d58dc4ec02ae3b259bc0565ea00d2}{lio\_setup\_nic\_devices}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00953}00953         \textcolor{keywordflow}{if} (retval) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00954}00954                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}Setup NIC devices failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00955}00955                 \textcolor{keywordflow}{goto} lio\_init\_failure;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00956}00956         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00957}00957 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00958}00958         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct, \textcolor{stringliteral}{"{}Network interfaces ready\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00959}00959 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00960}00960         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00962}00962 lio\_init\_failure:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00963}00963 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00964}00964         oct-\/>\mbox{\hyperlink{structocteon__device_a01127f1cf3a4c5980e97c37b77ce4d36}{ifcount}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00965}00965 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00966}00966         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00967}00967 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00968}00968 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00969}00969 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00970}\mbox{\hyperlink{lio__main_8c_a2831b234c612d4320a6d2cc2bbf8fb58}{00970}} \mbox{\hyperlink{lio__main_8c_a2831b234c612d4320a6d2cc2bbf8fb58}{lio\_ifmedia\_update}}(\textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00971}00971 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00972}00972         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00973}00973         \textcolor{keyword}{struct }ifmedia  *ifm;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00974}00974 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00975}00975         ifm = \&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00976}00976 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00977}00977         \textcolor{comment}{/* We only support Ethernet media type. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00978}00978         \textcolor{keywordflow}{if} (IFM\_TYPE(ifm-\/>ifm\_media) != IFM\_ETHER)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00979}00979                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00980}00980 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00981}00981         \textcolor{keywordflow}{switch} (IFM\_SUBTYPE(ifm-\/>ifm\_media)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00982}00982         \textcolor{keywordflow}{case} IFM\_AUTO:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00983}00983                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00984}00984         \textcolor{keywordflow}{case} IFM\_10G\_CX4:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00985}00985         \textcolor{keywordflow}{case} IFM\_10G\_SR:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00986}00986         \textcolor{keywordflow}{case} IFM\_10G\_T:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00987}00987         \textcolor{keywordflow}{case} IFM\_10G\_TWINAX:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00988}00988         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00989}00989                 \textcolor{comment}{/* We don't support changing the media type. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00990}00990                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}}, \textcolor{stringliteral}{"{}Invalid media type (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00991}00991                             IFM\_SUBTYPE(ifm-\/>ifm\_media));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00992}00992                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00993}00993         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00994}00994 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00995}00995         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00996}00996 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00997}00997 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00998}00998 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l00999}\mbox{\hyperlink{lio__main_8c_a5cb83d778624ecb76493f4d404a4d954}{00999}} \mbox{\hyperlink{lio__main_8c_a5cb83d778624ecb76493f4d404a4d954}{lio\_get\_media\_subtype}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01000}01000 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01001}01001 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01002}01002         \textcolor{keywordflow}{switch}(oct-\/>\mbox{\hyperlink{structocteon__device_a83fc25818638e088aff6f51ebe1ecc62}{subdevice\_id}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01003}01003         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a5c4051f3f2a09a42b950e0fca0dd0632}{LIO\_CN2350\_10G\_SUBDEVICE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01004}01004         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_abf88b43a9f08cbe7d9f191dcf050e494}{LIO\_CN2350\_10G\_SUBDEVICE1}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01005}01005         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a0b95357422043cb16d72a26d31f69ec9}{LIO\_CN2360\_10G\_SUBDEVICE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01006}01006                 \textcolor{keywordflow}{return} (IFM\_10G\_SR);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01007}01007 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01008}01008         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_afb4db2eef19e308c00af3c1e3ab5d8d8}{LIO\_CN2350\_25G\_SUBDEVICE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01009}01009         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a1bf802c2372a6a00f53ff99331ccae83}{LIO\_CN2360\_25G\_SUBDEVICE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01010}01010                 \textcolor{keywordflow}{return} (IFM\_25G\_SR);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01011}01011         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01012}01012 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01013}01013         \textcolor{keywordflow}{return} (IFM\_10G\_SR);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01014}01014 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01015}01015 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01016}01016 \textcolor{keyword}{static} uint64\_t}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01017}\mbox{\hyperlink{lio__main_8c_af41ccf74bd488d6da91eb06070f37c6b}{01017}} \mbox{\hyperlink{lio__main_8c_af41ccf74bd488d6da91eb06070f37c6b}{lio\_get\_baudrate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01018}01018 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01019}01019 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01020}01020         \textcolor{keywordflow}{switch}(oct-\/>\mbox{\hyperlink{structocteon__device_a83fc25818638e088aff6f51ebe1ecc62}{subdevice\_id}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01021}01021         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a5c4051f3f2a09a42b950e0fca0dd0632}{LIO\_CN2350\_10G\_SUBDEVICE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01022}01022         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_abf88b43a9f08cbe7d9f191dcf050e494}{LIO\_CN2350\_10G\_SUBDEVICE1}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01023}01023         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a0b95357422043cb16d72a26d31f69ec9}{LIO\_CN2360\_10G\_SUBDEVICE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01024}01024                 \textcolor{keywordflow}{return} (IF\_Gbps(10));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01025}01025 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01026}01026         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_afb4db2eef19e308c00af3c1e3ab5d8d8}{LIO\_CN2350\_25G\_SUBDEVICE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01027}01027         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a1bf802c2372a6a00f53ff99331ccae83}{LIO\_CN2360\_25G\_SUBDEVICE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01028}01028                 \textcolor{keywordflow}{return} (IF\_Gbps(25));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01029}01029         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01030}01030 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01031}01031         \textcolor{keywordflow}{return} (IF\_Gbps(10));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01032}01032 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01033}01033 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01034}01034 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01035}\mbox{\hyperlink{lio__main_8c_a052e966d4f8c9b156edfc66b0c89b60e}{01035}} \mbox{\hyperlink{lio__main_8c_a052e966d4f8c9b156edfc66b0c89b60e}{lio\_ifmedia\_status}}(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keyword}{struct} ifmediareq *ifmr)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01036}01036 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01037}01037         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01038}01038 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01039}01039         \textcolor{comment}{/* Report link down if the driver isn't running. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01040}01040         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{lio__network_8h_ac6a3028dc331940368b0383a9bf3f86b}{lio\_ifstate\_check}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_a6ee79fd2e38d1717a146513ac126fe4b}{LIO\_IFSTATE\_RUNNING}})) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01041}01041                 ifmr-\/>ifm\_active |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01042}01042                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01043}01043         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01044}01044 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01045}01045         \textcolor{comment}{/* Setup the default interface info. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01046}01046         ifmr-\/>ifm\_status = IFM\_AVALID;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01047}01047         ifmr-\/>ifm\_active = IFM\_ETHER;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01048}01048 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01049}01049         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_a4c66290c810d4bc3372d88e9dec84008}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01050}01050                 ifmr-\/>ifm\_status |= IFM\_ACTIVE;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01051}01051         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01052}01052                 ifmr-\/>ifm\_active |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01053}01053                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01054}01054         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01055}01055 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01056}01056         ifmr-\/>ifm\_active |= \mbox{\hyperlink{lio__main_8c_a5cb83d778624ecb76493f4d404a4d954}{lio\_get\_media\_subtype}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01057}01057 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01058}01058         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_a1920e0b04bf43fdf187061a6feb0f5de}{duplex}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01059}01059                 ifmr-\/>ifm\_active |= IFM\_FDX;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01060}01060         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01061}01061                 ifmr-\/>ifm\_active |= IFM\_HDX;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01062}01062 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01063}01063 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01064}01064 \textcolor{keyword}{static} uint64\_t}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01065}\mbox{\hyperlink{lio__main_8c_a3ca56f64e6efbcd4a9ea7565fdcbf31d}{01065}} \mbox{\hyperlink{lio__main_8c_a3ca56f64e6efbcd4a9ea7565fdcbf31d}{lio\_get\_counter}}(if\_t \mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}}, ift\_counter cnt)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01066}01066 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01067}01067         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01068}01068         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01069}01069         uint64\_t        counter = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01070}01070         \textcolor{keywordtype}{int}             i, q\_no;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01071}01071 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01072}01072         \textcolor{keywordflow}{switch} (cnt) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01073}01073         \textcolor{keywordflow}{case} IFCOUNTER\_IPACKETS:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01074}01074                 \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_a54c2f2f4558411f501e0f46dab998d52}{num\_oqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01075}01075                         q\_no = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[i].\mbox{\hyperlink{unionocteon__rxpciq_a212b7f61fb40d504ea084447f24eb221}{s}}.\mbox{\hyperlink{unionocteon__rxpciq_aeff0b5107876d3af385d339964d497dd}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01076}01076                         counter += oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[q\_no]-\/>\mbox{\hyperlink{structlio__droq_a8f9ff977aef838fdce6aee0d18286afb}{stats}}.\mbox{\hyperlink{structlio__droq__stats_a2e77254e863f3f28bc556c82ca981ec8}{rx\_pkts\_received}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01077}01077                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01078}01078                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01079}01079         \textcolor{keywordflow}{case} IFCOUNTER\_OPACKETS:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01080}01080                 \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_aa5139c7e09f7a8eca4676713d09b00e5}{num\_iqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01081}01081                         q\_no = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[i].\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01082}01082                         counter += oct-\/>\mbox{\hyperlink{structocteon__device_ad3b9d2c9e6e5c1f264886dcd3f373676}{instr\_queue}}[q\_no]-\/>\mbox{\hyperlink{structlio__instr__queue_ae643e92210d775f5ab51b3ea613abbad}{stats}}.\mbox{\hyperlink{structlio__iq__stats_a05b3db5300ff3030adcc8150a672cfda}{tx\_done}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01083}01083                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01084}01084                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01085}01085         \textcolor{keywordflow}{case} IFCOUNTER\_IBYTES:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01086}01086                 \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_a54c2f2f4558411f501e0f46dab998d52}{num\_oqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01087}01087                         q\_no = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[i].\mbox{\hyperlink{unionocteon__rxpciq_a212b7f61fb40d504ea084447f24eb221}{s}}.\mbox{\hyperlink{unionocteon__rxpciq_aeff0b5107876d3af385d339964d497dd}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01088}01088                         counter += oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[q\_no]-\/>\mbox{\hyperlink{structlio__droq_a8f9ff977aef838fdce6aee0d18286afb}{stats}}.\mbox{\hyperlink{structlio__droq__stats_a8013608358914a71ffd3ec49f62444d9}{rx\_bytes\_received}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01089}01089                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01090}01090                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01091}01091         \textcolor{keywordflow}{case} IFCOUNTER\_OBYTES:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01092}01092                 \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_aa5139c7e09f7a8eca4676713d09b00e5}{num\_iqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01093}01093                         q\_no = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[i].\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01094}01094                         counter += oct-\/>\mbox{\hyperlink{structocteon__device_ad3b9d2c9e6e5c1f264886dcd3f373676}{instr\_queue}}[q\_no]-\/>\mbox{\hyperlink{structlio__instr__queue_ae643e92210d775f5ab51b3ea613abbad}{stats}}.\mbox{\hyperlink{structlio__iq__stats_a6d899154a9db06c055c017201ff9938d}{tx\_tot\_bytes}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01095}01095                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01096}01096                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01097}01097         \textcolor{keywordflow}{case} IFCOUNTER\_IQDROPS:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01098}01098                 \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_a54c2f2f4558411f501e0f46dab998d52}{num\_oqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01099}01099                         q\_no = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[i].\mbox{\hyperlink{unionocteon__rxpciq_a212b7f61fb40d504ea084447f24eb221}{s}}.\mbox{\hyperlink{unionocteon__rxpciq_aeff0b5107876d3af385d339964d497dd}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01100}01100                         counter += oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[q\_no]-\/>\mbox{\hyperlink{structlio__droq_a8f9ff977aef838fdce6aee0d18286afb}{stats}}.\mbox{\hyperlink{structlio__droq__stats_a89626c4cc74275a654d2d52b9560cef7}{rx\_dropped}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01101}01101                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01102}01102                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01103}01103         \textcolor{keywordflow}{case} IFCOUNTER\_OQDROPS:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01104}01104                 \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_aa5139c7e09f7a8eca4676713d09b00e5}{num\_iqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01105}01105                         q\_no = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[i].\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01106}01106                         counter += oct-\/>\mbox{\hyperlink{structocteon__device_ad3b9d2c9e6e5c1f264886dcd3f373676}{instr\_queue}}[q\_no]-\/>\mbox{\hyperlink{structlio__instr__queue_ae643e92210d775f5ab51b3ea613abbad}{stats}}.\mbox{\hyperlink{structlio__iq__stats_af990b38eef526802f42c3578f22669ad}{tx\_dropped}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01107}01107                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01108}01108                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01109}01109         \textcolor{keywordflow}{case} IFCOUNTER\_IMCASTS:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01110}01110                 counter = oct-\/>\mbox{\hyperlink{structocteon__device_a54e6e663571ab7b368834ec840a899d1}{link\_stats}}.\mbox{\hyperlink{structocteon__link__stats_a2b07e153ac4858eaa6089ec462bb532c}{fromwire}}.\mbox{\hyperlink{structocteon__rx__stats_a9c440036b8224a090fb59a96f1e248c7}{total\_mcst}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01111}01111                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01112}01112         \textcolor{keywordflow}{case} IFCOUNTER\_OMCASTS:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01113}01113                 counter = oct-\/>\mbox{\hyperlink{structocteon__device_a54e6e663571ab7b368834ec840a899d1}{link\_stats}}.\mbox{\hyperlink{structocteon__link__stats_a4d896f6d091eabb3fbfb5e3c62596456}{fromhost}}.\mbox{\hyperlink{structocteon__tx__stats_ab45dbf5b925b63946ef18544bfc36365}{mcast\_pkts\_sent}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01114}01114                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01115}01115         \textcolor{keywordflow}{case} IFCOUNTER\_COLLISIONS:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01116}01116                 counter = oct-\/>\mbox{\hyperlink{structocteon__device_a54e6e663571ab7b368834ec840a899d1}{link\_stats}}.\mbox{\hyperlink{structocteon__link__stats_a4d896f6d091eabb3fbfb5e3c62596456}{fromhost}}.\mbox{\hyperlink{structocteon__tx__stats_a432de8f8f2a24f288c108cb03c822a51}{total\_collisions}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01117}01117                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01118}01118         \textcolor{keywordflow}{case} IFCOUNTER\_IERRORS:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01119}01119                 counter = oct-\/>\mbox{\hyperlink{structocteon__device_a54e6e663571ab7b368834ec840a899d1}{link\_stats}}.\mbox{\hyperlink{structocteon__link__stats_a2b07e153ac4858eaa6089ec462bb532c}{fromwire}}.\mbox{\hyperlink{structocteon__rx__stats_a6bb3f6625e04c86dcb9e4879a1f7ab8c}{fcs\_err}} +}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01120}01120                     oct-\/>\mbox{\hyperlink{structocteon__device_a54e6e663571ab7b368834ec840a899d1}{link\_stats}}.\mbox{\hyperlink{structocteon__link__stats_a2b07e153ac4858eaa6089ec462bb532c}{fromwire}}.\mbox{\hyperlink{structocteon__rx__stats_a2d5a11c3f142a49c63c48d2653f3c8f9}{l2\_err}} +}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01121}01121                     oct-\/>\mbox{\hyperlink{structocteon__device_a54e6e663571ab7b368834ec840a899d1}{link\_stats}}.\mbox{\hyperlink{structocteon__link__stats_a2b07e153ac4858eaa6089ec462bb532c}{fromwire}}.\mbox{\hyperlink{structocteon__rx__stats_a0889ba3048c9624f6c18449a40776668}{frame\_err}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01122}01122                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01123}01123         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01124}01124                 \textcolor{keywordflow}{return} (if\_get\_counter\_default(ifp, cnt));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01125}01125         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01126}01126 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01127}01127         \textcolor{keywordflow}{return} (counter);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01128}01128 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01129}01129 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01130}01130 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01131}\mbox{\hyperlink{lio__main_8c_a93cb50c4db24d90381b8305d0a8cc3ab}{01131}} \mbox{\hyperlink{lio__main_8c_a93cb50c4db24d90381b8305d0a8cc3ab}{lio\_init\_ifnet}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01132}01132 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01133}01133         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01134}01134         if\_t ifp = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01135}01135 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01136}01136         \textcolor{comment}{/* ifconfig entrypoint for media type/status reporting */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01137}01137         ifmedia\_init(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}}, IFM\_IMASK, \mbox{\hyperlink{lio__main_8c_a2831b234c612d4320a6d2cc2bbf8fb58}{lio\_ifmedia\_update}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01138}01138                      \mbox{\hyperlink{lio__main_8c_a052e966d4f8c9b156edfc66b0c89b60e}{lio\_ifmedia\_status}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01139}01139 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01140}01140         \textcolor{comment}{/* set the default interface values */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01141}01141         ifmedia\_add(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01142}01142                     (IFM\_ETHER | IFM\_FDX | \mbox{\hyperlink{lio__main_8c_a5cb83d778624ecb76493f4d404a4d954}{lio\_get\_media\_subtype}}(oct)),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01143}01143                     0, NULL);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01144}01144         ifmedia\_add(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}}, (IFM\_ETHER | IFM\_AUTO), 0, NULL);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01145}01145         ifmedia\_set(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}}, (IFM\_ETHER | IFM\_AUTO));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01146}01146 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01147}01147         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}}.ifm\_media = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}}.ifm\_cur-\/>ifm\_media;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01148}01148         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct, \textcolor{stringliteral}{"{}IFMEDIA flags : \%x\(\backslash\)n"{}}, \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa8e7e23eb5e79aba33841336c56f1901}{ifmedia}}.ifm\_media);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01149}01149 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01150}01150         if\_initname(ifp, device\_get\_name(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01151}01151                     device\_get\_unit(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01152}01152         if\_setflags(ifp, (IFF\_BROADCAST | IFF\_SIMPLEX | IFF\_MULTICAST));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01153}01153         if\_setioctlfn(ifp, \mbox{\hyperlink{lio__ioctl_8c_ae00ae2395f23c76ccf55502fd7350693}{lio\_ioctl}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01154}01154         if\_setgetcounterfn(ifp, \mbox{\hyperlink{lio__main_8c_a3ca56f64e6efbcd4a9ea7565fdcbf31d}{lio\_get\_counter}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01155}01155         if\_settransmitfn(ifp, \mbox{\hyperlink{lio__rxtx_8c_a9df63599d6f995462dca5a547fd2dbd6}{lio\_mq\_start}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01156}01156         if\_setqflushfn(ifp, \mbox{\hyperlink{lio__rxtx_8c_a05d8ae514c414dd15157920756336af0}{lio\_qflush}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01157}01157         if\_setinitfn(ifp, \mbox{\hyperlink{lio__main_8c_ab265f93e7d9b385e555cf74fff1f335c}{lio\_open}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01158}01158         if\_setmtu(ifp, \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_a3feaa805dbbf307ae3db2c88f16a6143}{mtu}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01159}01159         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a2c9f94ccb0cc0cf6c75af8d35e604ef4}{mtu}} = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_a3feaa805dbbf307ae3db2c88f16a6143}{mtu}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01160}01160         if\_sethwassist(ifp, (CSUM\_IP | CSUM\_TCP | CSUM\_UDP | CSUM\_TSO |}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01161}01161                              CSUM\_TCP\_IPV6 | CSUM\_UDP\_IPV6));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01162}01162 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01163}01163         if\_setcapabilitiesbit(ifp, (IFCAP\_HWCSUM | IFCAP\_HWCSUM\_IPV6 |}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01164}01164                                     IFCAP\_TSO | IFCAP\_LRO |}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01165}01165                                     IFCAP\_JUMBO\_MTU | IFCAP\_HWSTATS |}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01166}01166                                     IFCAP\_LINKSTATE | IFCAP\_VLAN\_HWFILTER |}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01167}01167                                     IFCAP\_VLAN\_HWCSUM | IFCAP\_VLAN\_HWTAGGING |}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01168}01168                                     IFCAP\_VLAN\_HWTSO | IFCAP\_VLAN\_MTU), 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01169}01169 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01170}01170         if\_setcapenable(ifp, if\_getcapabilities(ifp));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01171}01171         if\_setbaudrate(ifp, \mbox{\hyperlink{lio__main_8c_af41ccf74bd488d6da91eb06070f37c6b}{lio\_get\_baudrate}}(oct));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01172}01172 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01173}01173         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01174}01174 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01175}01175 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01176}01176 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01177}\mbox{\hyperlink{lio__main_8c_a623199430723a62211f873d1b652eb86}{01177}} \mbox{\hyperlink{lio__main_8c_a623199430723a62211f873d1b652eb86}{lio\_tcp\_lro\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *octeon\_dev, \textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01178}01178 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01179}01179         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01180}01180         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq}{lio\_droq}} *droq;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01181}01181         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structlio__droq_a47165d09beab28fd12aff1d79cfb3cab}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01182}01182         \textcolor{keywordtype}{int}             i;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01183}01183 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01184}01184         \textcolor{keywordflow}{for} (i = 0; i < octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a54c2f2f4558411f501e0f46dab998d52}{num\_oqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01185}01185                 \mbox{\hyperlink{structlio__droq_a47165d09beab28fd12aff1d79cfb3cab}{q\_no}} = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[i].\mbox{\hyperlink{unionocteon__rxpciq_a212b7f61fb40d504ea084447f24eb221}{s}}.\mbox{\hyperlink{unionocteon__rxpciq_aeff0b5107876d3af385d339964d497dd}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01186}01186                 droq = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[\mbox{\hyperlink{structlio__droq_a47165d09beab28fd12aff1d79cfb3cab}{q\_no}}];}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01187}01187                 \textcolor{keywordflow}{if} (droq-\/>\mbox{\hyperlink{structlio__droq_a2266e708f7d9e8f9f72222d392e2ade8}{lro}}.ifp) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01188}01188                         tcp\_lro\_free(\&droq-\/>\mbox{\hyperlink{structlio__droq_a2266e708f7d9e8f9f72222d392e2ade8}{lro}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01189}01189                         droq-\/>\mbox{\hyperlink{structlio__droq_a2266e708f7d9e8f9f72222d392e2ade8}{lro}}.ifp = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01190}01190                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01191}01191         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01192}01192 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01193}01193 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01194}01194 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01195}\mbox{\hyperlink{lio__main_8c_ad7bc11f0deaddcaf2b49b305f81243ed}{01195}} \mbox{\hyperlink{lio__main_8c_ad7bc11f0deaddcaf2b49b305f81243ed}{lio\_tcp\_lro\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *octeon\_dev, \textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01196}01196 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01197}01197         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01198}01198         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq}{lio\_droq}} *droq;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01199}01199         \textcolor{keyword}{struct }lro\_ctrl *lro;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01200}01200         \textcolor{keywordtype}{int}             i, q\_no, ret = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01201}01201 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01202}01202         \textcolor{keywordflow}{for} (i = 0; i < octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a54c2f2f4558411f501e0f46dab998d52}{num\_oqs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01203}01203                 q\_no = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[i].\mbox{\hyperlink{unionocteon__rxpciq_a212b7f61fb40d504ea084447f24eb221}{s}}.\mbox{\hyperlink{unionocteon__rxpciq_aeff0b5107876d3af385d339964d497dd}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01204}01204                 droq = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[q\_no];}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01205}01205                 lro = \&droq-\/>\mbox{\hyperlink{structlio__droq_a2266e708f7d9e8f9f72222d392e2ade8}{lro}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01206}01206                 ret = tcp\_lro\_init(lro);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01207}01207                 \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01208}01208                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}LRO Initialization failed ret \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01209}01209                                     ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01210}01210                         \textcolor{keywordflow}{goto} lro\_init\_failed;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01211}01211                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01212}01212 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01213}01213                 lro-\/>ifp = ifp;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01214}01214         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01215}01215 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01216}01216         \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01217}01217 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01218}01218 lro\_init\_failed:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01219}01219         \mbox{\hyperlink{lio__main_8c_a623199430723a62211f873d1b652eb86}{lio\_tcp\_lro\_free}}(octeon\_dev, ifp);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01220}01220 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01221}01221         \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01222}01222 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01223}01223 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01224}01224 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01225}\mbox{\hyperlink{lio__main_8c_a900d58dc4ec02ae3b259bc0565ea00d2}{01225}} \mbox{\hyperlink{lio__main_8c_a900d58dc4ec02ae3b259bc0565ea00d2}{lio\_setup\_nic\_devices}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *octeon\_dev)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01226}01226 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01227}01227         \textcolor{keyword}{union           }\mbox{\hyperlink{unionocteon__if__cfg}{octeon\_if\_cfg}} if\_cfg;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01228}01228         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01229}01229         \textcolor{keyword}{struct }ifnet    *ifp = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01230}01230         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__version}{lio\_version}}           *vdata;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01231}01231         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__soft__command}{lio\_soft\_command}}         *sc;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01232}01232         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__context}{lio\_if\_cfg\_context}}     *ctx;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01233}01233         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__resp}{lio\_if\_cfg\_resp}}           *resp;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01234}01234         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__props}{lio\_if\_props}}         *props;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01235}01235         \textcolor{keywordtype}{int}             num\_iqueues, num\_oqueues, retval;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01236}01236         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int}    base\_queue;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01237}01237         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int}    gmx\_port\_id;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01238}01238         uint32\_t        ctx\_size, data\_size;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01239}01239         uint32\_t        ifidx\_or\_pfnum, resp\_size;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01240}01240         uint8\_t         mac[ETHER\_HDR\_LEN], i, j;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01241}01241 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01242}01242         \textcolor{comment}{/* This is to handle link status changes */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01243}01243         \mbox{\hyperlink{lio__device_8c_aab7e4b1f30fb3151911652a4ff9a3914}{lio\_register\_dispatch\_fn}}(octeon\_dev, \mbox{\hyperlink{lio__common_8h_a33e94e4d8a48c4f8fcca7f71a4f622c3}{LIO\_OPCODE\_NIC}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01244}01244                                  \mbox{\hyperlink{lio__common_8h_a67dd2db1b4d0010770e818fd46893073}{LIO\_OPCODE\_NIC\_INFO}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01245}01245                                  \mbox{\hyperlink{lio__main_8c_a05b8d53e3c501d7b8cf693f37b016abc}{lio\_link\_info}}, octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01246}01246 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01247}01247         \textcolor{keywordflow}{for} (i = 0; i < octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a01127f1cf3a4c5980e97c37b77ce4d36}{ifcount}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01248}01248                 resp\_size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__resp}{lio\_if\_cfg\_resp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01249}01249                 ctx\_size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__context}{lio\_if\_cfg\_context}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01250}01250                 data\_size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__version}{lio\_version}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01251}01251                 sc = \mbox{\hyperlink{lio__iq_8h_add1cd4d610e5132e206f17aa347c6116}{lio\_alloc\_soft\_command}}(octeon\_dev, data\_size, resp\_size,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01252}01252                                             ctx\_size);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01253}01253                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01254}01254                         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01255}01255 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01256}01256                 resp = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__resp}{lio\_if\_cfg\_resp}} *)sc-\/>\mbox{\hyperlink{structlio__soft__command_aacfcbb9eb30a919cbc55077f21490974}{virtrptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01257}01257                 ctx = (\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__if__cfg__context}{lio\_if\_cfg\_context}} *)sc-\/>\mbox{\hyperlink{structlio__soft__command_a288d7c6ce348f6c917681748ebf432fd}{ctxptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01258}01258                 vdata = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__version}{lio\_version}} *)sc-\/>\mbox{\hyperlink{structlio__soft__command_acaf5313ed39db3b404d471eb73a6494d}{virtdptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01259}01259 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01260}01260                 *((uint64\_t *)vdata) = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01261}01261                 vdata-\/>\mbox{\hyperlink{structlio__version_ab27ab721cc9eaea494be27b2f256c64a}{major}} = htobe16(\mbox{\hyperlink{lio__common_8h_af157203ae43b90d0255d2fd5f5ca41ce}{LIO\_BASE\_MAJOR\_VERSION}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01262}01262                 vdata-\/>\mbox{\hyperlink{structlio__version_a280dbd3551c42804feb65818a4b8873a}{minor}} = htobe16(\mbox{\hyperlink{lio__common_8h_a6dd214069950075ae417eb683c4baaf9}{LIO\_BASE\_MINOR\_VERSION}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01263}01263                 vdata-\/>\mbox{\hyperlink{structlio__version_a6c4f65d8eb598eb6dd23a3016a052379}{micro}} = htobe16(\mbox{\hyperlink{lio__common_8h_ad1b73dee9a09b6071e6233de91fa4b49}{LIO\_BASE\_MICRO\_VERSION}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01264}01264 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01265}01265                 num\_iqueues = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a54dd68ea6c9623dab80a21f9deeda571}{sriov\_info}}.\mbox{\hyperlink{structlio__sriov__info_ae4a5b1c4e3e62c91c93ca32baf20cf5a}{num\_pf\_rings}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01266}01266                 num\_oqueues = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a54dd68ea6c9623dab80a21f9deeda571}{sriov\_info}}.\mbox{\hyperlink{structlio__sriov__info_ae4a5b1c4e3e62c91c93ca32baf20cf5a}{num\_pf\_rings}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01267}01267                 base\_queue = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a54dd68ea6c9623dab80a21f9deeda571}{sriov\_info}}.\mbox{\hyperlink{structlio__sriov__info_a495ebffae50502fa2b49e4f0ef21145a}{pf\_srn}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01268}01268 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01269}01269                 gmx\_port\_id = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_ae82b8a6df1dae1751fc3053a563dbec0}{pf\_num}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01270}01270                 ifidx\_or\_pfnum = octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_ae82b8a6df1dae1751fc3053a563dbec0}{pf\_num}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01272}01272                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(octeon\_dev, \textcolor{stringliteral}{"{}requesting config for interface \%d, iqs \%d, oqs \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01273}01273                             ifidx\_or\_pfnum, num\_iqueues, num\_oqueues);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01274}01274                 ctx-\/>\mbox{\hyperlink{structlio__if__cfg__context_a8e7cacc99b0518f1431e4ba2540e1833}{cond}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01275}01275                 ctx-\/>\mbox{\hyperlink{structlio__if__cfg__context_a1dddda8b7135ac578b2a8dd08faa0ad7}{octeon\_id}} = \mbox{\hyperlink{lio__device_8c_abccac796328628e806a42dd0cf14cdb2}{lio\_get\_device\_id}}(octeon\_dev);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01276}01276 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01277}01277                 if\_cfg.\mbox{\hyperlink{unionocteon__if__cfg_a8fa16eb8fc1f276395a6b0fb67138fa2}{if\_cfg64}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01278}01278                 if\_cfg.\mbox{\hyperlink{unionocteon__if__cfg_a8d869f383d3dccf931abeecc3eb8fe54}{s}}.\mbox{\hyperlink{unionocteon__if__cfg_adae888f8693f18805440b7337762992e}{num\_iqueues}} = num\_iqueues;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01279}01279                 if\_cfg.\mbox{\hyperlink{unionocteon__if__cfg_a8d869f383d3dccf931abeecc3eb8fe54}{s}}.\mbox{\hyperlink{unionocteon__if__cfg_a3190e05b2591d4c2c7c4b8648ddca705}{num\_oqueues}} = num\_oqueues;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01280}01280                 if\_cfg.\mbox{\hyperlink{unionocteon__if__cfg_a8d869f383d3dccf931abeecc3eb8fe54}{s}}.\mbox{\hyperlink{unionocteon__if__cfg_ac0c5f1c7bd0ddd414a43f386a387d47a}{base\_queue}} = base\_queue;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01281}01281                 if\_cfg.\mbox{\hyperlink{unionocteon__if__cfg_a8d869f383d3dccf931abeecc3eb8fe54}{s}}.\mbox{\hyperlink{unionocteon__if__cfg_a557e0023b5b4385003a4a0f3bd9c9cfb}{gmx\_port\_id}} = gmx\_port\_id;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01282}01282 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01283}01283                 sc-\/>\mbox{\hyperlink{structlio__soft__command_ad15512a7fe14de8f48679ea491ceef6d}{iq\_no}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01284}01284 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01285}01285                 \mbox{\hyperlink{lio__iq_8h_a6bd987af0b5107ea95f63de23cb68cda}{lio\_prepare\_soft\_command}}(octeon\_dev, sc, \mbox{\hyperlink{lio__common_8h_a33e94e4d8a48c4f8fcca7f71a4f622c3}{LIO\_OPCODE\_NIC}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01286}01286                                          \mbox{\hyperlink{lio__common_8h_ab3e3663dbc3b78986a83cd22ac8a3caf}{LIO\_OPCODE\_NIC\_IF\_CFG}}, 0,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01287}01287                                          if\_cfg.\mbox{\hyperlink{unionocteon__if__cfg_a8fa16eb8fc1f276395a6b0fb67138fa2}{if\_cfg64}}, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01288}01288 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01289}01289                 sc-\/>\mbox{\hyperlink{structlio__soft__command_a912a296891fe84dc401a7219a8847063}{callback}} = \mbox{\hyperlink{lio__main_8c_ab0f96ee99fb22f99947299e5d72952a6}{lio\_if\_cfg\_callback}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01290}01290                 sc-\/>\mbox{\hyperlink{structlio__soft__command_a998df93b613de98f6a4f5f47ac72f64a}{callback\_arg}} = sc;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01291}01291                 sc-\/>\mbox{\hyperlink{structlio__soft__command_a8e77d97141a049d956998e5bc28bc90d}{wait\_time}} = 3000;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01292}01292 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01293}01293                 retval = \mbox{\hyperlink{lio__iq_8h_a208aa2e8ecfdc37f4f3f961afd44c264}{lio\_send\_soft\_command}}(octeon\_dev, sc);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01294}01294                 \textcolor{keywordflow}{if} (retval == \mbox{\hyperlink{lio__iq_8h_a7a8baba01e32a87bd344a3ec2c8f703a}{LIO\_IQ\_SEND\_FAILED}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01295}01295                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}iq/oq config failed status: \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01296}01296                                     retval);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01297}01297                         \textcolor{comment}{/* Soft instr is freed by driver in case of failure. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01298}01298                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01299}01299                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01300}01300 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01301}01301                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01302}01302 \textcolor{comment}{                 * Sleep on a wait queue till the cond flag indicates that the}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01303}01303 \textcolor{comment}{                 * response arrived or timed-\/out.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01304}01304 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01305}01305                 \mbox{\hyperlink{lio__main_8h_ac82f1f60442fef9cf0258d63ff64cafe}{lio\_sleep\_cond}}(octeon\_dev, \&ctx-\/>\mbox{\hyperlink{structlio__if__cfg__context_a8e7cacc99b0518f1431e4ba2540e1833}{cond}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01306}01306 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01307}01307                 retval = resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_acf03f3ea82bd6eaa8fae56e15b831f26}{status}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01308}01308                 \textcolor{keywordflow}{if} (retval) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01309}01309                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}iq/oq config failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01310}01310                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01311}01311                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01312}01312 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01313}01313                 \mbox{\hyperlink{lio__main_8h_ab294e8e0e748bf0d78f5c1c0283a79cf}{lio\_swap\_8B\_data}}((uint64\_t *)(\&resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01314}01314                                  (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__if__cfg__info}{octeon\_if\_cfg\_info}})) >> 3);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01315}01315 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01316}01316                 num\_iqueues = bitcount64(resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_ab796c7cd502f8277c2f8a6d343b8dd8a}{iqmask}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01317}01317                 num\_oqueues = bitcount64(resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_aa8b1025f496ffb93af634174ad954c2d}{oqmask}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01318}01318 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01319}01319                 \textcolor{keywordflow}{if} (!(num\_iqueues) || !(num\_oqueues)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01320}01320                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01321}01321                                     \textcolor{stringliteral}{"{}Got bad iqueues (\%016llX) or oqueues (\%016llX) from firmware.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01322}01322                                     \mbox{\hyperlink{lio__main_8h_ae67a87eb5deeb31e550aa38dfa869505}{LIO\_CAST64}}(resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_ab796c7cd502f8277c2f8a6d343b8dd8a}{iqmask}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01323}01323                                     \mbox{\hyperlink{lio__main_8h_ae67a87eb5deeb31e550aa38dfa869505}{LIO\_CAST64}}(resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_aa8b1025f496ffb93af634174ad954c2d}{oqmask}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01324}01324                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01325}01325                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01326}01326 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01327}01327                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(octeon\_dev,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01328}01328                             \textcolor{stringliteral}{"{}interface \%d, iqmask \%016llx, oqmask \%016llx, numiqueues \%d, numoqueues \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01329}01329                             i, \mbox{\hyperlink{lio__main_8h_ae67a87eb5deeb31e550aa38dfa869505}{LIO\_CAST64}}(resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_ab796c7cd502f8277c2f8a6d343b8dd8a}{iqmask}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01330}01330                             \mbox{\hyperlink{lio__main_8h_ae67a87eb5deeb31e550aa38dfa869505}{LIO\_CAST64}}(resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_aa8b1025f496ffb93af634174ad954c2d}{oqmask}}),}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01331}01331                             num\_iqueues, num\_oqueues);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01332}01332 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01333}01333                 ifp = if\_alloc(IFT\_ETHER);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01334}01334 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01335}01335                 \textcolor{keywordflow}{if} (ifp == NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01336}01336                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Device allocation failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01337}01337                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01338}01338                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01339}01339 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01340}01340                 \mbox{\hyperlink{structlio}{lio}} = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}}), M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01341}01341 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01342}01342                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01343}01343                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Lio allocation failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01344}01344                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01345}01345                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01346}01346 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01347}01347                 if\_setsoftc(ifp, \mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01348}01348 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01349}01349                 ifp-\/>if\_hw\_tsomax = \mbox{\hyperlink{lio__network_8h_a80dbb8efd4292df7a28ca518495ede67}{LIO\_MAX\_FRAME\_SIZE}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01350}01350                 ifp-\/>if\_hw\_tsomaxsegcount = \mbox{\hyperlink{lio__network_8h_aa52cb75819e079f0cc21d14f42af60b0}{LIO\_MAX\_SG}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01351}01351                 ifp-\/>if\_hw\_tsomaxsegsize = PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01352}01352 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01353}01353                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a988e8b0d44ce15294b8d3189e649559f}{ifidx}} = ifidx\_or\_pfnum;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01354}01354 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01355}01355                 props = \&octeon\_dev-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01356}01356                 props-\/>\mbox{\hyperlink{structlio__if__props_a714b40300e1b599c7d4cec238bf3a1f7}{gmxport}} = resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_a7f13f2baceecda218831edb7cd572bc2}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a17ef4397fa6ac0a593e616902e0fb01a}{gmxport}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01357}01357                 props-\/>\mbox{\hyperlink{structlio__if__props_a66039d2909b1fbff45e0898d81d515c9}{ifp}} = ifp;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01358}01358 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01359}01359                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_aa9059a24880cf5dcf0838b3bb79c70e3}{num\_rxpciq}} = num\_oqueues;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01360}01360                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_aefa205dfa726bd948f643aa553846f68}{num\_txpciq}} = num\_iqueues;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01361}01361                 \textcolor{keywordflow}{for} (j = 0; j < num\_oqueues; j++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01362}01362                         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[j].\mbox{\hyperlink{unionocteon__rxpciq_a79960da444ff0f68bb1bce190e9381cf}{rxpciq64}} =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01363}01363                             resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_a7f13f2baceecda218831edb7cd572bc2}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[j].\mbox{\hyperlink{unionocteon__rxpciq_a79960da444ff0f68bb1bce190e9381cf}{rxpciq64}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01364}01364                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01365}01365 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01366}01366                 \textcolor{keywordflow}{for} (j = 0; j < num\_iqueues; j++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01367}01367                         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[j].\mbox{\hyperlink{unionocteon__txpciq_a250f69b890af54dabd4195fc0c9663b4}{txpciq64}} =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01368}01368                             resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_a7f13f2baceecda218831edb7cd572bc2}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[j].\mbox{\hyperlink{unionocteon__txpciq_a250f69b890af54dabd4195fc0c9663b4}{txpciq64}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01369}01369                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01370}01370 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01371}01371                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a16254b8f1d571201181c412795cc33a5}{hw\_addr}} = resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_a7f13f2baceecda218831edb7cd572bc2}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a16254b8f1d571201181c412795cc33a5}{hw\_addr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01372}01372                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a17ef4397fa6ac0a593e616902e0fb01a}{gmxport}} = resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_a7f13f2baceecda218831edb7cd572bc2}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a17ef4397fa6ac0a593e616902e0fb01a}{gmxport}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01373}01373                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_add33c399b34003438f4a0ce4545f61ec}{link\_status64}} =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01374}01374                     resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_a7f13f2baceecda218831edb7cd572bc2}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_add33c399b34003438f4a0ce4545f61ec}{link\_status64}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01375}01375 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01376}01376                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01377}01377 \textcolor{comment}{                 * Point to the properties for octeon device to which this}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01378}01378 \textcolor{comment}{                 * interface belongs.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01379}01379 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01380}01380                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}} = octeon\_dev;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01381}01381                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}} = ifp;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01382}01382 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01383}01383                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(octeon\_dev, \textcolor{stringliteral}{"{}if\%d gmx: \%d hw\_addr: 0x\%llx\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01384}01384                             \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a17ef4397fa6ac0a593e616902e0fb01a}{gmxport}}, \mbox{\hyperlink{lio__main_8h_ae67a87eb5deeb31e550aa38dfa869505}{LIO\_CAST64}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a16254b8f1d571201181c412795cc33a5}{hw\_addr}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01385}01385                 \mbox{\hyperlink{lio__main_8c_a93cb50c4db24d90381b8305d0a8cc3ab}{lio\_init\_ifnet}}(\mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01386}01386                 \textcolor{comment}{/* 64-\/bit swap required on LE machines */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01387}01387                 \mbox{\hyperlink{lio__main_8h_ab294e8e0e748bf0d78f5c1c0283a79cf}{lio\_swap\_8B\_data}}(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a16254b8f1d571201181c412795cc33a5}{hw\_addr}}, 1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01388}01388                 \textcolor{keywordflow}{for} (j = 0; j < 6; j++)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01389}01389                         mac[j] = *((uint8\_t *)(}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01390}01390                                    ((uint8\_t *)\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a16254b8f1d571201181c412795cc33a5}{hw\_addr}}) + 2 + j));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01391}01391 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01392}01392                 ether\_ifattach(ifp, mac);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01393}01393 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01394}01394                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01395}01395 \textcolor{comment}{                 * By default all interfaces on a single Octeon uses the same}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01396}01396 \textcolor{comment}{                 * tx and rx queues}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01397}01397 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01398}01398                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a167bcc91feaa2154088544822fe28d37}{txq}} = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[0].\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01399}01399                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac9b8beb05358cc8bcd9043f50da63331}{rxq}} = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[0].\mbox{\hyperlink{unionocteon__rxpciq_a212b7f61fb40d504ea084447f24eb221}{s}}.\mbox{\hyperlink{unionocteon__rxpciq_aeff0b5107876d3af385d339964d497dd}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01400}01400                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__core_8c_ac8c224a0db68dcfda14f740e86a1c079}{lio\_setup\_io\_queues}}(octeon\_dev, i, \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_aefa205dfa726bd948f643aa553846f68}{num\_txpciq}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01401}01401                                         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_aa9059a24880cf5dcf0838b3bb79c70e3}{num\_rxpciq}})) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01402}01402                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}I/O queues creation failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01403}01403                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01404}01404                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01405}01405 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01406}01406                 \mbox{\hyperlink{lio__network_8h_add3a071d097526119fa36f329ea32f5c}{lio\_ifstate\_set}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_a1ab627a43da1be66308d19c96c8aae9b}{LIO\_IFSTATE\_DROQ\_OPS}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01407}01407 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01408}01408                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a83c4750aaf78010ae572206bfcb6d7bd}{tx\_qsize}} = \mbox{\hyperlink{lio__device_8c_ae4eb3f55bd647e4369d6ea1f0e7b4c72}{lio\_get\_tx\_qsize}}(octeon\_dev, \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a167bcc91feaa2154088544822fe28d37}{txq}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01409}01409                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_af20ee297c86cab551b7c4f449fce8529}{rx\_qsize}} = \mbox{\hyperlink{lio__device_8c_ad6e7cf90aa67dc54c19201deac9a6623}{lio\_get\_rx\_qsize}}(octeon\_dev, \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac9b8beb05358cc8bcd9043f50da63331}{rxq}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01410}01410 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01411}01411                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_a70bb551396d7e5cae801f34905b0df18}{lio\_setup\_glists}}(octeon\_dev, \mbox{\hyperlink{structlio}{lio}}, num\_iqueues)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01412}01412                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}Gather list allocation failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01413}01413                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01414}01414                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01415}01415 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01416}01416                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{lio__main_8c_a17f570aaf869da2cc2a06e75a1d8bd41}{lio\_hwlro}} == 0) \&\& \mbox{\hyperlink{lio__main_8c_ad7bc11f0deaddcaf2b49b305f81243ed}{lio\_tcp\_lro\_init}}(octeon\_dev, ifp))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01417}01417                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01418}01418 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01419}01419                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_a17f570aaf869da2cc2a06e75a1d8bd41}{lio\_hwlro}} \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01420}01420                     (if\_getcapenable(ifp) \& IFCAP\_LRO) \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01421}01421                     (if\_getcapenable(ifp) \& IFCAP\_RXCSUM) \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01422}01422                     (if\_getcapenable(ifp) \& IFCAP\_RXCSUM\_IPV6))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01423}01423                         \mbox{\hyperlink{lio__core_8c_a777682709fe51635e2daaa073f81d1b1}{lio\_set\_feature}}(ifp, \mbox{\hyperlink{lio__common_8h_a84603cb24195b195a64887a58eeae71b}{LIO\_CMD\_LRO\_ENABLE}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01424}01424                                         \mbox{\hyperlink{lio__common_8h_a98fba0698bb62f0629ccb48518ebff65}{LIO\_LROIPV4}} | \mbox{\hyperlink{lio__common_8h_ab376c2b2b339084d44cb4d1586b08dce}{LIO\_LROIPV6}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01425}01425 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01426}01426                 \textcolor{keywordflow}{if} ((if\_getcapenable(ifp) \& IFCAP\_VLAN\_HWFILTER))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01427}01427                         \mbox{\hyperlink{lio__core_8c_a777682709fe51635e2daaa073f81d1b1}{lio\_set\_feature}}(ifp, \mbox{\hyperlink{lio__common_8h_af3b515a19b89b88586a49bcc6331dbfb}{LIO\_CMD\_VLAN\_FILTER\_CTL}}, 1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01428}01428                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01429}01429                         \mbox{\hyperlink{lio__core_8c_a777682709fe51635e2daaa073f81d1b1}{lio\_set\_feature}}(ifp, \mbox{\hyperlink{lio__common_8h_af3b515a19b89b88586a49bcc6331dbfb}{LIO\_CMD\_VLAN\_FILTER\_CTL}}, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01430}01430 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01431}01431                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_a4eb2d301b7cb095b150637f96dbc0578}{lio\_setup\_rx\_oom\_poll\_fn}}(ifp))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01432}01432                         \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01433}01433 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01434}01434                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(octeon\_dev, \textcolor{stringliteral}{"{}Setup NIC ifidx:\%d mac:\%02x\%02x\%02x\%02x\%02x\%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01435}01435                             i, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01436}01436                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_af5bb311dcb3438d0ed898e9df284c1c5}{link\_changes}}++;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01437}01437 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01438}01438                 \mbox{\hyperlink{lio__network_8h_add3a071d097526119fa36f329ea32f5c}{lio\_ifstate\_set}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_add47f1b3f39a4d10546bfb50e9c8a317}{LIO\_IFSTATE\_REGISTERED}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01439}01439 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01440}01440                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01441}01441 \textcolor{comment}{                 * Sending command to firmware to enable Rx checksum offload}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01442}01442 \textcolor{comment}{                 * by default at the time of setup of Liquidio driver for}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01443}01443 \textcolor{comment}{                 * this device}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01444}01444 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01445}01445                 \mbox{\hyperlink{lio__main_8c_a4166a244b7e359257daf211475b38eac}{lio\_set\_rxcsum\_command}}(ifp, \mbox{\hyperlink{lio__common_8h_aa47c370f28d3294259493681ce0201a4}{LIO\_CMD\_TNL\_RX\_CSUM\_CTL}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01446}01446                                        \mbox{\hyperlink{lio__common_8h_aefc0d5306f62537fcca5656cf2b400f4}{LIO\_CMD\_RXCSUM\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01447}01447                 \mbox{\hyperlink{lio__core_8c_a777682709fe51635e2daaa073f81d1b1}{lio\_set\_feature}}(ifp, \mbox{\hyperlink{lio__common_8h_ade735b23108b7b53d4f491218bcf208f}{LIO\_CMD\_TNL\_TX\_CSUM\_CTL}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01448}01448                                 \mbox{\hyperlink{lio__common_8h_ada43ddf79a82f86dd234754c67669d8a}{LIO\_CMD\_TXCSUM\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01449}01449 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01450}01450 \textcolor{preprocessor}{\#ifdef RSS}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01451}01451                 \textcolor{keywordflow}{if} (lio\_rss) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01452}01452                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_a32c7b1a3fe039a7abbf8c4bf64f0782f}{lio\_send\_rss\_param}}(\mbox{\hyperlink{structlio}{lio}}))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01453}01453                                 \textcolor{keywordflow}{goto} setup\_nic\_dev\_fail;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01454}01454                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01455}01455 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* RSS */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01456}01456 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01457}01457                         \mbox{\hyperlink{lio__core_8c_a777682709fe51635e2daaa073f81d1b1}{lio\_set\_feature}}(ifp, \mbox{\hyperlink{lio__common_8h_aea26ce1037dca1f1094de5dc5b6875c9}{LIO\_CMD\_SET\_FNV}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01458}01458                                         \mbox{\hyperlink{lio__common_8h_aa33cdc1d0d3ab21ad1f983108b2a9b13}{LIO\_CMD\_FNV\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01459}01459 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01460}01460                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(octeon\_dev, \textcolor{stringliteral}{"{}NIC ifidx:\%d Setup successful\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01461}01461 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01462}01462                 \mbox{\hyperlink{lio__iq_8h_aeacdddc60eaf524a3482cbd54a8e6fb0}{lio\_free\_soft\_command}}(octeon\_dev, sc);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01463}01463                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac0152641b7461639ce1df03a5fc51cff}{vlan\_attach}} =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01464}01464                     EVENTHANDLER\_REGISTER(vlan\_config,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01465}01465                                           \mbox{\hyperlink{lio__main_8c_a00c89086af7e85c75dc1b8b97b7a73b3}{lio\_vlan\_rx\_add\_vid}}, \mbox{\hyperlink{structlio}{lio}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01466}01466                                           EVENTHANDLER\_PRI\_FIRST);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01467}01467                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ab61bce8cc063de0d59ffad7338724f54}{vlan\_detach}} =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01468}01468                     EVENTHANDLER\_REGISTER(vlan\_unconfig,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01469}01469                                           \mbox{\hyperlink{lio__main_8c_a1bc24e64de3307b31cbd8ae9a8630faf}{lio\_vlan\_rx\_kill\_vid}}, \mbox{\hyperlink{structlio}{lio}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01470}01470                                           EVENTHANDLER\_PRI\_FIRST);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01471}01471 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01472}01472                 \textcolor{comment}{/* Update stats periodically */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01473}01473                 callout\_init(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8a5d5002a8fbf948c923b994cdc57abe}{stats\_timer}}, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01474}01474                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_afdddb6007bdf5e32124801023f3e08ff}{stats\_interval}} = \mbox{\hyperlink{lio__network_8h_aab0076f2201482a2496ef11c83420954}{LIO\_DEFAULT\_STATS\_INTERVAL}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01475}01475 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01476}01476                 \mbox{\hyperlink{lio__ioctl_8h_a8e5b0052ee9d864c1f54b7d955bd1af0}{lio\_add\_hw\_stats}}(\mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01477}01477         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01478}01478 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01479}01479         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01480}01480 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01481}01481 setup\_nic\_dev\_fail:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01482}01482 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01483}01483         \mbox{\hyperlink{lio__iq_8h_aeacdddc60eaf524a3482cbd54a8e6fb0}{lio\_free\_soft\_command}}(octeon\_dev, sc);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01484}01484 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01485}01485         \textcolor{keywordflow}{while} (i-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01486}01486                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(octeon\_dev, \textcolor{stringliteral}{"{}NIC ifidx:\%d Setup failed\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01487}01487                 \mbox{\hyperlink{lio__main_8c_a07a5ea1710155280e1a92d59481c8c79}{lio\_destroy\_nic\_device}}(octeon\_dev, i);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01488}01488         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01489}01489 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01490}01490         \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01491}01491 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01492}01492 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01493}01493 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01494}\mbox{\hyperlink{lio__main_8c_a05b8d53e3c501d7b8cf693f37b016abc}{01494}} \mbox{\hyperlink{lio__main_8c_a05b8d53e3c501d7b8cf693f37b016abc}{lio\_link\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__recv__info}{lio\_recv\_info}} *recv\_info, \textcolor{keywordtype}{void} *ptr)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01495}01495 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01496}01496         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = (\textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}} *)ptr;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01497}01497         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__recv__pkt}{lio\_recv\_pkt}} *recv\_pkt = recv\_info-\/>\mbox{\hyperlink{structlio__recv__info_af74be43e7c57a463316f57b9b26e6231}{recv\_pkt}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01498}01498         \textcolor{keyword}{union }\mbox{\hyperlink{unionocteon__link__status}{octeon\_link\_status}} *ls;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01499}01499         \textcolor{keywordtype}{int}     gmxport = 0, i;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01500}01500 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01501}01501         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct, \textcolor{stringliteral}{"{}\%s Called\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01502}01502         \textcolor{keywordflow}{if} (recv\_pkt-\/>\mbox{\hyperlink{structlio__recv__pkt_a1b1292fb259e9a0f6481efdf8516a9b8}{buffer\_size}}[0] != (\textcolor{keyword}{sizeof}(*ls) + \mbox{\hyperlink{lio__droq_8h_aaac9c27a5385c5ae787c0b5be2214e13}{LIO\_DROQ\_INFO\_SIZE}})) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01503}01503                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}Malformed NIC\_INFO, len=\%d, ifidx=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01504}01504                             recv\_pkt-\/>\mbox{\hyperlink{structlio__recv__pkt_a1b1292fb259e9a0f6481efdf8516a9b8}{buffer\_size}}[0],}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01505}01505                             recv\_pkt-\/>\mbox{\hyperlink{structlio__recv__pkt_ad9934d21e17e8082c40dd044ea49622a}{rh}}.\mbox{\hyperlink{unionocteon__rh_afbf21fddfea1efefdfbaddf6f2e2ee6f}{r\_nic\_info}}.\mbox{\hyperlink{unionocteon__rh_a3350e13ad485fcf309185df4a2ea887c}{gmxport}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01506}01506                 \textcolor{keywordflow}{goto} nic\_info\_err;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01507}01507         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01508}01508         gmxport = recv\_pkt-\/>\mbox{\hyperlink{structlio__recv__pkt_ad9934d21e17e8082c40dd044ea49622a}{rh}}.\mbox{\hyperlink{unionocteon__rh_afbf21fddfea1efefdfbaddf6f2e2ee6f}{r\_nic\_info}}.\mbox{\hyperlink{unionocteon__rh_a3350e13ad485fcf309185df4a2ea887c}{gmxport}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01509}01509         ls = (\textcolor{keyword}{union }\mbox{\hyperlink{unionocteon__link__status}{octeon\_link\_status}} *)(recv\_pkt-\/>\mbox{\hyperlink{structlio__recv__pkt_a80709536f103c2df8b2ade47ddb07d99}{buffer\_ptr}}[0]-\/>m\_data +}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01510}01510                                           \mbox{\hyperlink{lio__droq_8h_aaac9c27a5385c5ae787c0b5be2214e13}{LIO\_DROQ\_INFO\_SIZE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01511}01511         \mbox{\hyperlink{lio__main_8h_ab294e8e0e748bf0d78f5c1c0283a79cf}{lio\_swap\_8B\_data}}((uint64\_t *)ls,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01512}01512                          (\textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{unionocteon__link__status}{octeon\_link\_status}})) >> 3);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01513}01513 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01514}01514         \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a714b40300e1b599c7d4cec238bf3a1f7}{gmxport}} == gmxport)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01515}01515                 \mbox{\hyperlink{lio__main_8c_aaf6d32a7738adb0bde2152c51185d193}{lio\_update\_link\_status}}(oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a66039d2909b1fbff45e0898d81d515c9}{ifp}}, ls);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01516}01516 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01517}01517 nic\_info\_err:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01518}01518         \textcolor{keywordflow}{for} (i = 0; i < recv\_pkt-\/>\mbox{\hyperlink{structlio__recv__pkt_a756ac1586a62f8c682e3bdb031890cc5}{buffer\_count}}; i++)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01519}01519                 \mbox{\hyperlink{lio__network_8h_a567443b40ed2cc007f9eb3a146779059}{lio\_recv\_buffer\_free}}(recv\_pkt-\/>\mbox{\hyperlink{structlio__recv__pkt_a80709536f103c2df8b2ade47ddb07d99}{buffer\_ptr}}[i]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01520}01520 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01521}01521         \mbox{\hyperlink{lio__droq_8h_a5c8c9166464ffdd36c020c5565061fee}{lio\_free\_recv\_info}}(recv\_info);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01522}01522         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01523}01523 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01524}01524 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01525}01525 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01526}\mbox{\hyperlink{lio__main_8c_a599a43d2ebe5cec4e42f46f5a7c0739d}{01526}} \mbox{\hyperlink{lio__main_8c_a599a43d2ebe5cec4e42f46f5a7c0739d}{lio\_free\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__instr__queue}{lio\_instr\_queue}} *iq, \textcolor{keyword}{struct} \mbox{\hyperlink{structlio__mbuf__free__info}{lio\_mbuf\_free\_info}} *finfo)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01527}01527 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01528}01528 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01529}01529         bus\_dmamap\_sync(iq-\/>\mbox{\hyperlink{structlio__instr__queue_abe0999a1b9ad355655c815c85eefd061}{txtag}}, finfo-\/>\mbox{\hyperlink{structlio__mbuf__free__info_a2a4d1a328ae532fdc96a06e972ed3565}{map}}, BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01530}01530         bus\_dmamap\_unload(iq-\/>\mbox{\hyperlink{structlio__instr__queue_abe0999a1b9ad355655c815c85eefd061}{txtag}}, finfo-\/>\mbox{\hyperlink{structlio__mbuf__free__info_a2a4d1a328ae532fdc96a06e972ed3565}{map}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01531}01531         m\_freem(finfo-\/>\mbox{\hyperlink{structlio__mbuf__free__info_a8fd8ae090b47b0674bdf9b8a9c6f0f96}{mb}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01532}01532 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01533}01533 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01534}01534 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01535}\mbox{\hyperlink{lio__main_8c_acbc4a2c503a3cd5db0f9906596451a9e}{01535}} \mbox{\hyperlink{lio__main_8c_acbc4a2c503a3cd5db0f9906596451a9e}{lio\_free\_sgmbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__instr__queue}{lio\_instr\_queue}} *iq, \textcolor{keyword}{struct} \mbox{\hyperlink{structlio__mbuf__free__info}{lio\_mbuf\_free\_info}} *finfo)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01536}01536 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01537}01537         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__gather}{lio\_gather}}     *g;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01538}01538         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01539}01539         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}           *\mbox{\hyperlink{structlio}{lio}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01540}01540         \textcolor{keywordtype}{int}     iq\_no;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01541}01541 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01542}01542         g = finfo-\/>\mbox{\hyperlink{structlio__mbuf__free__info_ad02cacc15814394734987994710848fd}{g}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01543}01543         iq\_no = iq-\/>\mbox{\hyperlink{structlio__instr__queue_a0f80e25acea3c55a342c247a68038dec}{txpciq}}.\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01544}01544         oct = iq-\/>\mbox{\hyperlink{structlio__instr__queue_a93a4882d7471320902b3445ee35f1a88}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01545}01545         \mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a66039d2909b1fbff45e0898d81d515c9}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01546}01546 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01547}01547         mtx\_lock(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}}[iq\_no]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01548}01548         STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}}[iq\_no], \&g-\/>\mbox{\hyperlink{structlio__gather_ad62bc93af2e70bca44ff4be6326bfe6f}{node}}, entries);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01549}01549         mtx\_unlock(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}}[iq\_no]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01550}01550 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01551}01551         bus\_dmamap\_sync(iq-\/>\mbox{\hyperlink{structlio__instr__queue_abe0999a1b9ad355655c815c85eefd061}{txtag}}, finfo-\/>\mbox{\hyperlink{structlio__mbuf__free__info_a2a4d1a328ae532fdc96a06e972ed3565}{map}}, BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01552}01552         bus\_dmamap\_unload(iq-\/>\mbox{\hyperlink{structlio__instr__queue_abe0999a1b9ad355655c815c85eefd061}{txtag}}, finfo-\/>\mbox{\hyperlink{structlio__mbuf__free__info_a2a4d1a328ae532fdc96a06e972ed3565}{map}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01553}01553         m\_freem(finfo-\/>\mbox{\hyperlink{structlio__mbuf__free__info_a8fd8ae090b47b0674bdf9b8a9c6f0f96}{mb}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01554}01554 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01555}01555 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01556}01556 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01557}\mbox{\hyperlink{lio__main_8c_ab0f96ee99fb22f99947299e5d72952a6}{01557}} \mbox{\hyperlink{lio__main_8c_ab0f96ee99fb22f99947299e5d72952a6}{lio\_if\_cfg\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t status, \textcolor{keywordtype}{void} *buf)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01558}01558 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01559}01559         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__soft__command}{lio\_soft\_command}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__soft__command}{lio\_soft\_command}} *)buf;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01560}01560         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__resp}{lio\_if\_cfg\_resp}}   *resp;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01561}01561         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__context}{lio\_if\_cfg\_context}} *ctx;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01562}01562 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01563}01563         resp = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__if__cfg__resp}{lio\_if\_cfg\_resp}} *)sc-\/>\mbox{\hyperlink{structlio__soft__command_aacfcbb9eb30a919cbc55077f21490974}{virtrptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01564}01564         ctx = (\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__if__cfg__context}{lio\_if\_cfg\_context}} *)sc-\/>\mbox{\hyperlink{structlio__soft__command_a288d7c6ce348f6c917681748ebf432fd}{ctxptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01565}01565 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01566}01566         oct = \mbox{\hyperlink{lio__device_8c_ab6f265f5a5b9dfee70db2c4460a9d538}{lio\_get\_device}}(ctx-\/>\mbox{\hyperlink{structlio__if__cfg__context_a1dddda8b7135ac578b2a8dd08faa0ad7}{octeon\_id}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01567}01567         \textcolor{keywordflow}{if} (resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_acf03f3ea82bd6eaa8fae56e15b831f26}{status}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01568}01568                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}nic if cfg instruction failed. Status: \%llx (0x\%08x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01569}01569                             \mbox{\hyperlink{lio__main_8h_ae67a87eb5deeb31e550aa38dfa869505}{LIO\_CAST64}}(resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_acf03f3ea82bd6eaa8fae56e15b831f26}{status}}), \mbox{\hyperlink{structlio__if__cfg__resp_acf03f3ea82bd6eaa8fae56e15b831f26}{status}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01570}01570         ctx-\/>\mbox{\hyperlink{structlio__if__cfg__context_a8e7cacc99b0518f1431e4ba2540e1833}{cond}} = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01571}01571 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01572}01572         snprintf(oct-\/>\mbox{\hyperlink{structocteon__device_ac02b5516bad1e266bfdae40d713650f6}{fw\_info}}.\mbox{\hyperlink{structlio__fw__info_a6591b7507fb758d905e5e81f34d405b2}{lio\_firmware\_version}}, 32, \textcolor{stringliteral}{"{}\%s"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01573}01573                  resp-\/>\mbox{\hyperlink{structlio__if__cfg__resp_aed27513dfce8ce39b3c32778ea790383}{cfg\_info}}.\mbox{\hyperlink{structocteon__if__cfg__info_afd48b21f13627ab403be4a4f26214dfa}{lio\_firmware\_version}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01574}01574 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01575}01575         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01576}01576 \textcolor{comment}{         * This barrier is required to be sure that the response has been}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01577}01577 \textcolor{comment}{         * written fully before waking up the handler}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01578}01578 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01579}01579         wmb();}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01580}01580 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01581}01581 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01582}01582 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01583}\mbox{\hyperlink{lio__main_8c_ac3cbcfa582b972c315f83b7a203af4de}{01583}} \mbox{\hyperlink{lio__main_8c_ac3cbcfa582b972c315f83b7a203af4de}{lio\_is\_mac\_changed}}(uint8\_t *\textcolor{keyword}{new}, uint8\_t *old)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01584}01584 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01585}01585 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01586}01586         \textcolor{keywordflow}{return} ((\textcolor{keyword}{new}[0] != old[0]) || (\textcolor{keyword}{new}[1] != old[1]) ||}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01587}01587                 (\textcolor{keyword}{new}[2] != old[2]) || (\textcolor{keyword}{new}[3] != old[3]) ||}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01588}01588                 (\textcolor{keyword}{new}[4] != old[4]) || (\textcolor{keyword}{new}[5] != old[5]));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01589}01589 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01590}01590 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01591}01591 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01592}\mbox{\hyperlink{lio__ioctl_8h_ab265f93e7d9b385e555cf74fff1f335c}{01592}} \mbox{\hyperlink{lio__main_8c_ab265f93e7d9b385e555cf74fff1f335c}{lio\_open}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01593}01593 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01594}01594         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = arg;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01595}01595         \textcolor{keyword}{struct }ifnet    *ifp = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01596}01596         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01597}01597         uint8\_t *mac\_new, mac\_old[ETHER\_HDR\_LEN];}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01598}01598         \textcolor{keywordtype}{int}     ret = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01599}01599 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01600}01600         \mbox{\hyperlink{lio__network_8h_add3a071d097526119fa36f329ea32f5c}{lio\_ifstate\_set}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_a6ee79fd2e38d1717a146513ac126fe4b}{LIO\_IFSTATE\_RUNNING}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01601}01601 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01602}01602         \textcolor{comment}{/* Ready for link status updates */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01603}01603         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a17247aceb3068680d7a3909768da4877}{intf\_open}} = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01604}01604 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01605}01605         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}Interface Open, ready for traffic\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01606}01606 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01607}01607         \textcolor{comment}{/* tell Octeon to start forwarding packets to host */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01608}01608         \mbox{\hyperlink{lio__main_8c_ac389159dbd145c9785dd8469a75929fa}{lio\_send\_rx\_ctrl\_cmd}}(\mbox{\hyperlink{structlio}{lio}}, 1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01609}01609 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01610}01610         mac\_new = IF\_LLADDR(ifp);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01611}01611         memcpy(mac\_old, ((uint8\_t *)\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_a16254b8f1d571201181c412795cc33a5}{hw\_addr}}) + 2, ETHER\_HDR\_LEN);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01612}01612 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01613}01613         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_ac3cbcfa582b972c315f83b7a203af4de}{lio\_is\_mac\_changed}}(mac\_new, mac\_old)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01614}01614                 ret = \mbox{\hyperlink{lio__ioctl_8c_a762754c9066773104ef6ad5ecd9897e1}{lio\_set\_mac}}(ifp, mac\_new);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01615}01615                 \textcolor{keywordflow}{if} (ret)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01616}01616                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}MAC change failed, error: \%d\(\backslash\)n"{}}, ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01617}01617         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01618}01618 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01619}01619         \textcolor{comment}{/* Now inform the stack we're ready */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01620}01620         if\_setdrvflagbits(ifp, IFF\_DRV\_RUNNING, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01621}01621 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01622}01622         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}Interface is opened\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01623}01623 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01624}01624 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01625}01625 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01626}\mbox{\hyperlink{lio__main_8c_a4166a244b7e359257daf211475b38eac}{01626}} \mbox{\hyperlink{lio__main_8c_a4166a244b7e359257daf211475b38eac}{lio\_set\_rxcsum\_command}}(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keywordtype}{int} command, uint8\_t rx\_cmd)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01627}01627 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01628}01628         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__ctrl__pkt}{lio\_ctrl\_pkt}} nctrl;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01629}01629         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}           *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01630}01630         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01631}01631         \textcolor{keywordtype}{int}     ret = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01632}01632 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01633}01633         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_abdc7441d60674e269cc22b4a1facb233}{cmd64}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01634}01634         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_ad5cae7e8f601a66277962156b10a211e}{s}}.\mbox{\hyperlink{unionocteon__cmd_ae8a289a502362b98e550d65d3986dc3f}{cmd}} = command;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01635}01635         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_ad5cae7e8f601a66277962156b10a211e}{s}}.\mbox{\hyperlink{unionocteon__cmd_aa4b02c6bc773b809463ceb325e8fdc5f}{param1}} = rx\_cmd;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01636}01636         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a8a585822f4eb70f431c7db4606c50a50}{iq\_no}} = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[0].\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01637}01637         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a4415355127c5111f0570276c84d198a6}{wait\_time}} = 100;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01638}01638         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a8ed757510cd56d869fbc2a281008b91f}{lio}} = \mbox{\hyperlink{structlio}{lio}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01639}01639         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_adcc5ed7ab9f23d57202ceff098fa2146}{cb\_fn}} = \mbox{\hyperlink{lio__core_8c_a48c1e67dffbf88a354e7ef45e0261674}{lio\_ctrl\_cmd\_completion}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01640}01640 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01641}01641         ret = \mbox{\hyperlink{lio__ctrl_8c_a93d515939a6aef78b9f008a414e73940}{lio\_send\_ctrl\_pkt}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}}, \&nctrl);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01642}01642         \textcolor{keywordflow}{if} (ret < 0) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01643}01643                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}DEVFLAGS RXCSUM change failed in core(ret:0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01644}01644                             ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01645}01645         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01646}01646 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01647}01647         \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01648}01648 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01649}01649 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01650}01650 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01651}\mbox{\hyperlink{lio__main_8c_a1037bb669fd3259a60dca9660d69a353}{01651}} \mbox{\hyperlink{lio__main_8c_a1037bb669fd3259a60dca9660d69a353}{lio\_stop\_nic\_module}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01652}01652 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01653}01653         \textcolor{keywordtype}{int}             i, j;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01654}01654         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01655}01655 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01656}01656         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct, \textcolor{stringliteral}{"{}Stopping network interfaces\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01657}01657         \textcolor{keywordflow}{if} (!oct-\/>\mbox{\hyperlink{structocteon__device_a01127f1cf3a4c5980e97c37b77ce4d36}{ifcount}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01658}01658                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}Init for Octeon was not completed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01659}01659                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01660}01660         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01661}01661 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01662}01662         mtx\_lock(\&oct-\/>\mbox{\hyperlink{structocteon__device_a3dfa98f1e7bb87114ed8d2f54f3a73bd}{cmd\_resp\_wqlock}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01663}01663         oct-\/>\mbox{\hyperlink{structocteon__device_a87d0a062a62b952cc55818560584ec57}{cmd\_resp\_state}} = \mbox{\hyperlink{lio__device_8h_aa6d36e9801b6d8e8fb26402169f4490c}{LIO\_DRV\_OFFLINE}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01664}01664         mtx\_unlock(\&oct-\/>\mbox{\hyperlink{structocteon__device_a3dfa98f1e7bb87114ed8d2f54f3a73bd}{cmd\_resp\_wqlock}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01665}01665 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01666}01666         \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_a01127f1cf3a4c5980e97c37b77ce4d36}{ifcount}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01667}01667                 \mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a66039d2909b1fbff45e0898d81d515c9}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01668}01668                 \textcolor{keywordflow}{for} (j = 0; j < oct-\/>\mbox{\hyperlink{structocteon__device_a54c2f2f4558411f501e0f46dab998d52}{num\_oqs}}; j++)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01669}01669                         \mbox{\hyperlink{lio__droq_8c_a1f89c5971a094028121830eb9d611e03}{lio\_unregister\_droq\_ops}}(oct,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01670}01670                                                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[j].\mbox{\hyperlink{unionocteon__rxpciq_a212b7f61fb40d504ea084447f24eb221}{s}}.\mbox{\hyperlink{unionocteon__rxpciq_aeff0b5107876d3af385d339964d497dd}{q\_no}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01671}01671         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01672}01672 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01673}01673         callout\_drain(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8a5d5002a8fbf948c923b994cdc57abe}{stats\_timer}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01674}01674 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01675}01675         \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_a01127f1cf3a4c5980e97c37b77ce4d36}{ifcount}}; i++)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01676}01676                 \mbox{\hyperlink{lio__main_8c_a07a5ea1710155280e1a92d59481c8c79}{lio\_destroy\_nic\_device}}(oct, i);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01677}01677 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01678}01678         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct, \textcolor{stringliteral}{"{}Network interface stopped\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01679}01679 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01680}01680         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01681}01681 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01682}01682 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01683}01683 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01684}\mbox{\hyperlink{lio__main_8c_add62a024e37a6dc84d5ee2da7ff04774}{01684}} \mbox{\hyperlink{lio__main_8c_add62a024e37a6dc84d5ee2da7ff04774}{lio\_delete\_glists}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, \textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01685}01685 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01686}01686         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__gather}{lio\_gather}}     *g;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01687}01687         \textcolor{keywordtype}{int}     i;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01688}01688 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01689}01689         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01690}01690                 free((\textcolor{keywordtype}{void} *)\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01691}01691                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01692}01692         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01693}01693 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01694}01694         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}} == NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01695}01695                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01696}01696 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01697}01697         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_aefa205dfa726bd948f643aa553846f68}{num\_txpciq}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01698}01698                 \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01699}01699                         g = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__gather}{lio\_gather}} *)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01700}01700                             \mbox{\hyperlink{lio__bsd_8h_a0a40303ded54bd63591be7584a998306}{lio\_delete\_first\_node}}(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}}[i]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01701}01701                         free(g, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01702}01702                 \} \textcolor{keywordflow}{while} (g);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01703}01703 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01704}01704                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}} != NULL) \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01705}01705                     (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}}[i] != NULL)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01706}01706                         \mbox{\hyperlink{lio__network_8h_aa9eae17416dcdc92e8370166df882c34}{lio\_dma\_free}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aec91a475b3dfaa538603cb975dcabc7b}{glist\_entry\_size}} * \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a83c4750aaf78010ae572206bfcb6d7bd}{tx\_qsize}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01707}01707                                      \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}}[i]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01708}01708                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01709}01709         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01710}01710 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01711}01711         free(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01712}01712         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01713}01713 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01714}01714         free(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac861284edefcb1b769422cfe7694170c}{glists\_dma\_base}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01715}01715         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac861284edefcb1b769422cfe7694170c}{glists\_dma\_base}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01716}01716 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01717}01717         free(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01718}01718         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01719}01719 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01720}01720 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01721}01721 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01722}\mbox{\hyperlink{lio__main_8c_a70bb551396d7e5cae801f34905b0df18}{01722}} \mbox{\hyperlink{lio__main_8c_a70bb551396d7e5cae801f34905b0df18}{lio\_setup\_glists}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, \textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}}, \textcolor{keywordtype}{int} num\_iqs)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01723}01723 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01724}01724         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__gather}{lio\_gather}}     *g;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01725}01725         \textcolor{keywordtype}{int}     i, j;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01726}01726 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01727}01727         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}} = malloc(num\_iqs * \textcolor{keyword}{sizeof}(*\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}}), M\_DEVBUF,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01728}01728                                  M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01729}01729         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}} == NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01730}01730                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01731}01731 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01732}01732         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}} = malloc(num\_iqs * \textcolor{keyword}{sizeof}(*\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}}), M\_DEVBUF,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01733}01733                             M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01734}01734         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01735}01735                 free((\textcolor{keywordtype}{void} *)\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01736}01736                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01737}01737                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01738}01738         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01739}01739 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01740}01740         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aec91a475b3dfaa538603cb975dcabc7b}{glist\_entry\_size}} = \mbox{\hyperlink{lio__main_8h_a7021e7f1287cd109889e59efb1ee5c2b}{ROUNDUP8}}((\mbox{\hyperlink{lio__main_8h_a22d71f002511efb471c28a7b8dc599dc}{ROUNDUP4}}(\mbox{\hyperlink{lio__network_8h_aa52cb75819e079f0cc21d14f42af60b0}{LIO\_MAX\_SG}}) >> 2) *}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01741}01741                                          \mbox{\hyperlink{lio__common_8h_a68e561734b209a686ae62655bd5eba76}{LIO\_SG\_ENTRY\_SIZE}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01742}01742         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01743}01743 \textcolor{comment}{         * allocate memory to store virtual and dma base address of}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01744}01744 \textcolor{comment}{         * per glist consistent memory}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01745}01745 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01746}01746         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}} = malloc(num\_iqs * \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{void} *), M\_DEVBUF,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01747}01747                                        M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01748}01748         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac861284edefcb1b769422cfe7694170c}{glists\_dma\_base}} = malloc(num\_iqs * \textcolor{keyword}{sizeof}(vm\_paddr\_t), M\_DEVBUF,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01749}01749                                       M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01750}01750         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}} == NULL) || (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac861284edefcb1b769422cfe7694170c}{glists\_dma\_base}} == NULL)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01751}01751                 \mbox{\hyperlink{lio__main_8c_add62a024e37a6dc84d5ee2da7ff04774}{lio\_delete\_glists}}(oct, \mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01752}01752                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01753}01753         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01754}01754 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01755}01755         \textcolor{keywordflow}{for} (i = 0; i < num\_iqs; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01756}01756                 mtx\_init(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a1fcf7c8fbcb0b8a7e7e43a72bca67bf2}{glist\_lock}}[i], \textcolor{stringliteral}{"{}glist\_lock"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01757}01757 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01758}01758                 STAILQ\_INIT(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}}[i]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01759}01759 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01760}01760                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}}[i] =}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01761}01761                     \mbox{\hyperlink{lio__network_8h_a5cadbb52714f0c4c6eb2f61ff06a4a52}{lio\_dma\_alloc}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aec91a475b3dfaa538603cb975dcabc7b}{glist\_entry\_size}} * \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a83c4750aaf78010ae572206bfcb6d7bd}{tx\_qsize}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01762}01762                                   (vm\_paddr\_t *)\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac861284edefcb1b769422cfe7694170c}{glists\_dma\_base}}[i]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01763}01763                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}}[i] == NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01764}01764                         \mbox{\hyperlink{lio__main_8c_add62a024e37a6dc84d5ee2da7ff04774}{lio\_delete\_glists}}(oct, \mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01765}01765                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01766}01766                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01767}01767 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01768}01768                 \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a83c4750aaf78010ae572206bfcb6d7bd}{tx\_qsize}}; j++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01769}01769                         g = malloc(\textcolor{keyword}{sizeof}(*g), M\_DEVBUF, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01770}01770                         \textcolor{keywordflow}{if} (g == NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01771}01771                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01772}01772 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01773}01773                         g-\/>\mbox{\hyperlink{structlio__gather_aa9f0d8b8241c2588883f2d2bb3d61094}{sg}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__sg__entry}{lio\_sg\_entry}} *)(uintptr\_t)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01774}01774                             ((uint64\_t)(uintptr\_t)\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac4a090e89b4a400ea31b8ba559118c6d}{glists\_virt\_base}}[i] +}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01775}01775                              (j * \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aec91a475b3dfaa538603cb975dcabc7b}{glist\_entry\_size}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01776}01776                         g-\/>\mbox{\hyperlink{structlio__gather_a845d9b5fc0ebe4ec3fa17bc08505d8b6}{sg\_dma\_ptr}} = (uint64\_t)\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac861284edefcb1b769422cfe7694170c}{glists\_dma\_base}}[i] +}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01777}01777                                 (j * \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aec91a475b3dfaa538603cb975dcabc7b}{glist\_entry\_size}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01778}01778                         STAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a0d9ddaa68dd8fbe28aa38037079e5603}{ghead}}[i], \&g-\/>\mbox{\hyperlink{structlio__gather_ad62bc93af2e70bca44ff4be6326bfe6f}{node}}, entries);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01779}01779                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01780}01780 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01781}01781                 \textcolor{keywordflow}{if} (j != \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a83c4750aaf78010ae572206bfcb6d7bd}{tx\_qsize}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01782}01782                         \mbox{\hyperlink{lio__main_8c_add62a024e37a6dc84d5ee2da7ff04774}{lio\_delete\_glists}}(oct, \mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01783}01783                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01784}01784                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01785}01785         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01786}01786 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01787}01787         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01788}01788 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01789}01789 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01790}01790 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01791}\mbox{\hyperlink{lio__ioctl_8h_a030ec76d4cb48166ad9307a2462a2380}{01791}} \mbox{\hyperlink{lio__main_8c_a030ec76d4cb48166ad9307a2462a2380}{lio\_stop}}(\textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01792}01792 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01793}01793         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01794}01794         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01795}01795 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01796}01796         \mbox{\hyperlink{lio__network_8h_ae17e6bccf9904b2001d0ac924721927f}{lio\_ifstate\_reset}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_a6ee79fd2e38d1717a146513ac126fe4b}{LIO\_IFSTATE\_RUNNING}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01797}01797         if\_link\_state\_change(ifp, LINK\_STATE\_DOWN);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01798}01798 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01799}01799         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a17247aceb3068680d7a3909768da4877}{intf\_open}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01800}01800         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_a4c66290c810d4bc3372d88e9dec84008}{link\_up}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01801}01801         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_af5bb311dcb3438d0ed898e9df284c1c5}{link\_changes}}++;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01802}01802 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01803}01803         \mbox{\hyperlink{lio__main_8c_ac389159dbd145c9785dd8469a75929fa}{lio\_send\_rx\_ctrl\_cmd}}(\mbox{\hyperlink{structlio}{lio}}, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01804}01804 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01805}01805         \textcolor{comment}{/* Tell the stack that the interface is no longer active */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01806}01806         if\_setdrvflagbits(ifp, 0, IFF\_DRV\_RUNNING);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01807}01807 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01808}01808         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(oct, \textcolor{stringliteral}{"{}Interface is stopped\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01809}01809 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01810}01810 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01811}01811 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01812}\mbox{\hyperlink{lio__main_8c_af642002182e3315e67a34c5646c90672}{01812}} \mbox{\hyperlink{lio__main_8c_af642002182e3315e67a34c5646c90672}{lio\_check\_rx\_oom\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01813}01813 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01814}01814         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__droq}{lio\_droq}} *droq;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01815}01815         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01816}01816         \textcolor{keywordtype}{int}     desc\_refilled;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01817}01817         \textcolor{keywordtype}{int}     q, q\_no = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01818}01818 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01819}01819         \textcolor{keywordflow}{for} (q = 0; q < oct-\/>\mbox{\hyperlink{structocteon__device_a54c2f2f4558411f501e0f46dab998d52}{num\_oqs}}; q++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01820}01820                 q\_no = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_af82b1ef535327f1e0c6a1809762934a8}{rxpciq}}[q].\mbox{\hyperlink{unionocteon__rxpciq_a212b7f61fb40d504ea084447f24eb221}{s}}.\mbox{\hyperlink{unionocteon__rxpciq_aeff0b5107876d3af385d339964d497dd}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01821}01821                 \mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}} = oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[q\_no];}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01822}01822                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}} == NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01823}01823                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01824}01824                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__device_8h_af7ada375bed24a2721a516ad01e40c80}{lio\_read\_csr32}}(oct, \mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}-\/>\mbox{\hyperlink{structlio__droq_a6c03b162185dfc04f00630a1acee54c5}{pkts\_credit\_reg}}) <= 0x40) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01825}01825                         mtx\_lock(\&\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}-\/>\mbox{\hyperlink{structlio__droq_a7251e1f94d2cddfad791a291af24c9d5}{lock}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01826}01826                         desc\_refilled = \mbox{\hyperlink{lio__droq_8c_a0d890b5348eb19255227e4781f87c03e}{lio\_droq\_refill}}(oct, \mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01827}01827                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01828}01828 \textcolor{comment}{                         * Flush the droq descriptor data to memory to be sure}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01829}01829 \textcolor{comment}{                         * that when we update the credits the data in memory}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01830}01830 \textcolor{comment}{                         * is accurate.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01831}01831 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01832}01832                         wmb();}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01833}01833                         \mbox{\hyperlink{lio__device_8h_a946180ca969df8cd2d4b2c3eb4e9cb3c}{lio\_write\_csr32}}(oct, \mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}-\/>\mbox{\hyperlink{structlio__droq_a6c03b162185dfc04f00630a1acee54c5}{pkts\_credit\_reg}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01834}01834                                         desc\_refilled);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01835}01835                         \textcolor{comment}{/* make sure mmio write completes */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01836}01836                         \_\_compiler\_membar();}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01837}01837                         mtx\_unlock(\&\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}-\/>\mbox{\hyperlink{structlio__droq_a7251e1f94d2cddfad791a291af24c9d5}{lock}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01838}01838                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01839}01839         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01840}01840 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01841}01841 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01842}01842 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01843}\mbox{\hyperlink{lio__main_8c_a36a144bab045246d3006839b7be8590a}{01843}} \mbox{\hyperlink{lio__main_8c_a36a144bab045246d3006839b7be8590a}{lio\_poll\_check\_rx\_oom\_status}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending \_\_unused)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01844}01844 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01845}01845         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__tq}{lio\_tq}}     *rx\_status\_tq = arg;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01846}01846         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = \mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}-\/>\mbox{\hyperlink{structlio__tq_a5770f6cc05773a63e58dd8f6ed1006af}{ctxptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01847}01847 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01848}01848         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__network_8h_ac6a3028dc331940368b0383a9bf3f86b}{lio\_ifstate\_check}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_a6ee79fd2e38d1717a146513ac126fe4b}{LIO\_IFSTATE\_RUNNING}}))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01849}01849                 \mbox{\hyperlink{lio__main_8c_af642002182e3315e67a34c5646c90672}{lio\_check\_rx\_oom\_status}}(\mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01850}01850 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01851}01851         taskqueue\_enqueue\_timeout(\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}-\/>\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}}, \&\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}-\/>\mbox{\hyperlink{structlio__tq_a93a5d499ac3cec352a5bed558ec35168}{work}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01852}01852                                   \mbox{\hyperlink{lio__bsd_8h_ae6eb6d875a682c72af6de3d0fa0876e5}{lio\_ms\_to\_ticks}}(50));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01853}01853 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01854}01854 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01855}01855 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01856}\mbox{\hyperlink{lio__main_8c_a4eb2d301b7cb095b150637f96dbc0578}{01856}} \mbox{\hyperlink{lio__main_8c_a4eb2d301b7cb095b150637f96dbc0578}{lio\_setup\_rx\_oom\_poll\_fn}}(\textcolor{keyword}{struct} ifnet *\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01857}01857 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01858}01858         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01859}01859         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01860}01860         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__tq}{lio\_tq}}     *rx\_status\_tq;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01861}01861 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01862}01862         rx\_status\_tq = \&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01863}01863 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01864}01864         rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}} = taskqueue\_create(\textcolor{stringliteral}{"{}lio\_rx\_oom\_status"{}}, M\_WAITOK,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01865}01865                                             taskqueue\_thread\_enqueue,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01866}01866                                             \&rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01867}01867         \textcolor{keywordflow}{if} (rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01868}01868                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}unable to create lio rx oom status tq\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01869}01869                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01870}01870         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01871}01871 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01872}01872         TIMEOUT\_TASK\_INIT(rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}}, \&rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a93a5d499ac3cec352a5bed558ec35168}{work}}, 0,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01873}01873                           \mbox{\hyperlink{lio__main_8c_a36a144bab045246d3006839b7be8590a}{lio\_poll\_check\_rx\_oom\_status}}, (\textcolor{keywordtype}{void} *)rx\_status\_tq);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01874}01874 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01875}01875         rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a5770f6cc05773a63e58dd8f6ed1006af}{ctxptr}} = \mbox{\hyperlink{structlio}{lio}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01876}01876 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01877}01877         taskqueue\_start\_threads(\&rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}}, 1, PI\_NET,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01878}01878                                 \textcolor{stringliteral}{"{}lio\%d\_rx\_oom\_status"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01879}01879                                 oct-\/>\mbox{\hyperlink{structocteon__device_a6574a7bba62b9a35337dfe332ac83799}{octeon\_id}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01880}01880 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01881}01881         taskqueue\_enqueue\_timeout(rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}}, \&rx\_status\_tq-\/>\mbox{\hyperlink{structlio__tq_a93a5d499ac3cec352a5bed558ec35168}{work}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01882}01882                                   \mbox{\hyperlink{lio__bsd_8h_ae6eb6d875a682c72af6de3d0fa0876e5}{lio\_ms\_to\_ticks}}(50));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01883}01883 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01884}01884         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01885}01885 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01886}01886 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01887}01887 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01888}\mbox{\hyperlink{lio__main_8c_ac31a297820ba0df483063a027caaa265}{01888}} \mbox{\hyperlink{lio__main_8c_ac31a297820ba0df483063a027caaa265}{lio\_cleanup\_rx\_oom\_poll\_fn}}(\textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01889}01889 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01890}01890         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01891}01891 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01892}01892         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}.\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01893}01893                 \textcolor{keywordflow}{while} (taskqueue\_cancel\_timeout(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}.\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01894}01894                                                 \&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}.\mbox{\hyperlink{structlio__tq_a93a5d499ac3cec352a5bed558ec35168}{work}}, NULL))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01895}01895                         taskqueue\_drain\_timeout(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}.\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01896}01896                                                 \&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}.\mbox{\hyperlink{structlio__tq_a93a5d499ac3cec352a5bed558ec35168}{work}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01897}01897 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01898}01898                 taskqueue\_free(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}.\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01899}01899 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01900}01900                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a44aecc1500ac05a14e2357487d677dc4}{rx\_status\_tq}}.\mbox{\hyperlink{structlio__tq_a367b9bb34b913f264e45e286ccc9b499}{tq}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01901}01901         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01902}01902 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01903}01903 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01904}01904 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01905}\mbox{\hyperlink{lio__main_8c_a07a5ea1710155280e1a92d59481c8c79}{01905}} \mbox{\hyperlink{lio__main_8c_a07a5ea1710155280e1a92d59481c8c79}{lio\_destroy\_nic\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, \textcolor{keywordtype}{int} \mbox{\hyperlink{structlio_a988e8b0d44ce15294b8d3189e649559f}{ifidx}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01906}01906 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01907}01907         \textcolor{keyword}{struct }ifnet    *ifp = oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a66039d2909b1fbff45e0898d81d515c9}{ifp}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01908}01908         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01909}01909 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01910}01910         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01911}01911                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}\%s No ifp ptr for index \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01912}01912                             \_\_func\_\_, \mbox{\hyperlink{structlio_a988e8b0d44ce15294b8d3189e649559f}{ifidx}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01913}01913                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01914}01914         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01915}01915 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01916}01916         \mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01917}01917 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01918}01918         \mbox{\hyperlink{lio__network_8h_add3a071d097526119fa36f329ea32f5c}{lio\_ifstate\_set}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_acb5c5b25492a14adeeaaa82e9fcccf68}{LIO\_IFSTATE\_DETACH}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01919}01919 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01920}01920         \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct, \textcolor{stringliteral}{"{}NIC device cleanup\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01921}01921 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01922}01922         \textcolor{keywordflow}{if} (atomic\_load\_acq\_int(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{ifstate}}) \& \mbox{\hyperlink{lio__rxtx_8h_a6ee79fd2e38d1717a146513ac126fe4b}{LIO\_IFSTATE\_RUNNING}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01923}01923                 \mbox{\hyperlink{lio__main_8c_a030ec76d4cb48166ad9307a2462a2380}{lio\_stop}}(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01924}01924 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01925}01925         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__network_8h_a571873e98724c01fe5a3c01f02db19e3}{lio\_wait\_for\_pending\_requests}}(oct))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01926}01926                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}There were pending requests\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01927}01927 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01928}01928         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__iq_8h_ac4900db5765b1b439c6cac79a94ce7b3}{lio\_wait\_for\_instr\_fetch}}(oct))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01929}01929                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}IQ had pending instructions\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01930}01930 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01931}01931         \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_af8dbabee6aaa0be6a06dc92703a0bebf}{lio\_wait\_for\_oq\_pkts}}(oct))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01932}01932                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}OQ had pending packets\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01933}01933 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01934}01934         \textcolor{keywordflow}{if} (atomic\_load\_acq\_int(\&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aa69df616e50527613761d53375065bb7}{ifstate}}) \& \mbox{\hyperlink{lio__rxtx_8h_add47f1b3f39a4d10546bfb50e9c8a317}{LIO\_IFSTATE\_REGISTERED}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01935}01935                 ether\_ifdetach(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01936}01936 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01937}01937         \mbox{\hyperlink{lio__main_8c_a623199430723a62211f873d1b652eb86}{lio\_tcp\_lro\_free}}(oct, \mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01938}01938 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01939}01939         \mbox{\hyperlink{lio__main_8c_ac31a297820ba0df483063a027caaa265}{lio\_cleanup\_rx\_oom\_poll\_fn}}(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01940}01940 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01941}01941         \mbox{\hyperlink{lio__main_8c_add62a024e37a6dc84d5ee2da7ff04774}{lio\_delete\_glists}}(oct, \mbox{\hyperlink{structlio}{lio}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01942}01942 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01943}01943         EVENTHANDLER\_DEREGISTER(vlan\_config, \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ac0152641b7461639ce1df03a5fc51cff}{vlan\_attach}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01944}01944         EVENTHANDLER\_DEREGISTER(vlan\_unconfig, \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_ab61bce8cc063de0d59ffad7338724f54}{vlan\_detach}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01945}01945 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01946}01946         free(\mbox{\hyperlink{structlio}{lio}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01947}01947 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01948}01948         if\_free(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01949}01949 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01950}01950         oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a714b40300e1b599c7d4cec238bf3a1f7}{gmxport}} = -\/1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01951}01951 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01952}01952         oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a66039d2909b1fbff45e0898d81d515c9}{ifp}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01953}01953 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01954}01954 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01955}01955 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01956}\mbox{\hyperlink{lio__main_8c_a1652ce36911ac4c83dc9f30df7cad783}{01956}} \mbox{\hyperlink{lio__main_8c_a1652ce36911ac4c83dc9f30df7cad783}{print\_link\_info}}(\textcolor{keyword}{struct} ifnet *\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01957}01957 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01958}01958         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01959}01959 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01960}01960         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{lio__network_8h_ac6a3028dc331940368b0383a9bf3f86b}{lio\_ifstate\_check}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_ad9db2cd659b21642cc30badfd7feca90}{LIO\_IFSTATE\_RESETTING}}) \&\&}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01961}01961             \mbox{\hyperlink{lio__network_8h_ac6a3028dc331940368b0383a9bf3f86b}{lio\_ifstate\_check}}(\mbox{\hyperlink{structlio}{lio}}, \mbox{\hyperlink{lio__rxtx_8h_add47f1b3f39a4d10546bfb50e9c8a317}{LIO\_IFSTATE\_REGISTERED}})) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01962}01962                 \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__link__info}{octeon\_link\_info}} *linfo = \&\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01963}01963 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01964}01964                 \textcolor{keywordflow}{if} (linfo-\/>\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_a4c66290c810d4bc3372d88e9dec84008}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01965}01965                         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}}, \textcolor{stringliteral}{"{}\%d Mbps \%s Duplex UP\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01966}01966                                      linfo-\/>\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_ae3c183566ef7d93efa90c12ed4bbbe5c}{speed}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01967}01967                                      (linfo-\/>\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_a1920e0b04bf43fdf187061a6feb0f5de}{duplex}}) ? \textcolor{stringliteral}{"{}Full"{}} : \textcolor{stringliteral}{"{}Half"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01968}01968                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01969}01969                         \mbox{\hyperlink{lio__bsd_8h_ae98de25aa714ca601589b31d9364062a}{lio\_dev\_info}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}}, \textcolor{stringliteral}{"{}Link Down\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01970}01970                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01971}01971         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01972}01972 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01973}01973 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01974}01974 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01975}\mbox{\hyperlink{lio__main_8c_aaf6d32a7738adb0bde2152c51185d193}{01975}} \mbox{\hyperlink{lio__main_8c_aaf6d32a7738adb0bde2152c51185d193}{lio\_update\_link\_status}}(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keyword}{union} \mbox{\hyperlink{unionocteon__link__status}{octeon\_link\_status}} *ls)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01976}01976 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01977}01977         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}   *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01978}01978         \textcolor{keywordtype}{int}     changed = (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_add33c399b34003438f4a0ce4545f61ec}{link\_status64}} != ls-\/>\mbox{\hyperlink{unionocteon__link__status_add33c399b34003438f4a0ce4545f61ec}{link\_status64}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01979}01979 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01980}01980         \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_add33c399b34003438f4a0ce4545f61ec}{link\_status64}} = ls-\/>\mbox{\hyperlink{unionocteon__link__status_add33c399b34003438f4a0ce4545f61ec}{link\_status64}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01981}01981 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01982}01982         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a17247aceb3068680d7a3909768da4877}{intf\_open}}) \&\& (changed)) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01983}01983                 \mbox{\hyperlink{lio__main_8c_a1652ce36911ac4c83dc9f30df7cad783}{print\_link\_info}}(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01984}01984                 \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_af5bb311dcb3438d0ed898e9df284c1c5}{link\_changes}}++;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01985}01985                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab938dec6629cd68cf950f7e72f8a274d}{link}}.\mbox{\hyperlink{unionocteon__link__status_ae37b5eac8622127d61e40081d5e5f4ed}{s}}.\mbox{\hyperlink{unionocteon__link__status_a4c66290c810d4bc3372d88e9dec84008}{link\_up}})}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01986}01986                         if\_link\_state\_change(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}}, LINK\_STATE\_UP);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01987}01987                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01988}01988                         if\_link\_state\_change(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}}, LINK\_STATE\_DOWN);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01989}01989         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01990}01990 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01991}01991 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01992}01992 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01993}01993 \textcolor{comment}{ * \(\backslash\)brief Callback for rx ctrl}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01994}01994 \textcolor{comment}{ * @param status status of request}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01995}01995 \textcolor{comment}{ * @param buf pointer to resp structure}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01996}01996 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01997}01997 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01998}\mbox{\hyperlink{lio__main_8c_a58b7010ec8643da62406018a5a59a4f7}{01998}} \mbox{\hyperlink{lio__main_8c_a58b7010ec8643da62406018a5a59a4f7}{lio\_rx\_ctl\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t status, \textcolor{keywordtype}{void} *buf)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l01999}01999 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02000}02000         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__soft__command}{lio\_soft\_command}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__soft__command}{lio\_soft\_command}} *)buf;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02001}02001         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__rx__ctl__context}{lio\_rx\_ctl\_context}} *ctx;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02002}02002 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02003}02003         ctx = (\textcolor{keyword}{struct }\mbox{\hyperlink{structlio__rx__ctl__context}{lio\_rx\_ctl\_context}} *)sc-\/>\mbox{\hyperlink{structlio__soft__command_a288d7c6ce348f6c917681748ebf432fd}{ctxptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02004}02004 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02005}02005         oct = \mbox{\hyperlink{lio__device_8c_ab6f265f5a5b9dfee70db2c4460a9d538}{lio\_get\_device}}(ctx-\/>\mbox{\hyperlink{structlio__rx__ctl__context_acb2f2a20319b7b6937a8f52225f3999e}{octeon\_id}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02006}02006         \textcolor{keywordflow}{if} (status)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02007}02007                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}rx ctl instruction failed. Status: \%llx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02008}02008                             \mbox{\hyperlink{lio__main_8h_ae67a87eb5deeb31e550aa38dfa869505}{LIO\_CAST64}}(status));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02009}02009         ctx-\/>\mbox{\hyperlink{structlio__rx__ctl__context_a4ecf4e0ab888488073b05fccb6f7e07e}{cond}} = 1;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02010}02010 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02011}02011         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02012}02012 \textcolor{comment}{         * This barrier is required to be sure that the response has been}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02013}02013 \textcolor{comment}{         * written fully before waking up the handler}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02014}02014 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02015}02015         wmb();}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02016}02016 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02017}02017 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02018}02018 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02019}\mbox{\hyperlink{lio__main_8c_ac389159dbd145c9785dd8469a75929fa}{02019}} \mbox{\hyperlink{lio__main_8c_ac389159dbd145c9785dd8469a75929fa}{lio\_send\_rx\_ctrl\_cmd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio}{lio}} *\mbox{\hyperlink{structlio}{lio}}, \textcolor{keywordtype}{int} start\_stop)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02020}02020 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02021}02021         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__soft__command}{lio\_soft\_command}} *sc;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02022}02022         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__rx__ctl__context}{lio\_rx\_ctl\_context}} *ctx;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02023}02023         \textcolor{keyword}{union }\mbox{\hyperlink{unionocteon__cmd}{octeon\_cmd}}      *ncmd;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02024}02024         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = (\textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}} *)\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02025}02025         \textcolor{keywordtype}{int}     ctx\_size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__rx__ctl__context}{lio\_rx\_ctl\_context}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02026}02026         \textcolor{keywordtype}{int}     retval;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02027}02027 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02028}02028         \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a38144c633add54a1c2546bedf820da2c}{rx\_on}} == start\_stop)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02029}02029                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02030}02030 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02031}02031         sc = \mbox{\hyperlink{lio__iq_8h_add1cd4d610e5132e206f17aa347c6116}{lio\_alloc\_soft\_command}}(oct, \mbox{\hyperlink{lio__common_8h_ae5c5b88cddd153bccec303ce6be63718}{OCTEON\_CMD\_SIZE}}, 16, ctx\_size);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02032}02032         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02033}02033                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02034}02034 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02035}02035         ncmd = (\textcolor{keyword}{union }\mbox{\hyperlink{unionocteon__cmd}{octeon\_cmd}} *)sc-\/>\mbox{\hyperlink{structlio__soft__command_acaf5313ed39db3b404d471eb73a6494d}{virtdptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02036}02036         ctx = (\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__rx__ctl__context}{lio\_rx\_ctl\_context}} *)sc-\/>\mbox{\hyperlink{structlio__soft__command_a288d7c6ce348f6c917681748ebf432fd}{ctxptr}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02037}02037 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02038}02038         ctx-\/>\mbox{\hyperlink{structlio__rx__ctl__context_a4ecf4e0ab888488073b05fccb6f7e07e}{cond}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02039}02039         ctx-\/>\mbox{\hyperlink{structlio__rx__ctl__context_acb2f2a20319b7b6937a8f52225f3999e}{octeon\_id}} = \mbox{\hyperlink{lio__device_8c_abccac796328628e806a42dd0cf14cdb2}{lio\_get\_device\_id}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02040}02040         ncmd-\/>\mbox{\hyperlink{unionocteon__cmd_abdc7441d60674e269cc22b4a1facb233}{cmd64}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02041}02041         ncmd-\/>\mbox{\hyperlink{unionocteon__cmd_ad5cae7e8f601a66277962156b10a211e}{s}}.\mbox{\hyperlink{unionocteon__cmd_ae8a289a502362b98e550d65d3986dc3f}{cmd}} = \mbox{\hyperlink{lio__common_8h_a4031877c65c5cfbac601fd533949b7de}{LIO\_CMD\_RX\_CTL}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02042}02042         ncmd-\/>\mbox{\hyperlink{unionocteon__cmd_ad5cae7e8f601a66277962156b10a211e}{s}}.\mbox{\hyperlink{unionocteon__cmd_aa4b02c6bc773b809463ceb325e8fdc5f}{param1}} = start\_stop;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02043}02043 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02044}02044         \mbox{\hyperlink{lio__main_8h_ab294e8e0e748bf0d78f5c1c0283a79cf}{lio\_swap\_8B\_data}}((uint64\_t *)ncmd, (\mbox{\hyperlink{lio__common_8h_ae5c5b88cddd153bccec303ce6be63718}{OCTEON\_CMD\_SIZE}} >> 3));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02045}02045 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02046}02046         sc-\/>\mbox{\hyperlink{structlio__soft__command_ad15512a7fe14de8f48679ea491ceef6d}{iq\_no}} = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[0].\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02047}02047 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02048}02048         \mbox{\hyperlink{lio__iq_8h_a6bd987af0b5107ea95f63de23cb68cda}{lio\_prepare\_soft\_command}}(oct, sc, \mbox{\hyperlink{lio__common_8h_a33e94e4d8a48c4f8fcca7f71a4f622c3}{LIO\_OPCODE\_NIC}}, \mbox{\hyperlink{lio__common_8h_a471543356599fbd11ef4ec2bd3c13d05}{LIO\_OPCODE\_NIC\_CMD}}, 0,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02049}02049                                  0, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02050}02050 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02051}02051         sc-\/>\mbox{\hyperlink{structlio__soft__command_a912a296891fe84dc401a7219a8847063}{callback}} = \mbox{\hyperlink{lio__main_8c_a58b7010ec8643da62406018a5a59a4f7}{lio\_rx\_ctl\_callback}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02052}02052         sc-\/>\mbox{\hyperlink{structlio__soft__command_a998df93b613de98f6a4f5f47ac72f64a}{callback\_arg}} = sc;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02053}02053         sc-\/>\mbox{\hyperlink{structlio__soft__command_a8e77d97141a049d956998e5bc28bc90d}{wait\_time}} = 5000;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02054}02054 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02055}02055         retval = \mbox{\hyperlink{lio__iq_8h_a208aa2e8ecfdc37f4f3f961afd44c264}{lio\_send\_soft\_command}}(oct, sc);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02056}02056         \textcolor{keywordflow}{if} (retval == \mbox{\hyperlink{lio__iq_8h_a7a8baba01e32a87bd344a3ec2c8f703a}{LIO\_IQ\_SEND\_FAILED}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02057}02057                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}Failed to send RX Control message\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02058}02058         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02059}02059                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02060}02060 \textcolor{comment}{                 * Sleep on a wait queue till the cond flag indicates that the}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02061}02061 \textcolor{comment}{                 * response arrived or timed-\/out.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02062}02062 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02063}02063                 \mbox{\hyperlink{lio__main_8h_ac82f1f60442fef9cf0258d63ff64cafe}{lio\_sleep\_cond}}(oct, \&ctx-\/>\mbox{\hyperlink{structlio__rx__ctl__context_a4ecf4e0ab888488073b05fccb6f7e07e}{cond}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02064}02064                 oct-\/>\mbox{\hyperlink{structocteon__device_a15987c578f76afc4e6d187252efe23bc}{props}}.\mbox{\hyperlink{structlio__if__props_a38144c633add54a1c2546bedf820da2c}{rx\_on}} = start\_stop;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02065}02065         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02066}02066 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02067}02067         \mbox{\hyperlink{lio__iq_8h_aeacdddc60eaf524a3482cbd54a8e6fb0}{lio\_free\_soft\_command}}(oct, sc);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02068}02068 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02069}02069 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02070}02070 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02071}\mbox{\hyperlink{lio__main_8c_a00c89086af7e85c75dc1b8b97b7a73b3}{02071}} \mbox{\hyperlink{lio__main_8c_a00c89086af7e85c75dc1b8b97b7a73b3}{lio\_vlan\_rx\_add\_vid}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} ifnet *ifp, uint16\_t vid)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02072}02072 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02073}02073         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__ctrl__pkt}{lio\_ctrl\_pkt}} nctrl;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02074}02074         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}           *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02075}02075         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02076}02076         \textcolor{keywordtype}{int}     ret = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02077}02077 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02078}02078         \textcolor{keywordflow}{if} (if\_getsoftc(ifp) != arg)    \textcolor{comment}{/* Not our event */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02079}02079                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02080}02080 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02081}02081         \textcolor{keywordflow}{if} ((vid == 0) || (vid > 4095)) \textcolor{comment}{/* Invalid */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02082}02082                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02083}02083 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02084}02084         bzero(\&nctrl, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__ctrl__pkt}{lio\_ctrl\_pkt}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02085}02085 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02086}02086         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_abdc7441d60674e269cc22b4a1facb233}{cmd64}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02087}02087         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_ad5cae7e8f601a66277962156b10a211e}{s}}.\mbox{\hyperlink{unionocteon__cmd_ae8a289a502362b98e550d65d3986dc3f}{cmd}} = \mbox{\hyperlink{lio__common_8h_a46e11ff39571f80aa8c23a201b967aaf}{LIO\_CMD\_ADD\_VLAN\_FILTER}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02088}02088         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_ad5cae7e8f601a66277962156b10a211e}{s}}.\mbox{\hyperlink{unionocteon__cmd_aa4b02c6bc773b809463ceb325e8fdc5f}{param1}} = vid;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02089}02089         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a8a585822f4eb70f431c7db4606c50a50}{iq\_no}} = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[0].\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02090}02090         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a4415355127c5111f0570276c84d198a6}{wait\_time}} = 100;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02091}02091         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a8ed757510cd56d869fbc2a281008b91f}{lio}} = \mbox{\hyperlink{structlio}{lio}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02092}02092         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_adcc5ed7ab9f23d57202ceff098fa2146}{cb\_fn}} = \mbox{\hyperlink{lio__core_8c_a48c1e67dffbf88a354e7ef45e0261674}{lio\_ctrl\_cmd\_completion}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02093}02093 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02094}02094         ret = \mbox{\hyperlink{lio__ctrl_8c_a93d515939a6aef78b9f008a414e73940}{lio\_send\_ctrl\_pkt}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}}, \&nctrl);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02095}02095         \textcolor{keywordflow}{if} (ret < 0) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02096}02096                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}Add VLAN filter failed in core (ret: 0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02097}02097                             ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02098}02098         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02099}02099 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02100}02100 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02101}02101 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02102}\mbox{\hyperlink{lio__main_8c_a1bc24e64de3307b31cbd8ae9a8630faf}{02102}} \mbox{\hyperlink{lio__main_8c_a1bc24e64de3307b31cbd8ae9a8630faf}{lio\_vlan\_rx\_kill\_vid}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} ifnet *ifp, uint16\_t vid)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02103}02103 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02104}02104         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio__ctrl__pkt}{lio\_ctrl\_pkt}} nctrl;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02105}02105         \textcolor{keyword}{struct }\mbox{\hyperlink{structlio}{lio}}           *\mbox{\hyperlink{structlio}{lio}} = if\_getsoftc(\mbox{\hyperlink{structlio_a697242953be9b24a43568960906f5b86}{ifp}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02106}02106         \textcolor{keyword}{struct }\mbox{\hyperlink{structocteon__device}{octeon\_device}}       *oct = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02107}02107         \textcolor{keywordtype}{int}     ret = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02108}02108 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02109}02109         \textcolor{keywordflow}{if} (if\_getsoftc(ifp) != arg)    \textcolor{comment}{/* Not our event */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02110}02110                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02111}02111 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02112}02112         \textcolor{keywordflow}{if} ((vid == 0) || (vid > 4095)) \textcolor{comment}{/* Invalid */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02113}02113                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02114}02114 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02115}02115         bzero(\&nctrl, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structlio__ctrl__pkt}{lio\_ctrl\_pkt}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02116}02116 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02117}02117         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_abdc7441d60674e269cc22b4a1facb233}{cmd64}} = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02118}02118         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_ad5cae7e8f601a66277962156b10a211e}{s}}.\mbox{\hyperlink{unionocteon__cmd_ae8a289a502362b98e550d65d3986dc3f}{cmd}} = \mbox{\hyperlink{lio__common_8h_afa702941f27884618eb2310dc88e7c0e}{LIO\_CMD\_DEL\_VLAN\_FILTER}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02119}02119         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a5ba377c8c6282ebc84f072360d28a1f7}{ncmd}}.\mbox{\hyperlink{unionocteon__cmd_ad5cae7e8f601a66277962156b10a211e}{s}}.\mbox{\hyperlink{unionocteon__cmd_aa4b02c6bc773b809463ceb325e8fdc5f}{param1}} = vid;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02120}02120         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a8a585822f4eb70f431c7db4606c50a50}{iq\_no}} = \mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_aea3442e0b2b012f49360d68d80e30323}{linfo}}.\mbox{\hyperlink{structocteon__link__info_ab81ea307e028882d131992fd679923d7}{txpciq}}[0].\mbox{\hyperlink{unionocteon__txpciq_a6d4c2fdb74975a61c5ff707a70b8b277}{s}}.\mbox{\hyperlink{unionocteon__txpciq_a036a1f65fa239c8b4dbdcca730c8e47a}{q\_no}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02121}02121         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a4415355127c5111f0570276c84d198a6}{wait\_time}} = 100;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02122}02122         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_a8ed757510cd56d869fbc2a281008b91f}{lio}} = \mbox{\hyperlink{structlio}{lio}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02123}02123         nctrl.\mbox{\hyperlink{structlio__ctrl__pkt_adcc5ed7ab9f23d57202ceff098fa2146}{cb\_fn}} = \mbox{\hyperlink{lio__core_8c_a48c1e67dffbf88a354e7ef45e0261674}{lio\_ctrl\_cmd\_completion}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02124}02124 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02125}02125         ret = \mbox{\hyperlink{lio__ctrl_8c_a93d515939a6aef78b9f008a414e73940}{lio\_send\_ctrl\_pkt}}(\mbox{\hyperlink{structlio}{lio}}-\/>\mbox{\hyperlink{structlio_a8b0ccb8d2631f975afe11246f7010a6d}{oct\_dev}}, \&nctrl);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02126}02126         \textcolor{keywordflow}{if} (ret < 0) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02127}02127                 \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02128}02128                             \textcolor{stringliteral}{"{}Kill VLAN filter failed in core (ret: 0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02129}02129                             ret);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02130}02130         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02131}02131 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02132}02132 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02133}02133 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02134}\mbox{\hyperlink{lio__main_8c_af8dbabee6aaa0be6a06dc92703a0bebf}{02134}} \mbox{\hyperlink{lio__main_8c_af8dbabee6aaa0be6a06dc92703a0bebf}{lio\_wait\_for\_oq\_pkts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02135}02135 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02136}02136         \textcolor{keywordtype}{int}     i, pending\_pkts, pkt\_cnt = 0, retry = 100;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02137}02137 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02138}02138         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02139}02139                 pending\_pkts = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02140}02140 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02141}02141                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{lio__config_8h_a557f34ad47219b86b0222b7927e826e5}{LIO\_MAX\_OUTPUT\_QUEUES}}(oct); i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02142}02142                         \textcolor{keywordflow}{if} (!(oct-\/>\mbox{\hyperlink{structocteon__device_a2572013042e73f339174c82cf587494c}{io\_qmask}}.\mbox{\hyperlink{structlio__io__enable_a4eef5bebf2bae1622649170bdb0bb774}{oq}} \& \mbox{\hyperlink{lio__main_8h_aed42b76522e8377b3b0e77b64ee04fae}{BIT\_ULL}}(i)))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02143}02143                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02144}02144 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02145}02145                         pkt\_cnt = \mbox{\hyperlink{lio__droq_8c_ad33dc530043bc887d6cfdc451be9794a}{lio\_droq\_check\_hw\_for\_pkts}}(oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i]);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02146}02146                         \textcolor{keywordflow}{if} (pkt\_cnt > 0) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02147}02147                                 pending\_pkts += pkt\_cnt;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02148}02148                                 taskqueue\_enqueue(oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i]-\/>\mbox{\hyperlink{structlio__droq_ab239046de0e4e7b355023308f5bced5b}{droq\_taskqueue}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02149}02149                                                   \&oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i]-\/>\mbox{\hyperlink{structlio__droq_aec53447ea85ed1c19cd8b7e0cea12cfe}{droq\_task}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02150}02150                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02151}02151                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02152}02152 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02153}02153                 pkt\_cnt = 0;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02154}02154                 \mbox{\hyperlink{lio__bsd_8h_a7127c19922ac115d8494a76ae19d0480}{lio\_sleep\_timeout}}(1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02155}02155         \} \textcolor{keywordflow}{while} (retry-\/-\/ \&\& pending\_pkts);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02156}02156 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02157}02157         \textcolor{keywordflow}{return} (pkt\_cnt);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02158}02158 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02159}02159 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02160}02160 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02161}\mbox{\hyperlink{lio__main_8c_ae2fd63251d7062351c47d7f5972a3c9a}{02161}} \mbox{\hyperlink{lio__main_8c_ae2fd63251d7062351c47d7f5972a3c9a}{lio\_destroy\_resources}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02162}02162 \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02163}02163         \textcolor{keywordtype}{int} i, refcount;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02164}02164 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02165}02165         \textcolor{keywordflow}{switch} (atomic\_load\_acq\_int(\&oct-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}})) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02166}02166         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a9680c4e9ce767a2c48ed34111b244448}{LIO\_DEV\_RUNNING}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02167}02167         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_af662a032e5cbedf642d0c8f13e871003}{LIO\_DEV\_CORE\_OK}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02168}02168                 \textcolor{comment}{/* No more instructions will be forwarded. */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02169}02169                 atomic\_store\_rel\_int(\&oct-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}, \mbox{\hyperlink{lio__device_8h_a6ff2aab7f8eb3d624c0be3eca4b36877}{LIO\_DEV\_IN\_RESET}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02170}02170 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02171}02171                 oct-\/>\mbox{\hyperlink{structocteon__device_af5cd4924859965154259579d74739ee6}{app\_mode}} = \mbox{\hyperlink{lio__common_8h_a98798fb86630fcfe142a259fb12adca8}{LIO\_DRV\_INVALID\_APP}};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02172}02172                 \mbox{\hyperlink{lio__bsd_8h_a1e6b64f2d951d285e7d956ce8cd5dd04}{lio\_dev\_dbg}}(oct, \textcolor{stringliteral}{"{}Device state is now \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02173}02173                             \mbox{\hyperlink{lio__device_8c_a4f5e467630c4dbb3b155a71f89acb246}{lio\_get\_state\_string}}(\&oct-\/>\mbox{\hyperlink{structocteon__device_a58bdbcf5e1e1809ae0e3471e81e92a08}{status}}));}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02174}02174 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02175}02175                 \mbox{\hyperlink{lio__bsd_8h_a7127c19922ac115d8494a76ae19d0480}{lio\_sleep\_timeout}}(100);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02176}02176 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02177}02177                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02178}02178         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a54a225945d7ea57434192ef1722929f4}{LIO\_DEV\_HOST\_OK}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02179}02179 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02180}02180                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02181}02181         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_aefa97f185807b4dd1078366f8f13146a}{LIO\_DEV\_CONSOLE\_INIT\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02182}02182                 \textcolor{comment}{/* Remove any consoles */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02183}02183                 \mbox{\hyperlink{lio__console_8c_a298cdd9fe302f43e769044bc0f9130e0}{lio\_remove\_consoles}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02184}02184 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02185}02185                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02186}02186         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_add5dc61e81daefc7bfa1d89dff5542f6}{LIO\_DEV\_IO\_QUEUES\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02187}02187                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__network_8h_a571873e98724c01fe5a3c01f02db19e3}{lio\_wait\_for\_pending\_requests}}(oct))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02188}02188                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}There were pending requests\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02189}02189 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02190}02190                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__iq_8h_ac4900db5765b1b439c6cac79a94ce7b3}{lio\_wait\_for\_instr\_fetch}}(oct))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02191}02191                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}IQ had pending instructions\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02192}02192 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02193}02193                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02194}02194 \textcolor{comment}{                 * Disable the input and output queues now. No more packets will}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02195}02195 \textcolor{comment}{                 * arrive from Octeon, but we should wait for all packet}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02196}02196 \textcolor{comment}{                 * processing to finish.}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02197}02197 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02198}02198                 oct-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_a9bc68fa0be0dda8e3d94fd24700b5e2d}{disable\_io\_queues}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02199}02199 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02200}02200                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_af8dbabee6aaa0be6a06dc92703a0bebf}{lio\_wait\_for\_oq\_pkts}}(oct))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02201}02201                         \mbox{\hyperlink{lio__bsd_8h_abe414f7d7854f53de3fe9db975df03db}{lio\_dev\_err}}(oct, \textcolor{stringliteral}{"{}OQ had pending packets\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02202}02202 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02203}02203                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02204}02204         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a3916ce9e4e331e57a92d027f5ae2fcbe}{LIO\_DEV\_INTR\_SET\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02205}02205                 \textcolor{comment}{/* Disable interrupts  */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02206}02206                 oct-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_a93ec2340657567a9e174b2746d2b03fa}{disable\_interrupt}}(oct, \mbox{\hyperlink{lio__device_8h_a02b2b5bff89c9704ffd338aa6068c597}{OCTEON\_ALL\_INTR}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02207}02207 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02208}02208                 \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_a543cadb3f5a2102e1086b9cb4159ed78}{msix\_on}}) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02209}02209                         \textcolor{keywordflow}{for} (i = 0; i < oct-\/>\mbox{\hyperlink{structocteon__device_add07bbf3fc348f61059d8150d69e0daa}{num\_msix\_irqs}} -\/ 1; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02210}02210                                 \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_a71e3dab0368e240c06387057f5858425}{ioq\_vector}}[i].\mbox{\hyperlink{structlio__ioq__vector_ac9d63d56acc3cb8e7e1e544349b97bd1}{tag}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02211}02211                                         bus\_teardown\_intr(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02212}02212                                                   oct-\/>\mbox{\hyperlink{structocteon__device_a71e3dab0368e240c06387057f5858425}{ioq\_vector}}[i].\mbox{\hyperlink{structlio__ioq__vector_a741ec9bd9a8bea57df8638110aa0b193}{msix\_res}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02213}02213                                                       oct-\/>\mbox{\hyperlink{structocteon__device_a71e3dab0368e240c06387057f5858425}{ioq\_vector}}[i].\mbox{\hyperlink{structlio__ioq__vector_ac9d63d56acc3cb8e7e1e544349b97bd1}{tag}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02214}02214                                         oct-\/>\mbox{\hyperlink{structocteon__device_a71e3dab0368e240c06387057f5858425}{ioq\_vector}}[i].\mbox{\hyperlink{structlio__ioq__vector_ac9d63d56acc3cb8e7e1e544349b97bd1}{tag}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02215}02215                                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02216}02216                                 \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_a71e3dab0368e240c06387057f5858425}{ioq\_vector}}[i].\mbox{\hyperlink{structlio__ioq__vector_a741ec9bd9a8bea57df8638110aa0b193}{msix\_res}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02217}02217                                         bus\_release\_resource(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02218}02218                                                 SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02219}02219                                                 oct-\/>\mbox{\hyperlink{structocteon__device_a71e3dab0368e240c06387057f5858425}{ioq\_vector}}[i].\mbox{\hyperlink{structlio__ioq__vector_a2150628f03572c5744fe549ad8288977}{vector}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02220}02220                                                 oct-\/>\mbox{\hyperlink{structocteon__device_a71e3dab0368e240c06387057f5858425}{ioq\_vector}}[i].\mbox{\hyperlink{structlio__ioq__vector_a741ec9bd9a8bea57df8638110aa0b193}{msix\_res}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02221}02221                                         oct-\/>\mbox{\hyperlink{structocteon__device_a71e3dab0368e240c06387057f5858425}{ioq\_vector}}[i].\mbox{\hyperlink{structlio__ioq__vector_a741ec9bd9a8bea57df8638110aa0b193}{msix\_res}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02222}02222                                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02223}02223                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02224}02224                         \textcolor{comment}{/* non-\/iov vector's argument is oct struct */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02225}02225                         \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_ac1c864fd6d53f4454e362e35bf6dd0d3}{tag}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02226}02226                                 bus\_teardown\_intr(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}, oct-\/>\mbox{\hyperlink{structocteon__device_ae056c2f8bc4ba545159b8e66c71b6a42}{msix\_res}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02227}02227                                                   oct-\/>\mbox{\hyperlink{structocteon__device_ac1c864fd6d53f4454e362e35bf6dd0d3}{tag}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02228}02228                                 oct-\/>\mbox{\hyperlink{structocteon__device_ac1c864fd6d53f4454e362e35bf6dd0d3}{tag}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02229}02229                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02230}02230 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02231}02231                         \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_ae056c2f8bc4ba545159b8e66c71b6a42}{msix\_res}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02232}02232                                 bus\_release\_resource(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}}, SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02233}02233                                                      oct-\/>\mbox{\hyperlink{structocteon__device_a30332507e3a620aeb9cd9e4355f692a7}{aux\_vector}},}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02234}02234                                                      oct-\/>\mbox{\hyperlink{structocteon__device_ae056c2f8bc4ba545159b8e66c71b6a42}{msix\_res}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02235}02235                                 oct-\/>\mbox{\hyperlink{structocteon__device_ae056c2f8bc4ba545159b8e66c71b6a42}{msix\_res}} = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02236}02236                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02237}02237 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02238}02238                         pci\_release\_msi(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02239}02239                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02240}02240                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02241}02241         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a6ff2aab7f8eb3d624c0be3eca4b36877}{LIO\_DEV\_IN\_RESET}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02242}02242         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_afe9cfe60b5324223a09523e0616be34c}{LIO\_DEV\_DROQ\_INIT\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02243}02243                 \textcolor{comment}{/* Wait for any pending operations */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02244}02244                 \mbox{\hyperlink{lio__bsd_8h_a5c47086ad21f04cdc2b7e21dd15c3890}{lio\_mdelay}}(100);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02245}02245                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{lio__config_8h_a557f34ad47219b86b0222b7927e826e5}{LIO\_MAX\_OUTPUT\_QUEUES}}(oct); i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02246}02246                         \textcolor{keywordflow}{if} (!(oct-\/>\mbox{\hyperlink{structocteon__device_a2572013042e73f339174c82cf587494c}{io\_qmask}}.\mbox{\hyperlink{structlio__io__enable_a4eef5bebf2bae1622649170bdb0bb774}{oq}} \& \mbox{\hyperlink{lio__main_8h_aed42b76522e8377b3b0e77b64ee04fae}{BIT\_ULL}}(i)))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02247}02247                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02248}02248                         \mbox{\hyperlink{lio__droq_8c_a2bfce0bc110d2d53e2b5ab44151600e6}{lio\_delete\_droq}}(oct, i);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02249}02249                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02250}02250 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02251}02251                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02252}02252         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_ae921661ff4c31ec6536e0fef22044c5b}{LIO\_DEV\_RESP\_LIST\_INIT\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02253}02253                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{lio__config_8h_ab48d8ceb766362d8e504757729ea4650}{LIO\_MAX\_POSSIBLE\_OUTPUT\_QUEUES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02254}02254                         \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i] != NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02255}02255                                 free(oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i], M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02256}02256                                 oct-\/>\mbox{\hyperlink{structocteon__device_aa5854f223a4f85c18564802c6a8d2b82}{droq}}[i] = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02257}02257                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02258}02258                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02259}02259                 \mbox{\hyperlink{lio__response__manager_8c_ada7b712587ce5cb34fd4ae610def0296}{lio\_delete\_response\_list}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02260}02260 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02261}02261                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02262}02262         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_af75c59ff974ab81ba86b58ffd2d989dc}{LIO\_DEV\_INSTR\_QUEUE\_INIT\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02263}02263                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{lio__config_8h_ad5027b8a431b10ce01025a2887fba297}{LIO\_MAX\_INSTR\_QUEUES}}(oct); i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02264}02264                         \textcolor{keywordflow}{if} (!(oct-\/>\mbox{\hyperlink{structocteon__device_a2572013042e73f339174c82cf587494c}{io\_qmask}}.\mbox{\hyperlink{structlio__io__enable_ac488befca84b2b1657e8d7044be22383}{iq}} \& \mbox{\hyperlink{lio__main_8h_aed42b76522e8377b3b0e77b64ee04fae}{BIT\_ULL}}(i)))}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02265}02265                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02266}02266 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02267}02267                         \mbox{\hyperlink{lio__iq_8h_aa8e334609feb4119fcd037b89fc12298}{lio\_delete\_instr\_queue}}(oct, i);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02268}02268                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02269}02269 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02270}02270                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02271}02271         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a9d19683f16520f114a7219901da9d177}{LIO\_DEV\_MSIX\_ALLOC\_VECTOR\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02272}02272                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{lio__config_8h_abbb185566e0a27e22fe5cdf5d4ee1f14}{LIO\_MAX\_POSSIBLE\_INSTR\_QUEUES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02273}02273                         \textcolor{keywordflow}{if} (oct-\/>\mbox{\hyperlink{structocteon__device_ad3b9d2c9e6e5c1f264886dcd3f373676}{instr\_queue}}[i] != NULL) \{}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02274}02274                                 free(oct-\/>\mbox{\hyperlink{structocteon__device_ad3b9d2c9e6e5c1f264886dcd3f373676}{instr\_queue}}[i], M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02275}02275                                 oct-\/>\mbox{\hyperlink{structocteon__device_ad3b9d2c9e6e5c1f264886dcd3f373676}{instr\_queue}}[i] = NULL;}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02276}02276                         \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02277}02277                 \}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02278}02278                 \mbox{\hyperlink{lio__device_8c_a8ff7b2c5bcc121475f41f2bc0bc21eab}{lio\_free\_ioq\_vector}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02279}02279 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02280}02280                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02281}02281         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a37ccc736a686e3f96490c6faa5e4840e}{LIO\_DEV\_SC\_BUFF\_POOL\_INIT\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02282}02282                 \mbox{\hyperlink{lio__iq_8h_a1a098b81a6c70e9715022bff13860b4f}{lio\_free\_sc\_buffer\_pool}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02283}02283 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02284}02284                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02285}02285         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a73002cc047b242b3bf3804e16a0cf9c7}{LIO\_DEV\_DISPATCH\_INIT\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02286}02286                 \mbox{\hyperlink{lio__device_8c_a0bf2f961119ca6cf083fbe4de18780de}{lio\_delete\_dispatch\_list}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02287}02287 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02288}02288                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02289}02289         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a5a90413de983e5e6d1a108b0ffcd006e}{LIO\_DEV\_PCI\_MAP\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02290}02290                 refcount = \mbox{\hyperlink{lio__device_8c_ae6c679907cfa3439dc40a453c62a6bce}{lio\_deregister\_device}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02291}02291 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02292}02292                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{lio__main_8c_ae25611500be1d259ddbb569d478c5505}{fw\_type\_is\_none}}())}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02293}02293                         \mbox{\hyperlink{lio__main_8c_ae5365457055ebd2f07c217027d7d6c3f}{lio\_pci\_flr}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02294}02294 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02295}02295                 \textcolor{keywordflow}{if} (!refcount)}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02296}02296                         oct-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_a7e40c6321b2849e50746c837931d0dbe}{soft\_reset}}(oct);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02297}02297 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02298}02298                 \mbox{\hyperlink{lio__main_8h_a3f71bd147840753189cbd5104b273119}{lio\_unmap\_pci\_barx}}(oct, 0);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02299}02299                 \mbox{\hyperlink{lio__main_8h_a3f71bd147840753189cbd5104b273119}{lio\_unmap\_pci\_barx}}(oct, 1);}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02300}02300 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02301}02301                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02302}02302         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_a39654f765a5a5e326ae965960357b8e2}{LIO\_DEV\_PCI\_ENABLE\_DONE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02303}02303                 \textcolor{comment}{/* Disable the device, releasing the PCI INT */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02304}02304                 pci\_disable\_busmaster(oct-\/>\mbox{\hyperlink{structocteon__device_a2d1f835586ad43c0e0be46da81cd0f3c}{device}});}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02305}02305 }
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02306}02306                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02307}02307         \textcolor{keywordflow}{case} \mbox{\hyperlink{lio__device_8h_af19398512ad3f5599c8ec42f48e5f8b2}{LIO\_DEV\_BEGIN\_STATE}}:}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02308}02308                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02309}02309         \}       \textcolor{comment}{/* end switch (oct-\/>status) */}}
\DoxyCodeLine{\Hypertarget{lio__main_8c_source_l02310}02310 \}}

\end{DoxyCode}
