\hypertarget{bxe_8c_source}{}\doxysection{bxe.\+c}
\label{bxe_8c_source}\index{dev/bxe/bxe.c@{dev/bxe/bxe.c}}
\mbox{\hyperlink{bxe_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2007-\/2014 QLogic Corporation. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00006}00006 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00007}00007 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00008}00008 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "{}AS IS'}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00017}00017 \textcolor{comment}{ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00020}00020 \textcolor{comment}{ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00021}00021 \textcolor{comment}{ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00022}00022 \textcolor{comment}{ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00023}00023 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00024}00024 \textcolor{comment}{ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00025}00025 \textcolor{comment}{ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00026}00026 \textcolor{comment}{ * THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00030}\mbox{\hyperlink{bxe_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{bxe_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00032}\mbox{\hyperlink{bxe_8c_a976c2e4222c6339043f2145097755339}{00032}} \textcolor{preprocessor}{\#define BXE\_DRIVER\_VERSION "{}1.78.91"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00034}00034 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{bxe_8h}{bxe.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00035}00035 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ecore__sp_8h}{ecore\_sp.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00036}00036 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ecore__init_8h}{ecore\_init.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00037}00037 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{ecore__init__ops_8h}{ecore\_init\_ops.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00039}00039 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{57710__int__offsets_8h}{57710\_int\_offsets.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00040}00040 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{57711__int__offsets_8h}{57711\_int\_offsets.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00041}00041 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{57712__int__offsets_8h}{57712\_int\_offsets.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00043}00043 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00044}00044 \textcolor{comment}{ * CTLTYPE\_U64 and sysctl\_handle\_64 were added in r217616. Define these}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00045}00045 \textcolor{comment}{ * explicitly here for older kernels that don't include this changeset.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00046}00046 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00047}00047 \textcolor{preprocessor}{\#ifndef CTLTYPE\_U64}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00048}\mbox{\hyperlink{bxe_8c_a9e3bde6a466f862a0e246ed98f50b54a}{00048}} \textcolor{preprocessor}{\#define CTLTYPE\_U64      CTLTYPE\_QUAD}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00049}\mbox{\hyperlink{bxe_8c_a77015e81478b2b862f6e8c30ac901fa9}{00049}} \textcolor{preprocessor}{\#define sysctl\_handle\_64 sysctl\_handle\_quad}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00050}00050 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00052}00052 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00053}00053 \textcolor{comment}{ * CSUM\_TCP\_IPV6 and CSUM\_UDP\_IPV6 were added in r236170. Define these}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00054}00054 \textcolor{comment}{ * here as zero(0) for older kernels that don't include this changeset}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00055}00055 \textcolor{comment}{ * thereby masking the functionality.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00056}00056 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00057}00057 \textcolor{preprocessor}{\#ifndef CSUM\_TCP\_IPV6}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00058}\mbox{\hyperlink{bxe_8c_a56b8481078a714eaa80d3021e9018375}{00058}} \textcolor{preprocessor}{\#define CSUM\_TCP\_IPV6 0}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00059}\mbox{\hyperlink{bxe_8c_a37bf64f3447600af0819e071353fdfc6}{00059}} \textcolor{preprocessor}{\#define CSUM\_UDP\_IPV6 0}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00060}00060 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00062}\mbox{\hyperlink{bxe_8c_abf5ee2425a2a7809e26334200275ded7}{00062}} \textcolor{preprocessor}{\#define BXE\_DEF\_SB\_ATT\_IDX 0x0001}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00063}\mbox{\hyperlink{bxe_8c_a96802f0fed286b1597566be24d49c60d}{00063}} \textcolor{preprocessor}{\#define BXE\_DEF\_SB\_IDX     0x0002}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00065}00065 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00066}00066 \textcolor{comment}{ * FLR Support -\/ bxe\_pf\_flr\_clnup() is called during nic\_load in the per}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00067}00067 \textcolor{comment}{ * function HW initialization.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00068}00068 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00069}\mbox{\hyperlink{bxe_8c_a62e9ac530e8f1c107b85b49444fb60eb}{00069}} \textcolor{preprocessor}{\#define FLR\_WAIT\_USEC     10000 }\textcolor{comment}{/* 10 msecs */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00070}\mbox{\hyperlink{bxe_8c_ada41c66713fe0642ac2b58eb295ff274}{00070}} \textcolor{preprocessor}{\#define FLR\_WAIT\_INTERVAL 50    }\textcolor{comment}{/* usecs */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00071}\mbox{\hyperlink{bxe_8c_ace9fcc5fdedd8e61818f47e3aa552659}{00071}} \textcolor{preprocessor}{\#define FLR\_POLL\_CNT      (FLR\_WAIT\_USEC / FLR\_WAIT\_INTERVAL) }\textcolor{comment}{/* 200 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00073}\mbox{\hyperlink{structpbf__pN__buf__regs}{00073}} \textcolor{keyword}{struct }\mbox{\hyperlink{structpbf__pN__buf__regs}{pbf\_pN\_buf\_regs}} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00074}\mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{00074}}     \textcolor{keywordtype}{int} \mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{pN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00075}\mbox{\hyperlink{structpbf__pN__buf__regs_a36f2ebecbc9d22794a9c6e89f22e8750}{00075}}     uint32\_t \mbox{\hyperlink{structpbf__pN__buf__regs_a36f2ebecbc9d22794a9c6e89f22e8750}{init\_crd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00076}\mbox{\hyperlink{structpbf__pN__buf__regs_a0a2cc3edebc82f0230b0eb77115810f7}{00076}}     uint32\_t \mbox{\hyperlink{structpbf__pN__buf__regs_a0a2cc3edebc82f0230b0eb77115810f7}{crd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00077}\mbox{\hyperlink{structpbf__pN__buf__regs_ab520bad2dd9d3196ebc2a4720a98dc5e}{00077}}     uint32\_t \mbox{\hyperlink{structpbf__pN__buf__regs_ab520bad2dd9d3196ebc2a4720a98dc5e}{crd\_freed}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00078}00078 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00080}\mbox{\hyperlink{structpbf__pN__cmd__regs}{00080}} \textcolor{keyword}{struct }\mbox{\hyperlink{structpbf__pN__cmd__regs}{pbf\_pN\_cmd\_regs}} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00081}\mbox{\hyperlink{structpbf__pN__cmd__regs_aa006545286818a4f990a2254b7217ac5}{00081}}     \textcolor{keywordtype}{int} \mbox{\hyperlink{structpbf__pN__cmd__regs_aa006545286818a4f990a2254b7217ac5}{pN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00082}\mbox{\hyperlink{structpbf__pN__cmd__regs_a4a1d8cec6aeac1714d064daa0c37a643}{00082}}     uint32\_t \mbox{\hyperlink{structpbf__pN__cmd__regs_a4a1d8cec6aeac1714d064daa0c37a643}{lines\_occup}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00083}\mbox{\hyperlink{structpbf__pN__cmd__regs_ab0d9d726ca4ca9edf9eceb7a85f6c2c0}{00083}}     uint32\_t \mbox{\hyperlink{structpbf__pN__cmd__regs_ab0d9d726ca4ca9edf9eceb7a85f6c2c0}{lines\_freed}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00084}00084 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00086}00086 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00087}00087 \textcolor{comment}{ * PCI Device ID Table used by bxe\_probe().}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00088}00088 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00089}\mbox{\hyperlink{bxe_8c_a0c177be8ae81713e6142735c634b6f96}{00089}} \textcolor{preprocessor}{\#define BXE\_DEVDESC\_MAX 64}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00090}\mbox{\hyperlink{bxe_8c_a48ab994478b2edbaf55db5be134617a3}{00090}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__device__type}{bxe\_device\_type}} \mbox{\hyperlink{bxe_8c_a48ab994478b2edbaf55db5be134617a3}{bxe\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00091}00091     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00092}00092         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00093}00093         \mbox{\hyperlink{bxe_8h_a1b7934c4a8ca6b84ccb8bf427b62b643}{CHIP\_NUM\_57710}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00094}00094         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00095}00095         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57710 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00096}00096     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00097}00097     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00098}00098         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00099}00099         \mbox{\hyperlink{bxe_8h_ad7d65a5bfea8b99a25e2a5a5483f2901}{CHIP\_NUM\_57711}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00100}00100         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00101}00101         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57711 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00102}00102     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00103}00103     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00104}00104         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00105}00105         \mbox{\hyperlink{bxe_8h_a5e7d55be8faa050ec4904d2ee49ea230}{CHIP\_NUM\_57711E}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00106}00106         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00107}00107         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57711E 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00108}00108     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00109}00109     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00110}00110         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00111}00111         \mbox{\hyperlink{bxe_8h_a721416be503b9629887d1f0c19de4d6e}{CHIP\_NUM\_57712}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00112}00112         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00113}00113         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57712 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00114}00114     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00115}00115     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00116}00116         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00117}00117         \mbox{\hyperlink{bxe_8h_a18c98b5098de945d3d53ba2653efac53}{CHIP\_NUM\_57712\_MF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00118}00118         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00119}00119         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57712 MF 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00120}00120     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00121}00121     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00122}00122         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00123}00123         \mbox{\hyperlink{bxe_8h_ae1c6c23934664e98418c148fc053c907}{CHIP\_NUM\_57800}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00124}00124         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00125}00125         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57800 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00126}00126     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00127}00127     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00128}00128         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00129}00129         \mbox{\hyperlink{bxe_8h_af127808062f25478014efcbb14e9759e}{CHIP\_NUM\_57800\_MF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00130}00130         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00131}00131         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57800 MF 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00132}00132     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00133}00133     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00134}00134         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00135}00135         \mbox{\hyperlink{bxe_8h_a006f38dccf5cb273a68bf356ce8be369}{CHIP\_NUM\_57810}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00136}00136         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00137}00137         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57810 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00138}00138     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00139}00139     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00140}00140         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00141}00141         \mbox{\hyperlink{bxe_8h_afd5e2669948af67f18ff7520a5ab8c9e}{CHIP\_NUM\_57810\_MF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00142}00142         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00143}00143         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57810 MF 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00144}00144     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00145}00145     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00146}00146         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00147}00147         \mbox{\hyperlink{bxe_8h_aaac6a9bc04cec8858a85bc319eba842a}{CHIP\_NUM\_57811}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00148}00148         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00149}00149         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57811 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00150}00150     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00151}00151     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00152}00152         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00153}00153         \mbox{\hyperlink{bxe_8h_a82e9d2dfc194a87c7995e94e3350443c}{CHIP\_NUM\_57811\_MF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00154}00154         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00155}00155         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57811 MF 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00156}00156     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00157}00157     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00158}00158         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00159}00159         \mbox{\hyperlink{bxe_8h_ae11bea0f052834ad824fbf0ddb09f3cd}{CHIP\_NUM\_57840\_4\_10}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00160}00160         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00161}00161         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57840 4x10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00162}00162     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00163}00163     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00164}00164         \mbox{\hyperlink{bxe_8h_afb34d67f8e1fa33982b07e9c3cd67b1e}{QLOGIC\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00165}00165         \mbox{\hyperlink{bxe_8h_ae11bea0f052834ad824fbf0ddb09f3cd}{CHIP\_NUM\_57840\_4\_10}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00166}00166         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00167}00167         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57840 4x10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00168}00168     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00169}00169     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00170}00170         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00171}00171         \mbox{\hyperlink{bxe_8h_af97328ab1f73ea1dd64a84cc994fbb75}{CHIP\_NUM\_57840\_2\_20}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00172}00172         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00173}00173         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57840 2x20GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00174}00174     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00175}00175     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00176}00176         \mbox{\hyperlink{bxe_8h_a59eeeeb3dca95bf38fd9b4178eee382c}{BRCM\_VENDORID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00177}00177         \mbox{\hyperlink{bxe_8h_a0ec56f8af3258642955dbb603ea8b60f}{CHIP\_NUM\_57840\_MF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00178}00178         \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}, \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00179}00179         \textcolor{stringliteral}{"{}QLogic NetXtreme II BCM57840 MF 10GbE"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00180}00180     \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00181}00181     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00182}00182         0, 0, 0, 0, NULL}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00183}00183     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00184}00184 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00186}\mbox{\hyperlink{bxe_8c_ae85212e76abf12bb0e7e8e88328f4b9f}{00186}} \mbox{\hyperlink{bxe_8c_ae85212e76abf12bb0e7e8e88328f4b9f}{MALLOC\_DECLARE}}(M\_BXE\_ILT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00187}\mbox{\hyperlink{bxe_8c_a189dcc9794455cadd3ee7eb10e1e606f}{00187}} \mbox{\hyperlink{bxe_8c_a189dcc9794455cadd3ee7eb10e1e606f}{MALLOC\_DEFINE}}(M\_BXE\_ILT, \textcolor{stringliteral}{"{}bxe\_ilt"{}}, \textcolor{stringliteral}{"{}bxe ILT pointer"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00189}00189 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00190}00190 \textcolor{comment}{ * FreeBSD device entry points.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00191}00191 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00192}00192 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_aa65275a1d0b104d85bc1e33d0a1351a4}{bxe\_probe}}(device\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00193}00193 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a3a4c1b80a1fc2e28e0aa40b670ab04a5}{bxe\_attach}}(device\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00194}00194 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a2315da3b037414bdb87c7358d74d7253}{bxe\_detach}}(device\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00195}00195 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_aa35cd261d6769c18724d6893b017663e}{bxe\_shutdown}}(device\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00197}00197 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00198}00198 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00199}00199 \textcolor{comment}{ * FreeBSD KLD module/device interface event handler method.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00200}00200 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00201}\mbox{\hyperlink{bxe_8c_ad5f95a860474692ebaa9be8464c96c5c}{00201}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{bxe_8c_ad5f95a860474692ebaa9be8464c96c5c}{bxe\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00202}00202     \textcolor{comment}{/* Device interface (device\_if.h) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00203}00203     DEVMETHOD(device\_probe,     \mbox{\hyperlink{bxe_8c_aa65275a1d0b104d85bc1e33d0a1351a4}{bxe\_probe}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00204}00204     DEVMETHOD(device\_attach,    \mbox{\hyperlink{bxe_8c_a3a4c1b80a1fc2e28e0aa40b670ab04a5}{bxe\_attach}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00205}00205     DEVMETHOD(device\_detach,    \mbox{\hyperlink{bxe_8c_a2315da3b037414bdb87c7358d74d7253}{bxe\_detach}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00206}00206     DEVMETHOD(device\_shutdown,  \mbox{\hyperlink{bxe_8c_aa35cd261d6769c18724d6893b017663e}{bxe\_shutdown}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00207}00207     \textcolor{comment}{/* Bus interface (bus\_if.h) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00208}00208     DEVMETHOD(bus\_print\_child,  bus\_generic\_print\_child),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00209}00209     DEVMETHOD(bus\_driver\_added, bus\_generic\_driver\_added),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00210}00210     KOBJMETHOD\_END}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00211}00211 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00213}00213 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00214}00214 \textcolor{comment}{ * FreeBSD KLD Module data declaration}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00215}00215 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00216}\mbox{\hyperlink{bxe_8c_a96a6b5c035ca887523f6514ce022f2bc}{00216}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{bxe_8c_a96a6b5c035ca887523f6514ce022f2bc}{bxe\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00217}00217     \textcolor{stringliteral}{"{}bxe"{}},                   \textcolor{comment}{/* module name */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00218}00218     \mbox{\hyperlink{bxe_8c_ad5f95a860474692ebaa9be8464c96c5c}{bxe\_methods}},             \textcolor{comment}{/* event handler */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00219}00219     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}}) \textcolor{comment}{/* extra data */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00220}00220 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00221}00221 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00222}00222 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00223}00223 \textcolor{comment}{ * FreeBSD dev class is needed to manage dev instances and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00224}00224 \textcolor{comment}{ * to associate with a bus type}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00225}00225 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00226}\mbox{\hyperlink{bxe_8c_a13921de4482a03d0c5b8c8aa910d790b}{00226}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{bxe_8c_a13921de4482a03d0c5b8c8aa910d790b}{bxe\_devclass}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00228}\mbox{\hyperlink{bxe_8c_ac2e2fbad80e2b2a415d6114bf44441e4}{00228}} \mbox{\hyperlink{bxe_8c_ac2e2fbad80e2b2a415d6114bf44441e4}{MODULE\_DEPEND}}(bxe, pci, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00229}\mbox{\hyperlink{bxe_8c_a6f7a5ae49aeec64260f30f4d5cdb10af}{00229}} \mbox{\hyperlink{bxe_8c_ac2e2fbad80e2b2a415d6114bf44441e4}{MODULE\_DEPEND}}(bxe, ether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00230}\mbox{\hyperlink{bxe_8c_a4711faf317f91872bf1bd18a05767912}{00230}} \mbox{\hyperlink{bxe_8c_a4711faf317f91872bf1bd18a05767912}{DRIVER\_MODULE}}(bxe, pci, \mbox{\hyperlink{bxe_8c_a96a6b5c035ca887523f6514ce022f2bc}{bxe\_driver}}, \mbox{\hyperlink{bxe_8c_a13921de4482a03d0c5b8c8aa910d790b}{bxe\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00232}\mbox{\hyperlink{bxe_8c_a6c21e2ce8ce7bdd6621feeb76c8e868f}{00232}} \mbox{\hyperlink{bxe_8c_a6c21e2ce8ce7bdd6621feeb76c8e868f}{DEBUGNET\_DEFINE}}(bxe);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00234}00234 \textcolor{comment}{/* resources needed for unloading a previously loaded device */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00236}\mbox{\hyperlink{bxe_8c_ac7692c23460caf3b24a69d5e1a1841e9}{00236}} \textcolor{preprocessor}{\#define BXE\_PREV\_WAIT\_NEEDED 1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00237}\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{00237}} \textcolor{keyword}{struct }mtx \mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00238}\mbox{\hyperlink{bxe_8c_a62718e8f81b7690c8ddaea3836258ab7}{00238}} \mbox{\hyperlink{bxe_8c_a62718e8f81b7690c8ddaea3836258ab7}{MTX\_SYSINIT}}(\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}}, \&\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}}, \textcolor{stringliteral}{"{}bxe\_prev\_lock"{}}, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00239}\mbox{\hyperlink{structbxe__prev__list__node}{00239}} \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__prev__list__node}{bxe\_prev\_list\_node}} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00240}00240     LIST\_ENTRY(\mbox{\hyperlink{structbxe__prev__list__node}{bxe\_prev\_list\_node}}) node;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00241}00241     uint8\_t bus;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00242}00242     uint8\_t slot;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00243}00243     uint8\_t path;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00244}00244     uint8\_t aer; \textcolor{comment}{/* XXX automatic error recovery */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00245}00245     uint8\_t undi;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00246}00246 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00247}\mbox{\hyperlink{bxe_8c_aaa382ff02ce0eff5720a10e0bf808e21}{00247}} \textcolor{keyword}{static} \mbox{\hyperlink{bxe_8c_aaa382ff02ce0eff5720a10e0bf808e21}{LIST\_HEAD}}(, \mbox{\hyperlink{structbxe__prev__list__node}{bxe\_prev\_list\_node}}) bxe\_prev\_list = LIST\_HEAD\_INITIALIZER(bxe\_prev\_list);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00249}00249 \textcolor{keyword}{static} \textcolor{keywordtype}{int} load\_count[2][3] = \{ \{0\} \}; \textcolor{comment}{/* per-\/path: 0-\/common, 1-\/port0, 2-\/port1 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00250}00250 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00251}00251 \textcolor{comment}{/* Tunable device values... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00252}00252 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00253}\mbox{\hyperlink{bxe_8c_acd98d5614e79209c4a3f9e3d2952bb82}{00253}} \mbox{\hyperlink{bxe_8c_acd98d5614e79209c4a3f9e3d2952bb82}{SYSCTL\_NODE}}(\_hw, OID\_AUTO, bxe, CTLFLAG\_RD | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00254}00254     \textcolor{stringliteral}{"{}bxe driver parameters"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00256}00256 \textcolor{comment}{/* Debug */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00257}\mbox{\hyperlink{bxe_8c_aba8845f3e9ba1def9dfa26f69e334ffb}{00257}} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{bxe_8c_aba8845f3e9ba1def9dfa26f69e334ffb}{bxe\_debug}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00258}\mbox{\hyperlink{bxe_8c_acf91a5aef9cfc26b3778d7b462bc4807}{00258}} \mbox{\hyperlink{bxe_8c_acf91a5aef9cfc26b3778d7b462bc4807}{SYSCTL\_ULONG}}(\_hw\_bxe, OID\_AUTO, debug, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00259}00259              \&\mbox{\hyperlink{bxe_8c_aba8845f3e9ba1def9dfa26f69e334ffb}{bxe\_debug}}, 0, \textcolor{stringliteral}{"{}Debug logging mode"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00261}00261 \textcolor{comment}{/* Interrupt Mode: 0 (IRQ), 1 (MSI/IRQ), and 2 (MSI-\/X/MSI/IRQ) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00262}\mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{00262}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00263}\mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{00263}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, interrupt\_mode, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00264}00264            \&\mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}}, 0, \textcolor{stringliteral}{"{}Interrupt (MSI-\/X/MSI/INTx) mode"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00266}00266 \textcolor{comment}{/* Number of Queues: 0 (Auto) or 1 to 16 (fixed queue number) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00267}\mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{00267}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{bxe\_queue\_count}} = 4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00268}\mbox{\hyperlink{bxe_8c_a0f47b799d56f50de270c9ed5e65beba4}{00268}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, queue\_count, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00269}00269            \&\mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{bxe\_queue\_count}}, 0, \textcolor{stringliteral}{"{}Multi-\/Queue queue count"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00270}00270 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00271}00271 \textcolor{comment}{/* max number of buffers per queue (default RX\_BD\_USABLE) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00272}\mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{00272}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00273}\mbox{\hyperlink{bxe_8c_a7ae7fc14f9ddb01db11568e62ca2bcde}{00273}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, max\_rx\_bufs, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00274}00274            \&\mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}}, 0, \textcolor{stringliteral}{"{}Maximum Number of Rx Buffers Per Queue"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00276}00276 \textcolor{comment}{/* Host interrupt coalescing RX tick timer (usecs) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00277}\mbox{\hyperlink{bxe_8c_adb43340290236f122ccd829463845990}{00277}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_adb43340290236f122ccd829463845990}{bxe\_hc\_rx\_ticks}} = 25;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00278}\mbox{\hyperlink{bxe_8c_a52df8cbd2daa7e65ba60d5db3c6c00b6}{00278}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, hc\_rx\_ticks, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00279}00279            \&\mbox{\hyperlink{bxe_8c_adb43340290236f122ccd829463845990}{bxe\_hc\_rx\_ticks}}, 0, \textcolor{stringliteral}{"{}Host Coalescing Rx ticks"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00281}00281 \textcolor{comment}{/* Host interrupt coalescing TX tick timer (usecs) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00282}\mbox{\hyperlink{bxe_8c_a7ada9e3dadebfe1903c04ec189bcc022}{00282}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a7ada9e3dadebfe1903c04ec189bcc022}{bxe\_hc\_tx\_ticks}} = 50;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00283}\mbox{\hyperlink{bxe_8c_a2b91797abc84fc783e2de7cc08555fb7}{00283}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, hc\_tx\_ticks, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00284}00284            \&\mbox{\hyperlink{bxe_8c_a7ada9e3dadebfe1903c04ec189bcc022}{bxe\_hc\_tx\_ticks}}, 0, \textcolor{stringliteral}{"{}Host Coalescing Tx ticks"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00286}00286 \textcolor{comment}{/* Maximum number of Rx packets to process at a time */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00287}\mbox{\hyperlink{bxe_8c_a6d021e6ffe6010870c17c4aeca3e2ab5}{00287}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a6d021e6ffe6010870c17c4aeca3e2ab5}{bxe\_rx\_budget}} = 0xffffffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00288}\mbox{\hyperlink{bxe_8c_a7c7a64e47e4b2c0aefb384dd0c628d79}{00288}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, rx\_budget, CTLFLAG\_TUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00289}00289            \&\mbox{\hyperlink{bxe_8c_a6d021e6ffe6010870c17c4aeca3e2ab5}{bxe\_rx\_budget}}, 0, \textcolor{stringliteral}{"{}Rx processing budget"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00291}00291 \textcolor{comment}{/* Maximum LRO aggregation size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00292}\mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{00292}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{bxe\_max\_aggregation\_size}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00293}\mbox{\hyperlink{bxe_8c_aa73d134d1fd929b45516982ae52521aa}{00293}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, max\_aggregation\_size, CTLFLAG\_TUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00294}00294            \&\mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{bxe\_max\_aggregation\_size}}, 0, \textcolor{stringliteral}{"{}max aggregation size"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00295}00295 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00296}00296 \textcolor{comment}{/* PCI MRRS: -\/1 (Auto), 0 (128B), 1 (256B), 2 (512B), 3 (1KB) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00297}\mbox{\hyperlink{bxe_8c_a485b70543a3fe746b68d3da8d90cd329}{00297}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a485b70543a3fe746b68d3da8d90cd329}{bxe\_mrrs}} = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00298}\mbox{\hyperlink{bxe_8c_a5f30b9fa8d42e80203ee3a761fe14d65}{00298}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, mrrs, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00299}00299            \&\mbox{\hyperlink{bxe_8c_a485b70543a3fe746b68d3da8d90cd329}{bxe\_mrrs}}, 0, \textcolor{stringliteral}{"{}PCIe maximum read request size"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00301}00301 \textcolor{comment}{/* AutoGrEEEn: 0 (hardware default), 1 (force on), 2 (force off) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00302}\mbox{\hyperlink{bxe_8c_afb55eafaa052f7ef538e2b12e24bd6f0}{00302}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_afb55eafaa052f7ef538e2b12e24bd6f0}{bxe\_autogreeen}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00303}\mbox{\hyperlink{bxe_8c_adb02b32c4dbf126ce1b98806a674f566}{00303}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, autogreeen, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00304}00304            \&\mbox{\hyperlink{bxe_8c_afb55eafaa052f7ef538e2b12e24bd6f0}{bxe\_autogreeen}}, 0, \textcolor{stringliteral}{"{}AutoGrEEEn support"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00306}00306 \textcolor{comment}{/* 4-\/tuple RSS support for UDP: 0 (disabled), 1 (enabled) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00307}\mbox{\hyperlink{bxe_8c_a2c7f0d624ac9317a2e9b93a048cf5df5}{00307}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a2c7f0d624ac9317a2e9b93a048cf5df5}{bxe\_udp\_rss}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00308}\mbox{\hyperlink{bxe_8c_ae7dc47f709c5194e61ae89002a166ce0}{00308}} \mbox{\hyperlink{bxe_8c_a87ab72352c16b06914098d340c7b2607}{SYSCTL\_INT}}(\_hw\_bxe, OID\_AUTO, udp\_rss, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00309}00309            \&\mbox{\hyperlink{bxe_8c_a2c7f0d624ac9317a2e9b93a048cf5df5}{bxe\_udp\_rss}}, 0, \textcolor{stringliteral}{"{}UDP RSS support"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00310}00310 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00311}00311 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00312}\mbox{\hyperlink{bxe_8c_a6e1dc429b7edc05c121eceeed84d4ec6}{00312}} \textcolor{preprocessor}{\#define STAT\_NAME\_LEN 32 }\textcolor{comment}{/* no stat names below can be longer than this */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00313}00313 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00314}\mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{00314}} \textcolor{preprocessor}{\#define STATS\_OFFSET32(stat\_name)                   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00315}00315 \textcolor{preprocessor}{    (offsetof(struct bxe\_eth\_stats, stat\_name) / 4)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00316}00316 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00317}\mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{00317}} \textcolor{preprocessor}{\#define Q\_STATS\_OFFSET32(stat\_name)                   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00318}00318 \textcolor{preprocessor}{    (offsetof(struct bxe\_eth\_q\_stats, stat\_name) / 4)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00320}00320 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00321}\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{00321}}     uint32\_t \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00322}\mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{00322}}     uint32\_t \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00323}\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{00323}}     uint32\_t \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00324}\mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{00324}} \textcolor{preprocessor}{\#define STATS\_FLAGS\_PORT  1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00325}\mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{00325}} \textcolor{preprocessor}{\#define STATS\_FLAGS\_FUNC  2 }\textcolor{comment}{/* MF only cares about function stats */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00326}\mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{00326}} \textcolor{preprocessor}{\#define STATS\_FLAGS\_BOTH  (STATS\_FLAGS\_FUNC | STATS\_FLAGS\_PORT)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00327}\mbox{\hyperlink{bxe_8c_a16eef9431e7f80c825ff2cbefb09aad2}{00327}}     \textcolor{keywordtype}{char} \textcolor{keywordtype}{string}[\mbox{\hyperlink{bxe_8c_a6e1dc429b7edc05c121eceeed84d4ec6}{STAT\_NAME\_LEN}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00328}00328 \} \mbox{\hyperlink{bxe_8c_aab446e1b2b58c382a04e6a890d328b09}{bxe\_eth\_stats\_arr}}[] = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00329}00329     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_bytes\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00330}00330                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}rx\_bytes"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00331}00331     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(error\_bytes\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00332}00332                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}rx\_error\_bytes"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00333}00333     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_unicast\_packets\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00334}00334                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}rx\_ucast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00335}00335     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_multicast\_packets\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00336}00336                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}rx\_mcast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00337}00337     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_broadcast\_packets\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00338}00338                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}rx\_bcast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00339}00339     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_stat\_dot3statsfcserrors\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00340}00340                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_crc\_errors"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00341}00341     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_stat\_dot3statsalignmenterrors\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00342}00342                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_align\_errors"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00343}00343     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_stat\_etherstatsundersizepkts\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00344}00344                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_undersize\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00345}00345     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(etherstatsoverrsizepkts\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00346}00346                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_oversize\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00347}00347     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_stat\_etherstatsfragments\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00348}00348                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_fragments"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00349}00349     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_stat\_etherstatsjabbers\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00350}00350                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_jabbers"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00351}00351     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(no\_buff\_discard\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00352}00352                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}rx\_discards"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00353}00353     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mac\_filter\_discard),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00354}00354                 4, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_filtered\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00355}00355     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mf\_tag\_discard),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00356}00356                 4, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_mf\_tag\_discard"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00357}00357     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(pfc\_frames\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00358}00358                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}pfc\_frames\_received"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00359}00359     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(pfc\_frames\_sent\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00360}00360                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}pfc\_frames\_sent"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00361}00361     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(brb\_drop\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00362}00362                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_brb\_discard"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00363}00363     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(brb\_truncate\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00364}00364                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_brb\_truncate"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00365}00365     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(pause\_frames\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00366}00366                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_pause\_frames"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00367}00367     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_stat\_maccontrolframesreceived\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00368}00368                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_mac\_ctrl\_frames"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00369}00369     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(nig\_timer\_max),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00370}00370                 4, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}rx\_constant\_pause\_events"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00371}00371     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_bytes\_transmitted\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00372}00372                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}tx\_bytes"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00373}00373     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_ifhcoutbadoctets\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00374}00374                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_error\_bytes"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00375}00375     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_unicast\_packets\_transmitted\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00376}00376                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}tx\_ucast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00377}00377     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_multicast\_packets\_transmitted\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00378}00378                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}tx\_mcast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00379}00379     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_broadcast\_packets\_transmitted\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00380}00380                 8, \mbox{\hyperlink{bxe_8c_a1b738438ca62703a799d5dc3c225f286}{STATS\_FLAGS\_BOTH}}, \textcolor{stringliteral}{"{}tx\_bcast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00381}00381     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_dot3statsinternalmactransmiterrors\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00382}00382                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_mac\_errors"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00383}00383     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_stat\_dot3statscarriersenseerrors\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00384}00384                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_carrier\_errors"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00385}00385     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_dot3statssinglecollisionframes\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00386}00386                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_single\_collisions"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00387}00387     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_dot3statsmultiplecollisionframes\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00388}00388                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_multi\_collisions"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00389}00389     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_dot3statsdeferredtransmissions\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00390}00390                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_deferred"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00391}00391     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_dot3statsexcessivecollisions\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00392}00392                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_excess\_collisions"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00393}00393     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_dot3statslatecollisions\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00394}00394                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_late\_collisions"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00395}00395     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_etherstatscollisions\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00396}00396                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_total\_collisions"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00397}00397     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_etherstatspkts64octets\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00398}00398                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_64\_byte\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00399}00399     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_etherstatspkts65octetsto127octets\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00400}00400                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_65\_to\_127\_byte\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00401}00401     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_etherstatspkts128octetsto255octets\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00402}00402                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_128\_to\_255\_byte\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00403}00403     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_etherstatspkts256octetsto511octets\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00404}00404                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_256\_to\_511\_byte\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00405}00405     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_stat\_etherstatspkts512octetsto1023octets\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00406}00406                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_512\_to\_1023\_byte\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00407}00407     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(etherstatspkts1024octetsto1522octets\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00408}00408                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_1024\_to\_1522\_byte\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00409}00409     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(etherstatspktsover1522octets\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00410}00410                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_1523\_to\_9022\_byte\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00411}00411     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(pause\_frames\_sent\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00412}00412                 8, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}tx\_pause\_frames"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00413}00413     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_tpa\_aggregations\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00414}00414                 8, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tpa\_aggregations"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00415}00415     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_tpa\_aggregated\_frames\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00416}00416                 8, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tpa\_aggregated\_frames"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00417}00417     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(total\_tpa\_bytes\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00418}00418                 8, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tpa\_bytes"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00419}00419     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(eee\_tx\_lpi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00420}00420                 4, \mbox{\hyperlink{bxe_8c_a7321aa9605ae12f661bfde530752b6a8}{STATS\_FLAGS\_PORT}}, \textcolor{stringliteral}{"{}eee\_tx\_lpi"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00421}00421     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_calls),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00422}00422                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_calls"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00423}00423     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00424}00424                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00425}00425     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_tpa\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00426}00426                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_tpa\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00427}00427     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_erroneous\_jumbo\_sge\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00428}00428                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_erroneous\_jumbo\_sge\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00429}00429     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_bxe\_service\_rxsgl),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00430}00430                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_bxe\_service\_rxsgl"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00431}00431     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_jumbo\_sge\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00432}00432                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_jumbo\_sge\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00433}00433     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_soft\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00434}00434                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_soft\_errors"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00435}00435     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_hw\_csum\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00436}00436                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_hw\_csum\_errors"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00437}00437     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_ofld\_frames\_csum\_ip),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00438}00438                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_ofld\_frames\_csum\_ip"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00439}00439     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_ofld\_frames\_csum\_tcp\_udp),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00440}00440                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_ofld\_frames\_csum\_tcp\_udp"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00441}00441     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(rx\_budget\_reached),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00442}00442                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}rx\_budget\_reached"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00443}00443     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00444}00444                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00445}00445     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_soft\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00446}00446                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_soft\_errors"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00447}00447     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_ofld\_frames\_csum\_ip),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00448}00448                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_csum\_ip"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00449}00449     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_ofld\_frames\_csum\_tcp),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00450}00450                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_csum\_tcp"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00451}00451     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_ofld\_frames\_csum\_udp),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00452}00452                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_csum\_udp"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00453}00453     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_ofld\_frames\_lso),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00454}00454                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_lso"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00455}00455     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_ofld\_frames\_lso\_hdr\_splits),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00456}00456                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_lso\_hdr\_splits"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00457}00457     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_encap\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00458}00458                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_encap\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00459}00459     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_hw\_queue\_full),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00460}00460                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_hw\_queue\_full"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00461}00461     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_hw\_max\_queue\_depth),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00462}00462                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_hw\_max\_queue\_depth"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00463}00463     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_dma\_mapping\_failure),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00464}00464                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_dma\_mapping\_failure"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00465}00465     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_max\_drbr\_queue\_depth),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00466}00466                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_max\_drbr\_queue\_depth"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00467}00467     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_window\_violation\_std),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00468}00468                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_window\_violation\_std"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00469}00469     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_window\_violation\_tso),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00470}00470                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_window\_violation\_tso"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00471}00471     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_chain\_lost\_mbuf),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00472}00472                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_chain\_lost\_mbuf"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00473}00473     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_frames\_deferred),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00474}00474                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_frames\_deferred"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00475}00475     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_queue\_xoff),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00476}00476                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_queue\_xoff"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00477}00477     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_defrag\_attempts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00478}00478                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_defrag\_attempts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00479}00479     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_defrag\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00480}00480                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_defrag\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00481}00481     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_rx\_bd\_alloc\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00482}00482                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_rx\_bd\_alloc\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00483}00483     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_rx\_bd\_mapping\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00484}00484                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_rx\_bd\_mapping\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00485}00485     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_rx\_tpa\_alloc\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00486}00486                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_rx\_tpa\_alloc\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00487}00487     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_rx\_tpa\_mapping\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00488}00488                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_rx\_tpa\_mapping\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00489}00489     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_rx\_sge\_alloc\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00490}00490                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_rx\_sge\_alloc\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00491}00491     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_rx\_sge\_mapping\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00492}00492                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_rx\_sge\_mapping\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00493}00493     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_alloc\_tx),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00494}00494                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_alloc\_tx"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00495}00495     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_alloc\_rx),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00496}00496                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_alloc\_rx"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00497}00497     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_alloc\_sge),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00498}00498                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_alloc\_sge"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00499}00499     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(mbuf\_alloc\_tpa),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00500}00500                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}mbuf\_alloc\_tpa"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00501}00501     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_queue\_full\_return),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00502}00502                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_queue\_full\_return"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00503}00503     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(bxe\_tx\_mq\_sc\_state\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00504}00504                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}bxe\_tx\_mq\_sc\_state\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00505}00505     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_request\_link\_down\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00506}00506                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_request\_link\_down\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00507}00507     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(bd\_avail\_too\_less\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00508}00508                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}bd\_avail\_too\_less\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00509}00509     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(tx\_mq\_not\_empty),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00510}00510                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}tx\_mq\_not\_empty"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00511}00511     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(nsegs\_path1\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00512}00512                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}nsegs\_path1\_errors"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00513}00513     \{ \mbox{\hyperlink{bxe_8c_a74feda295aed3ba3c5d93c01caa03e69}{STATS\_OFFSET32}}(nsegs\_path2\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00514}00514                 4, \mbox{\hyperlink{bxe_8c_acd7ee62e88eb3a02414840886729925b}{STATS\_FLAGS\_FUNC}}, \textcolor{stringliteral}{"{}nsegs\_path2\_errors"{}}\}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00515}00515 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00516}00516 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00517}\mbox{\hyperlink{bxe_8c_aab446e1b2b58c382a04e6a890d328b09}{00517}} \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00518}00518 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00519}00519 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00520}00520     uint32\_t \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00521}00521     uint32\_t \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00522}00522     \textcolor{keywordtype}{char} \textcolor{keywordtype}{string}[\mbox{\hyperlink{bxe_8c_a6e1dc429b7edc05c121eceeed84d4ec6}{STAT\_NAME\_LEN}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00523}00523 \} \mbox{\hyperlink{bxe_8c_a9f622b6d2c60d9a626e27c784659dbf1}{bxe\_eth\_q\_stats\_arr}}[] = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00524}00524     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_bytes\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00525}00525                 8, \textcolor{stringliteral}{"{}rx\_bytes"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00526}00526     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_unicast\_packets\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00527}00527                 8, \textcolor{stringliteral}{"{}rx\_ucast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00528}00528     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_multicast\_packets\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00529}00529                 8, \textcolor{stringliteral}{"{}rx\_mcast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00530}00530     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_broadcast\_packets\_received\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00531}00531                 8, \textcolor{stringliteral}{"{}rx\_bcast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00532}00532     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(no\_buff\_discard\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00533}00533                 8, \textcolor{stringliteral}{"{}rx\_discards"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00534}00534     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_bytes\_transmitted\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00535}00535                 8, \textcolor{stringliteral}{"{}tx\_bytes"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00536}00536     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_unicast\_packets\_transmitted\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00537}00537                 8, \textcolor{stringliteral}{"{}tx\_ucast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00538}00538     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_multicast\_packets\_transmitted\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00539}00539                 8, \textcolor{stringliteral}{"{}tx\_mcast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00540}00540     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_broadcast\_packets\_transmitted\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00541}00541                 8, \textcolor{stringliteral}{"{}tx\_bcast\_packets"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00542}00542     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_tpa\_aggregations\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00543}00543                 8, \textcolor{stringliteral}{"{}tpa\_aggregations"{}} \},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00544}00544     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_tpa\_aggregated\_frames\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00545}00545                 8, \textcolor{stringliteral}{"{}tpa\_aggregated\_frames"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00546}00546     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(total\_tpa\_bytes\_hi),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00547}00547                 8, \textcolor{stringliteral}{"{}tpa\_bytes"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00548}00548     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_calls),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00549}00549                 4, \textcolor{stringliteral}{"{}rx\_calls"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00550}00550     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00551}00551                 4, \textcolor{stringliteral}{"{}rx\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00552}00552     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_tpa\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00553}00553                 4, \textcolor{stringliteral}{"{}rx\_tpa\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00554}00554     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_erroneous\_jumbo\_sge\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00555}00555                 4, \textcolor{stringliteral}{"{}rx\_erroneous\_jumbo\_sge\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00556}00556     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_bxe\_service\_rxsgl),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00557}00557                 4, \textcolor{stringliteral}{"{}rx\_bxe\_service\_rxsgl"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00558}00558     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_jumbo\_sge\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00559}00559                 4, \textcolor{stringliteral}{"{}rx\_jumbo\_sge\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00560}00560     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_soft\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00561}00561                 4, \textcolor{stringliteral}{"{}rx\_soft\_errors"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00562}00562     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_hw\_csum\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00563}00563                 4, \textcolor{stringliteral}{"{}rx\_hw\_csum\_errors"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00564}00564     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_ofld\_frames\_csum\_ip),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00565}00565                 4, \textcolor{stringliteral}{"{}rx\_ofld\_frames\_csum\_ip"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00566}00566     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_ofld\_frames\_csum\_tcp\_udp),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00567}00567                 4, \textcolor{stringliteral}{"{}rx\_ofld\_frames\_csum\_tcp\_udp"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00568}00568     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(rx\_budget\_reached),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00569}00569                 4, \textcolor{stringliteral}{"{}rx\_budget\_reached"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00570}00570     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_pkts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00571}00571                 4, \textcolor{stringliteral}{"{}tx\_pkts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00572}00572     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_soft\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00573}00573                 4, \textcolor{stringliteral}{"{}tx\_soft\_errors"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00574}00574     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_ofld\_frames\_csum\_ip),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00575}00575                 4, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_csum\_ip"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00576}00576     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_ofld\_frames\_csum\_tcp),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00577}00577                 4, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_csum\_tcp"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00578}00578     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_ofld\_frames\_csum\_udp),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00579}00579                 4, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_csum\_udp"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00580}00580     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_ofld\_frames\_lso),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00581}00581                 4, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_lso"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00582}00582     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_ofld\_frames\_lso\_hdr\_splits),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00583}00583                 4, \textcolor{stringliteral}{"{}tx\_ofld\_frames\_lso\_hdr\_splits"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00584}00584     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_encap\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00585}00585                 4, \textcolor{stringliteral}{"{}tx\_encap\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00586}00586     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_hw\_queue\_full),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00587}00587                 4, \textcolor{stringliteral}{"{}tx\_hw\_queue\_full"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00588}00588     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_hw\_max\_queue\_depth),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00589}00589                 4, \textcolor{stringliteral}{"{}tx\_hw\_max\_queue\_depth"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00590}00590     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_dma\_mapping\_failure),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00591}00591                 4, \textcolor{stringliteral}{"{}tx\_dma\_mapping\_failure"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00592}00592     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_max\_drbr\_queue\_depth),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00593}00593                 4, \textcolor{stringliteral}{"{}tx\_max\_drbr\_queue\_depth"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00594}00594     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_window\_violation\_std),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00595}00595                 4, \textcolor{stringliteral}{"{}tx\_window\_violation\_std"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00596}00596     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_window\_violation\_tso),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00597}00597                 4, \textcolor{stringliteral}{"{}tx\_window\_violation\_tso"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00598}00598     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_chain\_lost\_mbuf),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00599}00599                 4, \textcolor{stringliteral}{"{}tx\_chain\_lost\_mbuf"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00600}00600     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_frames\_deferred),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00601}00601                 4, \textcolor{stringliteral}{"{}tx\_frames\_deferred"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00602}00602     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_queue\_xoff),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00603}00603                 4, \textcolor{stringliteral}{"{}tx\_queue\_xoff"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00604}00604     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_defrag\_attempts),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00605}00605                 4, \textcolor{stringliteral}{"{}mbuf\_defrag\_attempts"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00606}00606     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_defrag\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00607}00607                 4, \textcolor{stringliteral}{"{}mbuf\_defrag\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00608}00608     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_rx\_bd\_alloc\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00609}00609                 4, \textcolor{stringliteral}{"{}mbuf\_rx\_bd\_alloc\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00610}00610     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_rx\_bd\_mapping\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00611}00611                 4, \textcolor{stringliteral}{"{}mbuf\_rx\_bd\_mapping\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00612}00612     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_rx\_tpa\_alloc\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00613}00613                 4, \textcolor{stringliteral}{"{}mbuf\_rx\_tpa\_alloc\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00614}00614     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_rx\_tpa\_mapping\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00615}00615                 4, \textcolor{stringliteral}{"{}mbuf\_rx\_tpa\_mapping\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00616}00616     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_rx\_sge\_alloc\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00617}00617                 4, \textcolor{stringliteral}{"{}mbuf\_rx\_sge\_alloc\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00618}00618     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_rx\_sge\_mapping\_failed),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00619}00619                 4, \textcolor{stringliteral}{"{}mbuf\_rx\_sge\_mapping\_failed"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00620}00620     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_alloc\_tx),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00621}00621                 4, \textcolor{stringliteral}{"{}mbuf\_alloc\_tx"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00622}00622     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_alloc\_rx),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00623}00623                 4, \textcolor{stringliteral}{"{}mbuf\_alloc\_rx"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00624}00624     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_alloc\_sge),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00625}00625                 4, \textcolor{stringliteral}{"{}mbuf\_alloc\_sge"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00626}00626     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(mbuf\_alloc\_tpa),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00627}00627                 4, \textcolor{stringliteral}{"{}mbuf\_alloc\_tpa"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00628}00628     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_queue\_full\_return),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00629}00629                 4, \textcolor{stringliteral}{"{}tx\_queue\_full\_return"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00630}00630     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(bxe\_tx\_mq\_sc\_state\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00631}00631                 4, \textcolor{stringliteral}{"{}bxe\_tx\_mq\_sc\_state\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00632}00632     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_request\_link\_down\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00633}00633                 4, \textcolor{stringliteral}{"{}tx\_request\_link\_down\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00634}00634     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(bd\_avail\_too\_less\_failures),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00635}00635                 4, \textcolor{stringliteral}{"{}bd\_avail\_too\_less\_failures"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00636}00636     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(tx\_mq\_not\_empty),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00637}00637                 4, \textcolor{stringliteral}{"{}tx\_mq\_not\_empty"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00638}00638     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(nsegs\_path1\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00639}00639                 4, \textcolor{stringliteral}{"{}nsegs\_path1\_errors"{}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00640}00640     \{ \mbox{\hyperlink{bxe_8c_a1c82b1fda3eb5a28cd6131feec1c41fc}{Q\_STATS\_OFFSET32}}(nsegs\_path2\_errors),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00641}00641                 4, \textcolor{stringliteral}{"{}nsegs\_path2\_errors"{}}\}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00642}00642 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00643}00643 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00644}\mbox{\hyperlink{bxe_8c_a9f622b6d2c60d9a626e27c784659dbf1}{00644}} \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00646}\mbox{\hyperlink{bxe_8c_acdedd8f2fc9fa1853da95066c18c3760}{00646}} \textcolor{preprocessor}{\#define BXE\_NUM\_ETH\_STATS   ARRAY\_SIZE(bxe\_eth\_stats\_arr)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00647}\mbox{\hyperlink{bxe_8c_a0df1a288e637b67580fc02576d11b7ae}{00647}} \textcolor{preprocessor}{\#define BXE\_NUM\_ETH\_Q\_STATS ARRAY\_SIZE(bxe\_eth\_q\_stats\_arr)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00648}00648 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00649}00649 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00650}00650 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a2212c57e59956cf53b4f735141f87282}{bxe\_cmng\_fns\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00651}00651                                  uint8\_t          read\_cfg,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00652}00652                                  uint8\_t          cmng\_type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00653}00653 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_ae3684edaf191533c7425a406f758cd0a}{bxe\_get\_cmng\_fns\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00654}00654 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a52e02dd8452a48e1bdd61876d6d06ec1}{storm\_memset\_cmng}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00655}00655                                  \textcolor{keyword}{struct} \mbox{\hyperlink{structcmng__init}{cmng\_init}} *cmng,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00656}00656                                  uint8\_t          port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00657}00657 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a7de36a383e6f8ea6b0d5b095d815875e}{bxe\_set\_reset\_global}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00658}00658 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a07b21b9de3ef7ccde7111feae924a352}{bxe\_set\_reset\_in\_progress}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00659}00659 \textcolor{keyword}{static} uint8\_t \mbox{\hyperlink{bxe_8c_aa8e60d884e752f4c51c8a313f973d00d}{bxe\_reset\_is\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00660}00660                                  \textcolor{keywordtype}{int}              engine);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00661}00661 \textcolor{keyword}{static} uint8\_t \mbox{\hyperlink{bxe_8c_a3b974b2a5d6d0486240139fe74ec362d}{bxe\_clear\_pf\_load}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00662}00662 \textcolor{keyword}{static} uint8\_t \mbox{\hyperlink{bxe_8c_a91656b2ffc7fe1c9ff94a04e05056801}{bxe\_chk\_parity\_attn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00663}00663                                    uint8\_t          *global,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00664}00664                                    uint8\_t          print);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00665}00665 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_ac47171d7e9b0e9b346122f490afcbf5a}{bxe\_int\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00666}00666 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_a2d21d8c7d71506277952a301e154ec1f}{bxe\_release\_leader\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00667}00667 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a2d96110aed3521282cc163243d1d0d2b}{bxe\_pf\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00668}00668 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a7a62f7cb289e73886ab83bef2ba23505}{bxe\_free\_fp\_buffers}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00669}00669 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a6b2eba231052d5cb25e75779ef7a1ce7}{bxe\_update\_rx\_prod}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00670}00670                                       \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00671}00671                                       uint16\_t            rx\_bd\_prod,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00672}00672                                       uint16\_t            rx\_cq\_prod,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00673}00673                                       uint16\_t            rx\_sge\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00674}00674 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_abcb5aa947ed64e7fe038dc31d304c608}{bxe\_link\_report\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00675}00675 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{bxe\_link\_report}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00676}00676 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a9c029beb080ac600e1ae282c2710195b}{bxe\_link\_status\_update}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00677}00677 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_ab2b27c8c258bce52a0ed9f0e6295b216}{bxe\_periodic\_callout\_func}}(\textcolor{keywordtype}{void} *xsc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00678}00678 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_ab9b8e5c75cdb1fb0ed9732bbbb2fc415}{bxe\_periodic\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00679}00679 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00680}00680 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_a5b3dc2834150b871a3524bd78b67e268}{bxe\_alloc\_rx\_bd\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00681}00681                                     uint16\_t prev\_index,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00682}00682                                     uint16\_t index);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00683}00683 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_a86a1707104c8fa67ce5e393b9e4b1c4c}{bxe\_alloc\_rx\_tpa\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00684}00684                                      \textcolor{keywordtype}{int}                 queue);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00685}00685 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_a81c63cb0393f95e2bb71c860433432b8}{bxe\_alloc\_rx\_sge\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00686}00686                                      uint16\_t            index);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00687}00687 \textcolor{keyword}{static} uint8\_t \mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{bxe\_txeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00688}00688                          \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00689}00689 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a0047f2fdf8f5001c01890e42fb8e1831}{bxe\_task\_fp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00690}00690 \textcolor{keyword}{static} \_\_noinline \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a38420aca9e66a107397ba4f2ac9a09bb}{bxe\_dump\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00691}00691                                      \textcolor{keyword}{struct} mbuf      *m,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00692}00692                                      uint8\_t          contents);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00693}00693 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_abf72f72346c48bed2d9f9552510dcdbd}{bxe\_alloc\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00694}00694 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_aba6356efb089c0f887dea37803476f0a}{bxe\_free\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00695}00695 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_a241e8ad9197e2f0d46a7e7b917333c65}{bxe\_alloc\_fw\_stats\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00696}00696 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a5ed8b0cde61b05bee51f5a9925d30d55}{bxe\_free\_fw\_stats\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00697}00697 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_af4f1b847084fa10eb260873fa4e01504}{bxe\_interrupt\_attach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00698}00698 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_afaf5ed29d000f45cc1191ed8e8e20c83}{bxe\_interrupt\_detach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00699}00699 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_af825a655512115af8f521c40de63426d}{bxe\_set\_rx\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00700}00700 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_a4d3093814fd53cc5033263719a5d0c02}{bxe\_init\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00701}00701 \textcolor{keyword}{static} \textcolor{keywordtype}{int}     \mbox{\hyperlink{bxe_8c_af3af3c28c0e5d3f4eeea043b064421a0}{bxe\_stop\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00702}00702 \textcolor{keyword}{static} \textcolor{keywordtype}{void}    \mbox{\hyperlink{bxe_8c_a7509961acf73ddbd86105b2e911d8e41}{bxe\_sp\_err\_timeout\_task}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00703}00703 \textcolor{keywordtype}{void}           \mbox{\hyperlink{bxe_8c_ad6e9a6bdbfa9da3b04c8b2bf09c61d34}{bxe\_parity\_recover}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00704}00704 \textcolor{keywordtype}{void}           \mbox{\hyperlink{bxe_8c_ae754832809b084ce5e719c8059d929e9}{bxe\_handle\_error}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00705}00705 \textcolor{keyword}{static} \_\_noinline \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_aa29198c57a0a0a54875358ed35334453}{bxe\_nic\_load}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00706}00706                                    \textcolor{keywordtype}{int}              load\_mode);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00707}00707 \textcolor{keyword}{static} \_\_noinline \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{bxe\_nic\_unload}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00708}00708                                      uint32\_t         unload\_mode,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00709}00709                                      uint8\_t          keep\_link);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00710}00710 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00711}00711 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_aa7d10ce01f5ebf6f80a47baed15ea59b}{bxe\_handle\_sp\_tq}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00712}00712 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_ae847039a954f9e4ab1a6354cd3a1535d}{bxe\_handle\_fp\_tq}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00713}00713 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00714}00714 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_ac76a2390458e70291dd5bfd2109c62db}{bxe\_add\_cdev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00715}00715 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a47a7891fb4cd1503371e2731bc8fec42}{bxe\_del\_cdev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00716}00716 \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a29af23f076c40ae19a6f213ce619d7e4}{bxe\_grc\_dump}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00717}00717 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a1e2b43ab8e5a9eba72b1d66ea02ce65d}{bxe\_alloc\_buf\_rings}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00718}00718 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_ac83cb9e279ddf7d9e215c14f724405c8}{bxe\_free\_buf\_rings}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00720}00720 \textcolor{comment}{/* calculate crc32 on a buffer (NOTE: crc32\_length MUST be aligned to 8) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00721}00721 uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00722}\mbox{\hyperlink{bxe_8c_a13ad326cae800d32e6434e43cab14b07}{00722}} \mbox{\hyperlink{bxe_8c_a13ad326cae800d32e6434e43cab14b07}{calc\_crc32}}(uint8\_t  *crc32\_packet,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00723}00723            uint32\_t crc32\_length,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00724}00724            uint32\_t crc32\_seed,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00725}00725            uint8\_t  complement)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00726}00726 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00727}00727    uint32\_t \textcolor{keywordtype}{byte}         = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00728}00728    uint32\_t bit          = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00729}00729    uint8\_t  msb          = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00730}00730    uint32\_t temp         = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00731}00731    uint32\_t shft         = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00732}00732    uint8\_t  current\_byte = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00733}00733    uint32\_t crc32\_result = crc32\_seed;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00734}00734    \textcolor{keyword}{const} uint32\_t CRC32\_POLY = 0x1edc6f41;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00735}00735 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00736}00736    \textcolor{keywordflow}{if} ((crc32\_packet == NULL) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00737}00737        (crc32\_length == 0) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00738}00738        ((crc32\_length \% 8) != 0))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00739}00739     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00740}00740         \textcolor{keywordflow}{return} (crc32\_result);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00741}00741     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00742}00742 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00743}00743     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{byte} = 0; \textcolor{keywordtype}{byte} < crc32\_length; \textcolor{keywordtype}{byte} = \textcolor{keywordtype}{byte} + 1)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00744}00744     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00745}00745         current\_byte = crc32\_packet[byte];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00746}00746         \textcolor{keywordflow}{for} (bit = 0; bit < 8; bit = bit + 1)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00747}00747         \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00748}00748             \textcolor{comment}{/* msb = crc32\_result[31]; */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00749}00749             msb = (uint8\_t)(crc32\_result >> 31);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00750}00750 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00751}00751             crc32\_result = crc32\_result << 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00752}00752 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00753}00753             \textcolor{comment}{/* it (msb != current\_byte[bit]) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00754}00754             \textcolor{keywordflow}{if} (msb != (0x1 \& (current\_byte >> bit)))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00755}00755             \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00756}00756                 crc32\_result = crc32\_result \string^ CRC32\_POLY;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00757}00757                 \textcolor{comment}{/* crc32\_result[0] = 1 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00758}00758                 crc32\_result |= 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00759}00759             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00760}00760         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00761}00761     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00763}00763     \textcolor{comment}{/* Last step is to:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00764}00764 \textcolor{comment}{     * 1. "{}mirror"{} every bit}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00765}00765 \textcolor{comment}{     * 2. swap the 4 bytes}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00766}00766 \textcolor{comment}{     * 3. complement each bit}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00767}00767 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00768}00768 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00769}00769     \textcolor{comment}{/* Mirror */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00770}00770     temp = crc32\_result;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00771}00771     shft = \textcolor{keyword}{sizeof}(crc32\_result) * 8 -\/ 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00772}00772 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00773}00773     \textcolor{keywordflow}{for} (crc32\_result >>= 1; crc32\_result; crc32\_result >>= 1)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00774}00774     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00775}00775         temp <<= 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00776}00776         temp |= crc32\_result \& 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00777}00777         shft-\/-\/ ;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00778}00778     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00779}00779 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00780}00780     \textcolor{comment}{/* temp[31-\/bit] = crc32\_result[bit] */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00781}00781     temp <<= shft;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00782}00782 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00783}00783     \textcolor{comment}{/* Swap */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00784}00784     \textcolor{comment}{/* crc32\_result = \{temp[7:0], temp[15:8], temp[23:16], temp[31:24]\} */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00785}00785     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00786}00786         uint32\_t t0, t1, t2, t3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00787}00787         t0 = (0x000000ff \& (temp >> 24));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00788}00788         t1 = (0x0000ff00 \& (temp >> 8));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00789}00789         t2 = (0x00ff0000 \& (temp << 8));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00790}00790         t3 = (0xff000000 \& (temp << 24));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00791}00791         crc32\_result = t0 | t1 | t2 | t3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00792}00792     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00793}00793 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00794}00794     \textcolor{comment}{/* Complement */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00795}00795     \textcolor{keywordflow}{if} (complement)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00796}00796     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00797}00797         crc32\_result = \string~crc32\_result;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00798}00798     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00799}00799 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00800}00800     \textcolor{keywordflow}{return} (crc32\_result);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00801}00801 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00802}00802 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00803}00803 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00804}\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{00804}} \mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\textcolor{keywordtype}{int}                    nr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00805}00805              \textcolor{keyword}{volatile} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00806}00806 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00807}00807     \textcolor{keywordflow}{return} ((atomic\_load\_acq\_long(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}) \& (1 << nr)) != 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00808}00808 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00809}00809 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00810}00810 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00811}\mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{00811}} \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int}           nr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00812}00812             \textcolor{keyword}{volatile} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00813}00813 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00814}00814     atomic\_set\_acq\_long(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, (1 << nr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00815}00815 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00816}00816 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00817}00817 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00818}\mbox{\hyperlink{bxe_8c_ae306d262ff0fe2d113c110cd660e9b19}{00818}} \mbox{\hyperlink{bxe_8c_ae306d262ff0fe2d113c110cd660e9b19}{bxe\_clear\_bit}}(\textcolor{keywordtype}{int}                    nr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00819}00819               \textcolor{keyword}{volatile} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00820}00820 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00821}00821     atomic\_clear\_acq\_long(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, (1 << nr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00822}00822 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00823}00823 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00824}00824 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00825}\mbox{\hyperlink{bxe_8c_acd06e46a0101123f2a33026e8ad523ec}{00825}} \mbox{\hyperlink{bxe_8c_acd06e46a0101123f2a33026e8ad523ec}{bxe\_test\_and\_set\_bit}}(\textcolor{keywordtype}{int}                    nr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00826}00826                        \textcolor{keyword}{volatile} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00827}00827 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00828}00828     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} x;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00829}00829     nr = (1 << nr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00830}00830     \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00831}00831         x = *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00832}00832     \} \textcolor{keywordflow}{while} (atomic\_cmpset\_acq\_long(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, x, x | nr) == 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00833}00833     \textcolor{comment}{// if (x \& nr) bit\_was\_set; else bit\_was\_not\_set;}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00834}00834     \textcolor{keywordflow}{return} (x \& nr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00835}00835 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00836}00836 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00837}00837 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00838}\mbox{\hyperlink{bxe_8c_af8691563e9e4141a061514786628bbc2}{00838}} \mbox{\hyperlink{bxe_8c_af8691563e9e4141a061514786628bbc2}{bxe\_test\_and\_clear\_bit}}(\textcolor{keywordtype}{int}                    nr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00839}00839                        \textcolor{keyword}{volatile} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00840}00840 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00841}00841     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} x;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00842}00842     nr = (1 << nr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00843}00843     \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00844}00844         x = *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00845}00845     \} \textcolor{keywordflow}{while} (atomic\_cmpset\_acq\_long(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, x, x \& \string~nr) == 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00846}00846     \textcolor{comment}{// if (x \& nr) bit\_was\_set; else bit\_was\_not\_set;}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00847}00847     \textcolor{keywordflow}{return} (x \& nr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00848}00848 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00849}00849 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00850}00850 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00851}\mbox{\hyperlink{bxe_8c_a7f0353d538d734793d50845c15975a54}{00851}} \mbox{\hyperlink{bxe_8c_a7f0353d538d734793d50845c15975a54}{bxe\_cmpxchg}}(\textcolor{keyword}{volatile} \textcolor{keywordtype}{int} *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00852}00852             \textcolor{keywordtype}{int}          old,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00853}00853             \textcolor{keywordtype}{int}          \textcolor{keyword}{new})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00854}00854 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00855}00855     \textcolor{keywordtype}{int} x;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00856}00856     \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00857}00857         x = *\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00858}00858     \} \textcolor{keywordflow}{while} (atomic\_cmpset\_acq\_int(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, old, \textcolor{keyword}{new}) == 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00859}00859     \textcolor{keywordflow}{return} (x);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00860}00860 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00862}00862 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00863}00863 \textcolor{comment}{ * Get DMA memory from the OS.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00864}00864 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00865}00865 \textcolor{comment}{ * Validates that the OS has provided DMA buffers in response to a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00866}00866 \textcolor{comment}{ * bus\_dmamap\_load call and saves the physical address of those buffers.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00867}00867 \textcolor{comment}{ * When the callback is used the OS will return 0 for the mapping function}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00868}00868 \textcolor{comment}{ * (bus\_dmamap\_load) so we use the value of map\_arg-\/>maxsegs to pass any}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00869}00869 \textcolor{comment}{ * failures back to the caller.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00870}00870 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00871}00871 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00872}00872 \textcolor{comment}{ *   Nothing.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00873}00873 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00874}00874 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00875}\mbox{\hyperlink{bxe_8c_af48f6b266284a42fba770f9fee41817f}{00875}} \mbox{\hyperlink{bxe_8c_af48f6b266284a42fba770f9fee41817f}{bxe\_dma\_map\_addr}}(\textcolor{keywordtype}{void} *arg, bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nseg, \textcolor{keywordtype}{int} error)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00876}00876 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00877}00877     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__dma}{bxe\_dma}} *dma = arg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00878}00878 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00879}00879     \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00880}00880         dma-\/>\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00881}00881         dma-\/>\mbox{\hyperlink{structbxe__dma_a1a3c26a8cfd897e019b4daf681aa422d}{nseg}}  = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00882}00882         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(dma-\/>\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Failed DMA alloc '\%s' (\%d)!\(\backslash\)n"{}}, dma-\/>\mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}}, error);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00883}00883     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00884}00884         dma-\/>\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} = segs-\/>ds\_addr;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00885}00885         dma-\/>\mbox{\hyperlink{structbxe__dma_a1a3c26a8cfd897e019b4daf681aa422d}{nseg}}  = \mbox{\hyperlink{structbxe__dma_a1a3c26a8cfd897e019b4daf681aa422d}{nseg}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00886}00886     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00887}00887 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00888}00888 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00889}00889 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00890}00890 \textcolor{comment}{ * Allocate a block of memory and map it for DMA. No partial completions}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00891}00891 \textcolor{comment}{ * allowed and release any resources acquired if we can't acquire all}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00892}00892 \textcolor{comment}{ * resources.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00893}00893 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00894}00894 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00895}00895 \textcolor{comment}{ *   0 = Success, !0 = Failure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00896}00896 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00897}00897 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00898}\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{00898}} \mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00899}00899               bus\_size\_t       \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00900}00900               \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__dma}{bxe\_dma}}   *dma,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00901}00901               \textcolor{keyword}{const} \textcolor{keywordtype}{char}       *\mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00902}00902 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00903}00903     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00904}00904 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00905}00905     \textcolor{keywordflow}{if} (dma-\/>\mbox{\hyperlink{structbxe__dma_ac4482e0d2c179a630ed7a291bc911908}{size}} > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00906}00906         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}dma block '\%s' already has size \%lu\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00907}00907               (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})dma-\/>\mbox{\hyperlink{structbxe__dma_ac4482e0d2c179a630ed7a291bc911908}{size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00908}00908         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00909}00909     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00910}00910 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00911}00911     memset(dma, 0, \textcolor{keyword}{sizeof}(*dma)); \textcolor{comment}{/* sanity */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00912}00912     dma-\/>\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}   = \mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00913}00913     dma-\/>\mbox{\hyperlink{structbxe__dma_ac4482e0d2c179a630ed7a291bc911908}{size}} = \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00914}00914     snprintf(dma-\/>\mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}}, \textcolor{keyword}{sizeof}(dma-\/>\mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}}), \textcolor{stringliteral}{"{}\%s"{}}, \mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00915}00915 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00916}00916     rc = bus\_dma\_tag\_create(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}}, \textcolor{comment}{/* parent tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00917}00917                             \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}},      \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00918}00918                             0,                  \textcolor{comment}{/* boundary limit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00919}00919                             BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* restricted low */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00920}00920                             BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* restricted hi */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00921}00921                             NULL,               \textcolor{comment}{/* addr filter() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00922}00922                             NULL,               \textcolor{comment}{/* addr filter() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00923}00923                             \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}},               \textcolor{comment}{/* max map size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00924}00924                             1,                  \textcolor{comment}{/* num discontinuous */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00925}00925                             \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}},               \textcolor{comment}{/* max seg size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00926}00926                             BUS\_DMA\_ALLOCNOW,   \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00927}00927                             NULL,               \textcolor{comment}{/* lock() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00928}00928                             NULL,               \textcolor{comment}{/* lock() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00929}00929                             \&dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}});         \textcolor{comment}{/* returned dma tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00930}00930     \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00931}00931         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Failed to create dma tag for '\%s' (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00932}00932         memset(dma, 0, \textcolor{keyword}{sizeof}(*dma));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00933}00933         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00934}00934     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00935}00935 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00936}00936     rc = bus\_dmamem\_alloc(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00937}00937                           (\textcolor{keywordtype}{void} **)\&dma-\/>\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00938}00938                           (BUS\_DMA\_NOWAIT | BUS\_DMA\_ZERO),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00939}00939                           \&dma-\/>\mbox{\hyperlink{structbxe__dma_a5c7a929833be8528cb48392e2c3cebe0}{map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00940}00940     \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00941}00941         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Failed to alloc dma mem for '\%s' (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00942}00942         bus\_dma\_tag\_destroy(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00943}00943         memset(dma, 0, \textcolor{keyword}{sizeof}(*dma));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00944}00944         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00945}00945     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00946}00946 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00947}00947     rc = bus\_dmamap\_load(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00948}00948                          dma-\/>\mbox{\hyperlink{structbxe__dma_a5c7a929833be8528cb48392e2c3cebe0}{map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00949}00949                          dma-\/>\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00950}00950                          \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00951}00951                          \mbox{\hyperlink{bxe_8c_af48f6b266284a42fba770f9fee41817f}{bxe\_dma\_map\_addr}}, \textcolor{comment}{/* BLOGD in here */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00952}00952                          dma,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00953}00953                          BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00954}00954     \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00955}00955         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Failed to load dma map for '\%s' (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__dma_aaa8174ea6f20ba113697eff03d033e98}{msg}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00956}00956         bus\_dmamem\_free(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}}, dma-\/>\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}}, dma-\/>\mbox{\hyperlink{structbxe__dma_a5c7a929833be8528cb48392e2c3cebe0}{map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00957}00957         bus\_dma\_tag\_destroy(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00958}00958         memset(dma, 0, \textcolor{keyword}{sizeof}(*dma));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00959}00959         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00960}00960     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00962}00962     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00963}00963 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00964}00964 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00965}00965 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00966}\mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{00966}} \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00967}00967              \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__dma}{bxe\_dma}}   *dma)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00968}00968 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00969}00969     \textcolor{keywordflow}{if} (dma-\/>\mbox{\hyperlink{structbxe__dma_ac4482e0d2c179a630ed7a291bc911908}{size}} > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00970}00970         \mbox{\hyperlink{bxe_8h_aa9dced7dd0063302e800bbbf9578fd6a}{DBASSERT}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, (dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}} != NULL), (\textcolor{stringliteral}{"{}dma tag is NULL"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00971}00971 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00972}00972         bus\_dmamap\_sync(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}}, dma-\/>\mbox{\hyperlink{structbxe__dma_a5c7a929833be8528cb48392e2c3cebe0}{map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00973}00973                         (BUS\_DMASYNC\_POSTREAD | BUS\_DMASYNC\_POSTWRITE));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00974}00974         bus\_dmamap\_unload(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}}, dma-\/>\mbox{\hyperlink{structbxe__dma_a5c7a929833be8528cb48392e2c3cebe0}{map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00975}00975         bus\_dmamem\_free(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}}, dma-\/>\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}}, dma-\/>\mbox{\hyperlink{structbxe__dma_a5c7a929833be8528cb48392e2c3cebe0}{map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00976}00976         bus\_dma\_tag\_destroy(dma-\/>\mbox{\hyperlink{structbxe__dma_aaeeec984201693d6f6716b674526f547}{tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00977}00977     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00978}00978 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00979}00979     memset(dma, 0, \textcolor{keyword}{sizeof}(*dma));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00980}00980 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00981}00981 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00982}00982 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00983}00983 \textcolor{comment}{ * These indirect read and write routines are only during init.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00984}00984 \textcolor{comment}{ * The locking is handled by the MCP.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00985}00985 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00986}00986 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00987}00987 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00988}\mbox{\hyperlink{bxe_8c_a6b0b85c9fb56fb801f648985f1e35bb0}{00988}} \mbox{\hyperlink{bxe_8c_a6b0b85c9fb56fb801f648985f1e35bb0}{bxe\_reg\_wr\_ind}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00989}00989                uint32\_t         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00990}00990                uint32\_t         val)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00991}00991 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00992}00992     pci\_write\_config(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{ecore__reg_8h_a04e130fe68fa35475c333a14e8479901}{PCICFG\_GRC\_ADDRESS}}, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00993}00993     pci\_write\_config(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{ecore__reg_8h_a212d62f34a0ea4205559cd72a3a7a007}{PCICFG\_GRC\_DATA}}, val, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00994}00994     pci\_write\_config(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{ecore__reg_8h_a04e130fe68fa35475c333a14e8479901}{PCICFG\_GRC\_ADDRESS}}, 0, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00995}00995 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00996}00996 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00997}00997 uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00998}\mbox{\hyperlink{bxe_8c_a3d38645c2d3abbf6a1e7932a5eacb605}{00998}} \mbox{\hyperlink{bxe_8c_a3d38645c2d3abbf6a1e7932a5eacb605}{bxe\_reg\_rd\_ind}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l00999}00999                uint32\_t         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01000}01000 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01001}01001     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01002}01002 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01003}01003     pci\_write\_config(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{ecore__reg_8h_a04e130fe68fa35475c333a14e8479901}{PCICFG\_GRC\_ADDRESS}}, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01004}01004     val = pci\_read\_config(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{ecore__reg_8h_a212d62f34a0ea4205559cd72a3a7a007}{PCICFG\_GRC\_DATA}}, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01005}01005     pci\_write\_config(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{ecore__reg_8h_a04e130fe68fa35475c333a14e8479901}{PCICFG\_GRC\_ADDRESS}}, 0, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01006}01006 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01007}01007     \textcolor{keywordflow}{return} (val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01008}01008 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01009}01009 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01010}01010 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01011}\mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{01011}} \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01012}01012                     uint32\_t         resource)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01013}01013 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01014}01014     uint32\_t lock\_status;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01015}01015     uint32\_t resource\_bit = (1 << resource);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01016}01016     \textcolor{keywordtype}{int} func = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01017}01017     uint32\_t hw\_lock\_control\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01018}01018     \textcolor{keywordtype}{int} cnt;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01019}01019 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01020}01020     \textcolor{comment}{/* validate the resource is within range */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01021}01021     \textcolor{keywordflow}{if} (resource > \mbox{\hyperlink{ecore__reg_8h_a15df0c7ae29fadd30fdeea93705f39d7}{HW\_LOCK\_MAX\_RESOURCE\_VALUE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01022}01022         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}(resource 0x\%x > HW\_LOCK\_MAX\_RESOURCE\_VALUE)"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01023}01023             \textcolor{stringliteral}{"{} resource\_bit 0x\%x\(\backslash\)n"{}}, resource, resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01024}01024         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01025}01025     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01026}01026 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01027}01027     \textcolor{keywordflow}{if} (func <= 5) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01028}01028         hw\_lock\_control\_reg = (\mbox{\hyperlink{ecore__reg_8h_af27e5ee55b5ebe5d7684e8a5e1dc5c22}{MISC\_REG\_DRIVER\_CONTROL\_1}} + (func * 8));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01029}01029     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01030}01030         hw\_lock\_control\_reg =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01031}01031                 (\mbox{\hyperlink{ecore__reg_8h_a65a694d0ee5eff4429fb120b44cae68a}{MISC\_REG\_DRIVER\_CONTROL\_7}} + ((func -\/ 6) * 8));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01032}01032     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01033}01033 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01034}01034     \textcolor{comment}{/* validate the resource is not already taken */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01035}01035     lock\_status = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, hw\_lock\_control\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01036}01036     \textcolor{keywordflow}{if} (lock\_status \& resource\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01037}01037         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}resource (0x\%x) in use (status 0x\%x bit 0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01038}01038               resource, lock\_status, resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01039}01039         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01040}01040     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01041}01041 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01042}01042     \textcolor{comment}{/* try every 5ms for 5 seconds */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01043}01043     \textcolor{keywordflow}{for} (cnt = 0; cnt < 1000; cnt++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01044}01044         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, (hw\_lock\_control\_reg + 4), resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01045}01045         lock\_status = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, hw\_lock\_control\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01046}01046         \textcolor{keywordflow}{if} (lock\_status \& resource\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01047}01047             \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01048}01048         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01049}01049         DELAY(5000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01050}01050     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01051}01051 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01052}01052     \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Resource 0x\%x resource\_bit 0x\%x lock timeout!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01053}01053         resource, resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01054}01054     \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01055}01055 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01056}01056 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01057}01057 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01058}\mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{01058}} \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01059}01059                     uint32\_t         resource)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01060}01060 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01061}01061     uint32\_t lock\_status;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01062}01062     uint32\_t resource\_bit = (1 << resource);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01063}01063     \textcolor{keywordtype}{int} func = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01064}01064     uint32\_t hw\_lock\_control\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01065}01065 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01066}01066     \textcolor{comment}{/* validate the resource is within range */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01067}01067     \textcolor{keywordflow}{if} (resource > \mbox{\hyperlink{ecore__reg_8h_a15df0c7ae29fadd30fdeea93705f39d7}{HW\_LOCK\_MAX\_RESOURCE\_VALUE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01068}01068         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}(resource 0x\%x > HW\_LOCK\_MAX\_RESOURCE\_VALUE)"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01069}01069             \textcolor{stringliteral}{"{} resource\_bit 0x\%x\(\backslash\)n"{}}, resource, resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01070}01070         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01071}01071     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01072}01072 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01073}01073     \textcolor{keywordflow}{if} (func <= 5) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01074}01074         hw\_lock\_control\_reg = (\mbox{\hyperlink{ecore__reg_8h_af27e5ee55b5ebe5d7684e8a5e1dc5c22}{MISC\_REG\_DRIVER\_CONTROL\_1}} + (func * 8));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01075}01075     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01076}01076         hw\_lock\_control\_reg =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01077}01077                 (\mbox{\hyperlink{ecore__reg_8h_a65a694d0ee5eff4429fb120b44cae68a}{MISC\_REG\_DRIVER\_CONTROL\_7}} + ((func -\/ 6) * 8));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01078}01078     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01079}01079 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01080}01080     \textcolor{comment}{/* validate the resource is currently taken */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01081}01081     lock\_status = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, hw\_lock\_control\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01082}01082     \textcolor{keywordflow}{if} (!(lock\_status \& resource\_bit)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01083}01083         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}resource (0x\%x) not in use (status 0x\%x bit 0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01084}01084               resource, lock\_status, resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01085}01085         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01086}01086     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01087}01087 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01088}01088     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, hw\_lock\_control\_reg, resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01089}01089     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01090}01090 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01091}\mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{01091}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01092}01092 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01093}01093         \mbox{\hyperlink{bxe_8h_a8f1450f94216c68fccf2db35ea557e33}{BXE\_PHY\_LOCK}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01094}01094         \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},\mbox{\hyperlink{ecore__reg_8h_a40a9af3a11b958f9c11afc9b802a51a7}{HW\_LOCK\_RESOURCE\_MDIO}}); }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01095}01095 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01096}01096 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01097}\mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{01097}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01098}01098 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01099}01099         \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},\mbox{\hyperlink{ecore__reg_8h_a40a9af3a11b958f9c11afc9b802a51a7}{HW\_LOCK\_RESOURCE\_MDIO}}); }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01100}01100         \mbox{\hyperlink{bxe_8h_ae7454d97f62f9596d34e716362da9810}{BXE\_PHY\_UNLOCK}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01101}01101 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01102}01102 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01103}01103 \textcolor{comment}{ * Per pf misc lock must be acquired before the per port mcp lock. Otherwise,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01104}01104 \textcolor{comment}{ * had we done things the other way around, if two pfs from the same port}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01105}01105 \textcolor{comment}{ * would attempt to access nvram at the same time, we could run into a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01106}01106 \textcolor{comment}{ * scenario such as:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01107}01107 \textcolor{comment}{ * pf A takes the port lock.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01108}01108 \textcolor{comment}{ * pf B succeeds in taking the same lock since they are from the same port.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01109}01109 \textcolor{comment}{ * pf A takes the per pf misc lock. Performs eeprom access.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01110}01110 \textcolor{comment}{ * pf A finishes. Unlocks the per pf misc lock.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01111}01111 \textcolor{comment}{ * Pf B takes the lock and proceeds to perform it's own access.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01112}01112 \textcolor{comment}{ * pf A unlocks the per port lock, while pf B is still working (!).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01113}01113 \textcolor{comment}{ * mcp takes the per port lock and corrupts pf B's access (and/or has it's own}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01114}01114 \textcolor{comment}{ * access corrupted by pf B).*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01115}01115 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01116}01116 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01117}\mbox{\hyperlink{bxe_8c_a686ad38cc5919eeb905171e24b2182e7}{01117}} \mbox{\hyperlink{bxe_8c_a686ad38cc5919eeb905171e24b2182e7}{bxe\_acquire\_nvram\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01118}01118 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01119}01119     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01120}01120     \textcolor{keywordtype}{int} count, i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01121}01121     uint32\_t val = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01122}01122 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01123}01123     \textcolor{comment}{/* acquire HW lock: protect against other PFs in PF Direct Assignment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01124}01124     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a5573d7a9f2bb74cfd30c16dfae96783a}{HW\_LOCK\_RESOURCE\_NVRAM}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01125}01125 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01126}01126     \textcolor{comment}{/* adjust timeout for emulation/FPGA */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01127}01127     count = \mbox{\hyperlink{bxe_8h_a6c655bc8cdc7e526399500ac04961e9a}{NVRAM\_TIMEOUT\_COUNT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01128}01128     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01129}01129         count *= 100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01130}01130     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01131}01131 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01132}01132     \textcolor{comment}{/* request access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01133}01133     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_af278d260fae03bc6fb6c3eb545bd7668}{MCP\_REG\_MCPR\_NVM\_SW\_ARB}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01134}01134            (\mbox{\hyperlink{ecore__reg_8h_a43b3cb662019fd90efa5e1242073c3fb}{MCPR\_NVM\_SW\_ARB\_ARB\_REQ\_SET1}} << port));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01135}01135 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01136}01136     \textcolor{keywordflow}{for} (i = 0; i < count*10; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01137}01137         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_af278d260fae03bc6fb6c3eb545bd7668}{MCP\_REG\_MCPR\_NVM\_SW\_ARB}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01138}01138         \textcolor{keywordflow}{if} (val \& (\mbox{\hyperlink{ecore__reg_8h_a32893be7ffea31e917ac01e591ee152e}{MCPR\_NVM\_SW\_ARB\_ARB\_ARB1}} << port)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01139}01139             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01140}01140         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01141}01141 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01142}01142         DELAY(5);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01143}01143     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01144}01144 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01145}01145     \textcolor{keywordflow}{if} (!(val \& (\mbox{\hyperlink{ecore__reg_8h_a32893be7ffea31e917ac01e591ee152e}{MCPR\_NVM\_SW\_ARB\_ARB\_ARB1}} << port))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01146}01146         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Cannot get access to nvram interface "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01147}01147             \textcolor{stringliteral}{"{}port \%d val 0x\%x (MCPR\_NVM\_SW\_ARB\_ARB\_ARB1 << port)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01148}01148             port, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01149}01149         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01150}01150     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01151}01151 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01152}01152     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01153}01153 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01154}01154 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01155}01155 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01156}\mbox{\hyperlink{bxe_8c_ac3a764725312596febb48d1fe2970af8}{01156}} \mbox{\hyperlink{bxe_8c_ac3a764725312596febb48d1fe2970af8}{bxe\_release\_nvram\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01157}01157 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01158}01158     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01159}01159     \textcolor{keywordtype}{int} count, i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01160}01160     uint32\_t val = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01161}01161 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01162}01162     \textcolor{comment}{/* adjust timeout for emulation/FPGA */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01163}01163     count = \mbox{\hyperlink{bxe_8h_a6c655bc8cdc7e526399500ac04961e9a}{NVRAM\_TIMEOUT\_COUNT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01164}01164     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01165}01165         count *= 100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01166}01166     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01167}01167 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01168}01168     \textcolor{comment}{/* relinquish nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01169}01169     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_af278d260fae03bc6fb6c3eb545bd7668}{MCP\_REG\_MCPR\_NVM\_SW\_ARB}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01170}01170            (\mbox{\hyperlink{ecore__reg_8h_ad8a5636ab3f0dfbec9291754406ae2c2}{MCPR\_NVM\_SW\_ARB\_ARB\_REQ\_CLR1}} << port));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01171}01171 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01172}01172     \textcolor{keywordflow}{for} (i = 0; i < count*10; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01173}01173         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_af278d260fae03bc6fb6c3eb545bd7668}{MCP\_REG\_MCPR\_NVM\_SW\_ARB}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01174}01174         \textcolor{keywordflow}{if} (!(val \& (\mbox{\hyperlink{ecore__reg_8h_a32893be7ffea31e917ac01e591ee152e}{MCPR\_NVM\_SW\_ARB\_ARB\_ARB1}} << port))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01175}01175             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01176}01176         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01177}01177 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01178}01178         DELAY(5);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01179}01179     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01180}01180 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01181}01181     \textcolor{keywordflow}{if} (val \& (\mbox{\hyperlink{ecore__reg_8h_a32893be7ffea31e917ac01e591ee152e}{MCPR\_NVM\_SW\_ARB\_ARB\_ARB1}} << port)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01182}01182         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Cannot free access to nvram interface "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01183}01183             \textcolor{stringliteral}{"{}port \%d val 0x\%x (MCPR\_NVM\_SW\_ARB\_ARB\_ARB1 << port)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01184}01184             port, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01185}01185         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01186}01186     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01187}01187 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01188}01188     \textcolor{comment}{/* release HW lock: protect against other PFs in PF Direct Assignment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01189}01189     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a5573d7a9f2bb74cfd30c16dfae96783a}{HW\_LOCK\_RESOURCE\_NVRAM}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01190}01190 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01191}01191     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01192}01192 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01193}01193 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01194}01194 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01195}\mbox{\hyperlink{bxe_8c_a8e43046b617654b550408814d79e6efa}{01195}} \mbox{\hyperlink{bxe_8c_a8e43046b617654b550408814d79e6efa}{bxe\_enable\_nvram\_access}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01196}01196 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01197}01197     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01198}01198 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01199}01199     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a4ed53670a6d58dd6f836bef42c7b9dc0}{MCP\_REG\_MCPR\_NVM\_ACCESS\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01200}01200 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01201}01201     \textcolor{comment}{/* enable both bits, even on read */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01202}01202     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a4ed53670a6d58dd6f836bef42c7b9dc0}{MCP\_REG\_MCPR\_NVM\_ACCESS\_ENABLE}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01203}01203            (val | \mbox{\hyperlink{ecore__reg_8h_a6ac0b3c55287f6e3b7e9a4d6d0fd901f}{MCPR\_NVM\_ACCESS\_ENABLE\_EN}} | \mbox{\hyperlink{ecore__reg_8h_acd0bd7fb7caa016c3d07abf76abc68bf}{MCPR\_NVM\_ACCESS\_ENABLE\_WR\_EN}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01204}01204 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01205}01205 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01206}01206 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01207}\mbox{\hyperlink{bxe_8c_a7af118e54dfe5a5c72de6c7dc163552b}{01207}} \mbox{\hyperlink{bxe_8c_a7af118e54dfe5a5c72de6c7dc163552b}{bxe\_disable\_nvram\_access}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01208}01208 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01209}01209     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01210}01210 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01211}01211     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a4ed53670a6d58dd6f836bef42c7b9dc0}{MCP\_REG\_MCPR\_NVM\_ACCESS\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01212}01212 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01213}01213     \textcolor{comment}{/* disable both bits, even after read */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01214}01214     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a4ed53670a6d58dd6f836bef42c7b9dc0}{MCP\_REG\_MCPR\_NVM\_ACCESS\_ENABLE}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01215}01215            (val \& \string~(\mbox{\hyperlink{ecore__reg_8h_a6ac0b3c55287f6e3b7e9a4d6d0fd901f}{MCPR\_NVM\_ACCESS\_ENABLE\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01216}01216                     \mbox{\hyperlink{ecore__reg_8h_acd0bd7fb7caa016c3d07abf76abc68bf}{MCPR\_NVM\_ACCESS\_ENABLE\_WR\_EN}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01217}01217 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01218}01218 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01219}01219 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01220}\mbox{\hyperlink{bxe_8c_aa8ffa724b68db71a727eec15ebcb1f0b}{01220}} \mbox{\hyperlink{bxe_8c_aa8ffa724b68db71a727eec15ebcb1f0b}{bxe\_nvram\_read\_dword}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01221}01221                      uint32\_t         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01222}01222                      uint32\_t         *ret\_val,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01223}01223                      uint32\_t         cmd\_flags)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01224}01224 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01225}01225     \textcolor{keywordtype}{int} count, i, rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01226}01226     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01227}01227 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01228}01228     \textcolor{comment}{/* build the command word */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01229}01229     cmd\_flags |= \mbox{\hyperlink{ecore__reg_8h_ad11161cb940ad579c375bec498beda38}{MCPR\_NVM\_COMMAND\_DOIT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01230}01230 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01231}01231     \textcolor{comment}{/* need to clear DONE bit separately */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01232}01232     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a442a2ede6deeb4275d461abe61e42cbe}{MCP\_REG\_MCPR\_NVM\_COMMAND}}, \mbox{\hyperlink{ecore__reg_8h_a1ca4843c05ff27d15289ded8f42e53c2}{MCPR\_NVM\_COMMAND\_DONE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01233}01233 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01234}01234     \textcolor{comment}{/* address of the NVRAM to read from */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01235}01235     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a3e56ddaaf0c46f6b256b85ab09a0e5ba}{MCP\_REG\_MCPR\_NVM\_ADDR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01236}01236            (\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} \& \mbox{\hyperlink{ecore__reg_8h_ad90f6ee4140983316c6f908bae6befd1}{MCPR\_NVM\_ADDR\_NVM\_ADDR\_VALUE}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01237}01237 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01238}01238     \textcolor{comment}{/* issue a read command */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01239}01239     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a442a2ede6deeb4275d461abe61e42cbe}{MCP\_REG\_MCPR\_NVM\_COMMAND}}, cmd\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01240}01240 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01241}01241     \textcolor{comment}{/* adjust timeout for emulation/FPGA */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01242}01242     count = \mbox{\hyperlink{bxe_8h_a6c655bc8cdc7e526399500ac04961e9a}{NVRAM\_TIMEOUT\_COUNT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01243}01243     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01244}01244         count *= 100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01245}01245     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01246}01246 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01247}01247     \textcolor{comment}{/* wait for completion */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01248}01248     *ret\_val = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01249}01249     rc = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01250}01250     \textcolor{keywordflow}{for} (i = 0; i < count; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01251}01251         DELAY(5);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01252}01252         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a442a2ede6deeb4275d461abe61e42cbe}{MCP\_REG\_MCPR\_NVM\_COMMAND}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01253}01253 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01254}01254         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a1ca4843c05ff27d15289ded8f42e53c2}{MCPR\_NVM\_COMMAND\_DONE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01255}01255             val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a78a55297f927e7593ca709bcde7f2e41}{MCP\_REG\_MCPR\_NVM\_READ}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01256}01256             \textcolor{comment}{/* we read nvram data in cpu order}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01257}01257 \textcolor{comment}{             * but ethtool sees it as an array of bytes}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01258}01258 \textcolor{comment}{             * converting to big-\/endian will do the work}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01259}01259 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01260}01260             *ret\_val = htobe32(val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01261}01261             rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01262}01262             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01263}01263         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01264}01264     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01265}01265 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01266}01266     \textcolor{keywordflow}{if} (rc == -\/1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01267}01267         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}nvram read timeout expired "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01268}01268             \textcolor{stringliteral}{"{}(offset 0x\%x cmd\_flags 0x\%x val 0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01269}01269             \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, cmd\_flags, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01270}01270     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01272}01272     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01273}01273 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01274}01274 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01275}01275 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01276}\mbox{\hyperlink{bxe_8c_a45bcc7f142ced7ca1993f58b5ef7ff21}{01276}} \mbox{\hyperlink{bxe_8c_a45bcc7f142ced7ca1993f58b5ef7ff21}{bxe\_nvram\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01277}01277                uint32\_t         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01278}01278                uint8\_t          *ret\_buf,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01279}01279                \textcolor{keywordtype}{int}              buf\_size)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01280}01280 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01281}01281     uint32\_t cmd\_flags;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01282}01282     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01283}01283     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01284}01284 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01285}01285     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} \& 0x03) || (buf\_size \& 0x03) || (buf\_size == 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01286}01286         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Invalid parameter, offset 0x\%x buf\_size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01287}01287               \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, buf\_size);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01288}01288         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01289}01289     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01290}01290 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01291}01291     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} + buf\_size) > \mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01292}01292         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Invalid parameter, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01293}01293                   \textcolor{stringliteral}{"{}offset 0x\%x + buf\_size 0x\%x > flash\_size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01294}01294               \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, buf\_size, \mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01295}01295         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01296}01296     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01297}01297 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01298}01298     \textcolor{comment}{/* request access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01299}01299     rc = \mbox{\hyperlink{bxe_8c_a686ad38cc5919eeb905171e24b2182e7}{bxe\_acquire\_nvram\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01300}01300     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01301}01301         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01302}01302     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01303}01303 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01304}01304     \textcolor{comment}{/* enable access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01305}01305     \mbox{\hyperlink{bxe_8c_a8e43046b617654b550408814d79e6efa}{bxe\_enable\_nvram\_access}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01306}01306 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01307}01307     \textcolor{comment}{/* read the first word(s) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01308}01308     cmd\_flags = \mbox{\hyperlink{ecore__reg_8h_aab1468a7a766d9f85bb9c1dd0525fc67}{MCPR\_NVM\_COMMAND\_FIRST}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01309}01309     \textcolor{keywordflow}{while} ((buf\_size > \textcolor{keyword}{sizeof}(uint32\_t)) \&\& (rc == 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01310}01310         rc = \mbox{\hyperlink{bxe_8c_aa8ffa724b68db71a727eec15ebcb1f0b}{bxe\_nvram\_read\_dword}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, \&val, cmd\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01311}01311         memcpy(ret\_buf, \&val, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01312}01312 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01313}01313         \textcolor{comment}{/* advance to the next dword */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01314}01314         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} += \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01315}01315         ret\_buf += \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01316}01316         buf\_size -\/= \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01317}01317         cmd\_flags = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01318}01318     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01319}01319 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01320}01320     \textcolor{keywordflow}{if} (rc == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01321}01321         cmd\_flags |= \mbox{\hyperlink{ecore__reg_8h_af930e1c84fa83a39884e2565dff79e61}{MCPR\_NVM\_COMMAND\_LAST}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01322}01322         rc = \mbox{\hyperlink{bxe_8c_aa8ffa724b68db71a727eec15ebcb1f0b}{bxe\_nvram\_read\_dword}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, \&val, cmd\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01323}01323         memcpy(ret\_buf, \&val, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01324}01324     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01325}01325 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01326}01326     \textcolor{comment}{/* disable access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01327}01327     \mbox{\hyperlink{bxe_8c_a7af118e54dfe5a5c72de6c7dc163552b}{bxe\_disable\_nvram\_access}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01328}01328     \mbox{\hyperlink{bxe_8c_ac3a764725312596febb48d1fe2970af8}{bxe\_release\_nvram\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01329}01329 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01330}01330     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01331}01331 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01332}01332 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01333}01333 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01334}\mbox{\hyperlink{bxe_8c_a91697e7280b3a380bee3ded2efc0c234}{01334}} \mbox{\hyperlink{bxe_8c_a91697e7280b3a380bee3ded2efc0c234}{bxe\_nvram\_write\_dword}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01335}01335                       uint32\_t         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01336}01336                       uint32\_t         val,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01337}01337                       uint32\_t         cmd\_flags)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01338}01338 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01339}01339     \textcolor{keywordtype}{int} count, i, rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01340}01340 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01341}01341     \textcolor{comment}{/* build the command word */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01342}01342     cmd\_flags |= (\mbox{\hyperlink{ecore__reg_8h_ad11161cb940ad579c375bec498beda38}{MCPR\_NVM\_COMMAND\_DOIT}} | \mbox{\hyperlink{ecore__reg_8h_a5649f2e9229b3a99d82aac3e175934f1}{MCPR\_NVM\_COMMAND\_WR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01343}01343 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01344}01344     \textcolor{comment}{/* need to clear DONE bit separately */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01345}01345     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a442a2ede6deeb4275d461abe61e42cbe}{MCP\_REG\_MCPR\_NVM\_COMMAND}}, \mbox{\hyperlink{ecore__reg_8h_a1ca4843c05ff27d15289ded8f42e53c2}{MCPR\_NVM\_COMMAND\_DONE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01346}01346 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01347}01347     \textcolor{comment}{/* write the data */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01348}01348     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_aadc84f2e138caf9d1521ded6ec97a3d3}{MCP\_REG\_MCPR\_NVM\_WRITE}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01349}01349 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01350}01350     \textcolor{comment}{/* address of the NVRAM to write to */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01351}01351     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a3e56ddaaf0c46f6b256b85ab09a0e5ba}{MCP\_REG\_MCPR\_NVM\_ADDR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01352}01352            (\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} \& \mbox{\hyperlink{ecore__reg_8h_ad90f6ee4140983316c6f908bae6befd1}{MCPR\_NVM\_ADDR\_NVM\_ADDR\_VALUE}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01353}01353 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01354}01354     \textcolor{comment}{/* issue the write command */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01355}01355     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a442a2ede6deeb4275d461abe61e42cbe}{MCP\_REG\_MCPR\_NVM\_COMMAND}}, cmd\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01356}01356 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01357}01357     \textcolor{comment}{/* adjust timeout for emulation/FPGA */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01358}01358     count = \mbox{\hyperlink{bxe_8h_a6c655bc8cdc7e526399500ac04961e9a}{NVRAM\_TIMEOUT\_COUNT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01359}01359     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01360}01360         count *= 100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01361}01361     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01362}01362 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01363}01363     \textcolor{comment}{/* wait for completion */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01364}01364     rc = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01365}01365     \textcolor{keywordflow}{for} (i = 0; i < count; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01366}01366         DELAY(5);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01367}01367         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a442a2ede6deeb4275d461abe61e42cbe}{MCP\_REG\_MCPR\_NVM\_COMMAND}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01368}01368         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a1ca4843c05ff27d15289ded8f42e53c2}{MCPR\_NVM\_COMMAND\_DONE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01369}01369             rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01370}01370             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01371}01371         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01372}01372     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01373}01373 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01374}01374     \textcolor{keywordflow}{if} (rc == -\/1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01375}01375         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}nvram write timeout expired "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01376}01376             \textcolor{stringliteral}{"{}(offset 0x\%x cmd\_flags 0x\%x val 0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01377}01377             \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, cmd\_flags, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01378}01378     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01379}01379 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01380}01380     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01381}01381 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01382}01382 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01383}\mbox{\hyperlink{bxe_8c_aa549262d5713c544caa4a82041e634f4}{01383}} \textcolor{preprocessor}{\#define BYTE\_OFFSET(offset) (8 * (offset \& 0x03))}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01384}01384 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01385}01385 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01386}\mbox{\hyperlink{bxe_8c_ab4f3464ed3f5fe3ac76caa0fc582bd30}{01386}} \mbox{\hyperlink{bxe_8c_ab4f3464ed3f5fe3ac76caa0fc582bd30}{bxe\_nvram\_write1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01387}01387                  uint32\_t         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01388}01388                  uint8\_t          *data\_buf,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01389}01389                  \textcolor{keywordtype}{int}              buf\_size)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01390}01390 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01391}01391     uint32\_t cmd\_flags;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01392}01392     uint32\_t align\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01393}01393     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01394}01394     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01395}01395 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01396}01396     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} + buf\_size) > \mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01397}01397         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Invalid parameter, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01398}01398                   \textcolor{stringliteral}{"{}offset 0x\%x + buf\_size 0x\%x > flash\_size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01399}01399               \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, buf\_size, \mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01400}01400         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01401}01401     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01402}01402 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01403}01403     \textcolor{comment}{/* request access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01404}01404     rc = \mbox{\hyperlink{bxe_8c_a686ad38cc5919eeb905171e24b2182e7}{bxe\_acquire\_nvram\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01405}01405     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01406}01406         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01407}01407     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01408}01408 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01409}01409     \textcolor{comment}{/* enable access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01410}01410     \mbox{\hyperlink{bxe_8c_a8e43046b617654b550408814d79e6efa}{bxe\_enable\_nvram\_access}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01411}01411 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01412}01412     cmd\_flags = (\mbox{\hyperlink{ecore__reg_8h_aab1468a7a766d9f85bb9c1dd0525fc67}{MCPR\_NVM\_COMMAND\_FIRST}} | \mbox{\hyperlink{ecore__reg_8h_af930e1c84fa83a39884e2565dff79e61}{MCPR\_NVM\_COMMAND\_LAST}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01413}01413     align\_offset = (\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} \& \string~0x03);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01414}01414     rc = \mbox{\hyperlink{bxe_8c_aa8ffa724b68db71a727eec15ebcb1f0b}{bxe\_nvram\_read\_dword}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, align\_offset, \&val, cmd\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01415}01415 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01416}01416     \textcolor{keywordflow}{if} (rc == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01417}01417         val \&= \string~(0xff << \mbox{\hyperlink{bxe_8c_aa549262d5713c544caa4a82041e634f4}{BYTE\_OFFSET}}(\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01418}01418         val |= (*data\_buf << \mbox{\hyperlink{bxe_8c_aa549262d5713c544caa4a82041e634f4}{BYTE\_OFFSET}}(\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01419}01419 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01420}01420         \textcolor{comment}{/* nvram data is returned as an array of bytes}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01421}01421 \textcolor{comment}{         * convert it back to cpu order}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01422}01422 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01423}01423         val = be32toh(val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01424}01424 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01425}01425         rc = \mbox{\hyperlink{bxe_8c_a91697e7280b3a380bee3ded2efc0c234}{bxe\_nvram\_write\_dword}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, align\_offset, val, cmd\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01426}01426     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01427}01427 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01428}01428     \textcolor{comment}{/* disable access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01429}01429     \mbox{\hyperlink{bxe_8c_a7af118e54dfe5a5c72de6c7dc163552b}{bxe\_disable\_nvram\_access}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01430}01430     \mbox{\hyperlink{bxe_8c_ac3a764725312596febb48d1fe2970af8}{bxe\_release\_nvram\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01431}01431 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01432}01432     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01433}01433 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01434}01434 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01435}01435 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01436}\mbox{\hyperlink{bxe_8c_a25d6cfb297b5c3d9aaf0436b841952cd}{01436}} \mbox{\hyperlink{bxe_8c_a25d6cfb297b5c3d9aaf0436b841952cd}{bxe\_nvram\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01437}01437                 uint32\_t         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01438}01438                 uint8\_t          *data\_buf,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01439}01439                 \textcolor{keywordtype}{int}              buf\_size)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01440}01440 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01441}01441     uint32\_t cmd\_flags;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01442}01442     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01443}01443     uint32\_t written\_so\_far;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01444}01444     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01445}01445 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01446}01446     \textcolor{keywordflow}{if} (buf\_size == 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01447}01447         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_ab4f3464ed3f5fe3ac76caa0fc582bd30}{bxe\_nvram\_write1}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, data\_buf, buf\_size));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01448}01448     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01449}01449 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01450}01450     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} \& 0x03) || (buf\_size \& 0x03) \textcolor{comment}{/* || (buf\_size == 0) */}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01451}01451         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Invalid parameter, offset 0x\%x buf\_size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01452}01452               \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, buf\_size);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01453}01453         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01454}01454     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01455}01455 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01456}01456     \textcolor{keywordflow}{if} (buf\_size == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01457}01457         \textcolor{keywordflow}{return} (0); \textcolor{comment}{/* nothing to do */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01458}01458     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01459}01459 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01460}01460     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} + buf\_size) > \mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01461}01461         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \textcolor{stringliteral}{"{}Invalid parameter, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01462}01462                   \textcolor{stringliteral}{"{}offset 0x\%x + buf\_size 0x\%x > flash\_size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01463}01463               \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, buf\_size, \mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01464}01464         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01465}01465     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01466}01466 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01467}01467     \textcolor{comment}{/* request access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01468}01468     rc = \mbox{\hyperlink{bxe_8c_a686ad38cc5919eeb905171e24b2182e7}{bxe\_acquire\_nvram\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01469}01469     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01470}01470         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01471}01471     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01472}01472 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01473}01473     \textcolor{comment}{/* enable access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01474}01474     \mbox{\hyperlink{bxe_8c_a8e43046b617654b550408814d79e6efa}{bxe\_enable\_nvram\_access}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01475}01475 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01476}01476     written\_so\_far = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01477}01477     cmd\_flags = \mbox{\hyperlink{ecore__reg_8h_aab1468a7a766d9f85bb9c1dd0525fc67}{MCPR\_NVM\_COMMAND\_FIRST}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01478}01478     \textcolor{keywordflow}{while} ((written\_so\_far < buf\_size) \&\& (rc == 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01479}01479         \textcolor{keywordflow}{if} (written\_so\_far == (buf\_size -\/ \textcolor{keyword}{sizeof}(uint32\_t))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01480}01480             cmd\_flags |= \mbox{\hyperlink{ecore__reg_8h_af930e1c84fa83a39884e2565dff79e61}{MCPR\_NVM\_COMMAND\_LAST}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01481}01481         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (((\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} + 4) \% \mbox{\hyperlink{bxe_8h_afd5fda9e52ccbe635c6dd3a565629f6f}{NVRAM\_PAGE\_SIZE}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01482}01482             cmd\_flags |= \mbox{\hyperlink{ecore__reg_8h_af930e1c84fa83a39884e2565dff79e61}{MCPR\_NVM\_COMMAND\_LAST}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01483}01483         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} \% \mbox{\hyperlink{bxe_8h_afd5fda9e52ccbe635c6dd3a565629f6f}{NVRAM\_PAGE\_SIZE}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01484}01484             cmd\_flags |= \mbox{\hyperlink{ecore__reg_8h_aab1468a7a766d9f85bb9c1dd0525fc67}{MCPR\_NVM\_COMMAND\_FIRST}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01485}01485         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01486}01486 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01487}01487         memcpy(\&val, data\_buf, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01488}01488 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01489}01489         rc = \mbox{\hyperlink{bxe_8c_a91697e7280b3a380bee3ded2efc0c234}{bxe\_nvram\_write\_dword}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}}, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, val, cmd\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01490}01490 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01491}01491         \textcolor{comment}{/* advance to the next dword */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01492}01492         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} += \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01493}01493         data\_buf += \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01494}01494         written\_so\_far += \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01495}01495         cmd\_flags = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01496}01496     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01497}01497 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01498}01498     \textcolor{comment}{/* disable access to nvram interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01499}01499     \mbox{\hyperlink{bxe_8c_a7af118e54dfe5a5c72de6c7dc163552b}{bxe\_disable\_nvram\_access}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01500}01500     \mbox{\hyperlink{bxe_8c_ac3a764725312596febb48d1fe2970af8}{bxe\_release\_nvram\_lock}}(\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01501}01501 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01502}01502     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01503}01503 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01504}01504 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01505}01505 \textcolor{comment}{/* copy command into DMAE command memory and set DMAE command Go */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01506}01506 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01507}\mbox{\hyperlink{bxe_8c_a9a114f4b3263168c17f2b8f6cb56ecdc}{01507}} \mbox{\hyperlink{bxe_8c_a9a114f4b3263168c17f2b8f6cb56ecdc}{bxe\_post\_dmae}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *\mbox{\hyperlink{structbxe__dma_a9b5ba4a366115a81639dfcfebcfd6b2b}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01508}01508               \textcolor{keyword}{struct} \mbox{\hyperlink{structdmae__cmd}{dmae\_cmd}} *dmae,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01509}01509               \textcolor{keywordtype}{int}                 idx)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01510}01510 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01511}01511     uint32\_t cmd\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01512}01512     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01513}01513 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01514}01514     cmd\_offset = (\mbox{\hyperlink{ecore__reg_8h_a63a08b86667c5b063c5ce328bf421e99}{DMAE\_REG\_CMD\_MEM}} + (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structdmae__cmd}{dmae\_cmd}}) * idx));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01515}01515     \textcolor{keywordflow}{for} (i = 0; i < ((\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structdmae__cmd}{dmae\_cmd}}) / 4)); i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01516}01516         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (cmd\_offset + (i * 4)), *(((uint32\_t *)dmae) + i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01517}01517     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01518}01518 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01519}01519     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a7073b85751b1558e9b7d0a5198d6e0d0}{dmae\_reg\_go\_c}}[idx], 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01520}01520 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01521}01521 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01522}01522 uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01523}\mbox{\hyperlink{bxe_8c_ad8caa02c676baa1d41c19eafd55c85c6}{01523}} \mbox{\hyperlink{bxe_8c_ad8caa02c676baa1d41c19eafd55c85c6}{bxe\_dmae\_opcode\_add\_comp}}(uint32\_t \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01524}01524                          uint8\_t  comp\_type)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01525}01525 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01526}01526     \textcolor{keywordflow}{return} (\mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} | ((comp\_type << \mbox{\hyperlink{ecore__hsi_8h_ae8dd41195492953531d5f616af2ab356}{DMAE\_CMD\_C\_DST\_SHIFT}}) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01527}01527                       \mbox{\hyperlink{ecore__hsi_8h_a3abe1359e307495dfd760c3464a9ec79}{DMAE\_CMD\_C\_TYPE\_ENABLE}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01528}01528 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01529}01529 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01530}01530 uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01531}\mbox{\hyperlink{bxe_8c_a19b576b3a2569e4f8b68ebc68e6754a7}{01531}} \mbox{\hyperlink{bxe_8c_a19b576b3a2569e4f8b68ebc68e6754a7}{bxe\_dmae\_opcode\_clr\_src\_reset}}(uint32\_t \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01532}01532 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01533}01533     \textcolor{keywordflow}{return} (\mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} \& \string~\mbox{\hyperlink{ecore__hsi_8h_a65cdbc84a80fbd9c2f335722e27e82de}{DMAE\_CMD\_SRC\_RESET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01534}01534 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01535}01535 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01536}01536 uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01537}\mbox{\hyperlink{bxe_8c_a8b496e5ad1bc8c2b288cf9641390692e}{01537}} \mbox{\hyperlink{bxe_8c_a8b496e5ad1bc8c2b288cf9641390692e}{bxe\_dmae\_opcode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01538}01538                 uint8\_t          src\_type,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01539}01539                 uint8\_t          dst\_type,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01540}01540                 uint8\_t          with\_comp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01541}01541                 uint8\_t          comp\_type)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01542}01542 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01543}01543     uint32\_t \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01544}01544 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01545}01545     \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} |= ((src\_type << \mbox{\hyperlink{ecore__hsi_8h_adabc3dcd8d1cd65b7b6b27822a074497}{DMAE\_CMD\_SRC\_SHIFT}}) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01546}01546                (dst\_type << \mbox{\hyperlink{ecore__hsi_8h_a86afe2990ef653302806e1b18cecd777}{DMAE\_CMD\_DST\_SHIFT}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01547}01547 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01548}01548     \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} |= (\mbox{\hyperlink{ecore__hsi_8h_a65cdbc84a80fbd9c2f335722e27e82de}{DMAE\_CMD\_SRC\_RESET}} | \mbox{\hyperlink{ecore__hsi_8h_a337bb5b95b40675e2d8225e6776a595e}{DMAE\_CMD\_DST\_RESET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01549}01549 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01550}01550     \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} |= (\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ? \mbox{\hyperlink{bxe_8h_a6cb9428fb23393d33170e69905422174}{DMAE\_CMD\_PORT\_1}} : \mbox{\hyperlink{bxe_8h_ae8989ceeca88adb55333da2424883a92}{DMAE\_CMD\_PORT\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01551}01551 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01552}01552     \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} |= ((\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc) << \mbox{\hyperlink{ecore__hsi_8h_ab082b68ec50abb212d3aa67378b1c894}{DMAE\_CMD\_E1HVN\_SHIFT}}) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01553}01553                (\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc) << \mbox{\hyperlink{ecore__hsi_8h_afcc3cef010f401feb7d52809a306eae7}{DMAE\_CMD\_DST\_VN\_SHIFT}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01554}01554 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01555}01555     \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} |= (\mbox{\hyperlink{bxe_8h_aaa95115a2a61bb0d84a6880140a18129}{DMAE\_COM\_SET\_ERR}} << \mbox{\hyperlink{ecore__hsi_8h_ac9da92b3e67a09a46c07d6374fd3628b}{DMAE\_CMD\_ERR\_POLICY\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01556}01556 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01557}01557 \textcolor{preprocessor}{\#ifdef \_\_BIG\_ENDIAN}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01558}01558     \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} |= \mbox{\hyperlink{bxe_8h_ac67df10df7f8dd04d4f44b9833fd65f2}{DMAE\_CMD\_ENDIANITY\_B\_DW\_SWAP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01559}01559 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01560}01560     \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} |= \mbox{\hyperlink{bxe_8h_aca369155a0b9ea70d000b8b4237837d8}{DMAE\_CMD\_ENDIANITY\_DW\_SWAP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01561}01561 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01562}01562 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01563}01563     \textcolor{keywordflow}{if} (with\_comp) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01564}01564         \mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} = \mbox{\hyperlink{bxe_8c_ad8caa02c676baa1d41c19eafd55c85c6}{bxe\_dmae\_opcode\_add\_comp}}(\mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}}, comp\_type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01565}01565     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01566}01566 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01567}01567     \textcolor{keywordflow}{return} (\mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01568}01568 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01569}01569 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01570}01570 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01571}\mbox{\hyperlink{bxe_8c_a9ae0b78eebc0eb970ca6da1b7fa7d64c}{01571}} \mbox{\hyperlink{bxe_8c_a9ae0b78eebc0eb970ca6da1b7fa7d64c}{bxe\_prep\_dmae\_with\_comp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01572}01572                         \textcolor{keyword}{struct} \mbox{\hyperlink{structdmae__cmd}{dmae\_cmd}} *dmae,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01573}01573                         uint8\_t             src\_type,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01574}01574                         uint8\_t             dst\_type)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01575}01575 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01576}01576     memset(dmae, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structdmae__cmd}{dmae\_cmd}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01577}01577 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01578}01578     \textcolor{comment}{/* set the opcode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01579}01579     dmae-\/>\mbox{\hyperlink{structdmae__cmd_adf48fbd249392a2307a668fe87d52b35}{opcode}} = \mbox{\hyperlink{bxe_8c_a8b496e5ad1bc8c2b288cf9641390692e}{bxe\_dmae\_opcode}}(sc, src\_type, dst\_type,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01580}01580                                    TRUE, \mbox{\hyperlink{bxe_8h_af9a05b4a217230e4020125421247abf2}{DMAE\_COMP\_PCI}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01581}01581 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01582}01582     \textcolor{comment}{/* fill in the completion parameters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01583}01583     dmae-\/>\mbox{\hyperlink{structdmae__cmd_a023b1be8f05a21367ff2d0585ce4060e}{comp\_addr\_lo}} = \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(\mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, wb\_comp));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01584}01584     dmae-\/>\mbox{\hyperlink{structdmae__cmd_aa5ba6dee9e6019baa1fc5d2196f4b45a}{comp\_addr\_hi}} = \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(\mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, wb\_comp));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01585}01585     dmae-\/>\mbox{\hyperlink{structdmae__cmd_a77d7299352e1fd6091c2f200793a9382}{comp\_val}}     = \mbox{\hyperlink{bxe_8h_a9903a333da07bbf5b9ff2b8d473d7a6b}{DMAE\_COMP\_VAL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01586}01586 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01587}01587 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01588}01588 \textcolor{comment}{/* issue a DMAE command over the init channel and wait for completion */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01589}01589 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01590}\mbox{\hyperlink{bxe_8c_a9076a6f87cb3bb59222e5c541de3cf9c}{01590}} \mbox{\hyperlink{bxe_8c_a9076a6f87cb3bb59222e5c541de3cf9c}{bxe\_issue\_dmae\_with\_comp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01591}01591                          \textcolor{keyword}{struct} \mbox{\hyperlink{structdmae__cmd}{dmae\_cmd}} *dmae)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01592}01592 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01593}01593     uint32\_t *wb\_comp = \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, wb\_comp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01594}01594     \textcolor{keywordtype}{int} timeout = \mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc) ? 400000 : 4000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01595}01595 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01596}01596     \mbox{\hyperlink{bxe_8h_adc6593a1e0d9d4ec6054f3a80fcb5001}{BXE\_DMAE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01597}01597 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01598}01598     \textcolor{comment}{/* reset completion */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01599}01599     *wb\_comp = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01600}01600 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01601}01601     \textcolor{comment}{/* post the command on the channel used for initializations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01602}01602     \mbox{\hyperlink{bxe_8c_a9a114f4b3263168c17f2b8f6cb56ecdc}{bxe\_post\_dmae}}(sc, dmae, \mbox{\hyperlink{bxe_8h_ad95e93180e4db5383ab03e00237ea93b}{INIT\_DMAE\_C}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01603}01603 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01604}01604     \textcolor{comment}{/* wait for completion */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01605}01605     DELAY(5);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01606}01606 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01607}01607     \textcolor{keywordflow}{while} ((*wb\_comp \& \string~\mbox{\hyperlink{bxe_8h_a0f77f2463485d18423f19730be00049d}{DMAE\_PCI\_ERR\_FLAG}}) != \mbox{\hyperlink{bxe_8h_a9903a333da07bbf5b9ff2b8d473d7a6b}{DMAE\_COMP\_VAL}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01608}01608         \textcolor{keywordflow}{if} (!timeout ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01609}01609             (sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} != \mbox{\hyperlink{bxe_8h_ae70e8a5625712b5a0f3c8c9af5107e5b}{BXE\_RECOVERY\_DONE}} \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01610}01610              sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} != \mbox{\hyperlink{bxe_8h_a1c66677c12a098e679be5964b7851834}{BXE\_RECOVERY\_NIC\_LOADING}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01611}01611             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}DMAE timeout! *wb\_comp 0x\%x recovery\_state 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01612}01612                 *wb\_comp, sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01613}01613             \mbox{\hyperlink{bxe_8h_a25480ab60d4bcd6eb3e1a2f89d24a9cc}{BXE\_DMAE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01614}01614             \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_ad387cf73cfaeed8569c25e50d63cae35}{DMAE\_TIMEOUT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01615}01615         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01616}01616 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01617}01617         timeout-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01618}01618         DELAY(50);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01619}01619     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01620}01620 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01621}01621     \textcolor{keywordflow}{if} (*wb\_comp \& \mbox{\hyperlink{bxe_8h_a0f77f2463485d18423f19730be00049d}{DMAE\_PCI\_ERR\_FLAG}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01622}01622         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}DMAE PCI error! *wb\_comp 0x\%x recovery\_state 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01623}01623                 *wb\_comp, sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01624}01624         \mbox{\hyperlink{bxe_8h_a25480ab60d4bcd6eb3e1a2f89d24a9cc}{BXE\_DMAE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01625}01625         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_ac28da693ee49a6edca68bd1e83615e5c}{DMAE\_PCI\_ERROR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01626}01626     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01627}01627 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01628}01628     \mbox{\hyperlink{bxe_8h_a25480ab60d4bcd6eb3e1a2f89d24a9cc}{BXE\_DMAE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01629}01629     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01630}01630 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01631}01631 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01632}01632 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01633}\mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{01633}} \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01634}01634               uint32\_t         src\_addr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01635}01635               uint32\_t         len32)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01636}01636 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01637}01637     \textcolor{keyword}{struct }\mbox{\hyperlink{structdmae__cmd}{dmae\_cmd}} dmae;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01638}01638     uint32\_t *data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01639}01639     \textcolor{keywordtype}{int} i, rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01640}01640 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01641}01641     \mbox{\hyperlink{bxe_8h_aa9dced7dd0063302e800bbbf9578fd6a}{DBASSERT}}(sc, (len32 <= 4), (\textcolor{stringliteral}{"{}DMAE read length is \%d"{}}, len32));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01642}01642 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01643}01643     \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structbxe__softc_ab8635fb9ce6cf45243a4e83c338680e7}{dmae\_ready}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01644}01644         data = \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, wb\_data[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01645}01645 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01646}01646         \textcolor{keywordflow}{for} (i = 0; i < len32; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01647}01647             data[i] = (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01648}01648                           \mbox{\hyperlink{bxe_8c_a3d38645c2d3abbf6a1e7932a5eacb605}{bxe\_reg\_rd\_ind}}(sc, (src\_addr + (i * 4))) :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01649}01649                           \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, (src\_addr + (i * 4)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01650}01650         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01651}01651 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01652}01652         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01653}01653     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01654}01654 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01655}01655     \textcolor{comment}{/* set opcode and fixed command fields */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01656}01656     \mbox{\hyperlink{bxe_8c_a9ae0b78eebc0eb970ca6da1b7fa7d64c}{bxe\_prep\_dmae\_with\_comp}}(sc, \&dmae, \mbox{\hyperlink{bxe_8h_a433afe9271397d9dc8b06985345810f4}{DMAE\_SRC\_GRC}}, \mbox{\hyperlink{bxe_8h_a20b3915de033718431f605323499a9d3}{DMAE\_DST\_PCI}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01657}01657 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01658}01658     \textcolor{comment}{/* fill in addresses and len */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01659}01659     dmae.\mbox{\hyperlink{structdmae__cmd_a75d4c1e72eab59bba3f44d0fc20089b7}{src\_addr\_lo}} = (src\_addr >> 2); \textcolor{comment}{/* GRC addr has dword resolution */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01660}01660     dmae.\mbox{\hyperlink{structdmae__cmd_aa534a2e735f920cd63804540b1fc94ec}{src\_addr\_hi}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01661}01661     dmae.\mbox{\hyperlink{structdmae__cmd_ac83320138fd5b1624c7d564dd879cf21}{dst\_addr\_lo}} = \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(\mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, wb\_data));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01662}01662     dmae.\mbox{\hyperlink{structdmae__cmd_a1656678df09477c0e03309f50a8184a7}{dst\_addr\_hi}} = \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(\mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, wb\_data));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01663}01663     dmae.len         = len32;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01664}01664 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01665}01665     \textcolor{comment}{/* issue the command and wait for completion */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01666}01666     \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{bxe_8c_a9076a6f87cb3bb59222e5c541de3cf9c}{bxe\_issue\_dmae\_with\_comp}}(sc, \&dmae)) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01667}01667         \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(sc, (\textcolor{stringliteral}{"{}DMAE failed (\%d)\(\backslash\)n"{}}, rc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01668}01668     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01669}01669 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01670}01670 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01671}01671 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01672}\mbox{\hyperlink{bxe_8c_aaa8fc0ab983f385e3747884a95182cc6}{01672}} \mbox{\hyperlink{bxe_8c_aaa8fc0ab983f385e3747884a95182cc6}{bxe\_write\_dmae}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01673}01673                bus\_addr\_t       dma\_addr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01674}01674                uint32\_t         dst\_addr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01675}01675                uint32\_t         len32)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01676}01676 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01677}01677     \textcolor{keyword}{struct }\mbox{\hyperlink{structdmae__cmd}{dmae\_cmd}} dmae;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01678}01678     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01679}01679 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01680}01680     \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structbxe__softc_ab8635fb9ce6cf45243a4e83c338680e7}{dmae\_ready}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01681}01681         \mbox{\hyperlink{bxe_8h_aa9dced7dd0063302e800bbbf9578fd6a}{DBASSERT}}(sc, (len32 <= 4), (\textcolor{stringliteral}{"{}DMAE not ready and length is \%d"{}}, len32));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01682}01682 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01683}01683         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01684}01684             \mbox{\hyperlink{ecore__init__ops_8h_a92a3c9988ea4bf7ba69f2d33f8f8fea9}{ecore\_init\_ind\_wr}}(sc, dst\_addr, \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, wb\_data[0]), len32);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01685}01685         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01686}01686             \mbox{\hyperlink{ecore__init__ops_8h_a0ca60108761659cef3b933fb289738b5}{ecore\_init\_str\_wr}}(sc, dst\_addr, \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, wb\_data[0]), len32);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01687}01687         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01688}01688 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01689}01689         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01690}01690     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01691}01691 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01692}01692     \textcolor{comment}{/* set opcode and fixed command fields */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01693}01693     \mbox{\hyperlink{bxe_8c_a9ae0b78eebc0eb970ca6da1b7fa7d64c}{bxe\_prep\_dmae\_with\_comp}}(sc, \&dmae, \mbox{\hyperlink{bxe_8h_a450e84ad36ac6ccbadce08fd529c249b}{DMAE\_SRC\_PCI}}, \mbox{\hyperlink{bxe_8h_aac335eeb7580eb3e8af054fcdbc9ba02}{DMAE\_DST\_GRC}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01694}01694 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01695}01695     \textcolor{comment}{/* fill in addresses and len */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01696}01696     dmae.\mbox{\hyperlink{structdmae__cmd_a75d4c1e72eab59bba3f44d0fc20089b7}{src\_addr\_lo}} = \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(dma\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01697}01697     dmae.\mbox{\hyperlink{structdmae__cmd_aa534a2e735f920cd63804540b1fc94ec}{src\_addr\_hi}} = \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(dma\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01698}01698     dmae.\mbox{\hyperlink{structdmae__cmd_ac83320138fd5b1624c7d564dd879cf21}{dst\_addr\_lo}} = (dst\_addr >> 2); \textcolor{comment}{/* GRC addr has dword resolution */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01699}01699     dmae.\mbox{\hyperlink{structdmae__cmd_a1656678df09477c0e03309f50a8184a7}{dst\_addr\_hi}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01700}01700     dmae.len         = len32;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01701}01701 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01702}01702     \textcolor{comment}{/* issue the command and wait for completion */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01703}01703     \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{bxe_8c_a9076a6f87cb3bb59222e5c541de3cf9c}{bxe\_issue\_dmae\_with\_comp}}(sc, \&dmae)) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01704}01704         \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(sc, (\textcolor{stringliteral}{"{}DMAE failed (\%d)\(\backslash\)n"{}}, rc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01705}01705     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01706}01706 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01707}01707 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01708}01708 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01709}\mbox{\hyperlink{bxe_8c_a71216cf17d1dd4d3357b8ca4c350d26a}{01709}} \mbox{\hyperlink{bxe_8c_a71216cf17d1dd4d3357b8ca4c350d26a}{bxe\_write\_dmae\_phys\_len}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01710}01710                         bus\_addr\_t       phys\_addr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01711}01711                         uint32\_t         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01712}01712                         uint32\_t         len)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01713}01713 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01714}01714     \textcolor{keywordtype}{int} dmae\_wr\_max = \mbox{\hyperlink{bxe_8h_a1e838065ff86bb34fe424e2e3fe4a803}{DMAE\_LEN32\_WR\_MAX}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01715}01715     \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01716}01716 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01717}01717     \textcolor{keywordflow}{while} (len > dmae\_wr\_max) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01718}01718         \mbox{\hyperlink{bxe_8c_aaa8fc0ab983f385e3747884a95182cc6}{bxe\_write\_dmae}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01719}01719                        (phys\_addr + \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}), \textcolor{comment}{/* src DMA address */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01720}01720                        (\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}),      \textcolor{comment}{/* dst GRC address */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01721}01721                        dmae\_wr\_max);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01722}01722         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} += (dmae\_wr\_max * 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01723}01723         len -\/= dmae\_wr\_max;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01724}01724     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01725}01725 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01726}01726     \mbox{\hyperlink{bxe_8c_aaa8fc0ab983f385e3747884a95182cc6}{bxe\_write\_dmae}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01727}01727                    (phys\_addr + \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}), \textcolor{comment}{/* src DMA address */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01728}01728                    (\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}),      \textcolor{comment}{/* dst GRC address */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01729}01729                    len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01730}01730 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01731}01731 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01732}01732 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01733}\mbox{\hyperlink{bxe_8c_a5f43bafc1d417b93d1591dd54d1fb039}{01733}} \mbox{\hyperlink{bxe_8c_a5f43bafc1d417b93d1591dd54d1fb039}{bxe\_set\_ctx\_validation}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}   *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01734}01734                        \textcolor{keyword}{struct} \mbox{\hyperlink{structeth__context}{eth\_context}} *cxt,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01735}01735                        uint32\_t           cid)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01736}01736 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01737}01737     \textcolor{comment}{/* ustorm cxt validation */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01738}01738     cxt-\/>\mbox{\hyperlink{structeth__context_aa7b9d4913f53dd46b471ed09eca5ec71}{ustorm\_ag\_context}}.cdu\_usage =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01739}01739         \mbox{\hyperlink{ecore__reg_8h_a8826169a630c99278ecd8cdf67acb8b8}{CDU\_RSRVD\_VALUE\_TYPE\_A}}(\mbox{\hyperlink{bxe_8h_a965fabd8978e7b46a212d56f1ef37604}{HW\_CID}}(sc, cid),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01740}01740             \mbox{\hyperlink{ecore__reg_8h_a19867ff96e6433dd601fcdb162aaf9fd}{CDU\_REGION\_NUMBER\_UCM\_AG}}, \mbox{\hyperlink{ecore__hsi_8h_acdf0efffcd30d2dd47aa36b78d3398a7aa985757a3b58465439c725d270bfd29b}{ETH\_CONNECTION\_TYPE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01741}01741     \textcolor{comment}{/* xcontext validation */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01742}01742     cxt-\/>\mbox{\hyperlink{structeth__context_a4c231169f14a5d7fc2512b9dbc4975c8}{xstorm\_ag\_context}}.cdu\_reserved =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01743}01743         \mbox{\hyperlink{ecore__reg_8h_a8826169a630c99278ecd8cdf67acb8b8}{CDU\_RSRVD\_VALUE\_TYPE\_A}}(\mbox{\hyperlink{bxe_8h_a965fabd8978e7b46a212d56f1ef37604}{HW\_CID}}(sc, cid),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01744}01744             \mbox{\hyperlink{ecore__reg_8h_a95983703ebefc687be8723539ae450b7}{CDU\_REGION\_NUMBER\_XCM\_AG}}, \mbox{\hyperlink{ecore__hsi_8h_acdf0efffcd30d2dd47aa36b78d3398a7aa985757a3b58465439c725d270bfd29b}{ETH\_CONNECTION\_TYPE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01745}01745 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01746}01746 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01747}01747 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01748}\mbox{\hyperlink{bxe_8c_a1cc50b833f49b15313359b3300a10493}{01748}} \mbox{\hyperlink{bxe_8c_a1cc50b833f49b15313359b3300a10493}{bxe\_storm\_memset\_hc\_timeout}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01749}01749                             uint8\_t          port,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01750}01750                             uint8\_t          fw\_sb\_id,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01751}01751                             uint8\_t          sb\_index,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01752}01752                             uint8\_t          ticks)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01753}01753 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01754}01754     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01755}01755         (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01756}01756          \mbox{\hyperlink{ecore__fw__defs_8h_a81e410496e8b418a970ba1cd2bb5c58a}{CSTORM\_STATUS\_BLOCK\_DATA\_TIMEOUT\_OFFSET}}(fw\_sb\_id, sb\_index));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01757}01757 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01758}01758     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, ticks);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01759}01759 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01760}01760     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01761}01761           \textcolor{stringliteral}{"{}port \%d fw\_sb\_id \%d sb\_index \%d ticks \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01762}01762           port, fw\_sb\_id, sb\_index, ticks);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01763}01763 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01764}01764 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01765}01765 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01766}\mbox{\hyperlink{bxe_8c_a95299b6e475d8919eb137033933cbdf2}{01766}} \mbox{\hyperlink{bxe_8c_a95299b6e475d8919eb137033933cbdf2}{bxe\_storm\_memset\_hc\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01767}01767                             uint8\_t          port,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01768}01768                             uint16\_t         fw\_sb\_id,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01769}01769                             uint8\_t          sb\_index,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01770}01770                             uint8\_t          disable)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01771}01771 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01772}01772     uint32\_t enable\_flag =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01773}01773         (disable) ? 0 : (1 << HC\_INDEX\_DATA\_HC\_ENABLED\_SHIFT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01774}01774     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01775}01775         (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01776}01776          \mbox{\hyperlink{ecore__fw__defs_8h_a737e3a8313f6c76995a8581800e962a5}{CSTORM\_STATUS\_BLOCK\_DATA\_FLAGS\_OFFSET}}(fw\_sb\_id, sb\_index));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01777}01777     uint8\_t \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01778}01778 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01779}01779     \textcolor{comment}{/* clear and set */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01780}01780     \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} = \mbox{\hyperlink{bxe_8h_a91fae46e1d66e29d8bda5c1587d0e3ee}{REG\_RD8}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01781}01781     \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} \&= \string~HC\_INDEX\_DATA\_HC\_ENABLED;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01782}01782     \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} |= enable\_flag;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01783}01783     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01784}01784 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01785}01785     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01786}01786           \textcolor{stringliteral}{"{}port \%d fw\_sb\_id \%d sb\_index \%d disable \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01787}01787           port, fw\_sb\_id, sb\_index, disable);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01788}01788 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01789}01789 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01790}01790 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01791}\mbox{\hyperlink{bxe_8c_ae738a2272f76d4e9d29ca44495722ad8}{01791}} \mbox{\hyperlink{bxe_8c_ae738a2272f76d4e9d29ca44495722ad8}{bxe\_update\_coalesce\_sb\_index}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01792}01792                              uint8\_t          fw\_sb\_id,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01793}01793                              uint8\_t          sb\_index,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01794}01794                              uint8\_t          disable,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01795}01795                              uint16\_t         usec)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01796}01796 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01797}01797     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01798}01798     uint8\_t ticks = (usec / 4); \textcolor{comment}{/* XXX ??? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01799}01799 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01800}01800     \mbox{\hyperlink{bxe_8c_a1cc50b833f49b15313359b3300a10493}{bxe\_storm\_memset\_hc\_timeout}}(sc, port, fw\_sb\_id, sb\_index, ticks);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01801}01801 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01802}01802     disable = (disable) ? 1 : ((usec) ? 0 : 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01803}01803     \mbox{\hyperlink{bxe_8c_a95299b6e475d8919eb137033933cbdf2}{bxe\_storm\_memset\_hc\_disable}}(sc, port, fw\_sb\_id, sb\_index, disable);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01804}01804 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01805}01805 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01806}01806 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01807}\mbox{\hyperlink{bxe_8c_af9ca260c17129651868d524227be8b84}{01807}} \mbox{\hyperlink{bxe_8c_af9ca260c17129651868d524227be8b84}{elink\_cb\_udelay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01808}01808                 uint32\_t         usecs)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01809}01809 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01810}01810     DELAY(usecs);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01811}01811 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01812}01812 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01813}01813 uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01814}\mbox{\hyperlink{bxe_8c_a4bad47728d66c0b7b15ec9b2a054d067}{01814}} \mbox{\hyperlink{bxe_8c_a4bad47728d66c0b7b15ec9b2a054d067}{elink\_cb\_reg\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01815}01815                   uint32\_t         \mbox{\hyperlink{structreg__addr}{reg\_addr}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01816}01816 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01817}01817     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{structreg__addr}{reg\_addr}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01818}01818 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01819}01819 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01820}01820 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01821}\mbox{\hyperlink{bxe_8c_af3dda815a6c39fd5bd9e5ab8f4c5f5f7}{01821}} \mbox{\hyperlink{bxe_8c_af3dda815a6c39fd5bd9e5ab8f4c5f5f7}{elink\_cb\_reg\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01822}01822                    uint32\_t         \mbox{\hyperlink{structreg__addr}{reg\_addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01823}01823                    uint32\_t         val)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01824}01824 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01825}01825     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{structreg__addr}{reg\_addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01826}01826 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01827}01827 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01828}01828 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01829}\mbox{\hyperlink{bxe_8c_a1ade6b6719e6705b297d82bd22ee1fbb}{01829}} \mbox{\hyperlink{bxe_8c_a1ade6b6719e6705b297d82bd22ee1fbb}{elink\_cb\_reg\_wb\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01830}01830                       uint32\_t         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01831}01831                       uint32\_t         *wb\_write,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01832}01832                       uint16\_t         len)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01833}01833 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01834}01834     \mbox{\hyperlink{bxe_8h_af679576d81b65be7ee9caf88dfff6b53}{REG\_WR\_DMAE}}(sc, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, wb\_write, len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01835}01835 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01836}01836 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01837}01837 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01838}\mbox{\hyperlink{bxe_8c_a0bdf2d7112e922c1bde04d178c82414d}{01838}} \mbox{\hyperlink{bxe_8c_a0bdf2d7112e922c1bde04d178c82414d}{elink\_cb\_reg\_wb\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01839}01839                      uint32\_t         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01840}01840                      uint32\_t         *wb\_write,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01841}01841                      uint16\_t         len)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01842}01842 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01843}01843     \mbox{\hyperlink{bxe_8h_af93c08ed6d3edb795a3ccf04926e7d73}{REG\_RD\_DMAE}}(sc, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, wb\_write, len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01844}01844 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01845}01845 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01846}01846 uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01847}\mbox{\hyperlink{bxe_8c_ad0a87c00c259716886f05c4a290392c2}{01847}} \mbox{\hyperlink{bxe_8c_ad0a87c00c259716886f05c4a290392c2}{elink\_cb\_path\_id}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01848}01848 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01849}01849     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01850}01850 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01851}01851 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01852}01852 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01853}\mbox{\hyperlink{bxe_8c_ab6df9113a498d2cf117cd58be6804230}{01853}} \mbox{\hyperlink{bxe_8c_ab6df9113a498d2cf117cd58be6804230}{elink\_cb\_event\_log}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}     *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01854}01854                    \textcolor{keyword}{const} \mbox{\hyperlink{bxe__elink_8h_a1ee75488af160c9f6b31a2c2def193b2}{elink\_log\_id\_t}} \mbox{\hyperlink{bxe__elink_8h_a9d6fbcb11dcef59ca8921775cea69dc8}{elink\_log\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01855}01855                    ...)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01856}01856 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01857}01857     \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01858}01858     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}ELINK EVENT LOG (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe__elink_8h_a9d6fbcb11dcef59ca8921775cea69dc8}{elink\_log\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01859}01859 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01860}01860 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01861}01861 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01862}\mbox{\hyperlink{bxe_8c_a3172c150da38f101b310560f1503c31c}{01862}} \mbox{\hyperlink{bxe_8c_a3172c150da38f101b310560f1503c31c}{bxe\_set\_spio}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01863}01863              \textcolor{keywordtype}{int}              spio,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01864}01864              uint32\_t         mode)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01865}01865 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01866}01866     uint32\_t spio\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01867}01867 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01868}01868     \textcolor{comment}{/* Only 2 SPIOs are configurable */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01869}01869     \textcolor{keywordflow}{if} ((spio != \mbox{\hyperlink{ecore__reg_8h_a6d929ef8ac75a7d9a8ea7c3fa46bbc43}{MISC\_SPIO\_SPIO4}}) \&\& (spio != \mbox{\hyperlink{ecore__reg_8h_abf9d38c632a5d495f68da837ad0b12bd}{MISC\_SPIO\_SPIO5}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01870}01870         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid SPIO 0x\%x mode 0x\%x\(\backslash\)n"{}}, spio, mode);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01871}01871         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01872}01872     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01873}01873 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01874}01874     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a29f80c0e8e79b7d52e84216759080992}{HW\_LOCK\_RESOURCE\_SPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01875}01875 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01876}01876     \textcolor{comment}{/* read SPIO and mask except the float bits */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01877}01877     spio\_reg = (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9a31a45626eaf0be775102d449badcf5}{MISC\_REG\_SPIO}}) \& \mbox{\hyperlink{ecore__reg_8h_aed5c77292b41b6a8ca30791b9891d453}{MISC\_SPIO\_FLOAT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01878}01878 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01879}01879     \textcolor{keywordflow}{switch} (mode) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01880}01880     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_adba7fb7968d66e8035956d43ace7d6da}{MISC\_SPIO\_OUTPUT\_LOW}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01881}01881         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Set SPIO 0x\%x -\/> output low\(\backslash\)n"{}}, spio);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01882}01882         \textcolor{comment}{/* clear FLOAT and set CLR */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01883}01883         spio\_reg \&= \string~(spio << \mbox{\hyperlink{ecore__reg_8h_ab03ac587e75b226e0b741cc9d22ac3f3}{MISC\_SPIO\_FLOAT\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01884}01884         spio\_reg |=  (spio << \mbox{\hyperlink{ecore__reg_8h_a3e2ffdc81cae37bfbc7f60699eae8887}{MISC\_SPIO\_CLR\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01885}01885         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01886}01886 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01887}01887     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a8310648d25c9a12d25fe034c098287aa}{MISC\_SPIO\_OUTPUT\_HIGH}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01888}01888         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Set SPIO 0x\%x -\/> output high\(\backslash\)n"{}}, spio);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01889}01889         \textcolor{comment}{/* clear FLOAT and set SET */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01890}01890         spio\_reg \&= \string~(spio << \mbox{\hyperlink{ecore__reg_8h_ab03ac587e75b226e0b741cc9d22ac3f3}{MISC\_SPIO\_FLOAT\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01891}01891         spio\_reg |=  (spio << \mbox{\hyperlink{ecore__reg_8h_a166fa181d38e667a9b4d404dfa0c68bc}{MISC\_SPIO\_SET\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01892}01892         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01893}01893 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01894}01894     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_acd4226ce627fbd1113ec2e0e36f735c0}{MISC\_SPIO\_INPUT\_HI\_Z}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01895}01895         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Set SPIO 0x\%x -\/> input\(\backslash\)n"{}}, spio);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01896}01896         \textcolor{comment}{/* set FLOAT */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01897}01897         spio\_reg |= (spio << \mbox{\hyperlink{ecore__reg_8h_ab03ac587e75b226e0b741cc9d22ac3f3}{MISC\_SPIO\_FLOAT\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01898}01898         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01899}01899 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01900}01900     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01901}01901         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01902}01902     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01903}01903 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01904}01904     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9a31a45626eaf0be775102d449badcf5}{MISC\_REG\_SPIO}}, spio\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01905}01905     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a29f80c0e8e79b7d52e84216759080992}{HW\_LOCK\_RESOURCE\_SPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01906}01906 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01907}01907     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01908}01908 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01909}01909 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01910}01910 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01911}\mbox{\hyperlink{bxe_8c_aaea04e8252586d0652d8a27371b6a833}{01911}} \mbox{\hyperlink{bxe_8c_aaea04e8252586d0652d8a27371b6a833}{bxe\_gpio\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01912}01912               \textcolor{keywordtype}{int}              gpio\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01913}01913               uint8\_t          port)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01914}01914 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01915}01915     \textcolor{comment}{/* The GPIO should be swapped if swap register is set and active */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01916}01916     \textcolor{keywordtype}{int} gpio\_port = ((\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8bdbe889e9b7cd77b1ce57c07fa15e43}{NIG\_REG\_PORT\_SWAP}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01917}01917                       \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac0035ad468df377c1bfb4386dec459e7}{NIG\_REG\_STRAP\_OVERRIDE}})) \string^ port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01918}01918     \textcolor{keywordtype}{int} gpio\_shift = (gpio\_num +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01919}01919                       (gpio\_port ? \mbox{\hyperlink{ecore__reg_8h_ad8772984e1288d0a11e56239de3ee5e7}{MISC\_REGISTERS\_GPIO\_PORT\_SHIFT}} : 0));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01920}01920     uint32\_t gpio\_mask = (1 << gpio\_shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01921}01921     uint32\_t gpio\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01922}01922 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01923}01923     \textcolor{keywordflow}{if} (gpio\_num > \mbox{\hyperlink{ecore__reg_8h_a6a6dd934fb86258b2538dcf5ea84d539}{MISC\_REGISTERS\_GPIO\_3}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01924}01924         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid GPIO \%d port 0x\%x gpio\_port \%d gpio\_shift \%d"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01925}01925             \textcolor{stringliteral}{"{} gpio\_mask 0x\%x\(\backslash\)n"{}}, gpio\_num, port, gpio\_port, gpio\_shift,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01926}01926             gpio\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01927}01927         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01928}01928     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01929}01929 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01930}01930     \textcolor{comment}{/* read GPIO value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01931}01931     gpio\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aaef9a52080a10552a8262648b2f8e3ce}{MISC\_REG\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01932}01932 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01933}01933     \textcolor{comment}{/* get the requested pin value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01934}01934     \textcolor{keywordflow}{return} ((gpio\_reg \& gpio\_mask) == gpio\_mask) ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01935}01935 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01936}01936 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01937}01937 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01938}\mbox{\hyperlink{bxe_8c_a0173fc1a987b80129a62a3d57961eb47}{01938}} \mbox{\hyperlink{bxe_8c_a0173fc1a987b80129a62a3d57961eb47}{bxe\_gpio\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01939}01939                \textcolor{keywordtype}{int}              gpio\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01940}01940                uint32\_t         mode,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01941}01941                uint8\_t          port)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01942}01942 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01943}01943     \textcolor{comment}{/* The GPIO should be swapped if swap register is set and active */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01944}01944     \textcolor{keywordtype}{int} gpio\_port = ((\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8bdbe889e9b7cd77b1ce57c07fa15e43}{NIG\_REG\_PORT\_SWAP}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01945}01945                       \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac0035ad468df377c1bfb4386dec459e7}{NIG\_REG\_STRAP\_OVERRIDE}})) \string^ port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01946}01946     \textcolor{keywordtype}{int} gpio\_shift = (gpio\_num +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01947}01947                       (gpio\_port ? \mbox{\hyperlink{ecore__reg_8h_ad8772984e1288d0a11e56239de3ee5e7}{MISC\_REGISTERS\_GPIO\_PORT\_SHIFT}} : 0));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01948}01948     uint32\_t gpio\_mask = (1 << gpio\_shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01949}01949     uint32\_t gpio\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01950}01950 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01951}01951     \textcolor{keywordflow}{if} (gpio\_num > \mbox{\hyperlink{ecore__reg_8h_a6a6dd934fb86258b2538dcf5ea84d539}{MISC\_REGISTERS\_GPIO\_3}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01952}01952         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid GPIO \%d mode 0x\%x port 0x\%x gpio\_port \%d"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01953}01953             \textcolor{stringliteral}{"{} gpio\_shift \%d gpio\_mask 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01954}01954             gpio\_num, mode, port, gpio\_port, gpio\_shift, gpio\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01955}01955         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01956}01956     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01957}01957 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01958}01958     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf294e2b4b76d6e16833ef89f6867d0c}{HW\_LOCK\_RESOURCE\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01959}01959 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01960}01960     \textcolor{comment}{/* read GPIO and mask except the float bits */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01961}01961     gpio\_reg = (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aaef9a52080a10552a8262648b2f8e3ce}{MISC\_REG\_GPIO}}) \& \mbox{\hyperlink{ecore__reg_8h_acbf3b755d2a59b06d12e001eedd743be}{MISC\_REGISTERS\_GPIO\_FLOAT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01962}01962 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01963}01963     \textcolor{keywordflow}{switch} (mode) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01964}01964     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a387f374dce3696c2a35ad3d49511129b}{MISC\_REGISTERS\_GPIO\_OUTPUT\_LOW}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01965}01965         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01966}01966               \textcolor{stringliteral}{"{}Set GPIO \%d (shift \%d) -\/> output low\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01967}01967               gpio\_num, gpio\_shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01968}01968         \textcolor{comment}{/* clear FLOAT and set CLR */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01969}01969         gpio\_reg \&= \string~(gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_a13916a47117e904df7063e5b4c5f05b3}{MISC\_REGISTERS\_GPIO\_FLOAT\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01970}01970         gpio\_reg |=  (gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_a6abf825df3f2692e54856a850d0134df}{MISC\_REGISTERS\_GPIO\_CLR\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01971}01971         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01972}01972 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01973}01973     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a8130ae1d6fe2299bc3d7906becdaeb27}{MISC\_REGISTERS\_GPIO\_OUTPUT\_HIGH}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01974}01974         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01975}01975               \textcolor{stringliteral}{"{}Set GPIO \%d (shift \%d) -\/> output high\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01976}01976               gpio\_num, gpio\_shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01977}01977         \textcolor{comment}{/* clear FLOAT and set SET */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01978}01978         gpio\_reg \&= \string~(gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_a13916a47117e904df7063e5b4c5f05b3}{MISC\_REGISTERS\_GPIO\_FLOAT\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01979}01979         gpio\_reg |=  (gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_ad58e3292f381e36b8c88554f1b8ae2ff}{MISC\_REGISTERS\_GPIO\_SET\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01980}01980         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01981}01981 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01982}01982     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a072a453f452e40fcbf07ad3b60777ce6}{MISC\_REGISTERS\_GPIO\_INPUT\_HI\_Z}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01983}01983         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01984}01984               \textcolor{stringliteral}{"{}Set GPIO \%d (shift \%d) -\/> input\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01985}01985               gpio\_num, gpio\_shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01986}01986         \textcolor{comment}{/* set FLOAT */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01987}01987         gpio\_reg |= (gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_a13916a47117e904df7063e5b4c5f05b3}{MISC\_REGISTERS\_GPIO\_FLOAT\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01988}01988         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01989}01989 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01990}01990     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01991}01991         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01992}01992     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01993}01993 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01994}01994     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aaef9a52080a10552a8262648b2f8e3ce}{MISC\_REG\_GPIO}}, gpio\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01995}01995     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf294e2b4b76d6e16833ef89f6867d0c}{HW\_LOCK\_RESOURCE\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01996}01996 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01997}01997     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01998}01998 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l01999}01999 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02000}02000 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02001}\mbox{\hyperlink{bxe_8c_a77c5b40a8fcce341d049c464aff15ee4}{02001}} \mbox{\hyperlink{bxe_8c_a77c5b40a8fcce341d049c464aff15ee4}{bxe\_gpio\_mult\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02002}02002                     uint8\_t          pins,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02003}02003                     uint32\_t         mode)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02004}02004 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02005}02005     uint32\_t gpio\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02006}02006 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02007}02007     \textcolor{comment}{/* any port swapping should be handled by caller */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02008}02008 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02009}02009     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf294e2b4b76d6e16833ef89f6867d0c}{HW\_LOCK\_RESOURCE\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02010}02010 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02011}02011     \textcolor{comment}{/* read GPIO and mask except the float bits */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02012}02012     gpio\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aaef9a52080a10552a8262648b2f8e3ce}{MISC\_REG\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02013}02013     gpio\_reg \&= \string~(pins << \mbox{\hyperlink{ecore__reg_8h_a13916a47117e904df7063e5b4c5f05b3}{MISC\_REGISTERS\_GPIO\_FLOAT\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02014}02014     gpio\_reg \&= \string~(pins << \mbox{\hyperlink{ecore__reg_8h_a6abf825df3f2692e54856a850d0134df}{MISC\_REGISTERS\_GPIO\_CLR\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02015}02015     gpio\_reg \&= \string~(pins << \mbox{\hyperlink{ecore__reg_8h_ad58e3292f381e36b8c88554f1b8ae2ff}{MISC\_REGISTERS\_GPIO\_SET\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02016}02016 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02017}02017     \textcolor{keywordflow}{switch} (mode) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02018}02018     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a387f374dce3696c2a35ad3d49511129b}{MISC\_REGISTERS\_GPIO\_OUTPUT\_LOW}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02019}02019         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}}, \textcolor{stringliteral}{"{}Set GPIO 0x\%x -\/> output low\(\backslash\)n"{}}, pins);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02020}02020         \textcolor{comment}{/* set CLR */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02021}02021         gpio\_reg |= (pins << \mbox{\hyperlink{ecore__reg_8h_a6abf825df3f2692e54856a850d0134df}{MISC\_REGISTERS\_GPIO\_CLR\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02022}02022         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02023}02023 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02024}02024     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a8130ae1d6fe2299bc3d7906becdaeb27}{MISC\_REGISTERS\_GPIO\_OUTPUT\_HIGH}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02025}02025         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}}, \textcolor{stringliteral}{"{}Set GPIO 0x\%x -\/> output high\(\backslash\)n"{}}, pins);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02026}02026         \textcolor{comment}{/* set SET */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02027}02027         gpio\_reg |= (pins << \mbox{\hyperlink{ecore__reg_8h_ad58e3292f381e36b8c88554f1b8ae2ff}{MISC\_REGISTERS\_GPIO\_SET\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02028}02028         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02029}02029 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02030}02030     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a072a453f452e40fcbf07ad3b60777ce6}{MISC\_REGISTERS\_GPIO\_INPUT\_HI\_Z}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02031}02031         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}}, \textcolor{stringliteral}{"{}Set GPIO 0x\%x -\/> input\(\backslash\)n"{}}, pins);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02032}02032         \textcolor{comment}{/* set FLOAT */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02033}02033         gpio\_reg |= (pins << \mbox{\hyperlink{ecore__reg_8h_a13916a47117e904df7063e5b4c5f05b3}{MISC\_REGISTERS\_GPIO\_FLOAT\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02034}02034         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02035}02035 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02036}02036     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02037}02037         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid GPIO mode assignment pins 0x\%x mode 0x\%x"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02038}02038             \textcolor{stringliteral}{"{} gpio\_reg 0x\%x\(\backslash\)n"{}}, pins, mode, gpio\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02039}02039         \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf294e2b4b76d6e16833ef89f6867d0c}{HW\_LOCK\_RESOURCE\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02040}02040         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02041}02041     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02042}02042 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02043}02043     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aaef9a52080a10552a8262648b2f8e3ce}{MISC\_REG\_GPIO}}, gpio\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02044}02044     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf294e2b4b76d6e16833ef89f6867d0c}{HW\_LOCK\_RESOURCE\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02045}02045 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02046}02046     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02047}02047 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02048}02048 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02049}02049 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02050}\mbox{\hyperlink{bxe_8c_a132662fef137ea11e5e68255ad03e15f}{02050}} \mbox{\hyperlink{bxe_8c_a132662fef137ea11e5e68255ad03e15f}{bxe\_gpio\_int\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02051}02051                    \textcolor{keywordtype}{int}              gpio\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02052}02052                    uint32\_t         mode,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02053}02053                    uint8\_t          port)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02054}02054 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02055}02055     \textcolor{comment}{/* The GPIO should be swapped if swap register is set and active */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02056}02056     \textcolor{keywordtype}{int} gpio\_port = ((\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8bdbe889e9b7cd77b1ce57c07fa15e43}{NIG\_REG\_PORT\_SWAP}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02057}02057                       \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac0035ad468df377c1bfb4386dec459e7}{NIG\_REG\_STRAP\_OVERRIDE}})) \string^ port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02058}02058     \textcolor{keywordtype}{int} gpio\_shift = (gpio\_num +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02059}02059                       (gpio\_port ? \mbox{\hyperlink{ecore__reg_8h_ad8772984e1288d0a11e56239de3ee5e7}{MISC\_REGISTERS\_GPIO\_PORT\_SHIFT}} : 0));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02060}02060     uint32\_t gpio\_mask = (1 << gpio\_shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02061}02061     uint32\_t gpio\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02062}02062 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02063}02063     \textcolor{keywordflow}{if} (gpio\_num > \mbox{\hyperlink{ecore__reg_8h_a6a6dd934fb86258b2538dcf5ea84d539}{MISC\_REGISTERS\_GPIO\_3}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02064}02064         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid GPIO \%d mode 0x\%x port 0x\%x gpio\_port \%d"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02065}02065             \textcolor{stringliteral}{"{} gpio\_shift \%d gpio\_mask 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02066}02066             gpio\_num, mode, port, gpio\_port, gpio\_shift, gpio\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02067}02067         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02068}02068     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02069}02069 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02070}02070     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf294e2b4b76d6e16833ef89f6867d0c}{HW\_LOCK\_RESOURCE\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02071}02071 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02072}02072     \textcolor{comment}{/* read GPIO int */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02073}02073     gpio\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a066062b97a1c79c43d69df98c32fbaf0}{MISC\_REG\_GPIO\_INT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02074}02074 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02075}02075     \textcolor{keywordflow}{switch} (mode) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02076}02076     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a5aaf6a5f4c653f42525bd86a460e7d66}{MISC\_REGISTERS\_GPIO\_INT\_OUTPUT\_CLR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02077}02077         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02078}02078               \textcolor{stringliteral}{"{}Clear GPIO INT \%d (shift \%d) -\/> output low\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02079}02079               gpio\_num, gpio\_shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02080}02080         \textcolor{comment}{/* clear SET and set CLR */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02081}02081         gpio\_reg \&= \string~(gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_ab40395729ba380045db7c7eb15360b79}{MISC\_REGISTERS\_GPIO\_INT\_SET\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02082}02082         gpio\_reg |=  (gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_a2699219cc287eb170cb01e39b5dca9cd}{MISC\_REGISTERS\_GPIO\_INT\_CLR\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02083}02083         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02084}02084 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02085}02085     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a6f40ed5245725dad73d4860d69a85a2a}{MISC\_REGISTERS\_GPIO\_INT\_OUTPUT\_SET}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02086}02086         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02087}02087               \textcolor{stringliteral}{"{}Set GPIO INT \%d (shift \%d) -\/> output high\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02088}02088               gpio\_num, gpio\_shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02089}02089         \textcolor{comment}{/* clear CLR and set SET */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02090}02090         gpio\_reg \&= \string~(gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_a2699219cc287eb170cb01e39b5dca9cd}{MISC\_REGISTERS\_GPIO\_INT\_CLR\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02091}02091         gpio\_reg |=  (gpio\_mask << \mbox{\hyperlink{ecore__reg_8h_ab40395729ba380045db7c7eb15360b79}{MISC\_REGISTERS\_GPIO\_INT\_SET\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02092}02092         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02093}02093 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02094}02094     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02095}02095         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02096}02096     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02097}02097 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02098}02098     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a066062b97a1c79c43d69df98c32fbaf0}{MISC\_REG\_GPIO\_INT}}, gpio\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02099}02099     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf294e2b4b76d6e16833ef89f6867d0c}{HW\_LOCK\_RESOURCE\_GPIO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02100}02100 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02101}02101     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02102}02102 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02103}02103 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02104}02104 uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02105}\mbox{\hyperlink{bxe_8c_a1878e81a3a7957e14ce19ce5f4dbafda}{02105}} \mbox{\hyperlink{bxe_8c_a1878e81a3a7957e14ce19ce5f4dbafda}{elink\_cb\_gpio\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02106}02106                    uint16\_t         gpio\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02107}02107                    uint8\_t          port)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02108}02108 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02109}02109     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_aaea04e8252586d0652d8a27371b6a833}{bxe\_gpio\_read}}(sc, gpio\_num, port));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02110}02110 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02111}02111 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02112}02112 uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02113}\mbox{\hyperlink{bxe_8c_a750ceb58a8df39687e2efdcc4ec07596}{02113}} \mbox{\hyperlink{bxe_8c_a750ceb58a8df39687e2efdcc4ec07596}{elink\_cb\_gpio\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02114}02114                     uint16\_t         gpio\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02115}02115                     uint8\_t          mode, \textcolor{comment}{/* 0=low 1=high */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02116}02116                     uint8\_t          port)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02117}02117 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02118}02118     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a0173fc1a987b80129a62a3d57961eb47}{bxe\_gpio\_write}}(sc, gpio\_num, mode, port));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02119}02119 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02120}02120 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02121}02121 uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02122}\mbox{\hyperlink{bxe_8c_a53cb611b818e5cd39fd96568b22ad305}{02122}} \mbox{\hyperlink{bxe_8c_a53cb611b818e5cd39fd96568b22ad305}{elink\_cb\_gpio\_mult\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02123}02123                          uint8\_t          pins,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02124}02124                          uint8\_t          mode) \textcolor{comment}{/* 0=low 1=high */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02125}02125 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02126}02126     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a77c5b40a8fcce341d049c464aff15ee4}{bxe\_gpio\_mult\_write}}(sc, pins, mode));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02127}02127 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02128}02128 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02129}02129 uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02130}\mbox{\hyperlink{bxe_8c_a862d5c47250e7c03aa6a2a314db81be1}{02130}} \mbox{\hyperlink{bxe_8c_a862d5c47250e7c03aa6a2a314db81be1}{elink\_cb\_gpio\_int\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02131}02131                         uint16\_t         gpio\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02132}02132                         uint8\_t          mode, \textcolor{comment}{/* 0=low 1=high */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02133}02133                         uint8\_t          port)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02134}02134 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02135}02135     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a132662fef137ea11e5e68255ad03e15f}{bxe\_gpio\_int\_write}}(sc, gpio\_num, mode, port));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02136}02136 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02137}02137 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02138}02138 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02139}\mbox{\hyperlink{bxe_8c_a6409a0d8682349807f7f10ebd88c924e}{02139}} \mbox{\hyperlink{bxe_8c_a6409a0d8682349807f7f10ebd88c924e}{elink\_cb\_notify\_link\_changed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02140}02140 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02141}02141     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_ac8012f0e27f8e86268ea8623f555b75f}{MISC\_REG\_AEU\_GENERAL\_ATTN\_12}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02142}02142                 (\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc) * \textcolor{keyword}{sizeof}(uint32\_t))), 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02143}02143 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02144}02144 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02145}02145 \textcolor{comment}{/* send the MCP a request, block until there is a reply */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02146}02146 uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02147}\mbox{\hyperlink{bxe_8c_ad5f15d456628f38a07e4325484ae0be8}{02147}} \mbox{\hyperlink{bxe_8c_ad5f15d456628f38a07e4325484ae0be8}{elink\_cb\_fw\_command}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02148}02148                     uint32\_t         command,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02149}02149                     uint32\_t         param)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02150}02150 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02151}02151     \textcolor{keywordtype}{int} mb\_idx = \mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02152}02152     uint32\_t seq;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02153}02153     uint32\_t rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02154}02154     uint32\_t cnt = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02155}02155     uint8\_t delay = \mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc) ? 100 : 10;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02156}02156 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02157}02157     \mbox{\hyperlink{bxe_8h_a70d9f1efba02d010bf73e015f33127b1}{BXE\_FWMB\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02158}02158 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02159}02159     seq = ++sc-\/>\mbox{\hyperlink{structbxe__softc_a4b58dae5cf487d519e80adf337151e7f}{fw\_seq}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02160}02160     \mbox{\hyperlink{bxe_8h_a796652c93e2f5179de2b8b6fde78ec78}{SHMEM\_WR}}(sc, func\_mb[mb\_idx].drv\_mb\_param, param);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02161}02161     \mbox{\hyperlink{bxe_8h_a796652c93e2f5179de2b8b6fde78ec78}{SHMEM\_WR}}(sc, func\_mb[mb\_idx].drv\_mb\_header, (command | seq));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02162}02162 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02163}02163     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02164}02164           \textcolor{stringliteral}{"{}wrote command 0x\%08x to FW MB param 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02165}02165           (command | seq), param);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02166}02166 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02167}02167     \textcolor{comment}{/* Let the FW do it's magic. GIve it up to 5 seconds... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02168}02168     \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02169}02169         DELAY(delay * 1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02170}02170         rc = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, func\_mb[mb\_idx].fw\_mb\_header);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02171}02171     \} \textcolor{keywordflow}{while} ((seq != (rc \& \mbox{\hyperlink{ecore__hsi_8h_a8d45a5dabe70f5c62a88620648ba664d}{FW\_MSG\_SEQ\_NUMBER\_MASK}})) \&\& (cnt++ < 500));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02172}02172 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02173}02173     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02174}02174           \textcolor{stringliteral}{"{}[after \%d ms] read 0x\%x seq 0x\%x from FW MB\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02175}02175           cnt*delay, rc, seq);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02176}02176 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02177}02177     \textcolor{comment}{/* is this a reply to our command? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02178}02178     \textcolor{keywordflow}{if} (seq == (rc \& \mbox{\hyperlink{ecore__hsi_8h_a8d45a5dabe70f5c62a88620648ba664d}{FW\_MSG\_SEQ\_NUMBER\_MASK}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02179}02179         rc \&= \mbox{\hyperlink{ecore__hsi_8h_acacae24950c7fb4cc6d75f4e0c70888b}{FW\_MSG\_CODE\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02180}02180     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02181}02181         \textcolor{comment}{/* Ruh-\/roh! */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02182}02182         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FW failed to respond!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02183}02183         \textcolor{comment}{// XXX bxe\_fw\_dump(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02184}02184         rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02185}02185     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02186}02186 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02187}02187     \mbox{\hyperlink{bxe_8h_a20ba6613a005bbd1c62589c4c434561a}{BXE\_FWMB\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02188}02188     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02189}02189 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02190}02190 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02191}02191 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02192}\mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{02192}} \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02193}02193                uint32\_t         command,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02194}02194                uint32\_t         param)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02195}02195 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02196}02196     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_ad5f15d456628f38a07e4325484ae0be8}{elink\_cb\_fw\_command}}(sc, command, param));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02197}02197 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02198}02198 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02199}02199 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02200}\mbox{\hyperlink{bxe_8c_a4084973f456720d94c6370b03140cc33}{02200}} \mbox{\hyperlink{bxe_8c_a4084973f456720d94c6370b03140cc33}{\_\_storm\_memset\_dma\_mapping}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02201}02201                            uint32\_t         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02202}02202                            bus\_addr\_t       mapping)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02203}02203 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02204}02204     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(mapping));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02205}02205     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + 4), \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(mapping));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02206}02206 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02207}02207 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02208}02208 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02209}\mbox{\hyperlink{bxe_8c_a6f782bb17238baa46ac431fc65043bc4}{02209}} \mbox{\hyperlink{bxe_8c_a6f782bb17238baa46ac431fc65043bc4}{storm\_memset\_spq\_addr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02210}02210                       bus\_addr\_t       mapping,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02211}02211                       uint16\_t         abs\_fid)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02212}02212 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02213}02213     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (\mbox{\hyperlink{ecore__reg_8h_a83d9053ce3e02eb316fcd86d46e9ce9b}{XSEM\_REG\_FAST\_MEMORY}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02214}02214                      \mbox{\hyperlink{ecore__fw__defs_8h_a2a402d0468a38dd43ab883e6734f4760}{XSTORM\_SPQ\_PAGE\_BASE\_OFFSET}}(abs\_fid));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02215}02215     \mbox{\hyperlink{bxe_8c_a4084973f456720d94c6370b03140cc33}{\_\_storm\_memset\_dma\_mapping}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, mapping);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02216}02216 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02217}02217 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02218}02218 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02219}\mbox{\hyperlink{bxe_8c_ad32ce7372db57e61624daece369dd72b}{02219}} \mbox{\hyperlink{bxe_8c_ad32ce7372db57e61624daece369dd72b}{storm\_memset\_vf\_to\_pf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02220}02220                       uint16\_t         abs\_fid,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02221}02221                       uint16\_t         pf\_id)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02222}02222 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02223}02223     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_ad0f10f2aa3e621945be4db8d429bff93}{XSTORM\_VF\_TO\_PF\_OFFSET}}(abs\_fid)), pf\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02224}02224     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_ac1b2bd3b2efbb338b927c60341267a94}{CSTORM\_VF\_TO\_PF\_OFFSET}}(abs\_fid)), pf\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02225}02225     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a59d4e64d8518e1ebf4f6925617f52778}{TSTORM\_VF\_TO\_PF\_OFFSET}}(abs\_fid)), pf\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02226}02226     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a4c7e4ea695c936141a6f8250175a5d51}{USTORM\_VF\_TO\_PF\_OFFSET}}(abs\_fid)), pf\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02227}02227 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02228}02228 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02229}02229 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02230}\mbox{\hyperlink{bxe_8c_acee0b5b0a75d3bd0b3d1c11ca684f90c}{02230}} \mbox{\hyperlink{bxe_8c_acee0b5b0a75d3bd0b3d1c11ca684f90c}{storm\_memset\_func\_en}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02231}02231                      uint16\_t         abs\_fid,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02232}02232                      uint8\_t          enable)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02233}02233 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02234}02234     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a679bde4fe36279330edae061b0c01ef1}{XSTORM\_FUNC\_EN\_OFFSET}}(abs\_fid)), enable);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02235}02235     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_abaa14f5ab4f3ee4018e00245f69e2760}{CSTORM\_FUNC\_EN\_OFFSET}}(abs\_fid)), enable);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02236}02236     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a5a4293ff74fb2911413bcdcd373f4824}{TSTORM\_FUNC\_EN\_OFFSET}}(abs\_fid)), enable);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02237}02237     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_aab306b10beb3a9329fe64243f676134f}{USTORM\_FUNC\_EN\_OFFSET}}(abs\_fid)), enable);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02238}02238 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02239}02239 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02240}02240 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02241}\mbox{\hyperlink{bxe_8c_a7261cde8df5f4bdd195875d9557dcefd}{02241}} \mbox{\hyperlink{bxe_8c_a7261cde8df5f4bdd195875d9557dcefd}{storm\_memset\_eq\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}       *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02242}02242                      \textcolor{keyword}{struct} \mbox{\hyperlink{structevent__ring__data}{event\_ring\_data}} *eq\_data,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02243}02243                      uint16\_t               pfid)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02244}02244 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02245}02245     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02246}02246     \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02247}02247 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02248}02248     \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a632686d5544737021704bc7410efa23a}{CSTORM\_EVENT\_RING\_DATA\_OFFSET}}(pfid));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02249}02249     \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structevent__ring__data}{event\_ring\_data}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02250}02250     \mbox{\hyperlink{bxe_8c_ab05cdbe02d08b583d1714e0f5db5d42d}{ecore\_storm\_memset\_struct}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}}, (uint32\_t *)eq\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02251}02251 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02252}02252 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02253}02253 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02254}\mbox{\hyperlink{bxe_8c_a94b80518ab58bc31e6dc0cd53996531f}{02254}} \mbox{\hyperlink{bxe_8c_a94b80518ab58bc31e6dc0cd53996531f}{storm\_memset\_eq\_prod}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02255}02255                      uint16\_t         eq\_prod,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02256}02256                      uint16\_t         pfid)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02257}02257 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02258}02258     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02259}02259                      \mbox{\hyperlink{ecore__fw__defs_8h_ab5416d57a70ddb64261c93ed4f2b7a33}{CSTORM\_EVENT\_RING\_PROD\_OFFSET}}(pfid));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02260}02260     \mbox{\hyperlink{bxe_8h_ac2821d115af748d785cee022eac211bb}{REG\_WR16}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, eq\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02261}02261 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02262}02262 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02263}02263 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02264}02264 \textcolor{comment}{ * Post a slowpath command.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02265}02265 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02266}02266 \textcolor{comment}{ * A slowpath command is used to propagate a configuration change through}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02267}02267 \textcolor{comment}{ * the controller in a controlled manner, allowing each STORM processor and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02268}02268 \textcolor{comment}{ * other H/W blocks to phase in the change.  The commands sent on the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02269}02269 \textcolor{comment}{ * slowpath are referred to as ramrods.  Depending on the ramrod used the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02270}02270 \textcolor{comment}{ * completion of the ramrod will occur in different ways.  Here's a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02271}02271 \textcolor{comment}{ * breakdown of ramrods and how they complete:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02272}02272 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02273}02273 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_PORT\_SETUP}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02274}02274 \textcolor{comment}{ *   Used to setup the leading connection on a port.  Completes on the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02275}02275 \textcolor{comment}{ *   Receive Completion Queue (RCQ) of that port (typically fp[0]).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02276}02276 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02277}02277 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_CLIENT\_SETUP}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02278}02278 \textcolor{comment}{ *   Used to setup an additional connection on a port.  Completes on the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02279}02279 \textcolor{comment}{ *   RCQ of the multi-\/queue/RSS connection being initialized.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02280}02280 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02281}02281 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_STAT\_QUERY}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02282}02282 \textcolor{comment}{ *   Used to force the storm processors to update the statistics database}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02283}02283 \textcolor{comment}{ *   in host memory.  This ramrod is send on the leading connection CID and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02284}02284 \textcolor{comment}{ *   completes as an index increment of the CSTORM on the default status}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02285}02285 \textcolor{comment}{ *   block.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02286}02286 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02287}02287 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_UPDATE}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02288}02288 \textcolor{comment}{ *   Used to update the state of the leading connection, usually to udpate}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02289}02289 \textcolor{comment}{ *   the RSS indirection table.  Completes on the RCQ of the leading}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02290}02290 \textcolor{comment}{ *   connection. (Not currently used under FreeBSD until OS support becomes}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02291}02291 \textcolor{comment}{ *   available.)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02292}02292 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02293}02293 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_HALT}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02294}02294 \textcolor{comment}{ *   Used when tearing down a connection prior to driver unload.  Completes}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02295}02295 \textcolor{comment}{ *   on the RCQ of the multi-\/queue/RSS connection being torn down.  Don't}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02296}02296 \textcolor{comment}{ *   use this on the leading connection.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02297}02297 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02298}02298 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_SET\_MAC}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02299}02299 \textcolor{comment}{ *   Sets the Unicast/Broadcast/Multicast used by the port.  Completes on}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02300}02300 \textcolor{comment}{ *   the RCQ of the leading connection.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02301}02301 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02302}02302 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_CFC\_DEL}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02303}02303 \textcolor{comment}{ *   Used when tearing down a conneciton prior to driver unload.  Completes}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02304}02304 \textcolor{comment}{ *   on the RCQ of the leading connection (since the current connection}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02305}02305 \textcolor{comment}{ *   has been completely removed from controller memory).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02306}02306 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02307}02307 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_PORT\_DEL}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02308}02308 \textcolor{comment}{ *   Used to tear down the leading connection prior to driver unload,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02309}02309 \textcolor{comment}{ *   typically fp[0].  Completes as an index increment of the CSTORM on the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02310}02310 \textcolor{comment}{ *   default status block.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02311}02311 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02312}02312 \textcolor{comment}{ * RAMROD\_CMD\_ID\_ETH\_FORWARD\_SETUP}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02313}02313 \textcolor{comment}{ *   Used for connection offload.  Completes on the RCQ of the multi-\/queue}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02314}02314 \textcolor{comment}{ *   RSS connection that is being offloaded.  (Not currently used under}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02315}02315 \textcolor{comment}{ *   FreeBSD.)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02316}02316 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02317}02317 \textcolor{comment}{ * There can only be one command pending per function.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02318}02318 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02319}02319 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02320}02320 \textcolor{comment}{ *   0 = Success, !0 = Failure.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02321}02321 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02322}02322 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02323}02323 \textcolor{comment}{/* must be called under the spq lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02324}02324 \textcolor{keyword}{static} \textcolor{keyword}{inline}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02325}\mbox{\hyperlink{bxe_8c_ad407ac5dff9c2d0f6de8b55d5f527e79}{02325}} \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__spe}{eth\_spe}} *\mbox{\hyperlink{bxe_8c_ad407ac5dff9c2d0f6de8b55d5f527e79}{bxe\_sp\_get\_next}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02326}02326 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02327}02327     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__spe}{eth\_spe}} *next\_spe = sc-\/>\mbox{\hyperlink{structbxe__softc_a671332a7386b3d2a88f8382c9db8b2cf}{spq\_prod\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02328}02328 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02329}02329     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a671332a7386b3d2a88f8382c9db8b2cf}{spq\_prod\_bd}} == sc-\/>\mbox{\hyperlink{structbxe__softc_a1345d43ff7704933724053b0a067953d}{spq\_last\_bd}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02330}02330         \textcolor{comment}{/* wrap back to the first eth\_spq */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02331}02331         sc-\/>\mbox{\hyperlink{structbxe__softc_a671332a7386b3d2a88f8382c9db8b2cf}{spq\_prod\_bd}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a118b7ddd116d503983abc8bb596b4778}{spq}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02332}02332         sc-\/>\mbox{\hyperlink{structbxe__softc_ace6d811b17e2065696ebe680fb2e27fd}{spq\_prod\_idx}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02333}02333     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02334}02334         sc-\/>\mbox{\hyperlink{structbxe__softc_a671332a7386b3d2a88f8382c9db8b2cf}{spq\_prod\_bd}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02335}02335         sc-\/>\mbox{\hyperlink{structbxe__softc_ace6d811b17e2065696ebe680fb2e27fd}{spq\_prod\_idx}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02336}02336     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02337}02337 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02338}02338     \textcolor{keywordflow}{return} (next\_spe);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02339}02339 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02340}02340 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02341}02341 \textcolor{comment}{/* must be called under the spq lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02342}02342 \textcolor{keyword}{static} \textcolor{keyword}{inline}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02343}\mbox{\hyperlink{bxe_8c_aae6d6a79219810168aa9b016cf28a46f}{02343}} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_aae6d6a79219810168aa9b016cf28a46f}{bxe\_sp\_prod\_update}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02344}02344 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02345}02345     \textcolor{keywordtype}{int} func = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02346}02346 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02347}02347     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02348}02348 \textcolor{comment}{     * Make sure that BD data is updated before writing the producer.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02349}02349 \textcolor{comment}{     * BD data is written to the memory, the producer is read from the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02350}02350 \textcolor{comment}{     * memory, thus we need a full memory barrier to ensure the ordering.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02351}02351 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02352}02352     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02353}02353 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02354}02354     \mbox{\hyperlink{bxe_8h_ac2821d115af748d785cee022eac211bb}{REG\_WR16}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_ad6771c43bed6d6af3cd484905214120a}{XSTORM\_SPQ\_PROD\_OFFSET}}(func)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02355}02355              sc-\/>\mbox{\hyperlink{structbxe__softc_ace6d811b17e2065696ebe680fb2e27fd}{spq\_prod\_idx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02356}02356 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02357}02357     bus\_space\_barrier(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a1fce441aaa962f572d643140658a6e4c}{BAR0}}].\mbox{\hyperlink{structbxe__bar_ac5332e395c57aaf5ebdca5ff35d96cd3}{tag}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a1fce441aaa962f572d643140658a6e4c}{BAR0}}].\mbox{\hyperlink{structbxe__bar_a7de264b12dc05a944543a1f6817c17ec}{handle}}, 0, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02358}02358                       BUS\_SPACE\_BARRIER\_WRITE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02359}02359 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02360}02360 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02367}02367 \textcolor{keyword}{static} \textcolor{keyword}{inline}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02368}\mbox{\hyperlink{bxe_8c_a505b57a86fb732265d541f7f25fba74b}{02368}} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a505b57a86fb732265d541f7f25fba74b}{bxe\_is\_contextless\_ramrod}}(\textcolor{keywordtype}{int} cmd,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02369}02369                               \textcolor{keywordtype}{int} cmd\_type)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02370}02370 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02371}02371     \textcolor{keywordflow}{if} ((cmd\_type == \mbox{\hyperlink{ecore__hsi_8h_acdf0efffcd30d2dd47aa36b78d3398a7a93e2035671e781e2fc9664c0f8d8b110}{NONE\_CONNECTION\_TYPE}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02372}02372         (cmd == \mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37aa9eb1b64b3763755ddd9b6a321bd3fa7}{RAMROD\_CMD\_ID\_ETH\_FORWARD\_SETUP}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02373}02373         (cmd == \mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37aa624f7f345e2f82a9a165353014471c1}{RAMROD\_CMD\_ID\_ETH\_CLASSIFICATION\_RULES}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02374}02374         (cmd == \mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37a0ee8b00f51ba4c6c4be67dc43900ae90}{RAMROD\_CMD\_ID\_ETH\_FILTER\_RULES}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02375}02375         (cmd == \mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37a4d66fe9860491114ea3b72635371f1f4}{RAMROD\_CMD\_ID\_ETH\_MULTICAST\_RULES}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02376}02376         (cmd == \mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37ab691c1a322593c85fac9280844681c73}{RAMROD\_CMD\_ID\_ETH\_SET\_MAC}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02377}02377         (cmd == \mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37ac8d8c67ffe08a721c81a21e5f0be5bbf}{RAMROD\_CMD\_ID\_ETH\_RSS\_UPDATE}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02378}02378         \textcolor{keywordflow}{return} (TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02379}02379     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02380}02380         \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02381}02381     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02382}02382 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02383}02383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02398}02398 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02399}\mbox{\hyperlink{bxe_8c_aa071703a14573da4addf7bd65924dd0f}{02399}} \mbox{\hyperlink{bxe_8c_aa071703a14573da4addf7bd65924dd0f}{bxe\_sp\_post}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02400}02400             \textcolor{keywordtype}{int}              command,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02401}02401             \textcolor{keywordtype}{int}              cid,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02402}02402             uint32\_t         data\_hi,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02403}02403             uint32\_t         data\_lo,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02404}02404             \textcolor{keywordtype}{int}              cmd\_type)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02405}02405 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02406}02406     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__spe}{eth\_spe}} *spe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02407}02407     uint16\_t type;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02408}02408     \textcolor{keywordtype}{int} common;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02409}02409 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02410}02410     common = \mbox{\hyperlink{bxe_8c_a505b57a86fb732265d541f7f25fba74b}{bxe\_is\_contextless\_ramrod}}(command, cmd\_type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02411}02411 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02412}02412     \mbox{\hyperlink{bxe_8h_ae5c7438a68e46ba00bf256af1f52d2dd}{BXE\_SP\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02413}02413 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02414}02414     \textcolor{keywordflow}{if} (common) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02415}02415         \textcolor{keywordflow}{if} (!atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aed766106b28f783ee287253ef2f39a20}{eq\_spq\_left}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02416}02416             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}EQ ring is full!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02417}02417             \mbox{\hyperlink{bxe_8h_a4f24fc555a71b157bc4da9daa1cb7d5a}{BXE\_SP\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02418}02418             \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02419}02419         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02420}02420     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02421}02421         \textcolor{keywordflow}{if} (!atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abb5f0e2502a85ee8e234550ee0ad0a55}{cq\_spq\_left}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02422}02422             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}SPQ ring is full!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02423}02423             \mbox{\hyperlink{bxe_8h_a4f24fc555a71b157bc4da9daa1cb7d5a}{BXE\_SP\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02424}02424             \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02425}02425         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02426}02426     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02427}02427 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02428}02428     spe = \mbox{\hyperlink{bxe_8c_ad407ac5dff9c2d0f6de8b55d5f527e79}{bxe\_sp\_get\_next}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02429}02429 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02430}02430     \textcolor{comment}{/* CID needs port number to be encoded int it */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02431}02431     spe-\/>\mbox{\hyperlink{structeth__spe_a0c12aae2ec3a88e710025862b1e48a04}{hdr}}.\mbox{\hyperlink{structspe__hdr__t_a91400bfa1016cc1e0ef732f1dc9f0eda}{conn\_and\_cmd\_data}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02432}02432         htole32((command << \mbox{\hyperlink{ecore__hsi_8h_a94d378b12200d1da79a64a36a758b841}{SPE\_HDR\_T\_CMD\_ID\_SHIFT}}) | \mbox{\hyperlink{bxe_8h_a965fabd8978e7b46a212d56f1ef37604}{HW\_CID}}(sc, cid));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02433}02433 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02434}02434     type = (cmd\_type << \mbox{\hyperlink{ecore__hsi_8h_a560908145b29261297f227a2d7e63a31}{SPE\_HDR\_T\_CONN\_TYPE\_SHIFT}}) \& \mbox{\hyperlink{ecore__hsi_8h_a14ad27d59535ceafef0476630d68edea}{SPE\_HDR\_T\_CONN\_TYPE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02435}02435 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02436}02436     \textcolor{comment}{/* TBD: Check if it works for VFs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02437}02437     type |= ((\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc) << \mbox{\hyperlink{ecore__hsi_8h_afb42ef4ffdc9bc383d29a6649f44abcf}{SPE\_HDR\_T\_FUNCTION\_ID\_SHIFT}}) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02438}02438              \mbox{\hyperlink{ecore__hsi_8h_a8df1f72844c000c349236a4deb140f5a}{SPE\_HDR\_T\_FUNCTION\_ID}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02439}02439 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02440}02440     spe-\/>\mbox{\hyperlink{structeth__spe_a0c12aae2ec3a88e710025862b1e48a04}{hdr}}.\mbox{\hyperlink{structspe__hdr__t_ad8c99f11805a36eb74659ff5046b1f56}{type}} = htole16(type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02441}02441 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02442}02442     spe-\/>\mbox{\hyperlink{structeth__spe_af2f87f0c9b336a3f5db95cdc18ae1280}{data}}.\mbox{\hyperlink{unioneth__specific__data_a66845e2642cb957f14aae45b17c35b90}{update\_data\_addr}}.\mbox{\hyperlink{structregpair__t_afadda4afbbbed42148e10d7dccc574ba}{hi}} = htole32(data\_hi);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02443}02443     spe-\/>\mbox{\hyperlink{structeth__spe_af2f87f0c9b336a3f5db95cdc18ae1280}{data}}.\mbox{\hyperlink{unioneth__specific__data_a66845e2642cb957f14aae45b17c35b90}{update\_data\_addr}}.\mbox{\hyperlink{structregpair__t_a28917d5821a6427eb1adba4c0ba7a4b8}{lo}} = htole32(data\_lo);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02444}02444 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02445}02445     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02446}02446 \textcolor{comment}{     * It's ok if the actual decrement is issued towards the memory}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02447}02447 \textcolor{comment}{     * somewhere between the lock and unlock. Thus no more explict}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02448}02448 \textcolor{comment}{     * memory barrier is needed.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02449}02449 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02450}02450     \textcolor{keywordflow}{if} (common) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02451}02451         atomic\_subtract\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aed766106b28f783ee287253ef2f39a20}{eq\_spq\_left}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02452}02452     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02453}02453         atomic\_subtract\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abb5f0e2502a85ee8e234550ee0ad0a55}{cq\_spq\_left}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02454}02454     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02455}02455 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02456}02456     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}SPQE -\/> \%\#jx\(\backslash\)n"{}}, (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02457}02457     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}FUNC\_RDATA -\/> \%p / \%\#jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02458}02458           \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, func\_rdata), (uintmax\_t)\mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, func\_rdata));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02459}02459     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02460}02460           \textcolor{stringliteral}{"{}SPQE[\%x] (\%x:\%x) (cmd, common?) (\%d,\%d) hw\_cid \%x data (\%x:\%x) type(0x\%x) left (CQ, EQ) (\%lx,\%lx)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02461}02461           sc-\/>\mbox{\hyperlink{structbxe__softc_ace6d811b17e2065696ebe680fb2e27fd}{spq\_prod\_idx}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02462}02462           (uint32\_t)\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02463}02463           (uint32\_t)(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}) + (uint8\_t *)sc-\/>\mbox{\hyperlink{structbxe__softc_a671332a7386b3d2a88f8382c9db8b2cf}{spq\_prod\_bd}} -\/ (uint8\_t *)sc-\/>\mbox{\hyperlink{structbxe__softc_a118b7ddd116d503983abc8bb596b4778}{spq}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02464}02464           command,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02465}02465           common,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02466}02466           \mbox{\hyperlink{bxe_8h_a965fabd8978e7b46a212d56f1ef37604}{HW\_CID}}(sc, cid),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02467}02467           data\_hi,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02468}02468           data\_lo,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02469}02469           type,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02470}02470           atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abb5f0e2502a85ee8e234550ee0ad0a55}{cq\_spq\_left}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02471}02471           atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aed766106b28f783ee287253ef2f39a20}{eq\_spq\_left}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02472}02472 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02473}02473     \mbox{\hyperlink{bxe_8c_aae6d6a79219810168aa9b016cf28a46f}{bxe\_sp\_prod\_update}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02474}02474 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02475}02475     \mbox{\hyperlink{bxe_8h_a4f24fc555a71b157bc4da9daa1cb7d5a}{BXE\_SP\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02476}02476     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02477}02477 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02478}02478 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02486}02486 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02487}02487 \textcolor{comment}{ * FreeBSD Device probe function.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02488}02488 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02489}02489 \textcolor{comment}{ * Compares the device found to the driver's list of supported devices and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02490}02490 \textcolor{comment}{ * reports back to the bsd loader whether this is the right driver for the device.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02491}02491 \textcolor{comment}{ * This is the driver entry function called from the "{}kldload"{} command.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02492}02492 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02493}02493 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02494}02494 \textcolor{comment}{ *   BUS\_PROBE\_DEFAULT on success, positive value on failure.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02495}02495 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02496}02496 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02497}\mbox{\hyperlink{bxe_8c_aa65275a1d0b104d85bc1e33d0a1351a4}{02497}} \mbox{\hyperlink{bxe_8c_aa65275a1d0b104d85bc1e33d0a1351a4}{bxe\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02498}02498 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02499}02499     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__device__type}{bxe\_device\_type}} *t;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02500}02500     \textcolor{keywordtype}{char} *descbuf;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02501}02501     uint16\_t did, sdid, svid, vid;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02502}02502 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02503}02503     \textcolor{comment}{/* Find our device structure */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02504}02504     t = \mbox{\hyperlink{bxe_8c_a48ab994478b2edbaf55db5be134617a3}{bxe\_devs}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02505}02505 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02506}02506     \textcolor{comment}{/* Get the data for the device to be probed. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02507}02507     vid  = pci\_get\_vendor(dev);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02508}02508     did  = pci\_get\_device(dev);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02509}02509     svid = pci\_get\_subvendor(dev);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02510}02510     sdid = pci\_get\_subdevice(dev);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02511}02511 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02512}02512     \textcolor{comment}{/* Look through the list of known devices for a match. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02513}02513     \textcolor{keywordflow}{while} (t-\/>\mbox{\hyperlink{structbxe__device__type_ae4f38556ff221df1b41c795a67303a19}{bxe\_name}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02514}02514         \textcolor{keywordflow}{if} ((vid == t-\/>\mbox{\hyperlink{structbxe__device__type_a0c237e3043b1517fd600cec468551e1a}{bxe\_vid}}) \&\& (did == t-\/>\mbox{\hyperlink{structbxe__device__type_abac833a0879d6a574044b00a4a7e9a7b}{bxe\_did}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02515}02515             ((svid == t-\/>\mbox{\hyperlink{structbxe__device__type_afe26fb23f6b6ffa43655dce45db91fb3}{bxe\_svid}}) || (t-\/>\mbox{\hyperlink{structbxe__device__type_afe26fb23f6b6ffa43655dce45db91fb3}{bxe\_svid}} == \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}})) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02516}02516             ((sdid == t-\/>\mbox{\hyperlink{structbxe__device__type_a94347ad62a90d6c94117de5b0b68a26d}{bxe\_sdid}}) || (t-\/>\mbox{\hyperlink{structbxe__device__type_a94347ad62a90d6c94117de5b0b68a26d}{bxe\_sdid}} == \mbox{\hyperlink{bxe_8h_a13e5db1ce39cc8d13a6747e95e355275}{PCI\_ANY\_ID}}))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02517}02517             descbuf = malloc(\mbox{\hyperlink{bxe_8c_a0c177be8ae81713e6142735c634b6f96}{BXE\_DEVDESC\_MAX}}, M\_TEMP, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02518}02518             \textcolor{keywordflow}{if} (descbuf == NULL)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02519}02519                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02520}02520 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02521}02521             \textcolor{comment}{/* Print out the device identity. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02522}02522             snprintf(descbuf, \mbox{\hyperlink{bxe_8c_a0c177be8ae81713e6142735c634b6f96}{BXE\_DEVDESC\_MAX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02523}02523                      \textcolor{stringliteral}{"{}\%s (\%c\%d) BXE v:\%s"{}}, t-\/>\mbox{\hyperlink{structbxe__device__type_ae4f38556ff221df1b41c795a67303a19}{bxe\_name}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02524}02524                      (((pci\_read\_config(dev, PCIR\_REVID, 4) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02525}02525                         0xf0) >> 4) + \textcolor{charliteral}{'A'}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02526}02526                      (pci\_read\_config(dev, PCIR\_REVID, 4) \& 0xf),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02527}02527                      \mbox{\hyperlink{bxe_8c_a976c2e4222c6339043f2145097755339}{BXE\_DRIVER\_VERSION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02528}02528 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02529}02529             device\_set\_desc\_copy(dev, descbuf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02530}02530             free(descbuf, M\_TEMP);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02531}02531             \textcolor{keywordflow}{return} (BUS\_PROBE\_DEFAULT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02532}02532         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02533}02533         t++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02534}02534     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02535}02535 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02536}02536     \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02537}02537 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02538}02538 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02539}02539 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02540}\mbox{\hyperlink{bxe_8c_a58d6ea6d31deee3642fc85620758904f}{02540}} \mbox{\hyperlink{bxe_8c_a58d6ea6d31deee3642fc85620758904f}{bxe\_init\_mutexes}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02541}02541 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02542}02542 \textcolor{preprocessor}{\#ifdef BXE\_CORE\_LOCK\_SX}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02543}02543     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_a02ebaf6bb0bd4886553871db797d5829}{core\_sx\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_a02ebaf6bb0bd4886553871db797d5829}{core\_sx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02544}02544              \textcolor{stringliteral}{"{}bxe\%d\_core\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02545}02545     sx\_init(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab94ebfdc9855c60c2f20d522b94b1c0a}{core\_sx}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a02ebaf6bb0bd4886553871db797d5829}{core\_sx\_name}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02546}02546 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02547}02547     snprintf(sc-\/>core\_mtx\_name, \textcolor{keyword}{sizeof}(sc-\/>core\_mtx\_name),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02548}02548              \textcolor{stringliteral}{"{}bxe\%d\_core\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02549}02549     mtx\_init(\&sc-\/>core\_mtx, sc-\/>core\_mtx\_name, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02550}02550 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02551}02551 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02552}02552     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_a924b0c42e6db8160e038975febf030f4}{sp\_mtx\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_a924b0c42e6db8160e038975febf030f4}{sp\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02553}02553              \textcolor{stringliteral}{"{}bxe\%d\_sp\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02554}02554     mtx\_init(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a8669ac184caab8df07e212d30e150779}{sp\_mtx}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a924b0c42e6db8160e038975febf030f4}{sp\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02555}02555 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02556}02556     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_a5603f7da6beacadedcfe5a49716b2497}{dmae\_mtx\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_a5603f7da6beacadedcfe5a49716b2497}{dmae\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02557}02557              \textcolor{stringliteral}{"{}bxe\%d\_dmae\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02558}02558     mtx\_init(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abdbabd16747c0e9d8264647b41fad369}{dmae\_mtx}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a5603f7da6beacadedcfe5a49716b2497}{dmae\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02559}02559 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02560}02560     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a3596f1bf2bc7bc48956a974ff3c9852d}{phy\_mtx\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a3596f1bf2bc7bc48956a974ff3c9852d}{phy\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02561}02561              \textcolor{stringliteral}{"{}bxe\%d\_phy\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02562}02562     mtx\_init(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ac2e3667e770601712dc0c9307cb2fbc6}{phy\_mtx}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a3596f1bf2bc7bc48956a974ff3c9852d}{phy\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02563}02563 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02564}02564     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_af79a6e00b2d9004ff72942cf0bdf3c9f}{fwmb\_mtx\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_af79a6e00b2d9004ff72942cf0bdf3c9f}{fwmb\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02565}02565              \textcolor{stringliteral}{"{}bxe\%d\_fwmb\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02566}02566     mtx\_init(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ae245420fd5cfcbf75ea5e9282fa300b1}{fwmb\_mtx}}, sc-\/>\mbox{\hyperlink{structbxe__softc_af79a6e00b2d9004ff72942cf0bdf3c9f}{fwmb\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02567}02567 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02568}02568     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_aadd93ab276d0c74b85223aa563c644ca}{print\_mtx\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_aadd93ab276d0c74b85223aa563c644ca}{print\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02569}02569              \textcolor{stringliteral}{"{}bxe\%d\_print\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02570}02570     mtx\_init(\&(sc-\/>\mbox{\hyperlink{structbxe__softc_af4ce3e6c65be840f68e5b21900e8fb57}{print\_mtx}}), sc-\/>\mbox{\hyperlink{structbxe__softc_aadd93ab276d0c74b85223aa563c644ca}{print\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02571}02571 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02572}02572     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_afc9ba9cdb6a5af18c66958f00c81d116}{stats\_mtx\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_afc9ba9cdb6a5af18c66958f00c81d116}{stats\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02573}02573              \textcolor{stringliteral}{"{}bxe\%d\_stats\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02574}02574     mtx\_init(\&(sc-\/>\mbox{\hyperlink{structbxe__softc_a56a303617b56a8e50f166f3aa5f7b11d}{stats\_mtx}}), sc-\/>\mbox{\hyperlink{structbxe__softc_afc9ba9cdb6a5af18c66958f00c81d116}{stats\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02575}02575 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02576}02576     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_a2dbe2acee4df85f8162f99fd9ca97c5a}{mcast\_mtx\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_a2dbe2acee4df85f8162f99fd9ca97c5a}{mcast\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02577}02577              \textcolor{stringliteral}{"{}bxe\%d\_mcast\_lock"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02578}02578     mtx\_init(\&(sc-\/>\mbox{\hyperlink{structbxe__softc_ac643e04800caa21a78fd948efd218ccc}{mcast\_mtx}}), sc-\/>\mbox{\hyperlink{structbxe__softc_a2dbe2acee4df85f8162f99fd9ca97c5a}{mcast\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02579}02579 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02580}02580 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02581}02581 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02582}\mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{02582}} \mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{bxe\_release\_mutexes}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02583}02583 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02584}02584 \textcolor{preprocessor}{\#ifdef BXE\_CORE\_LOCK\_SX}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02585}02585     sx\_destroy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab94ebfdc9855c60c2f20d522b94b1c0a}{core\_sx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02586}02586 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02587}02587     \textcolor{keywordflow}{if} (mtx\_initialized(\&sc-\/>core\_mtx)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02588}02588         mtx\_destroy(\&sc-\/>core\_mtx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02589}02589     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02590}02590 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02591}02591 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02592}02592     \textcolor{keywordflow}{if} (mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a8669ac184caab8df07e212d30e150779}{sp\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02593}02593         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a8669ac184caab8df07e212d30e150779}{sp\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02594}02594     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02595}02595 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02596}02596     \textcolor{keywordflow}{if} (mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abdbabd16747c0e9d8264647b41fad369}{dmae\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02597}02597         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abdbabd16747c0e9d8264647b41fad369}{dmae\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02598}02598     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02599}02599 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02600}02600     \textcolor{keywordflow}{if} (mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ac2e3667e770601712dc0c9307cb2fbc6}{phy\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02601}02601         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ac2e3667e770601712dc0c9307cb2fbc6}{phy\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02602}02602     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02603}02603 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02604}02604     \textcolor{keywordflow}{if} (mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ae245420fd5cfcbf75ea5e9282fa300b1}{fwmb\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02605}02605         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ae245420fd5cfcbf75ea5e9282fa300b1}{fwmb\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02606}02606     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02607}02607 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02608}02608     \textcolor{keywordflow}{if} (mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af4ce3e6c65be840f68e5b21900e8fb57}{print\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02609}02609         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af4ce3e6c65be840f68e5b21900e8fb57}{print\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02610}02610     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02611}02611 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02612}02612     \textcolor{keywordflow}{if} (mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a56a303617b56a8e50f166f3aa5f7b11d}{stats\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02613}02613         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a56a303617b56a8e50f166f3aa5f7b11d}{stats\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02614}02614     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02615}02615 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02616}02616     \textcolor{keywordflow}{if} (mtx\_initialized(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ac643e04800caa21a78fd948efd218ccc}{mcast\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02617}02617         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ac643e04800caa21a78fd948efd218ccc}{mcast\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02618}02618     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02619}02619 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02620}02620 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02621}02621 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02622}\mbox{\hyperlink{bxe_8c_ae731d69bd5e491bceb7804c8c53407bf}{02622}} \mbox{\hyperlink{bxe_8c_ae731d69bd5e491bceb7804c8c53407bf}{bxe\_tx\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}* sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02623}02623 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02624}02624     if\_t ifp = sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02625}02625 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02626}02626     \textcolor{comment}{/* tell the stack the driver is stopped and TX queue is full */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02627}02627     \textcolor{keywordflow}{if} (ifp !=  NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02628}02628         if\_setdrvflags(ifp, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02629}02629     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02630}02630 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02631}02631 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02632}02632 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02633}\mbox{\hyperlink{bxe_8c_a425ed51fb9bdf68f8dfe8c36a27374e5}{02633}} \mbox{\hyperlink{bxe_8c_a425ed51fb9bdf68f8dfe8c36a27374e5}{bxe\_drv\_pulse}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02634}02634 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02635}02635     \mbox{\hyperlink{bxe_8h_a796652c93e2f5179de2b8b6fde78ec78}{SHMEM\_WR}}(sc, func\_mb[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc)].drv\_pulse\_mb,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02636}02636              sc-\/>\mbox{\hyperlink{structbxe__softc_a3685352e604bc0843e4e32082cbc739e}{fw\_drv\_pulse\_wr\_seq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02637}02637 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02638}02638 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02639}02639 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint16\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02640}\mbox{\hyperlink{bxe_8c_a27bf9359a144fda14c7d1e9a988cd2f7}{02640}} \mbox{\hyperlink{bxe_8c_a27bf9359a144fda14c7d1e9a988cd2f7}{bxe\_tx\_avail}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02641}02641              \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02642}02642 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02643}02643     int16\_t  used;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02644}02644     uint16\_t prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02645}02645     uint16\_t cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02646}02646 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02647}02647     prod = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a8895cb72e0640491ef115fe0f8eee971}{tx\_bd\_prod}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02648}02648     cons = fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa16de8d88d7655a6d9c075ed8b09d1f3}{tx\_bd\_cons}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02649}02649 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02650}02650     used = \mbox{\hyperlink{bxe_8h_a55d48e34713ab62249ad5b67d508162f}{SUB\_S16}}(prod, cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02651}02651 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02652}02652     \textcolor{keywordflow}{return} (int16\_t)(sc-\/>\mbox{\hyperlink{structbxe__softc_ae54ae6772bbb2b9435620aac68777c5f}{tx\_ring\_size}}) -\/ used;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02653}02653 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02654}02654 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02655}02655 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02656}\mbox{\hyperlink{bxe_8c_a8e74c1a419cea2ed034d6146258166f6}{02656}} \mbox{\hyperlink{bxe_8c_a8e74c1a419cea2ed034d6146258166f6}{bxe\_tx\_queue\_has\_work}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02657}02657 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02658}02658     uint16\_t hw\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02659}02659 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02660}02660     mb(); \textcolor{comment}{/* status block fields can change */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02661}02661     hw\_cons = le16toh(*fp-\/>\mbox{\hyperlink{structbxe__fastpath_a3dc4c1d3159c9ddf3935b81f7fd031f7}{tx\_cons\_sb}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02662}02662     \textcolor{keywordflow}{return} (hw\_cons != fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4fb28a798b123d9d554100f51c89e2f5}{tx\_pkt\_cons}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02663}02663 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02664}02664 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02665}02665 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02666}\mbox{\hyperlink{bxe_8c_a2386a1eee885f63fc4f65169c38bb1d8}{02666}} \mbox{\hyperlink{bxe_8c_a2386a1eee885f63fc4f65169c38bb1d8}{bxe\_has\_tx\_work}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02667}02667 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02668}02668     \textcolor{comment}{/* expand this for multi-\/cos if ever supported */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02669}02669     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a8e74c1a419cea2ed034d6146258166f6}{bxe\_tx\_queue\_has\_work}}(fp)) ? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02670}02670 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02671}02671 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02672}02672 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02673}\mbox{\hyperlink{bxe_8c_a38e828ced0b431f68f948b69a67adf05}{02673}} \mbox{\hyperlink{bxe_8c_a38e828ced0b431f68f948b69a67adf05}{bxe\_has\_rx\_work}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02674}02674 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02675}02675     uint16\_t rx\_cq\_cons\_sb;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02676}02676 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02677}02677     mb(); \textcolor{comment}{/* status block fields can change */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02678}02678     rx\_cq\_cons\_sb = le16toh(*fp-\/>\mbox{\hyperlink{structbxe__fastpath_a56f3586de2bf71291d0838302f3fa7f1}{rx\_cq\_cons\_sb}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02679}02679     \textcolor{keywordflow}{if} ((rx\_cq\_cons\_sb \& \mbox{\hyperlink{bxe_8h_a868af5987406a0a0fdaa591dd8fb37da}{RCQ\_MAX}}) == \mbox{\hyperlink{bxe_8h_a868af5987406a0a0fdaa591dd8fb37da}{RCQ\_MAX}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02680}02680         rx\_cq\_cons\_sb++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02681}02681     \textcolor{keywordflow}{return} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a00695efc5a0133b38e31029734b86646}{rx\_cq\_cons}} != rx\_cq\_cons\_sb);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02682}02682 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02683}02683 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02684}02684 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02685}\mbox{\hyperlink{bxe_8c_a6de8a6b47d64a51d7c6fb70a73192347}{02685}} \mbox{\hyperlink{bxe_8c_a6de8a6b47d64a51d7c6fb70a73192347}{bxe\_sp\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02686}02686              \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02687}02687              \textcolor{keyword}{union} \mbox{\hyperlink{unioneth__rx__cqe}{eth\_rx\_cqe}}    *rr\_cqe)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02688}02688 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02689}02689     \textcolor{keywordtype}{int} cid = \mbox{\hyperlink{bxe_8h_aa23f82e031204b15cef8824469b45863}{SW\_CID}}(rr\_cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a48c30e270484ea688b55a36f05fbb972}{ramrod\_cqe}}.\mbox{\hyperlink{structcommon__ramrod__eth__rx__cqe_ac55900674f68b110dd8c766e8ed9ff49}{conn\_and\_cmd\_data}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02690}02690     \textcolor{keywordtype}{int} command = \mbox{\hyperlink{bxe_8h_ad2da79f14ff0525d4b75e22f9573e431}{CQE\_CMD}}(rr\_cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a48c30e270484ea688b55a36f05fbb972}{ramrod\_cqe}}.\mbox{\hyperlink{structcommon__ramrod__eth__rx__cqe_ac55900674f68b110dd8c766e8ed9ff49}{conn\_and\_cmd\_data}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02691}02691     \textcolor{keyword}{enum} \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6}{ecore\_queue\_cmd}} drv\_cmd = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6abf2e226d41725549a2a16ce37fccf944}{ECORE\_Q\_CMD\_MAX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02692}02692     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__queue__sp__obj}{ecore\_queue\_sp\_obj}} *q\_obj = \&\mbox{\hyperlink{bxe_8h_a10daa98301153111a0edc1e899fa1575}{BXE\_SP\_OBJ}}(sc, fp).q\_obj;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02693}02693 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02694}02694     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}fp=\%d cid=\%d got ramrod \#\%d state is \%x type is \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02695}02695           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, cid, command, sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}}, rr\_cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a48c30e270484ea688b55a36f05fbb972}{ramrod\_cqe}}.\mbox{\hyperlink{structcommon__ramrod__eth__rx__cqe_ade5ceba9ef83a19c0ae3028e43f0017a}{ramrod\_type}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02696}02696 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02697}02697     \textcolor{keywordflow}{switch} (command) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02698}02698     \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37a2c28264fa654c6730eea475a15773b1f}{RAMROD\_CMD\_ID\_ETH\_CLIENT\_UPDATE}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02699}02699         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got UPDATE ramrod. CID \%d\(\backslash\)n"{}}, cid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02700}02700         drv\_cmd = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a00c53822cf87b991beafdcfbe15b526d}{ECORE\_Q\_CMD\_UPDATE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02701}02701         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02702}02702 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02703}02703     \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37a03b3c05e7b6b0d6ad1ec53018e9010ab}{RAMROD\_CMD\_ID\_ETH\_CLIENT\_SETUP}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02704}02704         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got MULTI[\%d] setup ramrod\(\backslash\)n"{}}, cid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02705}02705         drv\_cmd = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a666fa78465bdd0317f897b36de1033df}{ECORE\_Q\_CMD\_SETUP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02706}02706         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02707}02707 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02708}02708     \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37a2f56a146bf2eac69e8b699454d51198d}{RAMROD\_CMD\_ID\_ETH\_TX\_QUEUE\_SETUP}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02709}02709         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got MULTI[\%d] tx-\/only setup ramrod\(\backslash\)n"{}}, cid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02710}02710         drv\_cmd = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a315f7ab072d07b93c98062ea8ed819a4}{ECORE\_Q\_CMD\_SETUP\_TX\_ONLY}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02711}02711         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02712}02712 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02713}02713     \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37aac7419dee5a26cc33af7e3e4f0341496}{RAMROD\_CMD\_ID\_ETH\_HALT}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02714}02714         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got MULTI[\%d] halt ramrod\(\backslash\)n"{}}, cid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02715}02715         drv\_cmd = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6aefc7938d5f34c67311069e5a1803e0b1}{ECORE\_Q\_CMD\_HALT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02716}02716         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02717}02717 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02718}02718     \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37ac1994bbc0748a705cfae23fb7f50c606}{RAMROD\_CMD\_ID\_ETH\_TERMINATE}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02719}02719         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got MULTI[\%d] teminate ramrod\(\backslash\)n"{}}, cid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02720}02720         drv\_cmd = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a2e3de5814c9041f950b66e4383b4c390}{ECORE\_Q\_CMD\_TERMINATE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02721}02721         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02722}02722 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02723}02723     \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a31efce3ae9a55f6ff5ef04ea3d80ab37aa30ddf3cd0b10ab72ee10937cc132e34}{RAMROD\_CMD\_ID\_ETH\_EMPTY}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02724}02724         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got MULTI[\%d] empty ramrod\(\backslash\)n"{}}, cid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02725}02725         drv\_cmd = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a4fa75f88eecfe92129968ef9db88f4ea}{ECORE\_Q\_CMD\_EMPTY}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02726}02726         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02727}02727 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02728}02728     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02729}02729         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}ERROR: unexpected MC reply (\%d) on fp[\%d]\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02730}02730               command, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02731}02731         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02732}02732     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02733}02733 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02734}02734     \textcolor{keywordflow}{if} ((drv\_cmd != \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6abf2e226d41725549a2a16ce37fccf944}{ECORE\_Q\_CMD\_MAX}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02735}02735         q\_obj-\/>\mbox{\hyperlink{structecore__queue__sp__obj_a5d4a7697e0165d9c286494fc321a9ae9}{complete\_cmd}}(sc, q\_obj, drv\_cmd)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02736}02736         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02737}02737 \textcolor{comment}{         * q\_obj-\/>complete\_cmd() failure means that this was}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02738}02738 \textcolor{comment}{         * an unexpected completion.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02739}02739 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02740}02740 \textcolor{comment}{         * In this case we don't want to increase the sc-\/>spq\_left}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02741}02741 \textcolor{comment}{         * because apparently we haven't sent this command the first}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02742}02742 \textcolor{comment}{         * place.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02743}02743 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02744}02744         \textcolor{comment}{// bxe\_panic(sc, ("{}Unexpected SP completion\(\backslash\)n"{}));}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02745}02745         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02746}02746     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02747}02747 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02748}02748     atomic\_add\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abb5f0e2502a85ee8e234550ee0ad0a55}{cq\_spq\_left}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02749}02749 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02750}02750     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}sc-\/>cq\_spq\_left 0x\%lx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02751}02751           atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abb5f0e2502a85ee8e234550ee0ad0a55}{cq\_spq\_left}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02752}02752 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02753}02753 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02754}02754 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02755}02755 \textcolor{comment}{ * The current mbuf is part of an aggregation. Move the mbuf into the TPA}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02756}02756 \textcolor{comment}{ * aggregation queue, put an empty mbuf back onto the receive chain, and mark}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02757}02757 \textcolor{comment}{ * the current aggregation queue as in-\/progress.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02758}02758 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02759}02759 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02760}\mbox{\hyperlink{bxe_8c_aba1e4dbcf97c1c35911c79f7bffc6752}{02760}} \mbox{\hyperlink{bxe_8c_aba1e4dbcf97c1c35911c79f7bffc6752}{bxe\_tpa\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}            *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02761}02761               \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}         *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02762}02762               uint16\_t                    queue,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02763}02763               uint16\_t                    cons,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02764}02764               uint16\_t                    prod,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02765}02765               \textcolor{keyword}{struct} \mbox{\hyperlink{structeth__fast__path__rx__cqe}{eth\_fast\_path\_rx\_cqe}} *cqe)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02766}02766 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02767}02767     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__rx__bd}{bxe\_sw\_rx\_bd}} tmp\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02768}02768     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__rx__bd}{bxe\_sw\_rx\_bd}} *rx\_buf;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02769}02769     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__bd}{eth\_rx\_bd}} *rx\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02770}02770     \textcolor{keywordtype}{int} max\_agg\_queues \_\_diagused;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02771}02771     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__tpa__info}{bxe\_sw\_tpa\_info}} *tpa\_info = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[queue];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02772}02772     uint16\_t index;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02773}02773 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02774}02774     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a45ab3ab16f10dd36fd68fff8559bd291}{DBG\_LRO}}, \textcolor{stringliteral}{"{}fp[\%02d].tpa[\%02d] TPA START "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02775}02775                        \textcolor{stringliteral}{"{}cons=\%d prod=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02776}02776           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue, cons, prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02777}02777 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02778}02778     max\_agg\_queues = \mbox{\hyperlink{bxe_8h_a17145ba166c4c2e66d36460bbc2e2992}{MAX\_AGG\_QS}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02779}02779 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02780}02780     KASSERT((queue < max\_agg\_queues),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02781}02781             (\textcolor{stringliteral}{"{}fp[\%02d] invalid aggr queue (\%d >= \%d)!"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02782}02782              fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue, max\_agg\_queues));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02783}02783 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02784}02784     KASSERT((tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a0c6ae08d44f0bfc9bca2e1ad1b759bf0}{state}} == \mbox{\hyperlink{bxe_8h_a7427aadfd79787081532943317c21008}{BXE\_TPA\_STATE\_STOP}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02785}02785             (\textcolor{stringliteral}{"{}fp[\%02d].tpa[\%02d] starting aggr on queue not stopped!"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02786}02786              fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02787}02787 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02788}02788     \textcolor{comment}{/* copy the existing mbuf and mapping from the TPA pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02789}02789     tmp\_bd = tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02790}02790 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02791}02791     \textcolor{keywordflow}{if} (tmp\_bd.\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02792}02792         uint32\_t *tmp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02793}02793 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02794}02794         tmp = (uint32\_t *)cqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02795}02795 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02796}02796         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}fp[\%02d].tpa[\%02d] cons[\%d] prod[\%d]mbuf not allocated!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02797}02797               fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue, cons, prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02798}02798         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}cqe [0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x]\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02799}02799             *tmp, *(tmp+1), *(tmp+2), *(tmp+3), *(tmp+4), *(tmp+5), *(tmp+6), *(tmp+7)); }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02800}02800             }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02801}02801         \textcolor{comment}{/* XXX Error handling? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02802}02802         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02803}02803     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02804}02804 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02805}02805     \textcolor{comment}{/* change the TPA queue to the start state */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02806}02806     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a0c6ae08d44f0bfc9bca2e1ad1b759bf0}{state}}            = \mbox{\hyperlink{bxe_8h_aecdf9746833b5ad135c9c047ed427a14}{BXE\_TPA\_STATE\_START}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02807}02807     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a5c8a748aeefdac1c8d57d8e3690f2961}{placement\_offset}} = cqe-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_adf666d42006477865fd3c92b2cce743f}{placement\_offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02808}02808     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_acc28f2986ec8d9e54ea03e24b5804272}{parsing\_flags}}    = le16toh(cqe-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a9a177c44e17706beb08d3f8eb9c14bb9}{pars\_flags}}.\mbox{\hyperlink{structparsing__flags_a8c52cd82c1ded84b7be7cb99abf36860}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02809}02809     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a5e79f651bd76d3ce0ae55208ae57153f}{vlan\_tag}}         = le16toh(cqe-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a1a13fed70b0223a4a4062dde9e3021a4}{vlan\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02810}02810     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a42e4e681461791b05b2d94a017916372}{len\_on\_bd}}        = le16toh(cqe-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a0a2ad4c0f4003d2dda38448c2c1e87a9}{len\_on\_bd}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02811}02811 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02812}02812     fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae63b6b31ee4b7cb632c9a164ae2441df}{rx\_tpa\_queue\_used}} |= (1 << queue);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02813}02813 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02814}02814     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02815}02815 \textcolor{comment}{     * If all the buffer descriptors are filled with mbufs then fill in}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02816}02816 \textcolor{comment}{     * the current consumer index with a new BD. Else if a maximum Rx}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02817}02817 \textcolor{comment}{     * buffer limit is imposed then fill in the next producer index.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02818}02818 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02819}02819     index = (sc-\/>\mbox{\hyperlink{structbxe__softc_ac7d7c8445e3a1ea0072269753b635864}{max\_rx\_bufs}} != \mbox{\hyperlink{bxe_8h_a542fc7a39e64042f0b11c0238b5f9afd}{RX\_BD\_USABLE}}) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02820}02820                 prod : cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02821}02821 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02822}02822     \textcolor{comment}{/* move the received mbuf and mapping to TPA pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02823}02823     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[cons];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02824}02824 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02825}02825     \textcolor{comment}{/* release any existing RX BD mbuf mappings */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02826}02826     \textcolor{keywordflow}{if} (cons != index) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02827}02827         rx\_buf = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[cons];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02828}02828 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02829}02829         \textcolor{keywordflow}{if} (rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02830}02830             bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02831}02831                             BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02832}02832             bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02833}02833         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02834}02834 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02835}02835         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02836}02836 \textcolor{comment}{         * We get here when the maximum number of rx buffers is less than}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02837}02837 \textcolor{comment}{         * RX\_BD\_USABLE. The mbuf is already saved above so it's OK to NULL}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02838}02838 \textcolor{comment}{         * it out here without concern of a memory leak.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02839}02839 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02840}02840         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[cons].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02841}02841     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02842}02842 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02843}02843     \textcolor{comment}{/* update the Rx SW BD with the mbuf info from the TPA pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02844}02844     fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[index] = tmp\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02845}02845 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02846}02846     \textcolor{comment}{/* update the Rx BD with the empty mbuf phys address from the TPA pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02847}02847     rx\_bd = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb66bb2f7c9693cb39c166a9d032cb8e}{rx\_chain}}[index];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02848}02848     rx\_bd-\/>\mbox{\hyperlink{structeth__rx__bd_a6e57abf13f85b64d3112934b9381ebb1}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a7914f5245c8846cda23c548f6b628e4c}{seg}}.ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02849}02849     rx\_bd-\/>\mbox{\hyperlink{structeth__rx__bd_a3eeb582177d310625e629c2e85528f8e}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a7914f5245c8846cda23c548f6b628e4c}{seg}}.ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02850}02850 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02851}02851 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02852}02852 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02853}02853 \textcolor{comment}{ * When a TPA aggregation is completed, loop through the individual mbufs}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02854}02854 \textcolor{comment}{ * of the aggregation, combining them into a single mbuf which will be sent}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02855}02855 \textcolor{comment}{ * up the stack. Refill all freed SGEs with mbufs as we go along.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02856}02856 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02857}02857 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02858}\mbox{\hyperlink{bxe_8c_a1a6e9bfef5b560cd0817eba9b7f073f7}{02858}} \mbox{\hyperlink{bxe_8c_a1a6e9bfef5b560cd0817eba9b7f073f7}{bxe\_fill\_frag\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}          *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02859}02859                    \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}       *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02860}02860                    \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__sw__tpa__info}{bxe\_sw\_tpa\_info}}    *tpa\_info,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02861}02861                    uint16\_t                  queue,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02862}02862                    uint16\_t                  pages,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02863}02863                    \textcolor{keyword}{struct} mbuf               *m,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02864}02864                                \textcolor{keyword}{struct} \mbox{\hyperlink{structeth__end__agg__rx__cqe}{eth\_end\_agg\_rx\_cqe}} *cqe,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02865}02865                    uint16\_t                  cqe\_idx)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02866}02866 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02867}02867     \textcolor{keyword}{struct }mbuf *m\_frag;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02868}02868     uint32\_t frag\_len, frag\_size, i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02869}02869     uint16\_t sge\_idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02870}02870     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02871}02871     \textcolor{keywordtype}{int} j;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02872}02872 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02873}02873     frag\_size = le16toh(cqe-\/>\mbox{\hyperlink{structeth__end__agg__rx__cqe_aa043b75626004ba89f8557bee1cfcb41}{pkt\_len}}) -\/ tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a42e4e681461791b05b2d94a017916372}{len\_on\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02874}02874 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02875}02875     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a45ab3ab16f10dd36fd68fff8559bd291}{DBG\_LRO}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02876}02876           \textcolor{stringliteral}{"{}fp[\%02d].tpa[\%02d] TPA fill len\_on\_bd=\%d frag\_size=\%d pages=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02877}02877           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue, tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a42e4e681461791b05b2d94a017916372}{len\_on\_bd}}, frag\_size, pages);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02878}02878 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02879}02879     \textcolor{comment}{/* make sure the aggregated frame is not too big to handle */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02880}02880     \textcolor{keywordflow}{if} (pages > 8 * \mbox{\hyperlink{bxe_8h_ac72d5e4b9829f5522271eedead1a2188}{PAGES\_PER\_SGE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02881}02881 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02882}02882         uint32\_t *tmp = (uint32\_t *)cqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02883}02883 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02884}02884         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}fp[\%02d].sge[0x\%04x] has too many pages (\%d)! "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02885}02885                   \textcolor{stringliteral}{"{}pkt\_len=\%d len\_on\_bd=\%d frag\_size=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02886}02886               fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, cqe\_idx, pages, le16toh(cqe-\/>\mbox{\hyperlink{structeth__end__agg__rx__cqe_aa043b75626004ba89f8557bee1cfcb41}{pkt\_len}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02887}02887               tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a42e4e681461791b05b2d94a017916372}{len\_on\_bd}}, frag\_size);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02888}02888 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02889}02889         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}cqe [0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x]\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02890}02890             *tmp, *(tmp+1), *(tmp+2), *(tmp+3), *(tmp+4), *(tmp+5), *(tmp+6), *(tmp+7)); }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02891}02891 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02892}02892         \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(sc, (\textcolor{stringliteral}{"{}sge page count error\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02893}02893         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02894}02894     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02895}02895 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02896}02896     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02897}02897 \textcolor{comment}{     * Scan through the scatter gather list pulling individual mbufs into a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02898}02898 \textcolor{comment}{     * single mbuf for the host stack.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02899}02899 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02900}02900     \textcolor{keywordflow}{for} (i = 0, j = 0; i < pages; i += \mbox{\hyperlink{bxe_8h_ac72d5e4b9829f5522271eedead1a2188}{PAGES\_PER\_SGE}}, j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02901}02901         sge\_idx = \mbox{\hyperlink{bxe_8h_a3888b0d7b8e591a1df5197ac64e24b6f}{RX\_SGE}}(le16toh(cqe-\/>\mbox{\hyperlink{structeth__end__agg__rx__cqe_aec277f76f9d0cbbacb53515433927313}{sgl\_or\_raw\_data}}.\mbox{\hyperlink{unioneth__sgl__or__raw__data_ad1064049e94fb0774f92db9fa3a78469}{sgl}}[j]));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02902}02902 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02903}02903         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02904}02904 \textcolor{comment}{         * Firmware gives the indices of the SGE as if the ring is an array}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02905}02905 \textcolor{comment}{         * (meaning that the "{}next"{} element will consume 2 indices).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02906}02906 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02907}02907         frag\_len = min(frag\_size, (uint32\_t)(\mbox{\hyperlink{bxe_8h_a5f4f8dc18d06a9f33459f216d7e915bf}{SGE\_PAGES}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02908}02908 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02909}02909         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a45ab3ab16f10dd36fd68fff8559bd291}{DBG\_LRO}}, \textcolor{stringliteral}{"{}fp[\%02d].tpa[\%02d] TPA fill i=\%d j=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02910}02910                            \textcolor{stringliteral}{"{}sge\_idx=\%d frag\_size=\%d frag\_len=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02911}02911               fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue, i, j, sge\_idx, frag\_size, frag\_len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02912}02912 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02913}02913         m\_frag = fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[sge\_idx].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02914}02914 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02915}02915         \textcolor{comment}{/* allocate a new mbuf for the SGE */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02916}02916         rc = \mbox{\hyperlink{bxe_8c_a81c63cb0393f95e2bb71c860433432b8}{bxe\_alloc\_rx\_sge\_mbuf}}(fp, sge\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02917}02917         \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02918}02918             \textcolor{comment}{/* Leave all remaining SGEs in the ring! */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02919}02919             \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02920}02920         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02921}02921 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02922}02922         \textcolor{comment}{/* update the fragment length */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02923}02923         m\_frag-\/>m\_len = frag\_len;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02924}02924 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02925}02925         \textcolor{comment}{/* concatenate the fragment to the head mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02926}02926         m\_cat(m, m\_frag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02927}02927         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aab8bdd1587f71f69f2a7144f4fd2ad51}{mbuf\_alloc\_sge}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02928}02928 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02929}02929         \textcolor{comment}{/* update the TPA mbuf size and remaining fragment size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02930}02930         m-\/>m\_pkthdr.len += frag\_len;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02931}02931         frag\_size -\/= frag\_len;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02932}02932     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02933}02933 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02934}02934     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a45ab3ab16f10dd36fd68fff8559bd291}{DBG\_LRO}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02935}02935           \textcolor{stringliteral}{"{}fp[\%02d].tpa[\%02d] TPA fill done frag\_size=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02936}02936           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue, frag\_size);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02937}02937 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02938}02938     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02939}02939 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02940}02940 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02941}02941 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02942}\mbox{\hyperlink{bxe_8c_ab749a3962ca2049dec5d91b7671b163f}{02942}} \mbox{\hyperlink{bxe_8c_ab749a3962ca2049dec5d91b7671b163f}{bxe\_clear\_sge\_mask\_next\_elems}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02943}02943 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02944}02944     \textcolor{keywordtype}{int} i, j;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02945}02945 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02946}02946     \textcolor{keywordflow}{for} (i = 1; i <= \mbox{\hyperlink{bxe_8h_ae9875871c72b8147f3bc813b2368db08}{RX\_SGE\_NUM\_PAGES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02947}02947         \textcolor{keywordtype}{int} idx = \mbox{\hyperlink{bxe_8h_a20f417d9e85ef77ceaaf6b4f3d286fae}{RX\_SGE\_TOTAL\_PER\_PAGE}} * i -\/ 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02948}02948 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02949}02949         \textcolor{keywordflow}{for} (j = 0; j < 2; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02950}02950             \mbox{\hyperlink{ecore__sp_8h_a02a78483d3d2dc6fd6c977e57069e04a}{BIT\_VEC64\_CLEAR\_BIT}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7743e2764d5a1c45bfe5fc891ba1f54d}{sge\_mask}}, idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02951}02951             idx-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02952}02952         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02953}02953     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02954}02954 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02955}02955 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02956}02956 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02957}\mbox{\hyperlink{bxe_8c_ad4c8ebfd9442c6248ba2601f4b64319f}{02957}} \mbox{\hyperlink{bxe_8c_ad4c8ebfd9442c6248ba2601f4b64319f}{bxe\_init\_sge\_ring\_bit\_mask}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02958}02958 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02959}02959     \textcolor{comment}{/* set the mask to all 1's, it's faster to compare to 0 than to 0xf's */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02960}02960     memset(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7743e2764d5a1c45bfe5fc891ba1f54d}{sge\_mask}}, 0xff, \textcolor{keyword}{sizeof}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7743e2764d5a1c45bfe5fc891ba1f54d}{sge\_mask}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02961}02961 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02962}02962     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02963}02963 \textcolor{comment}{     * Clear the two last indices in the page to 1. These are the indices that}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02964}02964 \textcolor{comment}{     * correspond to the "{}next"{} element, hence will never be indicated and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02965}02965 \textcolor{comment}{     * should be removed from the calculations.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02966}02966 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02967}02967     \mbox{\hyperlink{bxe_8c_ab749a3962ca2049dec5d91b7671b163f}{bxe\_clear\_sge\_mask\_next\_elems}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02968}02968 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02969}02969 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02970}02970 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02971}\mbox{\hyperlink{bxe_8c_ad4361f1c36f1cbe6393801e2d9ceed3d}{02971}} \mbox{\hyperlink{bxe_8c_ad4361f1c36f1cbe6393801e2d9ceed3d}{bxe\_update\_last\_max\_sge}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02972}02972                         uint16\_t            idx)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02973}02973 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02974}02974     uint16\_t last\_max = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9ac0825dbf39ebf8f295f2ff2ece2930}{last\_max\_sge}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02975}02975 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02976}02976     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a55d48e34713ab62249ad5b67d508162f}{SUB\_S16}}(idx, last\_max) > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02977}02977         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9ac0825dbf39ebf8f295f2ff2ece2930}{last\_max\_sge}} = idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02978}02978     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02979}02979 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02980}02980 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02981}02981 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02982}\mbox{\hyperlink{bxe_8c_a065eacc30d99982881d6680246b7939e}{02982}} \mbox{\hyperlink{bxe_8c_a065eacc30d99982881d6680246b7939e}{bxe\_update\_sge\_prod}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}          *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02983}02983                     \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}       *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02984}02984                     uint16\_t                  sge\_len,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02985}02985                     \textcolor{keyword}{union} \mbox{\hyperlink{unioneth__sgl__or__raw__data}{eth\_sgl\_or\_raw\_data}} *cqe)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02986}02986 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02987}02987     uint16\_t last\_max, last\_elem, first\_elem;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02988}02988     uint16\_t delta = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02989}02989     uint16\_t i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02990}02990 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02991}02991     \textcolor{keywordflow}{if} (!sge\_len) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02992}02992         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02993}02993     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02994}02994 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02995}02995     \textcolor{comment}{/* first mark all used pages */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02996}02996     \textcolor{keywordflow}{for} (i = 0; i < sge\_len; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02997}02997         \mbox{\hyperlink{ecore__sp_8h_a02a78483d3d2dc6fd6c977e57069e04a}{BIT\_VEC64\_CLEAR\_BIT}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7743e2764d5a1c45bfe5fc891ba1f54d}{sge\_mask}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02998}02998                             \mbox{\hyperlink{bxe_8h_a3888b0d7b8e591a1df5197ac64e24b6f}{RX\_SGE}}(le16toh(cqe-\/>\mbox{\hyperlink{unioneth__sgl__or__raw__data_ad1064049e94fb0774f92db9fa3a78469}{sgl}}[i])));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l02999}02999     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03000}03000 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03001}03001     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a45ab3ab16f10dd36fd68fff8559bd291}{DBG\_LRO}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03002}03002           \textcolor{stringliteral}{"{}fp[\%02d] fp\_cqe-\/>sgl[\%d] = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03003}03003           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, sge\_len -\/ 1,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03004}03004           le16toh(cqe-\/>\mbox{\hyperlink{unioneth__sgl__or__raw__data_ad1064049e94fb0774f92db9fa3a78469}{sgl}}[sge\_len -\/ 1]));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03005}03005 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03006}03006     \textcolor{comment}{/* assume that the last SGE index is the biggest */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03007}03007     \mbox{\hyperlink{bxe_8c_ad4361f1c36f1cbe6393801e2d9ceed3d}{bxe\_update\_last\_max\_sge}}(fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03008}03008                             le16toh(cqe-\/>\mbox{\hyperlink{unioneth__sgl__or__raw__data_ad1064049e94fb0774f92db9fa3a78469}{sgl}}[sge\_len -\/ 1]));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03009}03009 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03010}03010     last\_max = \mbox{\hyperlink{bxe_8h_a3888b0d7b8e591a1df5197ac64e24b6f}{RX\_SGE}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9ac0825dbf39ebf8f295f2ff2ece2930}{last\_max\_sge}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03011}03011     last\_elem = last\_max >> \mbox{\hyperlink{ecore__sp_8h_acf97f109bcef4a0de65e1a44b439d584}{BIT\_VEC64\_ELEM\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03012}03012     first\_elem = \mbox{\hyperlink{bxe_8h_a3888b0d7b8e591a1df5197ac64e24b6f}{RX\_SGE}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aea87649aeabb6bdea13f1275511fd6c9}{rx\_sge\_prod}}) >> \mbox{\hyperlink{ecore__sp_8h_acf97f109bcef4a0de65e1a44b439d584}{BIT\_VEC64\_ELEM\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03013}03013 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03014}03014     \textcolor{comment}{/* if ring is not full */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03015}03015     \textcolor{keywordflow}{if} (last\_elem + 1 != first\_elem) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03016}03016         last\_elem++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03017}03017     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03018}03018 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03019}03019     \textcolor{comment}{/* now update the prod */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03020}03020     \textcolor{keywordflow}{for} (i = first\_elem; i != last\_elem; i = \mbox{\hyperlink{bxe_8h_a4596aaf2426c7b95283346657001f32d}{RX\_SGE\_NEXT\_MASK\_ELEM}}(i)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03021}03021         \textcolor{keywordflow}{if} (\_\_predict\_true(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7743e2764d5a1c45bfe5fc891ba1f54d}{sge\_mask}}[i])) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03022}03022             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03023}03023         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03024}03024 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03025}03025         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7743e2764d5a1c45bfe5fc891ba1f54d}{sge\_mask}}[i] = \mbox{\hyperlink{ecore__sp_8h_a1d2dbf32775f16136c38f831c637f957}{BIT\_VEC64\_ELEM\_ONE\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03026}03026         delta += \mbox{\hyperlink{ecore__sp_8h_ac5b80b4e6acbf1d67c71be9e9f7ba99a}{BIT\_VEC64\_ELEM\_SZ}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03027}03027     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03028}03028 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03029}03029     \textcolor{keywordflow}{if} (delta > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03030}03030         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aea87649aeabb6bdea13f1275511fd6c9}{rx\_sge\_prod}} += delta;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03031}03031         \textcolor{comment}{/* clear page-\/end entries */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03032}03032         \mbox{\hyperlink{bxe_8c_ab749a3962ca2049dec5d91b7671b163f}{bxe\_clear\_sge\_mask\_next\_elems}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03033}03033     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03034}03034 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03035}03035     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a45ab3ab16f10dd36fd68fff8559bd291}{DBG\_LRO}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03036}03036           \textcolor{stringliteral}{"{}fp[\%02d] fp-\/>last\_max\_sge=\%d fp-\/>rx\_sge\_prod=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03037}03037           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9ac0825dbf39ebf8f295f2ff2ece2930}{last\_max\_sge}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aea87649aeabb6bdea13f1275511fd6c9}{rx\_sge\_prod}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03038}03038 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03039}03039 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03040}03040 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03041}03041 \textcolor{comment}{ * The aggregation on the current TPA queue has completed. Pull the individual}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03042}03042 \textcolor{comment}{ * mbuf fragments together into a single mbuf, perform all necessary checksum}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03043}03043 \textcolor{comment}{ * calculations, and send the resuting mbuf to the stack.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03044}03044 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03045}03045 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03046}\mbox{\hyperlink{bxe_8c_a6760fb0168f0426948936b354ea4c07b}{03046}} \mbox{\hyperlink{bxe_8c_a6760fb0168f0426948936b354ea4c07b}{bxe\_tpa\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}          *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03047}03047              \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}       *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03048}03048              \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__sw__tpa__info}{bxe\_sw\_tpa\_info}}    *tpa\_info,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03049}03049              uint16\_t                  queue,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03050}03050              uint16\_t                  pages,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03051}03051                          \textcolor{keyword}{struct} \mbox{\hyperlink{structeth__end__agg__rx__cqe}{eth\_end\_agg\_rx\_cqe}} *cqe,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03052}03052              uint16\_t                  cqe\_idx)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03053}03053 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03054}03054     if\_t ifp = sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03055}03055     \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03056}03056     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03057}03057 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03058}03058     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a45ab3ab16f10dd36fd68fff8559bd291}{DBG\_LRO}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03059}03059           \textcolor{stringliteral}{"{}fp[\%02d].tpa[\%02d] pad=\%d pkt\_len=\%d pages=\%d vlan=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03060}03060           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue, tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a5c8a748aeefdac1c8d57d8e3690f2961}{placement\_offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03061}03061           le16toh(cqe-\/>\mbox{\hyperlink{structeth__end__agg__rx__cqe_aa043b75626004ba89f8557bee1cfcb41}{pkt\_len}}), pages, tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a5e79f651bd76d3ce0ae55208ae57153f}{vlan\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03062}03062 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03063}03063     m = tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03064}03064 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03065}03065     \textcolor{comment}{/* allocate a replacement before modifying existing mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03066}03066     rc = \mbox{\hyperlink{bxe_8c_a86a1707104c8fa67ce5e393b9e4b1c4c}{bxe\_alloc\_rx\_tpa\_mbuf}}(fp, queue);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03067}03067     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03068}03068         \textcolor{comment}{/* drop the frame and log an error */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03069}03069         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_ac2d839213389287bb6457fe6d925e7d5}{rx\_soft\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03070}03070         \textcolor{keywordflow}{goto} bxe\_tpa\_stop\_exit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03071}03071     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03072}03072 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03073}03073     \textcolor{comment}{/* we have a replacement, fixup the current mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03074}03074     m\_adj(m, tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a5c8a748aeefdac1c8d57d8e3690f2961}{placement\_offset}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03075}03075     m-\/>m\_pkthdr.len = m-\/>m\_len = tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a42e4e681461791b05b2d94a017916372}{len\_on\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03076}03076 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03077}03077     \textcolor{comment}{/* mark the checksums valid (taken care of by the firmware) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03078}03078     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a8a37382f0650db3faf0fde076f92af6c}{rx\_ofld\_frames\_csum\_ip}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03079}03079     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a003a01f8669d1c1ab9024fafe8f745ee}{rx\_ofld\_frames\_csum\_tcp\_udp}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03080}03080     m-\/>m\_pkthdr.csum\_data = 0xffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03081}03081     m-\/>m\_pkthdr.csum\_flags |= (CSUM\_IP\_CHECKED |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03082}03082                                CSUM\_IP\_VALID   |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03083}03083                                CSUM\_DATA\_VALID |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03084}03084                                CSUM\_PSEUDO\_HDR);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03085}03085 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03086}03086     \textcolor{comment}{/* aggregate all of the SGEs into a single mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03087}03087     rc = \mbox{\hyperlink{bxe_8c_a1a6e9bfef5b560cd0817eba9b7f073f7}{bxe\_fill\_frag\_mbuf}}(sc, fp, tpa\_info, queue, pages, m, cqe, cqe\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03088}03088     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03089}03089         \textcolor{comment}{/* drop the packet and log an error */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03090}03090         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_ac2d839213389287bb6457fe6d925e7d5}{rx\_soft\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03091}03091         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03092}03092     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03093}03093         \textcolor{keywordflow}{if} (tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_acc28f2986ec8d9e54ea03e24b5804272}{parsing\_flags}} \& \mbox{\hyperlink{ecore__hsi_8h_aa9fca4fb8a6c7c0cb9bc27158d82c007}{PARSING\_FLAGS\_INNER\_VLAN\_EXIST}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03094}03094             m-\/>m\_pkthdr.ether\_vtag = tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a5e79f651bd76d3ce0ae55208ae57153f}{vlan\_tag}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03095}03095             m-\/>m\_flags |= M\_VLANTAG;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03096}03096         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03097}03097 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03098}03098         \textcolor{comment}{/* assign packet to this interface interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03099}03099         if\_setrcvif(m, ifp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03100}03100 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03101}03101         \textcolor{comment}{/* specify what RSS queue was used for this flow */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03102}03102         m-\/>m\_pkthdr.flowid = fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03103}03103         \mbox{\hyperlink{bxe_8h_af28f1894ac29f547e70320fa4de602fb}{BXE\_SET\_FLOWID}}(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03104}03104 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03105}03105         if\_inc\_counter(ifp, IFCOUNTER\_IPACKETS, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03106}03106         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_af2eff062fa35ac9961c5cacd33b512c7}{rx\_tpa\_pkts}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03107}03107 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03108}03108         \textcolor{comment}{/* pass the frame to the stack */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03109}03109         if\_input(ifp, m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03110}03110     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03111}03111 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03112}03112     \textcolor{comment}{/* we passed an mbuf up the stack or dropped the frame */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03113}03113     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a79b8e7bd9f431a24e6f0c7e39c0a91e9}{mbuf\_alloc\_tpa}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03114}03114 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03115}03115 bxe\_tpa\_stop\_exit:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03116}03116 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03117}03117     fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[queue].\mbox{\hyperlink{structbxe__sw__tpa__info_a0c6ae08d44f0bfc9bca2e1ad1b759bf0}{state}} = \mbox{\hyperlink{bxe_8h_a7427aadfd79787081532943317c21008}{BXE\_TPA\_STATE\_STOP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03118}03118     fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae63b6b31ee4b7cb632c9a164ae2441df}{rx\_tpa\_queue\_used}} \&= \string~(1 << queue);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03119}03119 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03120}03120 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03121}03121 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03122}\mbox{\hyperlink{bxe_8c_aecd83befece019df882401f1fe70f96e}{03122}} \mbox{\hyperlink{bxe_8c_aecd83befece019df882401f1fe70f96e}{bxe\_service\_rxsgl}}(}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03123}03123                  \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03124}03124                  uint16\_t len,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03125}03125                  uint16\_t lenonbd,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03126}03126                  \textcolor{keyword}{struct} mbuf *m,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03127}03127                  \textcolor{keyword}{struct} \mbox{\hyperlink{structeth__fast__path__rx__cqe}{eth\_fast\_path\_rx\_cqe}} *cqe\_fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03128}03128 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03129}03129     \textcolor{keyword}{struct }mbuf *m\_frag;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03130}03130     uint16\_t frags, frag\_len;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03131}03131     uint16\_t sge\_idx = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03132}03132     uint16\_t j;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03133}03133     uint8\_t i, rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03134}03134     uint32\_t frag\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03135}03135 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03136}03136     \textcolor{comment}{/* adjust the mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03137}03137     m-\/>m\_len = lenonbd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03138}03138 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03139}03139     frag\_size =  len -\/ lenonbd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03140}03140     frags = \mbox{\hyperlink{bxe_8h_a635b2aaba996564912a54637018dced9}{SGE\_PAGE\_ALIGN}}(frag\_size) >> \mbox{\hyperlink{bxe_8h_a44e17214a6a71a4a75413a4774cec965}{SGE\_PAGE\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03141}03141 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03142}03142     \textcolor{keywordflow}{for} (i = 0, j = 0; i < frags; i += \mbox{\hyperlink{bxe_8h_ac72d5e4b9829f5522271eedead1a2188}{PAGES\_PER\_SGE}}, j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03143}03143         sge\_idx = \mbox{\hyperlink{bxe_8h_a3888b0d7b8e591a1df5197ac64e24b6f}{RX\_SGE}}(le16toh(cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a0d22826e5cb29ecdaff6715d7bf7495a}{sgl\_or\_raw\_data}}.\mbox{\hyperlink{unioneth__sgl__or__raw__data_ad1064049e94fb0774f92db9fa3a78469}{sgl}}[j]));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03144}03144 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03145}03145         m\_frag = fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[sge\_idx].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03146}03146         frag\_len = min(frag\_size, (uint32\_t)(\mbox{\hyperlink{bxe_8h_a15377a31935aabe5f70cb3f06f700a6a}{SGE\_PAGE\_SIZE}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03147}03147         m\_frag-\/>m\_len = frag\_len;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03148}03148 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03149}03149        \textcolor{comment}{/* allocate a new mbuf for the SGE */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03150}03150         rc = \mbox{\hyperlink{bxe_8c_a81c63cb0393f95e2bb71c860433432b8}{bxe\_alloc\_rx\_sge\_mbuf}}(fp, sge\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03151}03151         \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03152}03152             \textcolor{comment}{/* Leave all remaining SGEs in the ring! */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03153}03153             \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03154}03154         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03155}03155         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aab8bdd1587f71f69f2a7144f4fd2ad51}{mbuf\_alloc\_sge}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03156}03156 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03157}03157         \textcolor{comment}{/* concatenate the fragment to the head mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03158}03158         m\_cat(m, m\_frag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03159}03159 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03160}03160         frag\_size -\/= frag\_len;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03161}03161     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03162}03162 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03163}03163     \mbox{\hyperlink{bxe_8c_a065eacc30d99982881d6680246b7939e}{bxe\_update\_sge\_prod}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, fp, frags, \&cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a0d22826e5cb29ecdaff6715d7bf7495a}{sgl\_or\_raw\_data}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03164}03164 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03165}03165     \textcolor{keywordflow}{return} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03166}03166 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03167}03167 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03168}03168 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03169}\mbox{\hyperlink{bxe_8c_a686ef9c83cbbe9b76a38c5c8cd87bd7c}{03169}} \mbox{\hyperlink{bxe_8c_a686ef9c83cbbe9b76a38c5c8cd87bd7c}{bxe\_rxeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03170}03170           \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03171}03171 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03172}03172     if\_t ifp = sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03173}03173     uint16\_t bd\_cons, bd\_prod, bd\_prod\_fw, comp\_ring\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03174}03174     uint16\_t hw\_cq\_cons, sw\_cq\_cons, sw\_cq\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03175}03175     \textcolor{keywordtype}{int} rx\_pkts = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03176}03176     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03177}03177 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03178}03178     \mbox{\hyperlink{bxe_8h_aa18c9a86d6e0d006724fa6d0de6bd804}{BXE\_FP\_RX\_LOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03179}03179 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03180}03180     \textcolor{comment}{/* CQ "{}next element"{} is of the size of the regular element */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03181}03181     hw\_cq\_cons = le16toh(*fp-\/>\mbox{\hyperlink{structbxe__fastpath_a56f3586de2bf71291d0838302f3fa7f1}{rx\_cq\_cons\_sb}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03182}03182     \textcolor{keywordflow}{if} ((hw\_cq\_cons \& \mbox{\hyperlink{bxe_8h_a3c399ab6abb015789ca49f721e3c5bf9}{RCQ\_USABLE\_PER\_PAGE}}) == \mbox{\hyperlink{bxe_8h_a3c399ab6abb015789ca49f721e3c5bf9}{RCQ\_USABLE\_PER\_PAGE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03183}03183         hw\_cq\_cons++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03184}03184     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03185}03185 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03186}03186     bd\_cons = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9346adab23e93ce551b7c5b268c1555d}{rx\_bd\_cons}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03187}03187     bd\_prod = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2f3c58fb77796cd02e02122b4434bf32}{rx\_bd\_prod}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03188}03188     bd\_prod\_fw = bd\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03189}03189     sw\_cq\_cons = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a00695efc5a0133b38e31029734b86646}{rx\_cq\_cons}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03190}03190     sw\_cq\_prod = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a94d71948ebaf04ecea42ac112f73f613}{rx\_cq\_prod}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03191}03191 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03192}03192     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03193}03193 \textcolor{comment}{     * Memory barrier necessary as speculative reads of the rx}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03194}03194 \textcolor{comment}{     * buffer can be ahead of the index in the status block}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03195}03195 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03196}03196     rmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03197}03197 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03198}03198     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a4085ac592bcc72cb40bc07e4387b48a1}{DBG\_RX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03199}03199           \textcolor{stringliteral}{"{}fp[\%02d] Rx START hw\_cq\_cons=\%u sw\_cq\_cons=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03200}03200           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, hw\_cq\_cons, sw\_cq\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03201}03201 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03202}03202     \textcolor{keywordflow}{while} (sw\_cq\_cons != hw\_cq\_cons) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03203}03203         \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__rx__bd}{bxe\_sw\_rx\_bd}} *rx\_buf = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03204}03204         \textcolor{keyword}{union }\mbox{\hyperlink{unioneth__rx__cqe}{eth\_rx\_cqe}} *cqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03205}03205         \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__fast__path__rx__cqe}{eth\_fast\_path\_rx\_cqe}} *cqe\_fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03206}03206         uint8\_t cqe\_fp\_flags;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03207}03207         \textcolor{keyword}{enum} \mbox{\hyperlink{ecore__hsi_8h_ab68784c683943ad0edada6a20a67f8fc}{eth\_rx\_cqe\_type}} cqe\_fp\_type;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03208}03208         uint16\_t len, lenonbd,  pad;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03209}03209         \textcolor{keyword}{struct }mbuf *m = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03210}03210 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03211}03211         comp\_ring\_cons = \mbox{\hyperlink{bxe_8h_a521d328763fd65b535bc74ac294f5f89}{RCQ}}(sw\_cq\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03212}03212         bd\_prod = \mbox{\hyperlink{bxe_8h_a93333067a53d329a76fb1fe16af83319}{RX\_BD}}(bd\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03213}03213         bd\_cons = \mbox{\hyperlink{bxe_8h_a93333067a53d329a76fb1fe16af83319}{RX\_BD}}(bd\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03214}03214 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03215}03215         cqe          = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1a2b72fa0b868a8f030725885ab2cb2a}{rcq\_chain}}[comp\_ring\_cons];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03216}03216         cqe\_fp       = \&cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a65983d953305bb458fd44260e7cc9c5d}{fast\_path\_cqe}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03217}03217         cqe\_fp\_flags = cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a3686ea8aabf9a423ff3a5f764a0b263b}{type\_error\_flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03218}03218         cqe\_fp\_type  = cqe\_fp\_flags \& \mbox{\hyperlink{ecore__hsi_8h_a7e34b26f893970bc50cf8e2736a3fb7f}{ETH\_FAST\_PATH\_RX\_CQE\_TYPE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03219}03219 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03220}03220         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a4085ac592bcc72cb40bc07e4387b48a1}{DBG\_RX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03221}03221               \textcolor{stringliteral}{"{}fp[\%02d] Rx hw\_cq\_cons=\%d hw\_sw\_cons=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03222}03222               \textcolor{stringliteral}{"{}BD prod=\%d cons=\%d CQE type=0x\%x err=0x\%x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03223}03223               \textcolor{stringliteral}{"{}status=0x\%x rss\_hash=0x\%x vlan=0x\%x len=\%u lenonbd=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03224}03224               fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03225}03225               hw\_cq\_cons,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03226}03226               sw\_cq\_cons,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03227}03227               bd\_prod,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03228}03228               bd\_cons,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03229}03229               \mbox{\hyperlink{bxe_8h_adc501d30b6db81bae0fda1a286055189}{CQE\_TYPE}}(cqe\_fp\_flags),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03230}03230               cqe\_fp\_flags,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03231}03231               cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_ae8d051b8906426af6bec7311c9fb9115}{status\_flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03232}03232               le32toh(cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_abaacbaf99c5e451b5f3bf4bd2cc920c6}{rss\_hash\_result}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03233}03233               le16toh(cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a1a13fed70b0223a4a4062dde9e3021a4}{vlan\_tag}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03234}03234               le16toh(cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a036833e286a762d353f99c890fd1448a}{pkt\_len\_or\_gro\_seg\_len}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03235}03235               le16toh(cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a0a2ad4c0f4003d2dda38448c2c1e87a9}{len\_on\_bd}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03236}03236 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03237}03237         \textcolor{comment}{/* is this a slowpath msg? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03238}03238         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{bxe_8h_af1f278a22cdceb611b9694d196e5cdb1}{CQE\_TYPE\_SLOW}}(cqe\_fp\_type))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03239}03239             \mbox{\hyperlink{bxe_8c_a6de8a6b47d64a51d7c6fb70a73192347}{bxe\_sp\_event}}(sc, fp, cqe);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03240}03240             \textcolor{keywordflow}{goto} next\_cqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03241}03241         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03242}03242 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03243}03243         rx\_buf = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[bd\_cons];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03244}03244 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03245}03245         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_af21bc8edb1511d88e3204500f48bfe42}{CQE\_TYPE\_FAST}}(cqe\_fp\_type)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03246}03246             \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__tpa__info}{bxe\_sw\_tpa\_info}} *tpa\_info;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03247}03247             uint16\_t frag\_size, pages;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03248}03248             uint8\_t queue;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03249}03249 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03250}03250             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a054b178e68cdf1e02983eae7f3351299}{CQE\_TYPE\_START}}(cqe\_fp\_type)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03251}03251                 \mbox{\hyperlink{bxe_8c_aba1e4dbcf97c1c35911c79f7bffc6752}{bxe\_tpa\_start}}(sc, fp, cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_acaaacc6c094843483e5a777dfcc17b02}{queue\_index}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03252}03252                               bd\_cons, bd\_prod, cqe\_fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03253}03253                 m = NULL; \textcolor{comment}{/* packet not ready yet */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03254}03254                 \textcolor{keywordflow}{goto} next\_rx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03255}03255             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03256}03256 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03257}03257             KASSERT(\mbox{\hyperlink{bxe_8h_adc11de32a81a3c64e926709c99fc7a16}{CQE\_TYPE\_STOP}}(cqe\_fp\_type),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03258}03258                     (\textcolor{stringliteral}{"{}CQE type is not STOP! (0x\%x)\(\backslash\)n"{}}, cqe\_fp\_type));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03259}03259 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03260}03260             queue = cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a23fb6df24ec705970f594f480e4fbc1c}{end\_agg\_cqe}}.\mbox{\hyperlink{structeth__end__agg__rx__cqe_aed0ac874adc69f79792b1233e70e9eb4}{queue\_index}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03261}03261             tpa\_info = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[queue];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03262}03262 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03263}03263             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a45ab3ab16f10dd36fd68fff8559bd291}{DBG\_LRO}}, \textcolor{stringliteral}{"{}fp[\%02d].tpa[\%02d] TPA STOP\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03264}03264                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, queue);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03265}03265 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03266}03266             frag\_size = (le16toh(cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a23fb6df24ec705970f594f480e4fbc1c}{end\_agg\_cqe}}.\mbox{\hyperlink{structeth__end__agg__rx__cqe_aa043b75626004ba89f8557bee1cfcb41}{pkt\_len}}) -\/}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03267}03267                          tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a42e4e681461791b05b2d94a017916372}{len\_on\_bd}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03268}03268             pages = \mbox{\hyperlink{bxe_8h_a635b2aaba996564912a54637018dced9}{SGE\_PAGE\_ALIGN}}(frag\_size) >> \mbox{\hyperlink{bxe_8h_a44e17214a6a71a4a75413a4774cec965}{SGE\_PAGE\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03269}03269 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03270}03270             \mbox{\hyperlink{bxe_8c_a6760fb0168f0426948936b354ea4c07b}{bxe\_tpa\_stop}}(sc, fp, tpa\_info, queue, pages,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03271}03271                          \&cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a23fb6df24ec705970f594f480e4fbc1c}{end\_agg\_cqe}}, comp\_ring\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03272}03272 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03273}03273             \mbox{\hyperlink{bxe_8c_a065eacc30d99982881d6680246b7939e}{bxe\_update\_sge\_prod}}(sc, fp, pages, \&cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a23fb6df24ec705970f594f480e4fbc1c}{end\_agg\_cqe}}.\mbox{\hyperlink{structeth__end__agg__rx__cqe_aec277f76f9d0cbbacb53515433927313}{sgl\_or\_raw\_data}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03274}03274 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03275}03275             \textcolor{keywordflow}{goto} next\_cqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03276}03276         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03277}03277 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03278}03278         \textcolor{comment}{/* non TPA */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03279}03279 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03280}03280         \textcolor{comment}{/* is this an error packet? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03281}03281         \textcolor{keywordflow}{if} (\_\_predict\_false(cqe\_fp\_flags \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03282}03282                             \mbox{\hyperlink{ecore__hsi_8h_aa6e567d62339ff9660c84c8d4ea27082}{ETH\_FAST\_PATH\_RX\_CQE\_PHY\_DECODE\_ERR\_FLG}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03283}03283             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}flags 0x\%x rx packet \%u\(\backslash\)n"{}}, cqe\_fp\_flags, sw\_cq\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03284}03284             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_ac2d839213389287bb6457fe6d925e7d5}{rx\_soft\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03285}03285             \textcolor{keywordflow}{goto} next\_rx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03286}03286         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03287}03287 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03288}03288         len = le16toh(cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a036833e286a762d353f99c890fd1448a}{pkt\_len\_or\_gro\_seg\_len}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03289}03289         lenonbd = le16toh(cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_a0a2ad4c0f4003d2dda38448c2c1e87a9}{len\_on\_bd}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03290}03290         pad = cqe\_fp-\/>\mbox{\hyperlink{structeth__fast__path__rx__cqe_adf666d42006477865fd3c92b2cce743f}{placement\_offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03291}03291 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03292}03292         m = rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03293}03293 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03294}03294         \textcolor{keywordflow}{if} (\_\_predict\_false(m == NULL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03295}03295             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}No mbuf in rx chain descriptor \%d for fp[\%02d]\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03296}03296                   bd\_cons, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03297}03297             \textcolor{keywordflow}{goto} next\_rx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03298}03298         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03299}03299 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03300}03300         \textcolor{comment}{/* XXX double copy if packet length under a threshold */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03301}03301 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03302}03302         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03303}03303 \textcolor{comment}{         * If all the buffer descriptors are filled with mbufs then fill in}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03304}03304 \textcolor{comment}{         * the current consumer index with a new BD. Else if a maximum Rx}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03305}03305 \textcolor{comment}{         * buffer limit is imposed then fill in the next producer index.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03306}03306 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03307}03307         rc = \mbox{\hyperlink{bxe_8c_a5b3dc2834150b871a3524bd78b67e268}{bxe\_alloc\_rx\_bd\_mbuf}}(fp, bd\_cons,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03308}03308                                   (sc-\/>\mbox{\hyperlink{structbxe__softc_ac7d7c8445e3a1ea0072269753b635864}{max\_rx\_bufs}} != \mbox{\hyperlink{bxe_8h_a542fc7a39e64042f0b11c0238b5f9afd}{RX\_BD\_USABLE}}) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03309}03309                                       bd\_prod : bd\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03310}03310         \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03311}03311 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03312}03312             \textcolor{comment}{/* we simply reuse the received mbuf and don't post it to the stack */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03313}03313             m = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03314}03314 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03315}03315             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}mbuf alloc fail for fp[\%02d] rx chain (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03316}03316                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03317}03317             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_ac2d839213389287bb6457fe6d925e7d5}{rx\_soft\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03318}03318 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03319}03319             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ac7d7c8445e3a1ea0072269753b635864}{max\_rx\_bufs}} != \mbox{\hyperlink{bxe_8h_a542fc7a39e64042f0b11c0238b5f9afd}{RX\_BD\_USABLE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03320}03320                 \textcolor{comment}{/* copy this consumer index to the producer index */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03321}03321                 memcpy(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[bd\_prod], rx\_buf,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03322}03322                        \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__sw__rx__bd}{bxe\_sw\_rx\_bd}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03323}03323                 memset(rx\_buf, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__sw__rx__bd}{bxe\_sw\_rx\_bd}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03324}03324             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03325}03325 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03326}03326             \textcolor{keywordflow}{goto} next\_rx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03327}03327         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03328}03328 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03329}03329         \textcolor{comment}{/* current mbuf was detached from the bd */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03330}03330         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0f850d2e2103d0e6268465b9ca3994a9}{mbuf\_alloc\_rx}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03331}03331 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03332}03332         \textcolor{comment}{/* we allocated a replacement mbuf, fixup the current one */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03333}03333         m\_adj(m, pad);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03334}03334         m-\/>m\_pkthdr.len = m-\/>m\_len = len;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03335}03335 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03336}03336         \textcolor{keywordflow}{if} ((len > 60) \&\& (len > lenonbd)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03337}03337             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aff3096531d536696d146a0a78e62689b}{rx\_bxe\_service\_rxsgl}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03338}03338             rc = \mbox{\hyperlink{bxe_8c_aecd83befece019df882401f1fe70f96e}{bxe\_service\_rxsgl}}(fp, len, lenonbd, m, cqe\_fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03339}03339             \textcolor{keywordflow}{if} (rc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03340}03340                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03341}03341             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aab435d00b705bbf9abe9b14e17d8a478}{rx\_jumbo\_sge\_pkts}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03342}03342         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (lenonbd < len) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03343}03343             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aba14517e76066c931aaaba3cb8bacf6e}{rx\_erroneous\_jumbo\_sge\_pkts}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03344}03344         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03345}03345 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03346}03346         \textcolor{comment}{/* assign packet to this interface interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03347}03347         if\_setrcvif(m, ifp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03348}03348 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03349}03349         \textcolor{comment}{/* assume no hardware checksum has complated */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03350}03350         m-\/>m\_pkthdr.csum\_flags = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03351}03351 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03352}03352         \textcolor{comment}{/* validate checksum if offload enabled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03353}03353         \textcolor{keywordflow}{if} (if\_getcapenable(ifp) \& IFCAP\_RXCSUM) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03354}03354             \textcolor{comment}{/* check for a valid IP frame */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03355}03355             \textcolor{keywordflow}{if} (!(cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a65983d953305bb458fd44260e7cc9c5d}{fast\_path\_cqe}}.\mbox{\hyperlink{structeth__fast__path__rx__cqe_ae8d051b8906426af6bec7311c9fb9115}{status\_flags}} \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03356}03356                   \mbox{\hyperlink{ecore__hsi_8h_aea95def329b6cc2f33a9bbcb91f1d1cd}{ETH\_FAST\_PATH\_RX\_CQE\_IP\_XSUM\_NO\_VALIDATION\_FLG}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03357}03357                 m-\/>m\_pkthdr.csum\_flags |= CSUM\_IP\_CHECKED;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03358}03358                 \textcolor{keywordflow}{if} (\_\_predict\_false(cqe\_fp\_flags \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03359}03359                                     \mbox{\hyperlink{ecore__hsi_8h_adbc1f7f2ebf06a624e251e4eb414ebd0}{ETH\_FAST\_PATH\_RX\_CQE\_IP\_BAD\_XSUM\_FLG}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03360}03360                     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a474a576cac3c446b885fa113dc9f27fc}{rx\_hw\_csum\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03361}03361                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03362}03362                     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a8a37382f0650db3faf0fde076f92af6c}{rx\_ofld\_frames\_csum\_ip}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03363}03363                     m-\/>m\_pkthdr.csum\_flags |= CSUM\_IP\_VALID;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03364}03364                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03365}03365             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03366}03366 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03367}03367             \textcolor{comment}{/* check for a valid TCP/UDP frame */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03368}03368             \textcolor{keywordflow}{if} (!(cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a65983d953305bb458fd44260e7cc9c5d}{fast\_path\_cqe}}.\mbox{\hyperlink{structeth__fast__path__rx__cqe_ae8d051b8906426af6bec7311c9fb9115}{status\_flags}} \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03369}03369                   \mbox{\hyperlink{ecore__hsi_8h_a19220e962ffa3a02a446c04544ee6539}{ETH\_FAST\_PATH\_RX\_CQE\_L4\_XSUM\_NO\_VALIDATION\_FLG}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03370}03370                 \textcolor{keywordflow}{if} (\_\_predict\_false(cqe\_fp\_flags \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03371}03371                                     \mbox{\hyperlink{ecore__hsi_8h_a0c8be107e876594fcdbe648602610021}{ETH\_FAST\_PATH\_RX\_CQE\_L4\_BAD\_XSUM\_FLG}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03372}03372                     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a474a576cac3c446b885fa113dc9f27fc}{rx\_hw\_csum\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03373}03373                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03374}03374                     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a003a01f8669d1c1ab9024fafe8f745ee}{rx\_ofld\_frames\_csum\_tcp\_udp}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03375}03375                     m-\/>m\_pkthdr.csum\_data = 0xFFFF;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03376}03376                     m-\/>m\_pkthdr.csum\_flags |= (CSUM\_DATA\_VALID |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03377}03377                                                CSUM\_PSEUDO\_HDR);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03378}03378                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03379}03379             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03380}03380         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03381}03381 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03382}03382         \textcolor{comment}{/* if there is a VLAN tag then flag that info */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03383}03383         \textcolor{keywordflow}{if} (cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a65983d953305bb458fd44260e7cc9c5d}{fast\_path\_cqe}}.\mbox{\hyperlink{structeth__fast__path__rx__cqe_a9a177c44e17706beb08d3f8eb9c14bb9}{pars\_flags}}.\mbox{\hyperlink{structparsing__flags_a8c52cd82c1ded84b7be7cb99abf36860}{flags}} \& \mbox{\hyperlink{ecore__hsi_8h_aa9fca4fb8a6c7c0cb9bc27158d82c007}{PARSING\_FLAGS\_INNER\_VLAN\_EXIST}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03384}03384             m-\/>m\_pkthdr.ether\_vtag = cqe-\/>\mbox{\hyperlink{unioneth__rx__cqe_a65983d953305bb458fd44260e7cc9c5d}{fast\_path\_cqe}}.\mbox{\hyperlink{structeth__fast__path__rx__cqe_a1a13fed70b0223a4a4062dde9e3021a4}{vlan\_tag}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03385}03385             m-\/>m\_flags |= M\_VLANTAG;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03386}03386         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03387}03387 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03388}03388         \textcolor{comment}{/* specify what RSS queue was used for this flow */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03389}03389         m-\/>m\_pkthdr.flowid = fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03390}03390         \mbox{\hyperlink{bxe_8h_af28f1894ac29f547e70320fa4de602fb}{BXE\_SET\_FLOWID}}(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03391}03391 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03392}03392 next\_rx:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03393}03393 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03394}03394         bd\_cons    = \mbox{\hyperlink{bxe_8h_a7f9cc8eb0efcb171a6f68878e24c0b0b}{RX\_BD\_NEXT}}(bd\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03395}03395         bd\_prod    = \mbox{\hyperlink{bxe_8h_a7f9cc8eb0efcb171a6f68878e24c0b0b}{RX\_BD\_NEXT}}(bd\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03396}03396         bd\_prod\_fw = \mbox{\hyperlink{bxe_8h_a7f9cc8eb0efcb171a6f68878e24c0b0b}{RX\_BD\_NEXT}}(bd\_prod\_fw);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03397}03397 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03398}03398         \textcolor{comment}{/* pass the frame to the stack */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03399}03399         \textcolor{keywordflow}{if} (\_\_predict\_true(m != NULL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03400}03400             if\_inc\_counter(ifp, IFCOUNTER\_IPACKETS, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03401}03401             rx\_pkts++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03402}03402             if\_input(ifp, m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03403}03403         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03404}03404 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03405}03405 next\_cqe:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03406}03406 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03407}03407         sw\_cq\_prod = \mbox{\hyperlink{bxe_8h_aa6741ab00cec2255e98155570daf7168}{RCQ\_NEXT}}(sw\_cq\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03408}03408         sw\_cq\_cons = \mbox{\hyperlink{bxe_8h_aa6741ab00cec2255e98155570daf7168}{RCQ\_NEXT}}(sw\_cq\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03409}03409 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03410}03410         \textcolor{comment}{/* limit spinning on the queue */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03411}03411         \textcolor{keywordflow}{if} (rc != 0)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03412}03412             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03413}03413 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03414}03414         \textcolor{keywordflow}{if} (rx\_pkts == sc-\/>\mbox{\hyperlink{structbxe__softc_adc3f4269881e426d8f9efcf20a9da2c6}{rx\_budget}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03415}03415             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a99fee9122808fde0ddc6ce5c3d401591}{rx\_budget\_reached}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03416}03416             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03417}03417         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03418}03418     \} \textcolor{comment}{/* while work to do */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03419}03419 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03420}03420     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9346adab23e93ce551b7c5b268c1555d}{rx\_bd\_cons}} = bd\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03421}03421     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2f3c58fb77796cd02e02122b4434bf32}{rx\_bd\_prod}} = bd\_prod\_fw;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03422}03422     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a00695efc5a0133b38e31029734b86646}{rx\_cq\_cons}} = sw\_cq\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03423}03423     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a94d71948ebaf04ecea42ac112f73f613}{rx\_cq\_prod}} = sw\_cq\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03424}03424 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03425}03425     \textcolor{comment}{/* Update producers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03426}03426     \mbox{\hyperlink{bxe_8c_a6b2eba231052d5cb25e75779ef7a1ce7}{bxe\_update\_rx\_prod}}(sc, fp, bd\_prod\_fw, sw\_cq\_prod, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aea87649aeabb6bdea13f1275511fd6c9}{rx\_sge\_prod}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03427}03427 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03428}03428     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a24d52499be00e9548994cd285df1d441}{rx\_pkts}} += rx\_pkts;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03429}03429     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a1c4ea3f0c0b331d03ba2f27d779b20e3}{rx\_calls}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03430}03430 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03431}03431     \mbox{\hyperlink{bxe_8h_af40be5e4bca75d04f89e45daab5e0ff7}{BXE\_FP\_RX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03432}03432 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03433}03433     \textcolor{keywordflow}{return} (sw\_cq\_cons != hw\_cq\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03434}03434 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03435}03435 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03436}03436 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03437}\mbox{\hyperlink{bxe_8c_af3f0eed1fded9b4aaf4980b67e490d44}{03437}} \mbox{\hyperlink{bxe_8c_af3f0eed1fded9b4aaf4980b67e490d44}{bxe\_free\_tx\_pkt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03438}03438                 \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03439}03439                 uint16\_t            idx)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03440}03440 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03441}03441     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__tx__bd}{bxe\_sw\_tx\_bd}} *tx\_buf = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aed432b0de2d59b0c022ada4a493ae787}{tx\_mbuf\_chain}}[idx];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03442}03442     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__tx__start__bd}{eth\_tx\_start\_bd}} *tx\_start\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03443}03443     uint16\_t bd\_idx = \mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a4173070105376bca63f29e08e1271f00}{first\_bd}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03444}03444     uint16\_t new\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03445}03445     \textcolor{keywordtype}{int} \mbox{\hyperlink{structeth__tx__start__bd_aa2b4b38e4363471f0bd37b8df755885a}{nbd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03446}03446 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03447}03447     \textcolor{comment}{/* unmap the mbuf from non-\/paged memory */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03448}03448     bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}}, tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03449}03449 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03450}03450     tx\_start\_bd = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}}[bd\_idx].\mbox{\hyperlink{unioneth__tx__bd__types_aa46c56645d75d48c2c46bffb368f3e9d}{start\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03451}03451     \mbox{\hyperlink{structeth__tx__start__bd_aa2b4b38e4363471f0bd37b8df755885a}{nbd}} = le16toh(tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_aa2b4b38e4363471f0bd37b8df755885a}{nbd}}) -\/ 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03452}03452 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03453}03453     new\_cons = (tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a4173070105376bca63f29e08e1271f00}{first\_bd}} + \mbox{\hyperlink{structeth__tx__start__bd_aa2b4b38e4363471f0bd37b8df755885a}{nbd}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03454}03454 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03455}03455     \textcolor{comment}{/* free the mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03456}03456     \textcolor{keywordflow}{if} (\_\_predict\_true(tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_ab9ec5360d3a7948719ec780e5ef04946}{m}} != NULL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03457}03457         m\_freem(tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_ab9ec5360d3a7948719ec780e5ef04946}{m}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03458}03458         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5963bb719df461b095dcf277bb8983bb}{mbuf\_alloc\_tx}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03459}03459     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03460}03460         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_af50ee08ed3242e9a6139a800c2671e51}{tx\_chain\_lost\_mbuf}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03461}03461     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03462}03462 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03463}03463     tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_ab9ec5360d3a7948719ec780e5ef04946}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03464}03464     tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a4173070105376bca63f29e08e1271f00}{first\_bd}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03465}03465 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03466}03466     \textcolor{keywordflow}{return} (new\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03467}03467 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03468}03468 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03469}03469 \textcolor{comment}{/* transmit timeout watchdog */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03470}03470 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03471}\mbox{\hyperlink{bxe_8c_a7471383acb03f009ca23431df93d4151}{03471}} \mbox{\hyperlink{bxe_8c_a7471383acb03f009ca23431df93d4151}{bxe\_watchdog}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03472}03472              \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03473}03473 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03474}03474     \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03475}03475 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03476}03476     \textcolor{keywordflow}{if} ((fp-\/>\mbox{\hyperlink{structbxe__fastpath_aad1db379ee18aa583fd47b943997ba19}{watchdog\_timer}} == 0) || (-\/-\/fp-\/>\mbox{\hyperlink{structbxe__fastpath_aad1db379ee18aa583fd47b943997ba19}{watchdog\_timer}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03477}03477         \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03478}03478         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03479}03479     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03480}03480 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03481}03481     \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}TX watchdog timeout on fp[\%02d], resetting!\(\backslash\)n"{}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03482}03482 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03483}03483     \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03484}03484     \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(sc, \mbox{\hyperlink{bxe_8h_a1ab7908b8262db1c6650bcce9d2a9498}{BXE\_ERR\_TXQ\_STUCK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03485}03485     taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03486}03486         \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03487}03487 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03488}03488     \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03489}03489 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03490}03490 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03491}03491 \textcolor{comment}{/* processes transmit completions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03492}03492 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03493}\mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{03493}} \mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{bxe\_txeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03494}03494           \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03495}03495 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03496}03496     if\_t ifp = sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03497}03497     uint16\_t bd\_cons, hw\_cons, sw\_cons, pkt\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03498}03498     uint16\_t tx\_bd\_avail;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03499}03499 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03500}03500     \mbox{\hyperlink{bxe_8h_a5d8040430885498c3d17cf1183112d7d}{BXE\_FP\_TX\_LOCK\_ASSERT}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03501}03501 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03502}03502     bd\_cons = fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa16de8d88d7655a6d9c075ed8b09d1f3}{tx\_bd\_cons}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03503}03503     hw\_cons = le16toh(*fp-\/>\mbox{\hyperlink{structbxe__fastpath_a3dc4c1d3159c9ddf3935b81f7fd031f7}{tx\_cons\_sb}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03504}03504     sw\_cons = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4fb28a798b123d9d554100f51c89e2f5}{tx\_pkt\_cons}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03505}03505 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03506}03506     \textcolor{keywordflow}{while} (sw\_cons != hw\_cons) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03507}03507         pkt\_cons = \mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(sw\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03508}03508 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03509}03509         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03510}03510               \textcolor{stringliteral}{"{}TX: fp[\%d]: hw\_cons=\%u sw\_cons=\%u pkt\_cons=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03511}03511               fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, hw\_cons, sw\_cons, pkt\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03512}03512 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03513}03513         bd\_cons = \mbox{\hyperlink{bxe_8c_af3f0eed1fded9b4aaf4980b67e490d44}{bxe\_free\_tx\_pkt}}(sc, fp, pkt\_cons);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03514}03514 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03515}03515         sw\_cons++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03516}03516     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03517}03517 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03518}03518     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4fb28a798b123d9d554100f51c89e2f5}{tx\_pkt\_cons}} = sw\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03519}03519     fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa16de8d88d7655a6d9c075ed8b09d1f3}{tx\_bd\_cons}}  = bd\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03520}03520 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03521}03521     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03522}03522           \textcolor{stringliteral}{"{}TX done: fp[\%d]: hw\_cons=\%u sw\_cons=\%u sw\_prod=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03523}03523           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, hw\_cons, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4fb28a798b123d9d554100f51c89e2f5}{tx\_pkt\_cons}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb97e5017aa43f9a4e43c5f302af8d30}{tx\_pkt\_prod}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03524}03524 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03525}03525     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03526}03526 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03527}03527     tx\_bd\_avail = \mbox{\hyperlink{bxe_8c_a27bf9359a144fda14c7d1e9a988cd2f7}{bxe\_tx\_avail}}(sc, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03528}03528 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03529}03529     \textcolor{keywordflow}{if} (tx\_bd\_avail < \mbox{\hyperlink{bxe_8h_a17f028de99dbf0cf4373fcd9d9a728a0}{BXE\_TX\_CLEANUP\_THRESHOLD}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03530}03530         if\_setdrvflagbits(ifp, IFF\_DRV\_OACTIVE, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03531}03531     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03532}03532         if\_setdrvflagbits(ifp, 0, IFF\_DRV\_OACTIVE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03533}03533     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03534}03534 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03535}03535     \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb97e5017aa43f9a4e43c5f302af8d30}{tx\_pkt\_prod}} != fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4fb28a798b123d9d554100f51c89e2f5}{tx\_pkt\_cons}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03536}03536         \textcolor{comment}{/* reset the watchdog timer if there are pending transmits */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03537}03537         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aad1db379ee18aa583fd47b943997ba19}{watchdog\_timer}} = \mbox{\hyperlink{bxe_8h_a83943d47061343cf64295018233b8b52}{BXE\_TX\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03538}03538         \textcolor{keywordflow}{return} (TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03539}03539     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03540}03540         \textcolor{comment}{/* clear watchdog when there are no pending transmits */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03541}03541         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aad1db379ee18aa583fd47b943997ba19}{watchdog\_timer}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03542}03542         \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03543}03543     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03544}03544 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03545}03545 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03546}03546 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03547}\mbox{\hyperlink{bxe_8c_add28c0514af058d1c2b9e9540423aced}{03547}} \mbox{\hyperlink{bxe_8c_add28c0514af058d1c2b9e9540423aced}{bxe\_drain\_tx\_queues}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03548}03548 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03549}03549     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03550}03550     \textcolor{keywordtype}{int} i, count;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03551}03551 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03552}03552     \textcolor{comment}{/* wait until all TX fastpath tasks have completed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03553}03553     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03554}03554         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03555}03555 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03556}03556         count = 1000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03557}03557 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03558}03558         \textcolor{keywordflow}{while} (\mbox{\hyperlink{bxe_8c_a2386a1eee885f63fc4f65169c38bb1d8}{bxe\_has\_tx\_work}}(fp)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03559}03559 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03560}03560             \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03561}03561             \mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{bxe\_txeof}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03562}03562             \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03563}03563 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03564}03564             \textcolor{keywordflow}{if} (count == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03565}03565                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Timeout waiting for fp[\%d] "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03566}03566                           \textcolor{stringliteral}{"{}transmits to complete!\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03567}03567                 \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, (\textcolor{stringliteral}{"{}tx drain failure\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03568}03568                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03569}03569             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03570}03570 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03571}03571             count-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03572}03572             DELAY(1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03573}03573             rmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03574}03574         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03575}03575     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03576}03576 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03577}03577     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03578}03578 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03579}03579 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03580}03580 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03581}\mbox{\hyperlink{bxe_8c_a5b1249b7efe0dc2717660c88ce5aa590}{03581}} \mbox{\hyperlink{bxe_8c_a5b1249b7efe0dc2717660c88ce5aa590}{bxe\_del\_all\_macs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}          *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03582}03582                  \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__vlan__mac__obj}{ecore\_vlan\_mac\_obj}} *mac\_obj,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03583}03583                  \textcolor{keywordtype}{int}                       mac\_type,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03584}03584                  uint8\_t                   wait\_for\_comp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03585}03585 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03586}03586     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} ramrod\_flags = 0, vlan\_mac\_flags = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03587}03587     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03588}03588 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03589}03589     \textcolor{comment}{/* wait for completion of requested */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03590}03590     \textcolor{keywordflow}{if} (wait\_for\_comp) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03591}03591         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}}, \&ramrod\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03592}03592     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03593}03593 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03594}03594     \textcolor{comment}{/* Set the mac type of addresses we want to clear */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03595}03595     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(mac\_type, \&vlan\_mac\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03596}03596 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03597}03597     rc = mac\_obj-\/>\mbox{\hyperlink{structecore__vlan__mac__obj_ab51a3d4c1a48dba90b14ee8742c411ef}{delete\_all}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, mac\_obj, \&vlan\_mac\_flags, \&ramrod\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03598}03598     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03599}03599         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Failed to delete MACs (\%d) mac\_type \%d wait\_for\_comp 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03600}03600             rc, mac\_type, wait\_for\_comp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03601}03601     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03602}03602 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03603}03603     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03604}03604 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03605}03605 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03606}03606 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03607}\mbox{\hyperlink{bxe_8c_a14b715482ea58ad0dce42f3b5d4dfcb4}{03607}} \mbox{\hyperlink{bxe_8c_a14b715482ea58ad0dce42f3b5d4dfcb4}{bxe\_fill\_accept\_flags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03608}03608                       uint32\_t         rx\_mode,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03609}03609                       \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}    *rx\_accept\_flags,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03610}03610                       \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}    *tx\_accept\_flags)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03611}03611 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03612}03612     \textcolor{comment}{/* Clear the flags first */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03613}03613     *rx\_accept\_flags = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03614}03614     *tx\_accept\_flags = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03615}03615 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03616}03616     \textcolor{keywordflow}{switch} (rx\_mode) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03617}03617     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a08a8897d9e355038b5f370bc810740d6}{BXE\_RX\_MODE\_NONE}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03618}03618         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03619}03619 \textcolor{comment}{         * 'drop all' supersedes any accept flags that may have been}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03620}03620 \textcolor{comment}{         * passed to the function.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03621}03621 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03622}03622         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03623}03623 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03624}03624     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a9e0d93dd1801d7a817ecb48581b79229}{BXE\_RX\_MODE\_NORMAL}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03625}03625         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4ad6ea908e77e970388d7e342a1ea19c94}{ECORE\_ACCEPT\_UNICAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03626}03626         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a0fa6181999abb181479cc97cc3bb296f}{ECORE\_ACCEPT\_MULTICAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03627}03627         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a273fb866f8047d18a062f32c13cd59f6}{ECORE\_ACCEPT\_BROADCAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03628}03628 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03629}03629         \textcolor{comment}{/* internal switching mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03630}03630         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4ad6ea908e77e970388d7e342a1ea19c94}{ECORE\_ACCEPT\_UNICAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03631}03631         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a0fa6181999abb181479cc97cc3bb296f}{ECORE\_ACCEPT\_MULTICAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03632}03632         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a273fb866f8047d18a062f32c13cd59f6}{ECORE\_ACCEPT\_BROADCAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03633}03633 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03634}03634         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03635}03635 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03636}03636     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a4be23320422aac5c5cbf4ec188549c8b}{BXE\_RX\_MODE\_ALLMULTI}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03637}03637         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4ad6ea908e77e970388d7e342a1ea19c94}{ECORE\_ACCEPT\_UNICAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03638}03638         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a83683358f4e6edf4d39ad9fce9eb0084}{ECORE\_ACCEPT\_ALL\_MULTICAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03639}03639         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a273fb866f8047d18a062f32c13cd59f6}{ECORE\_ACCEPT\_BROADCAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03640}03640 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03641}03641         \textcolor{comment}{/* internal switching mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03642}03642         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4ad6ea908e77e970388d7e342a1ea19c94}{ECORE\_ACCEPT\_UNICAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03643}03643         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a83683358f4e6edf4d39ad9fce9eb0084}{ECORE\_ACCEPT\_ALL\_MULTICAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03644}03644         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a273fb866f8047d18a062f32c13cd59f6}{ECORE\_ACCEPT\_BROADCAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03645}03645 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03646}03646         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03647}03647 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03648}03648     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a02f24f5b6a461a620bd6011f1b680377}{BXE\_RX\_MODE\_PROMISC}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03649}03649         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03650}03650 \textcolor{comment}{         * According to deffinition of SI mode, iface in promisc mode}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03651}03651 \textcolor{comment}{         * should receive matched and unmatched (in resolution of port)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03652}03652 \textcolor{comment}{         * unicast packets.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03653}03653 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03654}03654         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a716bf2225c63388eb7144202d8a50521}{ECORE\_ACCEPT\_UNMATCHED}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03655}03655         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4ad6ea908e77e970388d7e342a1ea19c94}{ECORE\_ACCEPT\_UNICAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03656}03656         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a83683358f4e6edf4d39ad9fce9eb0084}{ECORE\_ACCEPT\_ALL\_MULTICAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03657}03657         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a273fb866f8047d18a062f32c13cd59f6}{ECORE\_ACCEPT\_BROADCAST}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03658}03658 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03659}03659         \textcolor{comment}{/* internal switching mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03660}03660         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a83683358f4e6edf4d39ad9fce9eb0084}{ECORE\_ACCEPT\_ALL\_MULTICAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03661}03661         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a273fb866f8047d18a062f32c13cd59f6}{ECORE\_ACCEPT\_BROADCAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03662}03662 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03663}03663         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab69a549c7c8c515be9b1c947eb7ecfca}{IS\_MF\_SI}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03664}03664             \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a88d740426d35bde61e179eb5ddaa2b03}{ECORE\_ACCEPT\_ALL\_UNICAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03665}03665         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03666}03666             \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4ad6ea908e77e970388d7e342a1ea19c94}{ECORE\_ACCEPT\_UNICAST}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03667}03667         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03668}03668 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03669}03669         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03670}03670 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03671}03671     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03672}03672         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Unknown rx\_mode (0x\%x)\(\backslash\)n"{}}, rx\_mode);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03673}03673         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03674}03674     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03675}03675 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03676}03676     \textcolor{comment}{/* Set ACCEPT\_ANY\_VLAN as we do not enable filtering by VLAN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03677}03677     \textcolor{keywordflow}{if} (rx\_mode != \mbox{\hyperlink{bxe_8h_a08a8897d9e355038b5f370bc810740d6}{BXE\_RX\_MODE\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03678}03678         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a51b1e4ecbc29022c326648de82e641ab}{ECORE\_ACCEPT\_ANY\_VLAN}}, rx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03679}03679         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a4caf8d8f829279fba122163d961608a4a51b1e4ecbc29022c326648de82e641ab}{ECORE\_ACCEPT\_ANY\_VLAN}}, tx\_accept\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03680}03680     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03681}03681 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03682}03682     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03683}03683 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03684}03684 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03685}03685 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03686}\mbox{\hyperlink{bxe_8c_aa20038683e52d635f005693e396f48ee}{03686}} \mbox{\hyperlink{bxe_8c_aa20038683e52d635f005693e396f48ee}{bxe\_set\_q\_rx\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03687}03687                   uint8\_t          \mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03688}03688                   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}    rx\_mode\_flags,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03689}03689                   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}    rx\_accept\_flags,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03690}03690                   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}    tx\_accept\_flags,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03691}03691                   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}    ramrod\_flags)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03692}03692 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03693}03693     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__rx__mode__ramrod__params}{ecore\_rx\_mode\_ramrod\_params}} ramrod\_param;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03694}03694     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03695}03695 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03696}03696     memset(\&ramrod\_param, 0, \textcolor{keyword}{sizeof}(ramrod\_param));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03697}03697 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03698}03698     \textcolor{comment}{/* Prepare ramrod parameters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03699}03699     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_ace040759171ce59bd7ed3c9d79547891}{cid}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03700}03700     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_ad9505224e53e328e465e26c2ae0ea1d4}{cl\_id}} = \mbox{\hyperlink{structecore__rx__mode__ramrod__params_ad9505224e53e328e465e26c2ae0ea1d4}{cl\_id}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03701}03701     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a65ce9075bb7c04c8bbd131ec1b4140b2}{rx\_mode\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_aa9174b987f3725f779ba1f34c9478828}{rx\_mode\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03702}03702     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a317d0c02017e1fd4caef8eeabde96d0e}{func\_id}} = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03703}03703 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03704}03704     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a9ec30866987893c11a4e46a8f38c78e2}{pstate}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03705}03705     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a4a5d048c8877fc83b17df436db363400}{state}} = \mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034aa41f7f61b38d8c20170c09ed945c1fca}{ECORE\_FILTER\_RX\_MODE\_PENDING}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03706}03706 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03707}03707     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_aa640b28d41dc9f4ccc8b71edcd0dcc67}{rdata}} = \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, rx\_mode\_rdata);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03708}03708     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a5fc8d109773a1ecfe034860b88bc6f01}{rdata\_mapping}} = \mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, rx\_mode\_rdata);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03709}03709 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03710}03710     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034aa41f7f61b38d8c20170c09ed945c1fca}{ECORE\_FILTER\_RX\_MODE\_PENDING}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03711}03711 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03712}03712     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a2128aa6c18c0a0a8c2e84c88ab4c9897}{ramrod\_flags}} = \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a2128aa6c18c0a0a8c2e84c88ab4c9897}{ramrod\_flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03713}03713     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a979ebb1968eddbee994688609ca97bd3}{rx\_mode\_flags}} = \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a979ebb1968eddbee994688609ca97bd3}{rx\_mode\_flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03714}03714 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03715}03715     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_aa3c3a5d0808e6c5b60781dd2cfe853e2}{rx\_accept\_flags}} = \mbox{\hyperlink{structecore__rx__mode__ramrod__params_aa3c3a5d0808e6c5b60781dd2cfe853e2}{rx\_accept\_flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03716}03716     ramrod\_param.\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a6736290987c5d5376fdbe3b28dcf2002}{tx\_accept\_flags}} = \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a6736290987c5d5376fdbe3b28dcf2002}{tx\_accept\_flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03717}03717 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03718}03718     rc = \mbox{\hyperlink{ecore__sp_8c_a10c07a97688ea515e49618f0d1fb491f}{ecore\_config\_rx\_mode}}(sc, \&ramrod\_param);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03719}03719     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03720}03720         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Set rx\_mode \%d cli\_id 0x\%x rx\_mode\_flags 0x\%x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03721}03721             \textcolor{stringliteral}{"{}rx\_accept\_flags 0x\%x tx\_accept\_flags 0x\%x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03722}03722             \textcolor{stringliteral}{"{}ramrod\_flags 0x\%x rc \%d failed\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a17c36e629d93822d520fd49218c91f35}{rx\_mode}}, \mbox{\hyperlink{structecore__rx__mode__ramrod__params_ad9505224e53e328e465e26c2ae0ea1d4}{cl\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03723}03723             (uint32\_t)\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a979ebb1968eddbee994688609ca97bd3}{rx\_mode\_flags}}, (uint32\_t)\mbox{\hyperlink{structecore__rx__mode__ramrod__params_aa3c3a5d0808e6c5b60781dd2cfe853e2}{rx\_accept\_flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03724}03724             (uint32\_t)\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a6736290987c5d5376fdbe3b28dcf2002}{tx\_accept\_flags}}, (uint32\_t)\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a2128aa6c18c0a0a8c2e84c88ab4c9897}{ramrod\_flags}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03725}03725         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03726}03726     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03727}03727 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03728}03728     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03729}03729 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03730}03730 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03731}03731 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03732}\mbox{\hyperlink{bxe_8c_a106c35ed5d61fb78b510d88e71a748b2}{03732}} \mbox{\hyperlink{bxe_8c_a106c35ed5d61fb78b510d88e71a748b2}{bxe\_set\_storm\_rx\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03733}03733 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03734}03734     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a979ebb1968eddbee994688609ca97bd3}{rx\_mode\_flags}} = 0, \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a2128aa6c18c0a0a8c2e84c88ab4c9897}{ramrod\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03735}03735     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{structecore__rx__mode__ramrod__params_aa3c3a5d0808e6c5b60781dd2cfe853e2}{rx\_accept\_flags}} = 0, \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a6736290987c5d5376fdbe3b28dcf2002}{tx\_accept\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03736}03736     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03737}03737 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03738}03738     rc = \mbox{\hyperlink{bxe_8c_a14b715482ea58ad0dce42f3b5d4dfcb4}{bxe\_fill\_accept\_flags}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a17c36e629d93822d520fd49218c91f35}{rx\_mode}}, \&\mbox{\hyperlink{structecore__rx__mode__ramrod__params_aa3c3a5d0808e6c5b60781dd2cfe853e2}{rx\_accept\_flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03739}03739                                \&\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a6736290987c5d5376fdbe3b28dcf2002}{tx\_accept\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03740}03740     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03741}03741         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03742}03742     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03743}03743 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03744}03744     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa3efd637a7223623ef67e0e72a7719eb7}{RAMROD\_RX}}, \&\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a2128aa6c18c0a0a8c2e84c88ab4c9897}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03745}03745     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa4584b3e71596ce26f4a2784cfa4fc6be}{RAMROD\_TX}}, \&\mbox{\hyperlink{structecore__rx__mode__ramrod__params_a2128aa6c18c0a0a8c2e84c88ab4c9897}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03746}03746 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03747}03747     \textcolor{comment}{/* XXX ensure all fastpath have same cl\_id and/or move it to bxe\_softc */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03748}03748     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_aa20038683e52d635f005693e396f48ee}{bxe\_set\_q\_rx\_mode}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0].\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}}, \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a979ebb1968eddbee994688609ca97bd3}{rx\_mode\_flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03749}03749                               \mbox{\hyperlink{structecore__rx__mode__ramrod__params_aa3c3a5d0808e6c5b60781dd2cfe853e2}{rx\_accept\_flags}}, \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a6736290987c5d5376fdbe3b28dcf2002}{tx\_accept\_flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03750}03750                               \mbox{\hyperlink{structecore__rx__mode__ramrod__params_a2128aa6c18c0a0a8c2e84c88ab4c9897}{ramrod\_flags}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03751}03751 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03752}03752 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03753}03753 \textcolor{comment}{/* returns the "{}mcp load\_code"{} according to global load\_count array */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03754}03754 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03755}\mbox{\hyperlink{bxe_8c_aa539789564f84064c8ef23f74f3160aa}{03755}} \mbox{\hyperlink{bxe_8c_aa539789564f84064c8ef23f74f3160aa}{bxe\_nic\_load\_no\_mcp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03756}03756 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03757}03757     \textcolor{keywordtype}{int} path = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03758}03758     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03759}03759 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03760}03760     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}NO MCP -\/ load counts[\%d]      \%d, \%d, \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03761}03761           path, load\_count[path][0], load\_count[path][1],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03762}03762           load\_count[path][2]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03763}03763     load\_count[path][0]++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03764}03764     load\_count[path][1 + port]++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03765}03765     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}NO MCP -\/ new load counts[\%d]  \%d, \%d, \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03766}03766           path, load\_count[path][0], load\_count[path][1],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03767}03767           load\_count[path][2]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03768}03768     \textcolor{keywordflow}{if} (load\_count[path][0] == 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03769}03769         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__hsi_8h_a56ed71995441ad66fb821f1fcf4b2753}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03770}03770     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (load\_count[path][1 + port] == 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03771}03771         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__hsi_8h_a55c05624df1c93e2fd6e05acc25ea0d1}{FW\_MSG\_CODE\_DRV\_LOAD\_PORT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03772}03772     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03773}03773         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__hsi_8h_ae351e81091525dc547b47825e91ac914}{FW\_MSG\_CODE\_DRV\_LOAD\_FUNCTION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03774}03774     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03775}03775 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03776}03776 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03777}03777 \textcolor{comment}{/* returns the "{}mcp load\_code"{} according to global load\_count array */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03778}03778 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03779}\mbox{\hyperlink{bxe_8c_af0dd7f928c6894be5ad0cf869d3d976a}{03779}} \mbox{\hyperlink{bxe_8c_af0dd7f928c6894be5ad0cf869d3d976a}{bxe\_nic\_unload\_no\_mcp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03780}03780 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03781}03781     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03782}03782     \textcolor{keywordtype}{int} path = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03783}03783 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03784}03784     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}NO MCP -\/ load counts[\%d]      \%d, \%d, \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03785}03785           path, load\_count[path][0], load\_count[path][1],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03786}03786           load\_count[path][2]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03787}03787     load\_count[path][0]-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03788}03788     load\_count[path][1 + port]-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03789}03789     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}NO MCP -\/ new load counts[\%d]  \%d, \%d, \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03790}03790           path, load\_count[path][0], load\_count[path][1],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03791}03791           load\_count[path][2]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03792}03792     \textcolor{keywordflow}{if} (load\_count[path][0] == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03793}03793         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__hsi_8h_a9b1319ff6f47a5ed548e28b9535baf62}{FW\_MSG\_CODE\_DRV\_UNLOAD\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03794}03794     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (load\_count[path][1 + port] == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03795}03795         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__hsi_8h_adc3d621cc99394554d77cc3445de95db}{FW\_MSG\_CODE\_DRV\_UNLOAD\_PORT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03796}03796     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03797}03797         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__hsi_8h_adf575d5080be62f18a1343e72dfa6793}{FW\_MSG\_CODE\_DRV\_UNLOAD\_FUNCTION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03798}03798     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03799}03799 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03800}03800 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03801}03801 \textcolor{comment}{/* request unload mode from the MCP: COMMON, PORT or FUNCTION */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03802}03802 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03803}\mbox{\hyperlink{bxe_8c_a6075ae4e08056b7cf5f372b6b3cd4757}{03803}} \mbox{\hyperlink{bxe_8c_a6075ae4e08056b7cf5f372b6b3cd4757}{bxe\_send\_unload\_req}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03804}03804                     \textcolor{keywordtype}{int}              unload\_mode)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03805}03805 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03806}03806     uint32\_t reset\_code = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03807}03807 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03808}03808     \textcolor{comment}{/* Select the UNLOAD request mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03809}03809     \textcolor{keywordflow}{if} (unload\_mode == \mbox{\hyperlink{bxe_8h_ad4f9da781b53a5b5d5718a12732ccace}{UNLOAD\_NORMAL}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03810}03810         reset\_code = \mbox{\hyperlink{ecore__hsi_8h_a3f83ef39d58042aaf1d89c973476c766}{DRV\_MSG\_CODE\_UNLOAD\_REQ\_WOL\_DIS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03811}03811     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03812}03812         reset\_code = \mbox{\hyperlink{ecore__hsi_8h_a3f83ef39d58042aaf1d89c973476c766}{DRV\_MSG\_CODE\_UNLOAD\_REQ\_WOL\_DIS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03813}03813     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03814}03814 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03815}03815     \textcolor{comment}{/* Send the request to the MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03816}03816     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03817}03817         reset\_code = \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, reset\_code, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03818}03818     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03819}03819         reset\_code = \mbox{\hyperlink{bxe_8c_af0dd7f928c6894be5ad0cf869d3d976a}{bxe\_nic\_unload\_no\_mcp}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03820}03820     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03821}03821 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03822}03822     \textcolor{keywordflow}{return} (reset\_code);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03823}03823 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03824}03824 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03825}03825 \textcolor{comment}{/* send UNLOAD\_DONE command to the MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03826}03826 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03827}\mbox{\hyperlink{bxe_8c_a65cc1d1cd365bb469c4051e74015b6dd}{03827}} \mbox{\hyperlink{bxe_8c_a65cc1d1cd365bb469c4051e74015b6dd}{bxe\_send\_unload\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03828}03828                      uint8\_t          keep\_link)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03829}03829 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03830}03830     uint32\_t reset\_param =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03831}03831         keep\_link ? \mbox{\hyperlink{ecore__hsi_8h_a0a477b7d5969e0cdce3cdbb13a361d5a}{DRV\_MSG\_CODE\_UNLOAD\_SKIP\_LINK\_RESET}} : 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03832}03832 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03833}03833     \textcolor{comment}{/* Report UNLOAD\_DONE to MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03834}03834     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03835}03835         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_afb079547add0c5714c954ea04b9659e7}{DRV\_MSG\_CODE\_UNLOAD\_DONE}}, reset\_param);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03836}03836     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03837}03837 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03838}03838 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03839}03839 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03840}\mbox{\hyperlink{bxe_8c_a53a914bb3bb83c49bfb5dc9e6b5a20cf}{03840}} \mbox{\hyperlink{bxe_8c_a53a914bb3bb83c49bfb5dc9e6b5a20cf}{bxe\_func\_wait\_started}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03841}03841 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03842}03842     \textcolor{keywordtype}{int} tout = 50;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03843}03843 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03844}03844     \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03845}03845         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03846}03846     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03847}03847 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03848}03848     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03849}03849 \textcolor{comment}{     * (assumption: No Attention from MCP at this stage)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03850}03850 \textcolor{comment}{     * PMF probably in the middle of TX disable/enable transaction}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03851}03851 \textcolor{comment}{     * 1. Sync IRS for default SB}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03852}03852 \textcolor{comment}{     * 2. Sync SP queue -\/ this guarantees us that attention handling started}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03853}03853 \textcolor{comment}{     * 3. Wait, that TX disable/enable transaction completes}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03854}03854 \textcolor{comment}{     *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03855}03855 \textcolor{comment}{     * 1+2 guarantee that if DCBX attention was scheduled it already changed}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03856}03856 \textcolor{comment}{     * pending bit of transaction from STARTED-\/-\/>TX\_STOPPED, if we already}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03857}03857 \textcolor{comment}{     * received completion for the transaction the state is TX\_STOPPED.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03858}03858 \textcolor{comment}{     * State will return to STARTED after completion of TX\_STOPPED-\/-\/>STARTED}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03859}03859 \textcolor{comment}{     * transaction.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03860}03860 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03861}03861 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03862}03862     \textcolor{comment}{/* XXX make sure default SB ISR is done */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03863}03863     \textcolor{comment}{/* need a way to synchronize an irq (intr\_mtx?) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03864}03864 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03865}03865     \textcolor{comment}{/* XXX flush any work queues */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03866}03866 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03867}03867     \textcolor{keywordflow}{while} (\mbox{\hyperlink{ecore__sp_8c_aec7e3125d12ea444b1488cc975b18f6f}{ecore\_func\_get\_state}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}}) !=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03868}03868            \mbox{\hyperlink{ecore__sp_8h_acc56314cdb56f6af19d83f4fb39fb1bcaa8cf890b63d21da9b0e4baa3664bf910}{ECORE\_F\_STATE\_STARTED}} \&\& tout-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03869}03869         DELAY(20000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03870}03870     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03871}03871 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03872}03872     \textcolor{keywordflow}{if} (\mbox{\hyperlink{ecore__sp_8c_aec7e3125d12ea444b1488cc975b18f6f}{ecore\_func\_get\_state}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}}) != \mbox{\hyperlink{ecore__sp_8h_acc56314cdb56f6af19d83f4fb39fb1bcaa8cf890b63d21da9b0e4baa3664bf910}{ECORE\_F\_STATE\_STARTED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03873}03873         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03874}03874 \textcolor{comment}{         * Failed to complete the transaction in a "{}good way"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03875}03875 \textcolor{comment}{         * Force both transactions with CLR bit.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03876}03876 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03877}03877         \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__func__state__params}{ecore\_func\_state\_params}} func\_params = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03878}03878 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03879}03879         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unexpected function state! "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03880}03880                   \textcolor{stringliteral}{"{}Forcing STARTED-\/-\/>TX\_STOPPED-\/-\/>STARTED\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03881}03881 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03882}03882         func\_params.\mbox{\hyperlink{structecore__func__state__params_a9d047bd98f6213c559509806e2abba82}{f\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03883}03883         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa90fa3ceff32295975066283ea941b18f}{RAMROD\_DRV\_CLR\_ONLY}}, \&func\_params.\mbox{\hyperlink{structecore__func__state__params_a741d53be8643b39cd77cc5a96a44c782}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03884}03884 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03885}03885         \textcolor{comment}{/* STARTED-\/-\/>TX\_STOPPED */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03886}03886         func\_params.\mbox{\hyperlink{structecore__func__state__params_a91c5e00faef974965a04f21fa001b331}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8aa8308ab054c84b3318f181eb90e72470}{ECORE\_F\_CMD\_TX\_STOP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03887}03887         \mbox{\hyperlink{ecore__sp_8c_a7e1322aba00d9db820211a49fd2e0c1e}{ecore\_func\_state\_change}}(sc, \&func\_params);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03888}03888 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03889}03889         \textcolor{comment}{/* TX\_STOPPED-\/-\/>STARTED */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03890}03890         func\_params.\mbox{\hyperlink{structecore__func__state__params_a91c5e00faef974965a04f21fa001b331}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8a3b93466499e99fba1ac5b2275e8acd44}{ECORE\_F\_CMD\_TX\_START}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03891}03891         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__sp_8c_a7e1322aba00d9db820211a49fd2e0c1e}{ecore\_func\_state\_change}}(sc, \&func\_params));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03892}03892     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03893}03893 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03894}03894     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03895}03895 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03896}03896 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03897}03897 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03898}\mbox{\hyperlink{bxe_8c_a16b29bdcbb7bd657c84c98ccc476b03e}{03898}} \mbox{\hyperlink{bxe_8c_a16b29bdcbb7bd657c84c98ccc476b03e}{bxe\_stop\_queue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03899}03899                \textcolor{keywordtype}{int}              index)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03900}03900 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03901}03901     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03902}03902     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__queue__state__params}{ecore\_queue\_state\_params}} q\_params = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03903}03903     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03904}03904 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03905}03905     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}stopping queue \%d cid \%d\(\backslash\)n"{}}, index, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03906}03906 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03907}03907     q\_params.\mbox{\hyperlink{structecore__queue__state__params_aa82261699d9e2173d45a77948c0c860f}{q\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}].\mbox{\hyperlink{structbxe__sp__objs_a351dc74bae42d4614c457b9bd4d2e5cf}{q\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03908}03908     \textcolor{comment}{/* We want to wait for completion in this context */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03909}03909     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}}, \&q\_params.\mbox{\hyperlink{structecore__queue__state__params_aa98775b61ce0689a849b75f95869dfa5}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03910}03910 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03911}03911     \textcolor{comment}{/* Stop the primary connection: */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03912}03912 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03913}03913     \textcolor{comment}{/* ...halt the connection */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03914}03914     q\_params.\mbox{\hyperlink{structecore__queue__state__params_a808f89ba4459a2f1f62406fe5e111ead}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6aefc7938d5f34c67311069e5a1803e0b1}{ECORE\_Q\_CMD\_HALT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03915}03915     rc = \mbox{\hyperlink{ecore__sp_8c_ac2191455ad3d3242f053d45f4eac5398}{ecore\_queue\_state\_change}}(sc, \&q\_params);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03916}03916     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03917}03917         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03918}03918     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03919}03919 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03920}03920     \textcolor{comment}{/* ...terminate the connection */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03921}03921     q\_params.\mbox{\hyperlink{structecore__queue__state__params_a808f89ba4459a2f1f62406fe5e111ead}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a2e3de5814c9041f950b66e4383b4c390}{ECORE\_Q\_CMD\_TERMINATE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03922}03922     memset(\&q\_params.\mbox{\hyperlink{structecore__queue__state__params_ae5d378efca7dbb25c4dd679a92ffed74}{params}}.\mbox{\hyperlink{structecore__queue__state__params_a7fd117d15f94c2cf88790bb61cea9ef7}{terminate}}, 0, \textcolor{keyword}{sizeof}(q\_params.\mbox{\hyperlink{structecore__queue__state__params_ae5d378efca7dbb25c4dd679a92ffed74}{params}}.\mbox{\hyperlink{structecore__queue__state__params_a7fd117d15f94c2cf88790bb61cea9ef7}{terminate}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03923}03923     q\_params.\mbox{\hyperlink{structecore__queue__state__params_ae5d378efca7dbb25c4dd679a92ffed74}{params}}.\mbox{\hyperlink{structecore__queue__state__params_a7fd117d15f94c2cf88790bb61cea9ef7}{terminate}}.\mbox{\hyperlink{structecore__queue__terminate__params_af7cba5a425db8ee61df639e82b33cedf}{cid\_index}} = \mbox{\hyperlink{bxe_8h_aaef4892dade0bd4079046bf98614ab07}{FIRST\_TX\_COS\_INDEX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03924}03924     rc = \mbox{\hyperlink{ecore__sp_8c_ac2191455ad3d3242f053d45f4eac5398}{ecore\_queue\_state\_change}}(sc, \&q\_params);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03925}03925     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03926}03926         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03927}03927     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03928}03928 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03929}03929     \textcolor{comment}{/* ...delete cfc entry */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03930}03930     q\_params.\mbox{\hyperlink{structecore__queue__state__params_a808f89ba4459a2f1f62406fe5e111ead}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a39cff6e8e4e1cae1ec96438e04ad9f81}{ECORE\_Q\_CMD\_CFC\_DEL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03931}03931     memset(\&q\_params.\mbox{\hyperlink{structecore__queue__state__params_ae5d378efca7dbb25c4dd679a92ffed74}{params}}.\mbox{\hyperlink{structecore__queue__state__params_a320d7b40711166e14e5204a28ffeada5}{cfc\_del}}, 0, \textcolor{keyword}{sizeof}(q\_params.\mbox{\hyperlink{structecore__queue__state__params_ae5d378efca7dbb25c4dd679a92ffed74}{params}}.\mbox{\hyperlink{structecore__queue__state__params_a320d7b40711166e14e5204a28ffeada5}{cfc\_del}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03932}03932     q\_params.\mbox{\hyperlink{structecore__queue__state__params_ae5d378efca7dbb25c4dd679a92ffed74}{params}}.\mbox{\hyperlink{structecore__queue__state__params_a320d7b40711166e14e5204a28ffeada5}{cfc\_del}}.\mbox{\hyperlink{structecore__queue__cfc__del__params_a4608d506a54e57d46c751fcdabab9d04}{cid\_index}} = \mbox{\hyperlink{bxe_8h_aaef4892dade0bd4079046bf98614ab07}{FIRST\_TX\_COS\_INDEX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03933}03933     \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__sp_8c_ac2191455ad3d3242f053d45f4eac5398}{ecore\_queue\_state\_change}}(sc, \&q\_params));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03934}03934 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03935}03935 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03936}03936 \textcolor{comment}{/* wait for the outstanding SP commands */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03937}03937 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03938}\mbox{\hyperlink{bxe_8c_aa4635446f81e51e12fe8232520a55249}{03938}} \mbox{\hyperlink{bxe_8c_aa4635446f81e51e12fe8232520a55249}{bxe\_wait\_sp\_comp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03939}03939                  \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}    mask)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03940}03940 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03941}03941     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} tmp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03942}03942     \textcolor{keywordtype}{int} tout = 5000; \textcolor{comment}{/* wait for 5 secs tops */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03943}03943 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03944}03944     \textcolor{keywordflow}{while} (tout-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03945}03945         mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03946}03946         \textcolor{keywordflow}{if} (!(atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}}) \& mask)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03947}03947             \textcolor{keywordflow}{return} (TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03948}03948         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03949}03949 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03950}03950         DELAY(1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03951}03951     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03952}03952 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03953}03953     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03954}03954 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03955}03955     tmp = atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03956}03956     \textcolor{keywordflow}{if} (tmp \& mask) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03957}03957         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Filtering completion timed out: "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03958}03958                   \textcolor{stringliteral}{"{}sp\_state 0x\%lx, mask 0x\%lx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03959}03959               tmp, mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03960}03960         \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03961}03961     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03962}03962 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03963}03963     \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03964}03964 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03965}03965 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03966}03966 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03967}\mbox{\hyperlink{bxe_8c_a3b70112ce1905d86b5cd493beaccf6ab}{03967}} \mbox{\hyperlink{bxe_8c_a3b70112ce1905d86b5cd493beaccf6ab}{bxe\_func\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03968}03968 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03969}03969     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__func__state__params}{ecore\_func\_state\_params}} func\_params = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03970}03970     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03971}03971 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03972}03972     \textcolor{comment}{/* prepare parameters for function state transitions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03973}03973     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}}, \&func\_params.\mbox{\hyperlink{structecore__func__state__params_a741d53be8643b39cd77cc5a96a44c782}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03974}03974     func\_params.\mbox{\hyperlink{structecore__func__state__params_a9d047bd98f6213c559509806e2abba82}{f\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03975}03975     func\_params.\mbox{\hyperlink{structecore__func__state__params_a91c5e00faef974965a04f21fa001b331}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8a8aabc2b25b4e5ab429fccbe90395cc36}{ECORE\_F\_CMD\_STOP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03976}03976 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03977}03977     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03978}03978 \textcolor{comment}{     * Try to stop the function the 'good way'. If it fails (in case}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03979}03979 \textcolor{comment}{     * of a parity error during bxe\_chip\_cleanup()) and we are}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03980}03980 \textcolor{comment}{     * not in a debug mode, perform a state transaction in order to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03981}03981 \textcolor{comment}{     * enable further HW\_RESET transaction.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03982}03982 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03983}03983     rc = \mbox{\hyperlink{ecore__sp_8c_a7e1322aba00d9db820211a49fd2e0c1e}{ecore\_func\_state\_change}}(sc, \&func\_params);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03984}03984     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03985}03985         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FUNC\_STOP ramrod failed. "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03986}03986                   \textcolor{stringliteral}{"{}Running a dry transaction (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03987}03987         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa90fa3ceff32295975066283ea941b18f}{RAMROD\_DRV\_CLR\_ONLY}}, \&func\_params.\mbox{\hyperlink{structecore__func__state__params_a741d53be8643b39cd77cc5a96a44c782}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03988}03988         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__sp_8c_a7e1322aba00d9db820211a49fd2e0c1e}{ecore\_func\_state\_change}}(sc, \&func\_params));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03989}03989     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03990}03990 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03991}03991     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03992}03992 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03993}03993 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03994}03994 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03995}\mbox{\hyperlink{bxe_8c_abbf798a672cdff0130ea0f4dc3d19e3d}{03995}} \mbox{\hyperlink{bxe_8c_abbf798a672cdff0130ea0f4dc3d19e3d}{bxe\_reset\_hw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03996}03996              uint32\_t         load\_code)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03997}03997 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03998}03998     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__func__state__params}{ecore\_func\_state\_params}} func\_params = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l03999}03999 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04000}04000     \textcolor{comment}{/* Prepare parameters for function state transitions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04001}04001     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}}, \&func\_params.\mbox{\hyperlink{structecore__func__state__params_a741d53be8643b39cd77cc5a96a44c782}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04002}04002 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04003}04003     func\_params.\mbox{\hyperlink{structecore__func__state__params_a9d047bd98f6213c559509806e2abba82}{f\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04004}04004     func\_params.\mbox{\hyperlink{structecore__func__state__params_a91c5e00faef974965a04f21fa001b331}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8a01f4c3bc1985e4b1c92396181b2f232c}{ECORE\_F\_CMD\_HW\_RESET}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04005}04005 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04006}04006     func\_params.\mbox{\hyperlink{structecore__func__state__params_a8eae38735ab6131fefc5ca8ee928b734}{params}}.\mbox{\hyperlink{structecore__func__state__params_a6d5cf2c0f850400f262cbae70c8fae43}{hw\_init}}.\mbox{\hyperlink{structecore__func__hw__init__params_a790a8973c8e62345b90d1ce25bcaecd1}{load\_phase}} = load\_code;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04007}04007 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04008}04008     \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__sp_8c_a7e1322aba00d9db820211a49fd2e0c1e}{ecore\_func\_state\_change}}(sc, \&func\_params));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04009}04009 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04010}04010 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04011}04011 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04012}\mbox{\hyperlink{bxe_8c_a230ff44ea3aff5c5899ee8907f890f66}{04012}} \mbox{\hyperlink{bxe_8c_a230ff44ea3aff5c5899ee8907f890f66}{bxe\_int\_disable\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04013}04013                      \textcolor{keywordtype}{int}              disable\_hw)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04014}04014 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04015}04015     \textcolor{keywordflow}{if} (disable\_hw) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04016}04016         \textcolor{comment}{/* prevent the HW from sending interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04017}04017         \mbox{\hyperlink{bxe_8c_ac47171d7e9b0e9b346122f490afcbf5a}{bxe\_int\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04018}04018     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04019}04019 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04020}04020     \textcolor{comment}{/* XXX need a way to synchronize ALL irqs (intr\_mtx?) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04021}04021     \textcolor{comment}{/* make sure all ISRs are done */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04022}04022 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04023}04023     \textcolor{comment}{/* XXX make sure sp\_task is not running */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04024}04024     \textcolor{comment}{/* cancel and flush work queues */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04025}04025 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04026}04026 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04027}04027 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04028}\mbox{\hyperlink{bxe_8c_a2e257b31f53b49cd7893f0efade0048a}{04028}} \mbox{\hyperlink{bxe_8c_a2e257b31f53b49cd7893f0efade0048a}{bxe\_chip\_cleanup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04029}04029                  uint32\_t         unload\_mode,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04030}04030                  uint8\_t          keep\_link)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04031}04031 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04032}04032     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04033}04033     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__mcast__ramrod__params}{ecore\_mcast\_ramrod\_params}} rparam = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04034}04034     uint32\_t reset\_code;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04035}04035     \textcolor{keywordtype}{int} i, rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04036}04036 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04037}04037     \mbox{\hyperlink{bxe_8c_add28c0514af058d1c2b9e9540423aced}{bxe\_drain\_tx\_queues}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04038}04038 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04039}04039     \textcolor{comment}{/* give HW time to discard old tx messages */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04040}04040     DELAY(1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04041}04041 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04042}04042     \textcolor{comment}{/* Clean all ETH MACs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04043}04043     rc = \mbox{\hyperlink{bxe_8c_a5b1249b7efe0dc2717660c88ce5aa590}{bxe\_del\_all\_macs}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[0].\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}}, \mbox{\hyperlink{ecore__sp_8h_a0ed680fdb405e7195d9f14032851eebba1b11e54e3712388924b06a7213a2f95c}{ECORE\_ETH\_MAC}}, FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04044}04044     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04045}04045         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to delete all ETH MACs (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04046}04046     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04047}04047 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04048}04048     \textcolor{comment}{/* Clean up UC list  */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04049}04049     rc = \mbox{\hyperlink{bxe_8c_a5b1249b7efe0dc2717660c88ce5aa590}{bxe\_del\_all\_macs}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[0].\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}}, \mbox{\hyperlink{ecore__sp_8h_a0ed680fdb405e7195d9f14032851eebba5303741586a07128b703a9b09f63a7aa}{ECORE\_UC\_LIST\_MAC}}, TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04050}04050     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04051}04051         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to delete UC MACs list (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04052}04052     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04053}04053 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04054}04054     \textcolor{comment}{/* Disable LLH */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04055}04055     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04056}04056         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac7750debed93c11358fbef94dd2d56ad}{NIG\_REG\_LLH0\_FUNC\_EN}} + port*8, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04057}04057     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04058}04058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04059}04059     \textcolor{comment}{/* Set "{}drop all"{} to stop Rx */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04060}04060 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04061}04061     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04062}04062 \textcolor{comment}{     * We need to take the BXE\_MCAST\_LOCK() here in order to prevent}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04063}04063 \textcolor{comment}{     * a race between the completion code and this code.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04064}04064 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04065}04065     \mbox{\hyperlink{bxe_8h_a35850806b8136932806ab9a1f7f77327}{BXE\_MCAST\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04066}04066 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04067}04067     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034aa41f7f61b38d8c20170c09ed945c1fca}{ECORE\_FILTER\_RX\_MODE\_PENDING}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04068}04068         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034acd92a024777ec987a1581edb5ca0b67c}{ECORE\_FILTER\_RX\_MODE\_SCHED}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04069}04069     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04070}04070         \mbox{\hyperlink{bxe_8c_a106c35ed5d61fb78b510d88e71a748b2}{bxe\_set\_storm\_rx\_mode}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04071}04071     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04072}04072 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04073}04073     \textcolor{comment}{/* Clean up multicast configuration */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04074}04074     rparam.\mbox{\hyperlink{structecore__mcast__ramrod__params_abc5cf4a8ad4c0247a4aeed544a262ac3}{mcast\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04075}04075     rc = \mbox{\hyperlink{ecore__sp_8c_afa16a6379ed01757caf80cbf7c9aa3f4}{ecore\_config\_mcast}}(sc, \&rparam, \mbox{\hyperlink{ecore__sp_8h_ac9e874ecf62c6b5d7ab51553b99d3958a7a32f4a530b25865b526e39ea48984c3}{ECORE\_MCAST\_CMD\_DEL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04076}04076     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04077}04077         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to send DEL MCAST command (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04078}04078     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04079}04079 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04080}04080     \mbox{\hyperlink{bxe_8h_a1a12eebcf647954bdcc60198134bccbd}{BXE\_MCAST\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04081}04081 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04082}04082     \textcolor{comment}{// XXX bxe\_iov\_chip\_cleanup(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04083}04083 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04084}04084     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04085}04085 \textcolor{comment}{     * Send the UNLOAD\_REQUEST to the MCP. This will return if}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04086}04086 \textcolor{comment}{     * this function should perform FUNCTION, PORT, or COMMON HW}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04087}04087 \textcolor{comment}{     * reset.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04088}04088 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04089}04089     reset\_code = \mbox{\hyperlink{bxe_8c_a6075ae4e08056b7cf5f372b6b3cd4757}{bxe\_send\_unload\_req}}(sc, unload\_mode);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04090}04090 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04091}04091     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04092}04092 \textcolor{comment}{     * (assumption: No Attention from MCP at this stage)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04093}04093 \textcolor{comment}{     * PMF probably in the middle of TX disable/enable transaction}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04094}04094 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04095}04095     rc = \mbox{\hyperlink{bxe_8c_a53a914bb3bb83c49bfb5dc9e6b5a20cf}{bxe\_func\_wait\_started}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04096}04096     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04097}04097         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}bxe\_func\_wait\_started failed (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04098}04098     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04099}04099 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04100}04100     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04101}04101 \textcolor{comment}{     * Close multi and leading connections}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04102}04102 \textcolor{comment}{     * Completions for ramrods are collected in a synchronous way}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04103}04103 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04104}04104     \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04105}04105         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a16b29bdcbb7bd657c84c98ccc476b03e}{bxe\_stop\_queue}}(sc, i)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04106}04106             \textcolor{keywordflow}{goto} unload\_error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04107}04107         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04108}04108     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04109}04109 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04110}04110     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04111}04111 \textcolor{comment}{     * If SP settings didn't get completed so far -\/ something}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04112}04112 \textcolor{comment}{     * very wrong has happen.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04113}04113 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04114}04114     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8c_aa4635446f81e51e12fe8232520a55249}{bxe\_wait\_sp\_comp}}(sc, \string~0x0UL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04115}04115         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Common slow path ramrods got stuck!(\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04116}04116     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04117}04117 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04118}04118 unload\_error:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04119}04119 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04120}04120     rc = \mbox{\hyperlink{bxe_8c_a3b70112ce1905d86b5cd493beaccf6ab}{bxe\_func\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04121}04121     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04122}04122         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Function stop failed!(\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04123}04123     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04124}04124 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04125}04125     \textcolor{comment}{/* disable HW interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04126}04126     \mbox{\hyperlink{bxe_8c_a230ff44ea3aff5c5899ee8907f890f66}{bxe\_int\_disable\_sync}}(sc, TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04127}04127 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04128}04128     \textcolor{comment}{/* detach interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04129}04129     \mbox{\hyperlink{bxe_8c_afaf5ed29d000f45cc1191ed8e8e20c83}{bxe\_interrupt\_detach}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04130}04130 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04131}04131     \textcolor{comment}{/* Reset the chip */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04132}04132     rc = \mbox{\hyperlink{bxe_8c_abbf798a672cdff0130ea0f4dc3d19e3d}{bxe\_reset\_hw}}(sc, reset\_code);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04133}04133     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04134}04134         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Hardware reset failed(\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04135}04135     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04136}04136 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04137}04137     \textcolor{comment}{/* Report UNLOAD\_DONE to MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04138}04138     \mbox{\hyperlink{bxe_8c_a65cc1d1cd365bb469c4051e74015b6dd}{bxe\_send\_unload\_done}}(sc, keep\_link);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04139}04139 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04140}04140 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04141}04141 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04142}\mbox{\hyperlink{bxe_8c_a723148862dcfab6e8da515f4400e27d0}{04142}} \mbox{\hyperlink{bxe_8c_a723148862dcfab6e8da515f4400e27d0}{bxe\_disable\_close\_the\_gate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04143}04143 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04144}04144     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04145}04145     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04146}04146 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04147}04147     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04148}04148           \textcolor{stringliteral}{"{}Disabling 'close the gates'\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04149}04149 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04150}04150     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04151}04151         uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = port ? \mbox{\hyperlink{ecore__reg_8h_a4fcd4215ad8e23c9de2d50c6b1bfa1aa}{MISC\_REG\_AEU\_MASK\_ATTN\_FUNC\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04152}04152                                \mbox{\hyperlink{ecore__reg_8h_ab4f826eb27e815cd197a08618e789f7b}{MISC\_REG\_AEU\_MASK\_ATTN\_FUNC\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04153}04153         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04154}04154         val \&= \string~(0x300);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04155}04155         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04156}04156     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04157}04157         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a5749910c7dec46fa5e90c91e276caad4}{MISC\_REG\_AEU\_GENERAL\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04158}04158         val \&= \string~(\mbox{\hyperlink{ecore__reg_8h_a66e0486bda58176c512d96eb114d56ea}{MISC\_AEU\_GENERAL\_MASK\_REG\_AEU\_PXP\_CLOSE\_MASK}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04159}04159                  \mbox{\hyperlink{ecore__reg_8h_acd76613dbb5da0cf415deb24ef5b58d6}{MISC\_AEU\_GENERAL\_MASK\_REG\_AEU\_NIG\_CLOSE\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04160}04160         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a5749910c7dec46fa5e90c91e276caad4}{MISC\_REG\_AEU\_GENERAL\_MASK}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04161}04161     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04162}04162 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04163}04163 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04164}04164 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04165}04165 \textcolor{comment}{ * Cleans the object that have internal lists without sending}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04166}04166 \textcolor{comment}{ * ramrods. Should be run when interrutps are disabled.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04167}04167 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04168}04168 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04169}\mbox{\hyperlink{bxe_8c_ae85a9f0c5f648920c50a860997039081}{04169}} \mbox{\hyperlink{bxe_8c_ae85a9f0c5f648920c50a860997039081}{bxe\_squeeze\_objects}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04170}04170 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04171}04171     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{structecore__mcast__ramrod__params_a43c3e52becfb66b5c60e2e5932249cfc}{ramrod\_flags}} = 0, vlan\_mac\_flags = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04172}04172     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__mcast__ramrod__params}{ecore\_mcast\_ramrod\_params}} rparam = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04173}04173     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__vlan__mac__obj}{ecore\_vlan\_mac\_obj}} *mac\_obj = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}-\/>\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04174}04174     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04175}04175 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04176}04176     \textcolor{comment}{/* Cleanup MACs' object first... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04177}04177 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04178}04178     \textcolor{comment}{/* Wait for completion of requested */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04179}04179     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}}, \&ramrod\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04180}04180     \textcolor{comment}{/* Perform a dry cleanup */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04181}04181     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa90fa3ceff32295975066283ea941b18f}{RAMROD\_DRV\_CLR\_ONLY}}, \&ramrod\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04182}04182 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04183}04183     \textcolor{comment}{/* Clean ETH primary MAC */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04184}04184     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a0ed680fdb405e7195d9f14032851eebba1b11e54e3712388924b06a7213a2f95c}{ECORE\_ETH\_MAC}}, \&vlan\_mac\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04185}04185     rc = mac\_obj-\/>\mbox{\hyperlink{structecore__vlan__mac__obj_ab51a3d4c1a48dba90b14ee8742c411ef}{delete\_all}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}-\/>\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}}, \&vlan\_mac\_flags,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04186}04186                              \&ramrod\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04187}04187     \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04188}04188         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to clean ETH MACs (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04189}04189     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04190}04190 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04191}04191     \textcolor{comment}{/* Cleanup UC list */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04192}04192     vlan\_mac\_flags = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04193}04193     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a0ed680fdb405e7195d9f14032851eebba5303741586a07128b703a9b09f63a7aa}{ECORE\_UC\_LIST\_MAC}}, \&vlan\_mac\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04194}04194     rc = mac\_obj-\/>\mbox{\hyperlink{structecore__vlan__mac__obj_ab51a3d4c1a48dba90b14ee8742c411ef}{delete\_all}}(sc, mac\_obj, \&vlan\_mac\_flags,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04195}04195                              \&ramrod\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04196}04196     \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04197}04197         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to clean UC list MACs (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04198}04198     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04199}04199 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04200}04200     \textcolor{comment}{/* Now clean mcast object... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04201}04201 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04202}04202     rparam.\mbox{\hyperlink{structecore__mcast__ramrod__params_abc5cf4a8ad4c0247a4aeed544a262ac3}{mcast\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04203}04203     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa90fa3ceff32295975066283ea941b18f}{RAMROD\_DRV\_CLR\_ONLY}}, \&rparam.\mbox{\hyperlink{structecore__mcast__ramrod__params_a43c3e52becfb66b5c60e2e5932249cfc}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04204}04204 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04205}04205     \textcolor{comment}{/* Add a DEL command... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04206}04206     rc = \mbox{\hyperlink{ecore__sp_8c_afa16a6379ed01757caf80cbf7c9aa3f4}{ecore\_config\_mcast}}(sc, \&rparam, \mbox{\hyperlink{ecore__sp_8h_ac9e874ecf62c6b5d7ab51553b99d3958a7a32f4a530b25865b526e39ea48984c3}{ECORE\_MCAST\_CMD\_DEL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04207}04207     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04208}04208         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to send DEL MCAST command (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04209}04209     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04210}04210 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04211}04211     \textcolor{comment}{/* now wait until all pending commands are cleared */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04212}04212 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04213}04213     rc = \mbox{\hyperlink{ecore__sp_8c_afa16a6379ed01757caf80cbf7c9aa3f4}{ecore\_config\_mcast}}(sc, \&rparam, \mbox{\hyperlink{ecore__sp_8h_ac9e874ecf62c6b5d7ab51553b99d3958a308765f89aff54e43ee25f0a4a010e28}{ECORE\_MCAST\_CMD\_CONT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04214}04214     \textcolor{keywordflow}{while} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04215}04215         \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04216}04216             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to clean MCAST object (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04217}04217             \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04218}04218         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04219}04219 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04220}04220         rc = \mbox{\hyperlink{ecore__sp_8c_afa16a6379ed01757caf80cbf7c9aa3f4}{ecore\_config\_mcast}}(sc, \&rparam, \mbox{\hyperlink{ecore__sp_8h_ac9e874ecf62c6b5d7ab51553b99d3958a308765f89aff54e43ee25f0a4a010e28}{ECORE\_MCAST\_CMD\_CONT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04221}04221     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04222}04222 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04223}04223 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04224}04224 \textcolor{comment}{/* stop the controller */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04225}04225 \textcolor{keyword}{static} \_\_noinline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04226}\mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{04226}} \mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{bxe\_nic\_unload}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04227}04227                uint32\_t         unload\_mode,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04228}04228                uint8\_t          keep\_link)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04229}04229 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04230}04230     uint8\_t global = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04231}04231     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04232}04232     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04233}04233 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04234}04234     \mbox{\hyperlink{bxe_8h_a9e59019dafc482034b9e64604ce070ee}{BXE\_CORE\_LOCK\_ASSERT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04235}04235 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04236}04236     if\_setdrvflagbits(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, 0, IFF\_DRV\_RUNNING);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04237}04237 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04238}04238     \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04239}04239         \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04240}04240 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04241}04241         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04242}04242         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aad1db379ee18aa583fd47b943997ba19}{watchdog\_timer}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04243}04243         \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04244}04244         \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04245}04245     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04246}04246 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04247}04247     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Starting NIC unload...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04248}04248 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04249}04249     \textcolor{comment}{/* mark driver as unloaded in shmem2 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04250}04250     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) \&\& \mbox{\hyperlink{bxe_8h_a9589edd1f6702afb76918ed934dd0fa6}{SHMEM2\_HAS}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, drv\_capabilities\_flag)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04251}04251         val = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, drv\_capabilities\_flag[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04252}04252         \mbox{\hyperlink{bxe_8h_a4f67d23feca46834d51501224c0c22f9}{SHMEM2\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, drv\_capabilities\_flag[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04253}04253                   val \& \string~\mbox{\hyperlink{ecore__hsi_8h_a3005a45096ff38b52071aacaa52531c9}{DRV\_FLAGS\_CAPABILITIES\_LOADED\_L2}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04254}04254     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04255}04255 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04256}04256     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) \&\& \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} != \mbox{\hyperlink{bxe_8h_ae70e8a5625712b5a0f3c8c9af5107e5b}{BXE\_RECOVERY\_DONE}} \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04257}04257         (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}} || \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04258}04258 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04259}04259         \textcolor{keywordflow}{if}(\mbox{\hyperlink{bxe_8h_a41dbd7d7b2c3e98bd56fa929b0bb9710}{CHIP\_PORT\_MODE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) == \mbox{\hyperlink{bxe_8h_a016d31fc3005f6b5e4018d33ac1fd028}{CHIP\_4\_PORT\_MODE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04260}04260             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04261}04261 \textcolor{comment}{             * We can get here if the driver has been unloaded}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04262}04262 \textcolor{comment}{             * during parity error recovery and is either waiting for a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04263}04263 \textcolor{comment}{             * leader to complete or for other functions to unload and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04264}04264 \textcolor{comment}{             * then ifconfig down has been issued. In this case we want to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04265}04265 \textcolor{comment}{             * unload and let other functions to complete a recovery}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04266}04266 \textcolor{comment}{             * process.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04267}04267 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04268}04268             \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} = \mbox{\hyperlink{bxe_8h_ae70e8a5625712b5a0f3c8c9af5107e5b}{BXE\_RECOVERY\_DONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04269}04269             \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a58ff5b9b70ec4dba07f023959a63012b}{is\_leader}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04270}04270             \mbox{\hyperlink{bxe_8c_a2d21d8c7d71506277952a301e154ec1f}{bxe\_release\_leader\_lock}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04271}04271             mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04272}04272             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Releasing a leadership...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04273}04273         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04274}04274         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Can't unload in closed or error state recover\_state 0x\%x"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04275}04275             \textcolor{stringliteral}{"{} state = 0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04276}04276         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04277}04277     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04278}04278 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04279}04279     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04280}04280 \textcolor{comment}{     * Nothing to do during unload if previous bxe\_nic\_load()}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04281}04281 \textcolor{comment}{     * did not completed successfully -\/ all resourses are released.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04282}04282 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04283}04283     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04284}04284         (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04285}04285         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04286}04286     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04287}04287 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04288}04288     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a371c6f1be71f0c49e3d82b22f49337d9}{BXE\_STATE\_CLOSING\_WAITING\_HALT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04289}04289     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04290}04290 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04291}04291     \textcolor{comment}{/* stop tx */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04292}04292     \mbox{\hyperlink{bxe_8c_ae731d69bd5e491bceb7804c8c53407bf}{bxe\_tx\_disable}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04293}04293 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04294}04294     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a17c36e629d93822d520fd49218c91f35}{rx\_mode}} = \mbox{\hyperlink{bxe_8h_a08a8897d9e355038b5f370bc810740d6}{BXE\_RX\_MODE\_NONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04295}04295     \textcolor{comment}{/* XXX set rx mode ??? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04296}04296 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04297}04297     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) \&\& !\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04298}04298         \textcolor{comment}{/* set ALWAYS\_ALIVE bit in shmem */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04299}04299         \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a3685352e604bc0843e4e32082cbc739e}{fw\_drv\_pulse\_wr\_seq}} |= \mbox{\hyperlink{ecore__hsi_8h_a94d5dcf1a7e6e8e6055123b1e6eb34d6}{DRV\_PULSE\_ALWAYS\_ALIVE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04300}04300 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04301}04301         \mbox{\hyperlink{bxe_8c_a425ed51fb9bdf68f8dfe8c36a27374e5}{bxe\_drv\_pulse}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04302}04302 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04303}04303         \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026ac9e9e0b6f7a6b265aca64124b6d1ff19}{STATS\_EVENT\_STOP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04304}04304         \mbox{\hyperlink{bxe__stats_8c_a01ae2c5d2adc144fef12e9a46e295204}{bxe\_save\_statistics}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04305}04305     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04306}04306 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04307}04307     \textcolor{comment}{/* wait till consumers catch up with producers in all queues */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04308}04308     \mbox{\hyperlink{bxe_8c_add28c0514af058d1c2b9e9540423aced}{bxe\_drain\_tx\_queues}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04309}04309 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04310}04310     \textcolor{comment}{/* if VF indicate to PF this function is going down (PF will delete sp}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04311}04311 \textcolor{comment}{     * elements and clear initializations}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04312}04312 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04313}04313     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a564b2f75c1d5338c4625919e871035bb}{IS\_VF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04314}04314         ; \textcolor{comment}{/* bxe\_vfpf\_close\_vf(sc); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04315}04315     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (unload\_mode != \mbox{\hyperlink{bxe_8h_a773cb9796f3292c69b4036676617cbe5}{UNLOAD\_RECOVERY}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04316}04316         \textcolor{comment}{/* if this is a normal/close unload need to clean up chip */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04317}04317         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04318}04318             \mbox{\hyperlink{bxe_8c_a2e257b31f53b49cd7893f0efade0048a}{bxe\_chip\_cleanup}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, unload\_mode, keep\_link);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04319}04319     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04320}04320         \textcolor{comment}{/* Send the UNLOAD\_REQUEST to the MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04321}04321         \mbox{\hyperlink{bxe_8c_a6075ae4e08056b7cf5f372b6b3cd4757}{bxe\_send\_unload\_req}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, unload\_mode);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04322}04322 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04323}04323         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04324}04324 \textcolor{comment}{         * Prevent transactions to host from the functions on the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04325}04325 \textcolor{comment}{         * engine that doesn't reset global blocks in case of global}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04326}04326 \textcolor{comment}{         * attention once gloabl blocks are reset and gates are opened}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04327}04327 \textcolor{comment}{         * (the engine which leader will perform the recovery}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04328}04328 \textcolor{comment}{         * last).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04329}04329 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04330}04330         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04331}04331             \mbox{\hyperlink{bxe_8c_a2d96110aed3521282cc163243d1d0d2b}{bxe\_pf\_disable}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04332}04332         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04333}04333 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04334}04334         \textcolor{comment}{/* disable HW interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04335}04335         \mbox{\hyperlink{bxe_8c_a230ff44ea3aff5c5899ee8907f890f66}{bxe\_int\_disable\_sync}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04336}04336 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04337}04337         \textcolor{comment}{/* detach interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04338}04338         \mbox{\hyperlink{bxe_8c_afaf5ed29d000f45cc1191ed8e8e20c83}{bxe\_interrupt\_detach}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04339}04339 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04340}04340         \textcolor{comment}{/* Report UNLOAD\_DONE to MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04341}04341         \mbox{\hyperlink{bxe_8c_a65cc1d1cd365bb469c4051e74015b6dd}{bxe\_send\_unload\_done}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04342}04342     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04343}04343 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04344}04344     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04345}04345 \textcolor{comment}{     * At this stage no more interrupts will arrive so we may safely clean}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04346}04346 \textcolor{comment}{     * the queue'able objects here in case they failed to get cleaned so far.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04347}04347 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04348}04348     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04349}04349         \mbox{\hyperlink{bxe_8c_ae85a9f0c5f648920c50a860997039081}{bxe\_squeeze\_objects}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04350}04350     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04351}04351 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04352}04352     \textcolor{comment}{/* There should be no more pending SP commands at this stage */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04353}04353     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04354}04354 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04355}04355     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04356}04356 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04357}04357     \mbox{\hyperlink{bxe_8c_a7a62f7cb289e73886ab83bef2ba23505}{bxe\_free\_fp\_buffers}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04358}04358 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04359}04359     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04360}04360         \mbox{\hyperlink{bxe_8c_aba6356efb089c0f887dea37803476f0a}{bxe\_free\_mem}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04361}04361     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04362}04362 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04363}04363     \mbox{\hyperlink{bxe_8c_a5ed8b0cde61b05bee51f5a9925d30d55}{bxe\_free\_fw\_stats\_mem}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04364}04364 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04365}04365     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04366}04366 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04367}04367     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04368}04368 \textcolor{comment}{     * Check if there are pending parity attentions. If there are -\/ set}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04369}04369 \textcolor{comment}{     * RECOVERY\_IN\_PROGRESS.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04370}04370 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04371}04371     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) \&\& \mbox{\hyperlink{bxe_8c_a91656b2ffc7fe1c9ff94a04e05056801}{bxe\_chk\_parity\_attn}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&global, FALSE)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04372}04372         \mbox{\hyperlink{bxe_8c_a07b21b9de3ef7ccde7111feae924a352}{bxe\_set\_reset\_in\_progress}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04373}04373 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04374}04374         \textcolor{comment}{/* Set RESET\_IS\_GLOBAL if needed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04375}04375         \textcolor{keywordflow}{if} (global) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04376}04376             \mbox{\hyperlink{bxe_8c_a7de36a383e6f8ea6b0d5b095d815875e}{bxe\_set\_reset\_global}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04377}04377         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04378}04378     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04379}04379 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04380}04380     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04381}04381 \textcolor{comment}{     * The last driver must disable a "{}close the gate"{} if there is no}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04382}04382 \textcolor{comment}{     * parity attention or "{}process kill"{} pending.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04383}04383 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04384}04384     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) \&\& !\mbox{\hyperlink{bxe_8c_a3b974b2a5d6d0486240139fe74ec362d}{bxe\_clear\_pf\_load}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04385}04385         \mbox{\hyperlink{bxe_8c_aa8e60d884e752f4c51c8a313f973d00d}{bxe\_reset\_is\_done}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04386}04386         \mbox{\hyperlink{bxe_8c_a723148862dcfab6e8da515f4400e27d0}{bxe\_disable\_close\_the\_gate}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04387}04387     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04388}04388 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04389}04389     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Ended NIC unload\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04390}04390 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04391}04391     \mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{bxe\_link\_report}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04392}04392 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04393}04393     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04394}04394 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04395}04395 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04396}04396 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04397}04397 \textcolor{comment}{ * Called by the OS to set various media options (i.e. link, speed, etc.) when}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04398}04398 \textcolor{comment}{ * the user runs "{}ifconfig bxe media ..."{} or "{}ifconfig bxe mediaopt ..."{}.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04399}04399 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04400}04400 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04401}\mbox{\hyperlink{bxe_8c_ae93a31210137480069624faaaa30aba0}{04401}} \mbox{\hyperlink{bxe_8c_ae93a31210137480069624faaaa30aba0}{bxe\_ifmedia\_update}}(\textcolor{keyword}{struct} ifnet  *ifp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04402}04402 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04403}04403     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)if\_getsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04404}04404     \textcolor{keyword}{struct }ifmedia *ifm;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04405}04405 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04406}04406     ifm = \&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04407}04407 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04408}04408     \textcolor{comment}{/* We only support Ethernet media type. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04409}04409     \textcolor{keywordflow}{if} (IFM\_TYPE(ifm-\/>ifm\_media) != IFM\_ETHER) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04410}04410         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04411}04411     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04412}04412 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04413}04413     \textcolor{keywordflow}{switch} (IFM\_SUBTYPE(ifm-\/>ifm\_media)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04414}04414     \textcolor{keywordflow}{case} IFM\_AUTO:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04415}04415          \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04416}04416     \textcolor{keywordflow}{case} IFM\_10G\_CX4:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04417}04417     \textcolor{keywordflow}{case} IFM\_10G\_SR:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04418}04418     \textcolor{keywordflow}{case} IFM\_10G\_T:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04419}04419     \textcolor{keywordflow}{case} IFM\_10G\_TWINAX:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04420}04420     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04421}04421         \textcolor{comment}{/* We don't support changing the media type. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04422}04422         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Invalid media type (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04423}04423               IFM\_SUBTYPE(ifm-\/>ifm\_media));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04424}04424         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04425}04425     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04426}04426 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04427}04427     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04428}04428 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04429}04429 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04430}04430 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04431}04431 \textcolor{comment}{ * Called by the OS to get the current media status (i.e. link, speed, etc.).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04432}04432 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04433}04433 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04434}\mbox{\hyperlink{bxe_8c_a2cc3575690a7fd98d1bf3242bb15f456}{04434}} \mbox{\hyperlink{bxe_8c_a2cc3575690a7fd98d1bf3242bb15f456}{bxe\_ifmedia\_status}}(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keyword}{struct} ifmediareq *ifmr)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04435}04435 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04436}04436     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = if\_getsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04437}04437 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04438}04438     \textcolor{comment}{/* Bug 165447: the 'ifconfig' tool skips printing of the "{}status: ..."{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04439}04439 \textcolor{comment}{       line if the IFM\_AVALID flag is *NOT* set. So we need to set this}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04440}04440 \textcolor{comment}{       flag unconditionally (irrespective of the admininistrative}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04441}04441 \textcolor{comment}{       'up/down' state of the interface) to ensure that that line is always}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04442}04442 \textcolor{comment}{       displayed.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04443}04443 \textcolor{comment}{    */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04444}04444     ifmr-\/>ifm\_status = IFM\_AVALID;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04445}04445 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04446}04446     \textcolor{comment}{/* Setup the default interface info. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04447}04447     ifmr-\/>ifm\_active = IFM\_ETHER;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04448}04448 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04449}04449     \textcolor{comment}{/* Report link down if the driver isn't running. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04450}04450     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04451}04451         ifmr-\/>ifm\_active |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04452}04452         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}}, \textcolor{stringliteral}{"{}in \%s : nic still not loaded fully\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04453}04453         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}}, \textcolor{stringliteral}{"{}in \%s : link\_up (1) : \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04454}04454                 \_\_func\_\_, sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04455}04455         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04456}04456     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04457}04457 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04458}04458 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04459}04459     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04460}04460         ifmr-\/>ifm\_status |= IFM\_ACTIVE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04461}04461         ifmr-\/>ifm\_active |= IFM\_FDX;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04462}04462     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04463}04463         ifmr-\/>ifm\_active |= IFM\_NONE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04464}04464         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab9cc7216231348103922733be8e0ad3}{DBG\_PHY}}, \textcolor{stringliteral}{"{}in \%s : setting IFM\_NONE\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04465}04465                 \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04466}04466         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04467}04467     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04468}04468 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04469}04469     ifmr-\/>ifm\_active |= sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04470}04470     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04471}04471 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04472}04472 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04473}04473 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04474}\mbox{\hyperlink{bxe_8c_af50380fbbd87214f52cbac7b9c6568b9}{04474}} \mbox{\hyperlink{bxe_8c_af50380fbbd87214f52cbac7b9c6568b9}{bxe\_handle\_chip\_tq}}(\textcolor{keywordtype}{void} *\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04475}04475                    \textcolor{keywordtype}{int}  pending)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04476}04476 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04477}04477     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04478}04478     \textcolor{keywordtype}{long} work = atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a7db11a1c0519f177e82a03478047579a}{chip\_tq\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04479}04479 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04480}04480     \textcolor{keywordflow}{switch} (work)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04481}04481     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04482}04482 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04483}04483     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_ae387e2902be58ab4cb5193ec605f127d}{CHIP\_TQ\_REINIT}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04484}04484         \textcolor{keywordflow}{if} (if\_getdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04485}04485             \textcolor{comment}{/* restart the interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04486}04486             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Restarting the interface...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04487}04487             \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04488}04488             \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04489}04489             \mbox{\hyperlink{bxe_8c_af3af3c28c0e5d3f4eeea043b064421a0}{bxe\_stop\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04490}04490             \mbox{\hyperlink{bxe_8c_a4d3093814fd53cc5033263719a5d0c02}{bxe\_init\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04491}04491             \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04492}04492         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04493}04493         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04494}04494 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04495}04495     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04496}04496         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04497}04497     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04498}04498 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04499}04499 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04500}04500 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04501}04501 \textcolor{comment}{ * Handles any IOCTL calls from the operating system.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04502}04502 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04503}04503 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04504}04504 \textcolor{comment}{ *   0 = Success, >0 Failure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04505}04505 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04506}04506 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04507}\mbox{\hyperlink{bxe_8c_aa1947455972f6d27958d07910f4c7827}{04507}} \mbox{\hyperlink{bxe_8c_aa1947455972f6d27958d07910f4c7827}{bxe\_ioctl}}(if\_t \mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04508}04508           u\_long       command,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04509}04509           caddr\_t      data)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04510}04510 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04511}04511     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = if\_getsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04512}04512     \textcolor{keyword}{struct }ifreq *ifr = (\textcolor{keyword}{struct }ifreq *)data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04513}04513     \textcolor{keywordtype}{int} mask = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04514}04514     \textcolor{keywordtype}{int} reinit = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04515}04515     \textcolor{keywordtype}{int} error = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04516}04516 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04517}04517     \textcolor{keywordtype}{int} mtu\_min = (\mbox{\hyperlink{bxe_8h_af5c7587a2824c8a0168c73de9f66e969}{ETH\_MIN\_PACKET\_SIZE}} -\/ \mbox{\hyperlink{bxe_8h_adec6db76cf213beb1c4ad4e7bf4d466d}{ETH\_HLEN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04518}04518     \textcolor{keywordtype}{int} mtu\_max = (MJUM9BYTES -\/ \mbox{\hyperlink{bxe_8h_a0c8d25f2aa5e9ac966516442b13f8d62}{ETH\_OVERHEAD}} -\/ \mbox{\hyperlink{ecore__fw__defs_8h_a9fa72350cc9e5cacea13852e4c5ea13f}{IP\_HEADER\_ALIGNMENT\_PADDING}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04519}04519 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04520}04520     \textcolor{keywordflow}{switch} (command)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04521}04521     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04522}04522     \textcolor{keywordflow}{case} SIOCSIFMTU:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04523}04523         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Received SIOCSIFMTU ioctl (mtu=\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04524}04524               ifr-\/>ifr\_mtu);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04525}04525 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04526}04526         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}} == ifr-\/>ifr\_mtu) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04527}04527             \textcolor{comment}{/* nothing to change */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04528}04528             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04529}04529         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04530}04530 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04531}04531         \textcolor{keywordflow}{if} ((ifr-\/>ifr\_mtu < mtu\_min) || (ifr-\/>ifr\_mtu > mtu\_max)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04532}04532             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unsupported MTU size \%d (range is \%d-\/\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04533}04533                   ifr-\/>ifr\_mtu, mtu\_min, mtu\_max);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04534}04534             error = EINVAL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04535}04535             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04536}04536         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04537}04537 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04538}04538         atomic\_store\_rel\_int((\textcolor{keyword}{volatile} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} *)\&sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04539}04539                              (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})ifr-\/>ifr\_mtu);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04540}04540         \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04541}04541 \textcolor{comment}{        atomic\_store\_rel\_long((volatile unsigned long *)\&if\_getmtu(ifp),}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04542}04542 \textcolor{comment}{                              (unsigned long)ifr-\/>ifr\_mtu);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04543}04543 \textcolor{comment}{        XXX -\/ Not sure why it needs to be atomic}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04544}04544 \textcolor{comment}{        */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04545}04545         if\_setmtu(ifp, ifr-\/>ifr\_mtu);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04546}04546         reinit = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04547}04547         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04548}04548 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04549}04549     \textcolor{keywordflow}{case} SIOCSIFFLAGS:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04550}04550         \textcolor{comment}{/* toggle the interface state up or down */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04551}04551         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Received SIOCSIFFLAGS ioctl\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04552}04552 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04553}04553         \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04554}04554         \textcolor{comment}{/* check if the interface is up */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04555}04555         \textcolor{keywordflow}{if} (if\_getflags(ifp) \& IFF\_UP) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04556}04556             \textcolor{keywordflow}{if} (if\_getdrvflags(ifp) \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04557}04557                 \textcolor{comment}{/* set the receive mode flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04558}04558                 \mbox{\hyperlink{bxe_8c_af825a655512115af8f521c40de63426d}{bxe\_set\_rx\_mode}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04559}04559             \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a4adbb737cab9288b4815aae574d0614a}{BXE\_STATE\_DISABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04560}04560                 \mbox{\hyperlink{bxe_8c_a4d3093814fd53cc5033263719a5d0c02}{bxe\_init\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04561}04561             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04562}04562         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04563}04563             \textcolor{keywordflow}{if} (if\_getdrvflags(ifp) \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04564}04564                 \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04565}04565                 \mbox{\hyperlink{bxe_8c_af3af3c28c0e5d3f4eeea043b064421a0}{bxe\_stop\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04566}04566             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04567}04567         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04568}04568         \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04569}04569 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04570}04570         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04571}04571 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04572}04572     \textcolor{keywordflow}{case} SIOCADDMULTI:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04573}04573     \textcolor{keywordflow}{case} SIOCDELMULTI:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04574}04574         \textcolor{comment}{/* add/delete multicast addresses */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04575}04575         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Received SIOCADDMULTI/SIOCDELMULTI ioctl\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04576}04576 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04577}04577         \textcolor{comment}{/* check if the interface is up */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04578}04578         \textcolor{keywordflow}{if} (if\_getdrvflags(ifp) \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04579}04579             \textcolor{comment}{/* set the receive mode flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04580}04580             \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04581}04581             \mbox{\hyperlink{bxe_8c_af825a655512115af8f521c40de63426d}{bxe\_set\_rx\_mode}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04582}04582             \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc); }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04583}04583         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04584}04584 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04585}04585         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04586}04586 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04587}04587     \textcolor{keywordflow}{case} SIOCSIFCAP:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04588}04588         \textcolor{comment}{/* find out which capabilities have changed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04589}04589         mask = (ifr-\/>ifr\_reqcap \string^ if\_getcapenable(ifp));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04590}04590 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04591}04591         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Received SIOCSIFCAP ioctl (mask=0x\%08x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04592}04592               mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04593}04593 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04594}04594         \textcolor{comment}{/* toggle the LRO capabilites enable flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04595}04595         \textcolor{keywordflow}{if} (mask \& IFCAP\_LRO) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04596}04596             if\_togglecapenable(ifp, IFCAP\_LRO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04597}04597             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Turning LRO \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04598}04598                   (if\_getcapenable(ifp) \& IFCAP\_LRO) ? \textcolor{stringliteral}{"{}ON"{}} : \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04599}04599             reinit = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04600}04600         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04601}04601 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04602}04602         \textcolor{comment}{/* toggle the TXCSUM checksum capabilites enable flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04603}04603         \textcolor{keywordflow}{if} (mask \& IFCAP\_TXCSUM) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04604}04604             if\_togglecapenable(ifp, IFCAP\_TXCSUM);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04605}04605             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Turning TXCSUM \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04606}04606                   (if\_getcapenable(ifp) \& IFCAP\_TXCSUM) ? \textcolor{stringliteral}{"{}ON"{}} : \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04607}04607             \textcolor{keywordflow}{if} (if\_getcapenable(ifp) \& IFCAP\_TXCSUM) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04608}04608                 if\_sethwassistbits(ifp, (CSUM\_IP      | }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04609}04609                                     CSUM\_TCP      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04610}04610                                     CSUM\_UDP      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04611}04611                                     CSUM\_TSO      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04612}04612                                     \mbox{\hyperlink{bxe_8c_a56b8481078a714eaa80d3021e9018375}{CSUM\_TCP\_IPV6}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04613}04613                                     \mbox{\hyperlink{bxe_8c_a37bf64f3447600af0819e071353fdfc6}{CSUM\_UDP\_IPV6}}), 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04614}04614             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04615}04615                 if\_clearhwassist(ifp); \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04616}04616             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04617}04617         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04618}04618 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04619}04619         \textcolor{comment}{/* toggle the RXCSUM checksum capabilities enable flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04620}04620         \textcolor{keywordflow}{if} (mask \& IFCAP\_RXCSUM) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04621}04621             if\_togglecapenable(ifp, IFCAP\_RXCSUM);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04622}04622             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Turning RXCSUM \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04623}04623                   (if\_getcapenable(ifp) \& IFCAP\_RXCSUM) ? \textcolor{stringliteral}{"{}ON"{}} : \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04624}04624             \textcolor{keywordflow}{if} (if\_getcapenable(ifp) \& IFCAP\_RXCSUM) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04625}04625                 if\_sethwassistbits(ifp, (CSUM\_IP      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04626}04626                                     CSUM\_TCP      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04627}04627                                     CSUM\_UDP      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04628}04628                                     CSUM\_TSO      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04629}04629                                     \mbox{\hyperlink{bxe_8c_a56b8481078a714eaa80d3021e9018375}{CSUM\_TCP\_IPV6}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04630}04630                                     \mbox{\hyperlink{bxe_8c_a37bf64f3447600af0819e071353fdfc6}{CSUM\_UDP\_IPV6}}), 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04631}04631             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04632}04632                 if\_clearhwassist(ifp); \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04633}04633             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04634}04634         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04635}04635 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04636}04636         \textcolor{comment}{/* toggle TSO4 capabilities enabled flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04637}04637         \textcolor{keywordflow}{if} (mask \& IFCAP\_TSO4) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04638}04638             if\_togglecapenable(ifp, IFCAP\_TSO4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04639}04639             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Turning TSO4 \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04640}04640                   (if\_getcapenable(ifp) \& IFCAP\_TSO4) ? \textcolor{stringliteral}{"{}ON"{}} : \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04641}04641         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04642}04642 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04643}04643         \textcolor{comment}{/* toggle TSO6 capabilities enabled flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04644}04644         \textcolor{keywordflow}{if} (mask \& IFCAP\_TSO6) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04645}04645             if\_togglecapenable(ifp, IFCAP\_TSO6);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04646}04646             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Turning TSO6 \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04647}04647                   (if\_getcapenable(ifp) \& IFCAP\_TSO6) ? \textcolor{stringliteral}{"{}ON"{}} : \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04648}04648         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04649}04649 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04650}04650         \textcolor{comment}{/* toggle VLAN\_HWTSO capabilities enabled flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04651}04651         \textcolor{keywordflow}{if} (mask \& IFCAP\_VLAN\_HWTSO) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04652}04652 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04653}04653             if\_togglecapenable(ifp, IFCAP\_VLAN\_HWTSO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04654}04654             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Turning VLAN\_HWTSO \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04655}04655                   (if\_getcapenable(ifp) \& IFCAP\_VLAN\_HWTSO) ? \textcolor{stringliteral}{"{}ON"{}} : \textcolor{stringliteral}{"{}OFF"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04656}04656         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04657}04657 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04658}04658         \textcolor{comment}{/* toggle VLAN\_HWCSUM capabilities enabled flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04659}04659         \textcolor{keywordflow}{if} (mask \& IFCAP\_VLAN\_HWCSUM) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04660}04660             \textcolor{comment}{/* XXX investigate this... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04661}04661             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Changing VLAN\_HWCSUM is not supported!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04662}04662             error = EINVAL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04663}04663         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04664}04664 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04665}04665         \textcolor{comment}{/* toggle VLAN\_MTU capabilities enable flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04666}04666         \textcolor{keywordflow}{if} (mask \& IFCAP\_VLAN\_MTU) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04667}04667             \textcolor{comment}{/* XXX investigate this... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04668}04668             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Changing VLAN\_MTU is not supported!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04669}04669             error = EINVAL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04670}04670         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04671}04671 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04672}04672         \textcolor{comment}{/* toggle VLAN\_HWTAGGING capabilities enabled flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04673}04673         \textcolor{keywordflow}{if} (mask \& IFCAP\_VLAN\_HWTAGGING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04674}04674             \textcolor{comment}{/* XXX investigate this... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04675}04675             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Changing VLAN\_HWTAGGING is not supported!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04676}04676             error = EINVAL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04677}04677         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04678}04678 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04679}04679         \textcolor{comment}{/* toggle VLAN\_HWFILTER capabilities enabled flag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04680}04680         \textcolor{keywordflow}{if} (mask \& IFCAP\_VLAN\_HWFILTER) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04681}04681             \textcolor{comment}{/* XXX investigate this... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04682}04682             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Changing VLAN\_HWFILTER is not supported!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04683}04683             error = EINVAL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04684}04684         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04685}04685 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04686}04686         \textcolor{comment}{/* XXX not yet...}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04687}04687 \textcolor{comment}{         * IFCAP\_WOL\_MAGIC}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04688}04688 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04689}04689 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04690}04690         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04691}04691 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04692}04692     \textcolor{keywordflow}{case} SIOCSIFMEDIA:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04693}04693     \textcolor{keywordflow}{case} SIOCGIFMEDIA:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04694}04694         \textcolor{comment}{/* set/get interface media */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04695}04695         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04696}04696               \textcolor{stringliteral}{"{}Received SIOCSIFMEDIA/SIOCGIFMEDIA ioctl (cmd=\%lu)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04697}04697               (command \& 0xff));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04698}04698         error = ifmedia\_ioctl(ifp, ifr, \&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}}, command);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04699}04699         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04700}04700 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04701}04701     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04702}04702         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}}, \textcolor{stringliteral}{"{}Received Unknown Ioctl (cmd=\%lu)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04703}04703               (command \& 0xff));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04704}04704         error = ether\_ioctl(ifp, command, data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04705}04705         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04706}04706     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04707}04707 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04708}04708     \textcolor{keywordflow}{if} (reinit \&\& (if\_getdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04709}04709         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}} | \mbox{\hyperlink{bxe_8h_ae607377e41951dcf3b46b4b6f6f68240}{DBG\_IOCTL}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04710}04710               \textcolor{stringliteral}{"{}Re-\/initializing hardware from IOCTL change\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04711}04711         \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04712}04712         \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04713}04713         \mbox{\hyperlink{bxe_8c_af3af3c28c0e5d3f4eeea043b064421a0}{bxe\_stop\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04714}04714         \mbox{\hyperlink{bxe_8c_a4d3093814fd53cc5033263719a5d0c02}{bxe\_init\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04715}04715         \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04716}04716     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04717}04717 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04718}04718     \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04719}04719 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04720}04720 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04721}04721 \textcolor{keyword}{static} \_\_noinline \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04722}\mbox{\hyperlink{bxe_8c_a38420aca9e66a107397ba4f2ac9a09bb}{04722}} \mbox{\hyperlink{bxe_8c_a38420aca9e66a107397ba4f2ac9a09bb}{bxe\_dump\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04723}04723               \textcolor{keyword}{struct} mbuf      *m,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04724}04724               uint8\_t          contents)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04725}04725 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04726}04726     \textcolor{keywordtype}{char} * type;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04727}04727     \textcolor{keywordtype}{int} i = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04728}04728 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04729}04729     \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_a5f4eec668b4a624c50d20ac0da6d34cf}{debug}} \& \mbox{\hyperlink{bxe_8h_ab597812eabed87ce5b01c175cbfa638d}{DBG\_MBUF}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04730}04730         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04731}04731     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04732}04732 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04733}04733     \textcolor{keywordflow}{if} (m == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04734}04734         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab597812eabed87ce5b01c175cbfa638d}{DBG\_MBUF}}, \textcolor{stringliteral}{"{}mbuf: null pointer\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04735}04735         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04736}04736     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04737}04737 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04738}04738     \textcolor{keywordflow}{while} (m) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04739}04739 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04740}04740         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab597812eabed87ce5b01c175cbfa638d}{DBG\_MBUF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04741}04741               \textcolor{stringliteral}{"{}\%02d: mbuf=\%p m\_len=\%d m\_flags=0x\%b m\_data=\%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04742}04742               i, m, m-\/>m\_len, m-\/>m\_flags, M\_FLAG\_BITS, m-\/>m\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04743}04743 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04744}04744         \textcolor{keywordflow}{if} (m-\/>m\_flags \& M\_PKTHDR) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04745}04745              \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab597812eabed87ce5b01c175cbfa638d}{DBG\_MBUF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04746}04746                    \textcolor{stringliteral}{"{}\%02d: -\/ m\_pkthdr: tot\_len=\%d flags=0x\%b csum\_flags=\%b\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04747}04747                    i, m-\/>m\_pkthdr.len, m-\/>m\_flags, M\_FLAG\_BITS,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04748}04748                    (\textcolor{keywordtype}{int})m-\/>m\_pkthdr.csum\_flags, CSUM\_BITS);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04749}04749         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04750}04750 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04751}04751         \textcolor{keywordflow}{if} (m-\/>m\_flags \& M\_EXT) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04752}04752             \textcolor{keywordflow}{switch} (m-\/>m\_ext.ext\_type) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04753}04753             \textcolor{keywordflow}{case} EXT\_CLUSTER:    type = \textcolor{stringliteral}{"{}EXT\_CLUSTER"{}};    \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04754}04754             \textcolor{keywordflow}{case} EXT\_SFBUF:      type = \textcolor{stringliteral}{"{}EXT\_SFBUF"{}};      \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04755}04755             \textcolor{keywordflow}{case} EXT\_JUMBOP:     type = \textcolor{stringliteral}{"{}EXT\_JUMBOP"{}};     \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04756}04756             \textcolor{keywordflow}{case} EXT\_JUMBO9:     type = \textcolor{stringliteral}{"{}EXT\_JUMBO9"{}};     \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04757}04757             \textcolor{keywordflow}{case} EXT\_JUMBO16:    type = \textcolor{stringliteral}{"{}EXT\_JUMBO16"{}};    \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04758}04758             \textcolor{keywordflow}{case} EXT\_PACKET:     type = \textcolor{stringliteral}{"{}EXT\_PACKET"{}};     \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04759}04759             \textcolor{keywordflow}{case} EXT\_MBUF:       type = \textcolor{stringliteral}{"{}EXT\_MBUF"{}};       \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04760}04760             \textcolor{keywordflow}{case} EXT\_NET\_DRV:    type = \textcolor{stringliteral}{"{}EXT\_NET\_DRV"{}};    \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04761}04761             \textcolor{keywordflow}{case} EXT\_MOD\_TYPE:   type = \textcolor{stringliteral}{"{}EXT\_MOD\_TYPE"{}};   \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04762}04762             \textcolor{keywordflow}{case} EXT\_DISPOSABLE: type = \textcolor{stringliteral}{"{}EXT\_DISPOSABLE"{}}; \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04763}04763             \textcolor{keywordflow}{case} EXT\_EXTREF:     type = \textcolor{stringliteral}{"{}EXT\_EXTREF"{}};     \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04764}04764             \textcolor{keywordflow}{default}:             type = \textcolor{stringliteral}{"{}UNKNOWN"{}};        \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04765}04765             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04766}04766 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04767}04767             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab597812eabed87ce5b01c175cbfa638d}{DBG\_MBUF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04768}04768                   \textcolor{stringliteral}{"{}\%02d: -\/ m\_ext: \%p ext\_size=\%d type=\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04769}04769                   i, m-\/>m\_ext.ext\_buf, m-\/>m\_ext.ext\_size, type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04770}04770         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04771}04771 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04772}04772         \textcolor{keywordflow}{if} (contents) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04773}04773             \mbox{\hyperlink{bxe_8h_a5c274a6378dbffea80f0c0d6d9745f7f}{bxe\_dump\_mbuf\_data}}(sc, \textcolor{stringliteral}{"{}mbuf data"{}}, m, TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04774}04774         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04775}04775 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04776}04776         m = m-\/>m\_next;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04777}04777         i++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04778}04778     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04779}04779 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04780}04780 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04781}04781 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04782}04782 \textcolor{comment}{ * Checks to ensure the 13 bd sliding window is >= MSS for TSO.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04783}04783 \textcolor{comment}{ * Check that (13 total bds -\/ 3 bds) = 10 bd window >= MSS.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04784}04784 \textcolor{comment}{ * The window: 3 bds are = 1 for headers BD + 2 for parse BD and last BD}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04785}04785 \textcolor{comment}{ * The headers comes in a separate bd in FreeBSD so 13-\/3=10.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04786}04786 \textcolor{comment}{ * Returns: 0 if OK to send, 1 if packet needs further defragmentation}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04787}04787 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04788}04788 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04789}\mbox{\hyperlink{bxe_8c_aa40355eea1f5097131a7ee4020966a5b}{04789}} \mbox{\hyperlink{bxe_8c_aa40355eea1f5097131a7ee4020966a5b}{bxe\_chktso\_window}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}  *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04790}04790                   \textcolor{keywordtype}{int}               nsegs,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04791}04791                   bus\_dma\_segment\_t *segs,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04792}04792                   \textcolor{keyword}{struct} mbuf       *m)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04793}04793 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04794}04794     uint32\_t num\_wnds, wnd\_size, wnd\_sum;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04795}04795     int32\_t frag\_idx, wnd\_idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04796}04796     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} lso\_mss;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04797}04797 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04798}04798     wnd\_sum = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04799}04799     wnd\_size = 10;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04800}04800     num\_wnds = nsegs -\/ wnd\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04801}04801     lso\_mss = htole16(m-\/>m\_pkthdr.tso\_segsz);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04802}04802 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04803}04803     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04804}04804 \textcolor{comment}{     * Total header lengths Eth+IP+TCP in first FreeBSD mbuf so calculate the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04805}04805 \textcolor{comment}{     * first window sum of data while skipping the first assuming it is the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04806}04806 \textcolor{comment}{     * header in FreeBSD.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04807}04807 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04808}04808     \textcolor{keywordflow}{for} (frag\_idx = 1; (frag\_idx <= wnd\_size); frag\_idx++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04809}04809         wnd\_sum += htole16(segs[frag\_idx].ds\_len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04810}04810     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04811}04811 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04812}04812     \textcolor{comment}{/* check the first 10 bd window size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04813}04813     \textcolor{keywordflow}{if} (wnd\_sum < lso\_mss) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04814}04814         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04815}04815     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04816}04816 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04817}04817     \textcolor{comment}{/* run through the windows */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04818}04818     \textcolor{keywordflow}{for} (wnd\_idx = 0; wnd\_idx < num\_wnds; wnd\_idx++, frag\_idx++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04819}04819         \textcolor{comment}{/* subtract the first mbuf-\/>m\_len of the last wndw(-\/header) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04820}04820         wnd\_sum -\/= htole16(segs[wnd\_idx+1].ds\_len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04821}04821         \textcolor{comment}{/* add the next mbuf len to the len of our new window */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04822}04822         wnd\_sum += htole16(segs[frag\_idx].ds\_len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04823}04823         \textcolor{keywordflow}{if} (wnd\_sum < lso\_mss) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04824}04824             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04825}04825         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04826}04826     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04827}04827 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04828}04828     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04829}04829 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04830}04830 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04831}04831 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04832}\mbox{\hyperlink{bxe_8c_a9f0b36d15f033bfc985f2558ea0ead66}{04832}} \mbox{\hyperlink{bxe_8c_a9f0b36d15f033bfc985f2558ea0ead66}{bxe\_set\_pbd\_csum\_e2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04833}04833                     \textcolor{keyword}{struct} mbuf         *m,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04834}04834                     uint32\_t            *parsing\_data)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04835}04835 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04836}04836     \textcolor{keyword}{struct }ether\_vlan\_header *eh = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04837}04837     \textcolor{keyword}{struct }ip *ip4 = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04838}04838     \textcolor{keyword}{struct }ip6\_hdr *ip6 = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04839}04839     caddr\_t ip = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04840}04840     \textcolor{keyword}{struct }tcphdr *th = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04841}04841     \textcolor{keywordtype}{int} e\_hlen, ip\_hlen, l4\_off;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04842}04842     uint16\_t proto;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04843}04843 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04844}04844     \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.csum\_flags == CSUM\_IP) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04845}04845         \textcolor{comment}{/* no L4 checksum offload needed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04846}04846         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04847}04847     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04848}04848 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04849}04849     \textcolor{comment}{/* get the Ethernet header */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04850}04850     eh = mtod(m, \textcolor{keyword}{struct} ether\_vlan\_header *);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04851}04851 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04852}04852     \textcolor{comment}{/* handle VLAN encapsulation if present */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04853}04853     \textcolor{keywordflow}{if} (eh-\/>evl\_encap\_proto == htons(ETHERTYPE\_VLAN)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04854}04854         e\_hlen = (ETHER\_HDR\_LEN + ETHER\_VLAN\_ENCAP\_LEN);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04855}04855         proto  = ntohs(eh-\/>evl\_proto);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04856}04856     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04857}04857         e\_hlen = ETHER\_HDR\_LEN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04858}04858         proto  = ntohs(eh-\/>evl\_encap\_proto);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04859}04859     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04860}04860 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04861}04861     \textcolor{keywordflow}{switch} (proto) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04862}04862     \textcolor{keywordflow}{case} ETHERTYPE\_IP:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04863}04863         \textcolor{comment}{/* get the IP header, if mbuf len < 20 then header in next mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04864}04864         ip4 = (m-\/>m\_len < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }ip)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04865}04865                   (struct ip *)m-\/>m\_next-\/>m\_data :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04866}04866                   (\textcolor{keyword}{struct} ip *)(m-\/>m\_data + e\_hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04867}04867         \textcolor{comment}{/* ip\_hl is number of 32-\/bit words */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04868}04868         ip\_hlen = (ip4-\/>ip\_hl << 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04869}04869         ip = (caddr\_t)ip4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04870}04870         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04871}04871     \textcolor{keywordflow}{case} ETHERTYPE\_IPV6:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04872}04872         \textcolor{comment}{/* get the IPv6 header, if mbuf len < 40 then header in next mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04873}04873         ip6 = (m-\/>m\_len < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }ip6\_hdr)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04874}04874                   (struct ip6\_hdr *)m-\/>m\_next-\/>m\_data :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04875}04875                   (\textcolor{keyword}{struct} ip6\_hdr *)(m-\/>m\_data + e\_hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04876}04876         \textcolor{comment}{/* XXX cannot support offload with IPv6 extensions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04877}04877         ip\_hlen = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }ip6\_hdr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04878}04878         ip = (caddr\_t)ip6;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04879}04879         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04880}04880     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04881}04881         \textcolor{comment}{/* We can't offload in this case... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04882}04882         \textcolor{comment}{/* XXX error stat ??? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04883}04883         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04884}04884     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04885}04885 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04886}04886     \textcolor{comment}{/* XXX assuming L4 header is contiguous to IPv4/IPv6 in the same mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04887}04887     l4\_off = (e\_hlen + ip\_hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04888}04888 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04889}04889     *parsing\_data |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04890}04890         (((l4\_off >> 1) << \mbox{\hyperlink{ecore__hsi_8h_a0562f060f101d7f32b7813cb00a09ec9}{ETH\_TX\_PARSE\_BD\_E2\_L4\_HDR\_START\_OFFSET\_W\_SHIFT}}) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04891}04891          \mbox{\hyperlink{ecore__hsi_8h_a57c4993bacb5ace81b5823e1d6218e7a}{ETH\_TX\_PARSE\_BD\_E2\_L4\_HDR\_START\_OFFSET\_W}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04892}04892 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04893}04893     \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.csum\_flags \& (CSUM\_TCP |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04894}04894                                   CSUM\_TSO |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04895}04895                                   \mbox{\hyperlink{bxe_8c_a56b8481078a714eaa80d3021e9018375}{CSUM\_TCP\_IPV6}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04896}04896         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_af9a61705bc69bfea00cb753c788efaf7}{tx\_ofld\_frames\_csum\_tcp}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04897}04897         th = (\textcolor{keyword}{struct }tcphdr *)(ip + ip\_hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04898}04898         \textcolor{comment}{/* th\_off is number of 32-\/bit words */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04899}04899         *parsing\_data |= ((th-\/>th\_off <<}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04900}04900                            \mbox{\hyperlink{ecore__hsi_8h_abca0e5bf75a44254fa9b74214aadde33}{ETH\_TX\_PARSE\_BD\_E2\_TCP\_HDR\_LENGTH\_DW\_SHIFT}}) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04901}04901                           \mbox{\hyperlink{ecore__hsi_8h_acce8d87b802fde61799b31bbc89c8a52}{ETH\_TX\_PARSE\_BD\_E2\_TCP\_HDR\_LENGTH\_DW}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04902}04902         \textcolor{keywordflow}{return} (l4\_off + (th-\/>th\_off << 2)); \textcolor{comment}{/* entire header length */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04903}04903     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.csum\_flags \& (CSUM\_UDP |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04904}04904                                          \mbox{\hyperlink{bxe_8c_a37bf64f3447600af0819e071353fdfc6}{CSUM\_UDP\_IPV6}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04905}04905         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a75ddcaf71937fa39d023ee0c98dcbf46}{tx\_ofld\_frames\_csum\_udp}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04906}04906         \textcolor{keywordflow}{return} (l4\_off + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} udphdr)); \textcolor{comment}{/* entire header length */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04907}04907     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04908}04908         \textcolor{comment}{/* XXX error stat ??? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04909}04909         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04910}04910     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04911}04911 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04912}04912 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04913}04913 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04914}\mbox{\hyperlink{bxe_8c_a0c4ed8f926849a6bb2f917735f29fd55}{04914}} \mbox{\hyperlink{bxe_8c_a0c4ed8f926849a6bb2f917735f29fd55}{bxe\_set\_pbd\_csum}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}        *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04915}04915                  \textcolor{keyword}{struct} mbuf                *m,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04916}04916                  \textcolor{keyword}{struct} \mbox{\hyperlink{structeth__tx__parse__bd__e1x}{eth\_tx\_parse\_bd\_e1x}} *pbd)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04917}04917 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04918}04918     \textcolor{keyword}{struct }ether\_vlan\_header *eh = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04919}04919     \textcolor{keyword}{struct }ip *ip4 = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04920}04920     \textcolor{keyword}{struct }ip6\_hdr *ip6 = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04921}04921     caddr\_t ip = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04922}04922     \textcolor{keyword}{struct }tcphdr *th = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04923}04923     \textcolor{keyword}{struct }udphdr *uh = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04924}04924     \textcolor{keywordtype}{int} e\_hlen, ip\_hlen;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04925}04925     uint16\_t proto;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04926}04926     uint8\_t hlen;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04927}04927     uint16\_t tmp\_csum;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04928}04928     uint32\_t *tmp\_uh;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04929}04929 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04930}04930     \textcolor{comment}{/* get the Ethernet header */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04931}04931     eh = mtod(m, \textcolor{keyword}{struct} ether\_vlan\_header *);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04932}04932 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04933}04933     \textcolor{comment}{/* handle VLAN encapsulation if present */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04934}04934     \textcolor{keywordflow}{if} (eh-\/>evl\_encap\_proto == htons(ETHERTYPE\_VLAN)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04935}04935         e\_hlen = (ETHER\_HDR\_LEN + ETHER\_VLAN\_ENCAP\_LEN);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04936}04936         proto  = ntohs(eh-\/>evl\_proto);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04937}04937     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04938}04938         e\_hlen = ETHER\_HDR\_LEN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04939}04939         proto  = ntohs(eh-\/>evl\_encap\_proto);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04940}04940     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04941}04941 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04942}04942     \textcolor{keywordflow}{switch} (proto) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04943}04943     \textcolor{keywordflow}{case} ETHERTYPE\_IP:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04944}04944         \textcolor{comment}{/* get the IP header, if mbuf len < 20 then header in next mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04945}04945         ip4 = (m-\/>m\_len < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }ip)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04946}04946                   (struct ip *)m-\/>m\_next-\/>m\_data :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04947}04947                   (\textcolor{keyword}{struct} ip *)(m-\/>m\_data + e\_hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04948}04948         \textcolor{comment}{/* ip\_hl is number of 32-\/bit words */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04949}04949         ip\_hlen = (ip4-\/>ip\_hl << 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04950}04950         ip = (caddr\_t)ip4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04951}04951         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04952}04952     \textcolor{keywordflow}{case} ETHERTYPE\_IPV6:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04953}04953         \textcolor{comment}{/* get the IPv6 header, if mbuf len < 40 then header in next mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04954}04954         ip6 = (m-\/>m\_len < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }ip6\_hdr)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04955}04955                   (struct ip6\_hdr *)m-\/>m\_next-\/>m\_data :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04956}04956                   (\textcolor{keyword}{struct} ip6\_hdr *)(m-\/>m\_data + e\_hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04957}04957         \textcolor{comment}{/* XXX cannot support offload with IPv6 extensions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04958}04958         ip\_hlen = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }ip6\_hdr) >> 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04959}04959         ip = (caddr\_t)ip6;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04960}04960         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04961}04961     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04962}04962         \textcolor{comment}{/* We can't offload in this case... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04963}04963         \textcolor{comment}{/* XXX error stat ??? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04964}04964         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04965}04965     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04966}04966 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04967}04967     hlen = (e\_hlen >> 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04968}04968 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04969}04969     \textcolor{comment}{/* note that rest of global\_data is indirectly zeroed here */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04970}04970     \textcolor{keywordflow}{if} (m-\/>m\_flags \& M\_VLANTAG) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04971}04971         pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_aaa8bfceb11c39e6dbdff82e45a035a19}{global\_data}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04972}04972             htole16(hlen | (1 << \mbox{\hyperlink{ecore__hsi_8h_a73ce539b3e4d91837d3fc82bc50e10bb}{ETH\_TX\_PARSE\_BD\_E1X\_LLC\_SNAP\_EN\_SHIFT}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04973}04973     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04974}04974         pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_aaa8bfceb11c39e6dbdff82e45a035a19}{global\_data}} = htole16(hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04975}04975     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04976}04976 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04977}04977     pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ae2bc5eda83982571e1f7f74e160c9b67}{ip\_hlen\_w}} = ip\_hlen;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04978}04978 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04979}04979     hlen += pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ae2bc5eda83982571e1f7f74e160c9b67}{ip\_hlen\_w}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04980}04980 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04981}04981     \textcolor{comment}{/* XXX assuming L4 header is contiguous to IPv4/IPv6 in the same mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04982}04982 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04983}04983     \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.csum\_flags \& (CSUM\_TCP |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04984}04984                                   CSUM\_TSO |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04985}04985                                   \mbox{\hyperlink{bxe_8c_a56b8481078a714eaa80d3021e9018375}{CSUM\_TCP\_IPV6}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04986}04986         th = (\textcolor{keyword}{struct }tcphdr *)(ip + (ip\_hlen << 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04987}04987         \textcolor{comment}{/* th\_off is number of 32-\/bit words */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04988}04988         hlen += (uint16\_t)(th-\/>th\_off << 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04989}04989     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.csum\_flags \& (CSUM\_UDP |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04990}04990                                          \mbox{\hyperlink{bxe_8c_a37bf64f3447600af0819e071353fdfc6}{CSUM\_UDP\_IPV6}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04991}04991         uh = (\textcolor{keyword}{struct }udphdr *)(ip + (ip\_hlen << 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04992}04992         hlen += (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }udphdr) / 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04993}04993     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04994}04994         \textcolor{comment}{/* valid case as only CSUM\_IP was set */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04995}04995         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04996}04996     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04997}04997 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04998}04998     pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ae3f03bd1f32d8d2fded9820db5c6dd61}{total\_hlen\_w}} = htole16(hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l04999}04999 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05000}05000     \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.csum\_flags \& (CSUM\_TCP |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05001}05001                                   CSUM\_TSO |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05002}05002                                   \mbox{\hyperlink{bxe_8c_a56b8481078a714eaa80d3021e9018375}{CSUM\_TCP\_IPV6}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05003}05003         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_af9a61705bc69bfea00cb753c788efaf7}{tx\_ofld\_frames\_csum\_tcp}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05004}05004         pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ac20661e183046ef8ff80a7f5a8164560}{tcp\_pseudo\_csum}} = ntohs(th-\/>th\_sum);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05005}05005     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.csum\_flags \& (CSUM\_UDP |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05006}05006                                          \mbox{\hyperlink{bxe_8c_a37bf64f3447600af0819e071353fdfc6}{CSUM\_UDP\_IPV6}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05007}05007         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a75ddcaf71937fa39d023ee0c98dcbf46}{tx\_ofld\_frames\_csum\_udp}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05008}05008 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05009}05009         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05010}05010 \textcolor{comment}{         * Everest1 (i.e. 57710, 57711, 57711E) does not natively support UDP}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05011}05011 \textcolor{comment}{         * checksums and does not know anything about the UDP header and where}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05012}05012 \textcolor{comment}{         * the checksum field is located. It only knows about TCP. Therefore}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05013}05013 \textcolor{comment}{         * we "{}lie"{} to the hardware for outgoing UDP packets w/ checksum}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05014}05014 \textcolor{comment}{         * offload. Since the checksum field offset for TCP is 16 bytes and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05015}05015 \textcolor{comment}{         * for UDP it is 6 bytes we pass a pointer to the hardware that is 10}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05016}05016 \textcolor{comment}{         * bytes less than the start of the UDP header. This allows the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05017}05017 \textcolor{comment}{         * hardware to write the checksum in the correct spot. But the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05018}05018 \textcolor{comment}{         * hardware will compute a checksum which includes the last 10 bytes}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05019}05019 \textcolor{comment}{         * of the IP header. To correct this we tweak the stack computed}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05020}05020 \textcolor{comment}{         * pseudo checksum by folding in the calculation of the inverse}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05021}05021 \textcolor{comment}{         * checksum for those final 10 bytes of the IP header. This allows}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05022}05022 \textcolor{comment}{         * the correct checksum to be computed by the hardware.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05023}05023 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05024}05024 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05025}05025         \textcolor{comment}{/* set pointer 10 bytes before UDP header */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05026}05026         tmp\_uh = (uint32\_t *)((uint8\_t *)uh -\/ 10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05027}05027 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05028}05028         \textcolor{comment}{/* calculate a pseudo header checksum over the first 10 bytes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05029}05029         tmp\_csum = in\_pseudo(*tmp\_uh,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05030}05030                              *(tmp\_uh + 1),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05031}05031                              *(uint16\_t *)(tmp\_uh + 2));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05032}05032 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05033}05033         pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ac20661e183046ef8ff80a7f5a8164560}{tcp\_pseudo\_csum}} = ntohs(in\_addword(uh-\/>uh\_sum, \string~tmp\_csum));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05034}05034     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05035}05035 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05036}05036     \textcolor{keywordflow}{return} (hlen * 2); \textcolor{comment}{/* entire header length, number of bytes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05037}05037 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05038}05038 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05039}05039 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05040}\mbox{\hyperlink{bxe_8c_a9a517dd26ccc034128ae94202dc76fa9}{05040}} \mbox{\hyperlink{bxe_8c_a9a517dd26ccc034128ae94202dc76fa9}{bxe\_set\_pbd\_lso\_e2}}(\textcolor{keyword}{struct} mbuf *m,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05041}05041                    uint32\_t    *parsing\_data)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05042}05042 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05043}05043     *parsing\_data |= ((m-\/>m\_pkthdr.tso\_segsz <<}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05044}05044                        \mbox{\hyperlink{ecore__hsi_8h_a1bd2a5fe15d337d85e35817be16f61f3}{ETH\_TX\_PARSE\_BD\_E2\_LSO\_MSS\_SHIFT}}) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05045}05045                       \mbox{\hyperlink{ecore__hsi_8h_aaacfda12714f0f3fba5b3185287fb9c1}{ETH\_TX\_PARSE\_BD\_E2\_LSO\_MSS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05046}05046 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05047}05047     \textcolor{comment}{/* XXX test for IPv6 with extension header... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05048}05048 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05049}05049 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05050}05050 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05051}\mbox{\hyperlink{bxe_8c_adac16d479e8758ac9af66694b4571388}{05051}} \mbox{\hyperlink{bxe_8c_adac16d479e8758ac9af66694b4571388}{bxe\_set\_pbd\_lso}}(\textcolor{keyword}{struct} mbuf                *m,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05052}05052                 \textcolor{keyword}{struct} \mbox{\hyperlink{structeth__tx__parse__bd__e1x}{eth\_tx\_parse\_bd\_e1x}} *pbd)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05053}05053 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05054}05054     \textcolor{keyword}{struct }ether\_vlan\_header *eh = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05055}05055     \textcolor{keyword}{struct }ip *ip = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05056}05056     \textcolor{keyword}{struct }tcphdr *th = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05057}05057     \textcolor{keywordtype}{int} e\_hlen;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05058}05058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05059}05059     \textcolor{comment}{/* get the Ethernet header */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05060}05060     eh = mtod(m, \textcolor{keyword}{struct} ether\_vlan\_header *);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05061}05061 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05062}05062     \textcolor{comment}{/* handle VLAN encapsulation if present */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05063}05063     e\_hlen = (eh-\/>evl\_encap\_proto == htons(ETHERTYPE\_VLAN)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05064}05064                  (ETHER\_HDR\_LEN + ETHER\_VLAN\_ENCAP\_LEN) : ETHER\_HDR\_LEN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05065}05065 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05066}05066     \textcolor{comment}{/* get the IP and TCP header, with LSO entire header in first mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05067}05067     \textcolor{comment}{/* XXX assuming IPv4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05068}05068     ip = (\textcolor{keyword}{struct }ip *)(m-\/>m\_data + e\_hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05069}05069     th = (\textcolor{keyword}{struct }tcphdr *)((caddr\_t)ip + (ip-\/>ip\_hl << 2));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05070}05070 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05071}05071     pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_a5df2af8191399d232adfdd7f8f028a6d}{lso\_mss}} = htole16(m-\/>m\_pkthdr.tso\_segsz);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05072}05072     pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_a6df65d13ff066a37c8430fb8d3aab473}{tcp\_send\_seq}} = ntohl(th-\/>th\_seq);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05073}05073     pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ad7df5508498e2d26a94f88ecfb3ae495}{tcp\_flags}} = ((ntohl(((uint32\_t *)th)[3]) >> 16) \& 0xff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05074}05074 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05075}05075 \textcolor{preprocessor}{\#if 1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05076}05076         \textcolor{comment}{/* XXX IPv4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05077}05077         pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ac0ca5c531fdcc5f6e068035d62731e9a}{ip\_id}} = ntohs(ip-\/>ip\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05078}05078         pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ac20661e183046ef8ff80a7f5a8164560}{tcp\_pseudo\_csum}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05079}05079             ntohs(in\_pseudo(ip-\/>ip\_src.s\_addr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05080}05080                             ip-\/>ip\_dst.s\_addr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05081}05081                             htons(IPPROTO\_TCP)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05082}05082 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05083}05083         \textcolor{comment}{/* XXX IPv6 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05084}05084         pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ac20661e183046ef8ff80a7f5a8164560}{tcp\_pseudo\_csum}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05085}05085             ntohs(in\_pseudo(\&ip6-\/>ip6\_src,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05086}05086                             \&ip6-\/>ip6\_dst,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05087}05087                             htons(IPPROTO\_TCP)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05088}05088 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05089}05089 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05090}05090     pbd-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_aaa8bfceb11c39e6dbdff82e45a035a19}{global\_data}} |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05091}05091         htole16(\mbox{\hyperlink{ecore__hsi_8h_aad4883d17dfbea3efe166cb7578a1141}{ETH\_TX\_PARSE\_BD\_E1X\_PSEUDO\_CS\_WITHOUT\_LEN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05092}05092 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05093}05093 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05094}05094 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05095}05095 \textcolor{comment}{ * Encapsulte an mbuf cluster into the tx bd chain and makes the memory}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05096}05096 \textcolor{comment}{ * visible to the controller.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05097}05097 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05098}05098 \textcolor{comment}{ * If an mbuf is submitted to this routine and cannot be given to the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05099}05099 \textcolor{comment}{ * controller (e.g. it has too many fragments) then the function may free}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05100}05100 \textcolor{comment}{ * the mbuf and return to the caller.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05101}05101 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05102}05102 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05103}05103 \textcolor{comment}{ *   0 = Success, !0 = Failure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05104}05104 \textcolor{comment}{ *   Note the side effect that an mbuf may be freed if it causes a problem.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05105}05105 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05106}05106 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05107}\mbox{\hyperlink{bxe_8c_a710078c9a6653e2d8965bca956ce98ed}{05107}} \mbox{\hyperlink{bxe_8c_a710078c9a6653e2d8965bca956ce98ed}{bxe\_tx\_encap}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp, \textcolor{keyword}{struct} mbuf **m\_head)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05108}05108 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05109}05109     bus\_dma\_segment\_t segs[32];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05110}05110     \textcolor{keyword}{struct }mbuf *m0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05111}05111     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__tx__bd}{bxe\_sw\_tx\_bd}} *tx\_buf;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05112}05112     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__tx__parse__bd__e1x}{eth\_tx\_parse\_bd\_e1x}} *pbd\_e1x = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05113}05113     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__tx__parse__bd__e2}{eth\_tx\_parse\_bd\_e2}} *pbd\_e2 = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05114}05114     \textcolor{comment}{/* struct eth\_tx\_parse\_2nd\_bd *pbd2 = NULL; */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05115}05115     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__tx__bd}{eth\_tx\_bd}} *tx\_data\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05116}05116     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__tx__bd}{eth\_tx\_bd}} *tx\_total\_pkt\_size\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05117}05117     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__tx__start__bd}{eth\_tx\_start\_bd}} *tx\_start\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05118}05118     uint16\_t bd\_prod, pkt\_prod, total\_pkt\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05119}05119     uint8\_t mac\_type;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05120}05120     \textcolor{keywordtype}{int} defragged, error, nsegs, rc, nbds, vlan\_off, ovlan;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05121}05121     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05122}05122     uint16\_t tx\_bd\_avail;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05123}05123     \textcolor{keyword}{struct }ether\_vlan\_header *eh;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05124}05124     uint32\_t pbd\_e2\_parsing\_data = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05125}05125     uint8\_t hlen = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05126}05126     \textcolor{keywordtype}{int} tmp\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05127}05127     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05128}05128 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05129}05129     sc = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05130}05130 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05131}05131     M\_ASSERTPKTHDR(*m\_head);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05132}05132 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05133}05133     m0 = *m\_head;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05134}05134     rc = defragged = nbds = ovlan = vlan\_off = total\_pkt\_size = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05135}05135     tx\_start\_bd = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05136}05136     tx\_data\_bd = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05137}05137     tx\_total\_pkt\_size\_bd = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05138}05138 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05139}05139     \textcolor{comment}{/* get the H/W pointer for packets and BDs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05140}05140     pkt\_prod = fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb97e5017aa43f9a4e43c5f302af8d30}{tx\_pkt\_prod}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05141}05141     bd\_prod = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a8895cb72e0640491ef115fe0f8eee971}{tx\_bd\_prod}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05142}05142 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05143}05143     mac\_type = \mbox{\hyperlink{ecore__hsi_8h_ad9af6ab15084df4d987b87f0275d0192a1f7a0e6962fef781007320745b3d7c6c}{UNICAST\_ADDRESS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05144}05144 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05145}05145     \textcolor{comment}{/* map the mbuf into the next open DMAable memory */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05146}05146     tx\_buf = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aed432b0de2d59b0c022ada4a493ae787}{tx\_mbuf\_chain}}[\mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(pkt\_prod)];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05147}05147     error = bus\_dmamap\_load\_mbuf\_sg(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05148}05148                                     tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}}, m0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05149}05149                                     segs, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05150}05150 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05151}05151     \textcolor{comment}{/* mapping errors */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05152}05152     \textcolor{keywordflow}{if}(\_\_predict\_false(error != 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05153}05153         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_af601f981b2059b01fbbe9911060360a0}{tx\_dma\_mapping\_failure}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05154}05154         \textcolor{keywordflow}{if} (error == ENOMEM) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05155}05155             \textcolor{comment}{/* resource issue, try again later */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05156}05156             rc = ENOMEM;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05157}05157         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (error == EFBIG) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05158}05158             \textcolor{comment}{/* possibly recoverable with defragmentation */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05159}05159             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_acce7782cb7ce2fb5a8b0e676356dd1b3}{mbuf\_defrag\_attempts}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05160}05160             m0 = m\_defrag(*m\_head, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05161}05161             \textcolor{keywordflow}{if} (m0 == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05162}05162                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_ab6512602c90d9e5c39fb21a8abc1f05a}{mbuf\_defrag\_failures}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05163}05163                 rc = ENOBUFS;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05164}05164             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05165}05165                 \textcolor{comment}{/* defrag successful, try mapping again */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05166}05166                 *m\_head = m0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05167}05167                 error = bus\_dmamap\_load\_mbuf\_sg(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05168}05168                                                 tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}}, m0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05169}05169                                                 segs, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05170}05170                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05171}05171                     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_af601f981b2059b01fbbe9911060360a0}{tx\_dma\_mapping\_failure}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05172}05172                     rc = error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05173}05173                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05174}05174             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05175}05175         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05176}05176             \textcolor{comment}{/* unknown, unrecoverable mapping error */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05177}05177             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unknown TX mapping error rc=\%d\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05178}05178             \mbox{\hyperlink{bxe_8c_a38420aca9e66a107397ba4f2ac9a09bb}{bxe\_dump\_mbuf}}(sc, m0, FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05179}05179             rc = error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05180}05180         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05181}05181 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05182}05182         \textcolor{keywordflow}{goto} bxe\_tx\_encap\_continue;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05183}05183     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05184}05184 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05185}05185     tx\_bd\_avail = \mbox{\hyperlink{bxe_8c_a27bf9359a144fda14c7d1e9a988cd2f7}{bxe\_tx\_avail}}(sc, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05186}05186 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05187}05187     \textcolor{comment}{/* make sure there is enough room in the send queue */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05188}05188     \textcolor{keywordflow}{if} (\_\_predict\_false(tx\_bd\_avail < (nsegs + 2))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05189}05189         \textcolor{comment}{/* Recoverable, try again later. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05190}05190         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a1ee220c118d6149b0c548d8b4f04a7e1}{tx\_hw\_queue\_full}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05191}05191         bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}}, tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05192}05192         rc = ENOMEM;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05193}05193         \textcolor{keywordflow}{goto} bxe\_tx\_encap\_continue;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05194}05194     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05195}05195 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05196}05196     \textcolor{comment}{/* capture the current H/W TX chain high watermark */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05197}05197     \textcolor{keywordflow}{if} (\_\_predict\_false(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_acabfc6e6cc4307cdec7320c61e795102}{tx\_hw\_max\_queue\_depth}} <}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05198}05198                         (\mbox{\hyperlink{bxe_8h_aef1089a2712840f8b334801074918e0c}{TX\_BD\_USABLE}} -\/ tx\_bd\_avail))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05199}05199         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_acabfc6e6cc4307cdec7320c61e795102}{tx\_hw\_max\_queue\_depth}} = (\mbox{\hyperlink{bxe_8h_aef1089a2712840f8b334801074918e0c}{TX\_BD\_USABLE}} -\/ tx\_bd\_avail);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05200}05200     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05201}05201 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05202}05202     \textcolor{comment}{/* make sure it fits in the packet window */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05203}05203     \textcolor{keywordflow}{if} (\_\_predict\_false(nsegs > \mbox{\hyperlink{bxe_8h_a4f216c608e1ea1a8f35a0925700ff254}{BXE\_MAX\_SEGMENTS}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05204}05204         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05205}05205 \textcolor{comment}{         * The mbuf may be to big for the controller to handle. If the frame}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05206}05206 \textcolor{comment}{         * is a TSO frame we'll need to do an additional check.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05207}05207 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05208}05208         \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags \& CSUM\_TSO) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05209}05209             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_aa40355eea1f5097131a7ee4020966a5b}{bxe\_chktso\_window}}(sc, nsegs, segs, m0) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05210}05210                 \textcolor{keywordflow}{goto} bxe\_tx\_encap\_continue; \textcolor{comment}{/* OK to send */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05211}05211             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05212}05212                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_adc0e12effff2e81138b2beb9b7300ddb}{tx\_window\_violation\_tso}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05213}05213             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05214}05214         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05215}05215             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a3d8bb2027e7e9f25b0f5c3c3e99ca75d}{tx\_window\_violation\_std}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05216}05216         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05217}05217 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05218}05218         \textcolor{comment}{/* lets try to defragment this mbuf and remap it */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05219}05219         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_acce7782cb7ce2fb5a8b0e676356dd1b3}{mbuf\_defrag\_attempts}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05220}05220         bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}}, tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05221}05221 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05222}05222         m0 = m\_defrag(*m\_head, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05223}05223         \textcolor{keywordflow}{if} (m0 == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05224}05224             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_ab6512602c90d9e5c39fb21a8abc1f05a}{mbuf\_defrag\_failures}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05225}05225             \textcolor{comment}{/* Ugh, just drop the frame... :( */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05226}05226             rc = ENOBUFS;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05227}05227         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05228}05228             \textcolor{comment}{/* defrag successful, try mapping again */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05229}05229             *m\_head = m0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05230}05230             error = bus\_dmamap\_load\_mbuf\_sg(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05231}05231                                             tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}}, m0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05232}05232                                             segs, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05233}05233             \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05234}05234                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_af601f981b2059b01fbbe9911060360a0}{tx\_dma\_mapping\_failure}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05235}05235                 \textcolor{comment}{/* No sense in trying to defrag/copy chain, drop it. :( */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05236}05236                 rc = error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05237}05237             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05238}05238                \textcolor{comment}{/* if the chain is still too long then drop it */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05239}05239                 \textcolor{keywordflow}{if}(m0-\/>m\_pkthdr.csum\_flags \& CSUM\_TSO) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05240}05240                     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05241}05241 \textcolor{comment}{                     * in case TSO is enabled nsegs should be checked against}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05242}05242 \textcolor{comment}{                     * BXE\_TSO\_MAX\_SEGMENTS}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05243}05243 \textcolor{comment}{                     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05244}05244                     \textcolor{keywordflow}{if} (\_\_predict\_false(nsegs > \mbox{\hyperlink{bxe_8h_a149090a58df685dfe042c45eeb204d56}{BXE\_TSO\_MAX\_SEGMENTS}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05245}05245                         bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}}, tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05246}05246                         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a447719a5ca45654a587873a7b7e653cc}{nsegs\_path1\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05247}05247                         rc = ENODEV;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05248}05248                     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05249}05249                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05250}05250                     \textcolor{keywordflow}{if} (\_\_predict\_false(nsegs > \mbox{\hyperlink{bxe_8h_a4f216c608e1ea1a8f35a0925700ff254}{BXE\_MAX\_SEGMENTS}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05251}05251                         bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}}, tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05252}05252                         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a86c10c1506848f180a2c940dc0d927c2}{nsegs\_path2\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05253}05253                         rc = ENODEV;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05254}05254                     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05255}05255                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05256}05256             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05257}05257         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05258}05258     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05259}05259 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05260}05260 bxe\_tx\_encap\_continue:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05261}05261 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05262}05262     \textcolor{comment}{/* Check for errors */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05263}05263     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05264}05264         \textcolor{keywordflow}{if} (rc == ENOMEM) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05265}05265             \textcolor{comment}{/* recoverable try again later  */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05266}05266         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05267}05267             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a9054f547670a3c278f9b3a39b397d7b9}{tx\_soft\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05268}05268             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5963bb719df461b095dcf277bb8983bb}{mbuf\_alloc\_tx}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05269}05269             m\_freem(*m\_head);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05270}05270             *m\_head = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05271}05271         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05272}05272 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05273}05273         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05274}05274     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05275}05275 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05276}05276     \textcolor{comment}{/* set flag according to packet type (UNICAST\_ADDRESS is default) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05277}05277     \textcolor{keywordflow}{if} (m0-\/>m\_flags \& M\_BCAST) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05278}05278         mac\_type = \mbox{\hyperlink{ecore__hsi_8h_ad9af6ab15084df4d987b87f0275d0192a65a37fa0f4d4568055dda03c3167d256}{BROADCAST\_ADDRESS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05279}05279     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (m0-\/>m\_flags \& M\_MCAST) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05280}05280         mac\_type = \mbox{\hyperlink{ecore__hsi_8h_ad9af6ab15084df4d987b87f0275d0192abcb33e32ccdf8bbb47af496a51c77422}{MULTICAST\_ADDRESS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05281}05281     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05282}05282 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05283}05283     \textcolor{comment}{/* store the mbuf into the mbuf ring */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05284}05284     tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_ab9ec5360d3a7948719ec780e5ef04946}{m}}        = m0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05285}05285     tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a4173070105376bca63f29e08e1271f00}{first\_bd}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a8895cb72e0640491ef115fe0f8eee971}{tx\_bd\_prod}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05286}05286     tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a8c54f3fb3ead06f6ecb6009b08fa5be4}{flags}}    = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05287}05287 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05288}05288     \textcolor{comment}{/* prepare the first transmit (start) BD for the mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05289}05289     tx\_start\_bd = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}}[\mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(bd\_prod)].\mbox{\hyperlink{unioneth__tx__bd__types_aa46c56645d75d48c2c46bffb368f3e9d}{start\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05290}05290 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05291}05291     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05292}05292           \textcolor{stringliteral}{"{}sending pkt\_prod=\%u tx\_buf=\%p next\_idx=\%u bd=\%u tx\_start\_bd=\%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05293}05293           pkt\_prod, tx\_buf, fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb97e5017aa43f9a4e43c5f302af8d30}{tx\_pkt\_prod}}, bd\_prod, tx\_start\_bd);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05294}05294 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05295}05295     tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a5836a8d811b3c1178cf402d10512b8d2}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(segs[0].ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05296}05296     tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_adb008618936571265d7409e41fae9290}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(segs[0].ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05297}05297     tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_ac54397107d6b8e7ef6ea41ba4aa8ca7c}{nbytes}}  = htole16(segs[0].ds\_len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05298}05298     total\_pkt\_size += tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_ac54397107d6b8e7ef6ea41ba4aa8ca7c}{nbytes}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05299}05299     tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}} = \mbox{\hyperlink{ecore__hsi_8h_a3d15b5292b317470ccd710515d035f76}{ETH\_TX\_BD\_FLAGS\_START\_BD}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05300}05300 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05301}05301     tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a83c5180fc7309618e97f738c15b3b75e}{general\_data}} = (1 << \mbox{\hyperlink{ecore__hsi_8h_a9b1e6b0578ebefe0d4720cde517d3f7a}{ETH\_TX\_START\_BD\_HDR\_NBDS\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05302}05302 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05303}05303     \textcolor{comment}{/* all frames have at least Start BD + Parsing BD */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05304}05304     nbds = nsegs + 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05305}05305     tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_aa2b4b38e4363471f0bd37b8df755885a}{nbd}} = htole16(nbds);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05306}05306 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05307}05307     \textcolor{keywordflow}{if} (m0-\/>m\_flags \& M\_VLANTAG) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05308}05308         tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a35428356f4033945ee14c05dfd71c0b0}{vlan\_or\_ethertype}} = htole16(m0-\/>m\_pkthdr.ether\_vtag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05309}05309         tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}} |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05310}05310             (\mbox{\hyperlink{ecore__hsi_8h_accfcb622c80087d0f06a8e5a91222354a4da24deb09bf278f2f428cdcee71d2ae}{X\_ETH\_OUTBAND\_VLAN}} << \mbox{\hyperlink{ecore__hsi_8h_a357eed4a8cd95e6ad850b9c287d8ad5f}{ETH\_TX\_BD\_FLAGS\_VLAN\_MODE\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05311}05311     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05312}05312         \textcolor{comment}{/* vf tx, start bd must hold the ethertype for fw to enforce it */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05313}05313         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a564b2f75c1d5338c4625919e871035bb}{IS\_VF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05314}05314             \textcolor{comment}{/* map ethernet header to find type and header length */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05315}05315             eh = mtod(m0, \textcolor{keyword}{struct} ether\_vlan\_header *);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05316}05316             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a35428356f4033945ee14c05dfd71c0b0}{vlan\_or\_ethertype}} = eh-\/>evl\_encap\_proto;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05317}05317         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05318}05318             \textcolor{comment}{/* used by FW for packet accounting */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05319}05319             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a35428356f4033945ee14c05dfd71c0b0}{vlan\_or\_ethertype}} = htole16(fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb97e5017aa43f9a4e43c5f302af8d30}{tx\_pkt\_prod}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05320}05320         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05321}05321     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05322}05322 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05323}05323     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05324}05324 \textcolor{comment}{     * add a parsing BD from the chain. The parsing BD is always added}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05325}05325 \textcolor{comment}{     * though it is only used for TSO and chksum}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05326}05326 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05327}05327     bd\_prod = \mbox{\hyperlink{bxe_8h_a8e4f75baab93cc20f1f31507cddc3551}{TX\_BD\_NEXT}}(bd\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05328}05328 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05329}05329     \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05330}05330         \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags \& CSUM\_IP) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05331}05331             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aa33d91044fd97cf049b091d0b1b754b2}{tx\_ofld\_frames\_csum\_ip}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05332}05332             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}} |= \mbox{\hyperlink{ecore__hsi_8h_a62a7afe117839f52c8f9698985275ea9}{ETH\_TX\_BD\_FLAGS\_IP\_CSUM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05333}05333         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05334}05334 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05335}05335         \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags \& \mbox{\hyperlink{bxe_8c_a56b8481078a714eaa80d3021e9018375}{CSUM\_TCP\_IPV6}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05336}05336             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}} |= (\mbox{\hyperlink{ecore__hsi_8h_a3ca13305c8dd0df64f357b3c2da74ba6}{ETH\_TX\_BD\_FLAGS\_IPV6}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05337}05337                                                   \mbox{\hyperlink{ecore__hsi_8h_a00b318a0f70cae4ebb5272ccb7c5bdf9}{ETH\_TX\_BD\_FLAGS\_L4\_CSUM}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05338}05338         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags \& \mbox{\hyperlink{bxe_8c_a37bf64f3447600af0819e071353fdfc6}{CSUM\_UDP\_IPV6}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05339}05339             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}} |= (\mbox{\hyperlink{ecore__hsi_8h_a3ca13305c8dd0df64f357b3c2da74ba6}{ETH\_TX\_BD\_FLAGS\_IPV6}}   |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05340}05340                                                   \mbox{\hyperlink{ecore__hsi_8h_afe53c550d8fc4f5d6bf0ac299e42cbc4}{ETH\_TX\_BD\_FLAGS\_IS\_UDP}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05341}05341                                                   \mbox{\hyperlink{ecore__hsi_8h_a00b318a0f70cae4ebb5272ccb7c5bdf9}{ETH\_TX\_BD\_FLAGS\_L4\_CSUM}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05342}05342         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((m0-\/>m\_pkthdr.csum\_flags \& CSUM\_TCP) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05343}05343                    (m0-\/>m\_pkthdr.csum\_flags \& CSUM\_TSO)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05344}05344             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}} |= \mbox{\hyperlink{ecore__hsi_8h_a00b318a0f70cae4ebb5272ccb7c5bdf9}{ETH\_TX\_BD\_FLAGS\_L4\_CSUM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05345}05345         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags \& CSUM\_UDP) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05346}05346             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}} |= (\mbox{\hyperlink{ecore__hsi_8h_a00b318a0f70cae4ebb5272ccb7c5bdf9}{ETH\_TX\_BD\_FLAGS\_L4\_CSUM}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05347}05347                                                   \mbox{\hyperlink{ecore__hsi_8h_afe53c550d8fc4f5d6bf0ac299e42cbc4}{ETH\_TX\_BD\_FLAGS\_IS\_UDP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05348}05348         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05349}05349     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05350}05350 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05351}05351     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05352}05352         pbd\_e2 = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}}[\mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(bd\_prod)].\mbox{\hyperlink{unioneth__tx__bd__types_af0cce6c7bdf0e6becc60ff2514080ff0}{parse\_bd\_e2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05353}05353         memset(pbd\_e2, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structeth__tx__parse__bd__e2}{eth\_tx\_parse\_bd\_e2}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05354}05354 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05355}05355         \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05356}05356             hlen = \mbox{\hyperlink{bxe_8c_a9f0b36d15f033bfc985f2558ea0ead66}{bxe\_set\_pbd\_csum\_e2}}(fp, m0, \&pbd\_e2\_parsing\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05357}05357         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05358}05358 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05359}05359         \mbox{\hyperlink{bxe_8h_a85842d21414d875b22dcb39a7162e63a}{SET\_FLAG}}(pbd\_e2\_parsing\_data, \mbox{\hyperlink{ecore__hsi_8h_a26c1fab12b80ad412a461465fb6ff141}{ETH\_TX\_PARSE\_BD\_E2\_ETH\_ADDR\_TYPE}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05360}05360                  mac\_type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05361}05361     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05362}05362         uint16\_t global\_data = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05363}05363 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05364}05364         pbd\_e1x = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}}[\mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(bd\_prod)].\mbox{\hyperlink{unioneth__tx__bd__types_ac8a541d68c19e86bad053e47883fc885}{parse\_bd\_e1x}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05365}05365         memset(pbd\_e1x, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structeth__tx__parse__bd__e1x}{eth\_tx\_parse\_bd\_e1x}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05366}05366 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05367}05367         \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05368}05368             hlen = \mbox{\hyperlink{bxe_8c_a0c4ed8f926849a6bb2f917735f29fd55}{bxe\_set\_pbd\_csum}}(fp, m0, pbd\_e1x);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05369}05369         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05370}05370 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05371}05371         \mbox{\hyperlink{bxe_8h_a85842d21414d875b22dcb39a7162e63a}{SET\_FLAG}}(global\_data,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05372}05372                  \mbox{\hyperlink{ecore__hsi_8h_a6b754d8331219dff6438ae743a482c1d}{ETH\_TX\_PARSE\_BD\_E1X\_ETH\_ADDR\_TYPE}}, mac\_type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05373}05373         pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_aaa8bfceb11c39e6dbdff82e45a035a19}{global\_data}} |= htole16(global\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05374}05374     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05375}05375 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05376}05376     \textcolor{comment}{/* setup the parsing BD with TSO specific info */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05377}05377     \textcolor{keywordflow}{if} (m0-\/>m\_pkthdr.csum\_flags \& CSUM\_TSO) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05378}05378         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aa7c4387418bb346087193462d08cde1d}{tx\_ofld\_frames\_lso}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05379}05379         tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}} |= \mbox{\hyperlink{ecore__hsi_8h_af1be3889d5388230c4c5eb4f234df3a2}{ETH\_TX\_BD\_FLAGS\_SW\_LSO}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05380}05380 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05381}05381         \textcolor{keywordflow}{if} (\_\_predict\_false(tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_ac54397107d6b8e7ef6ea41ba4aa8ca7c}{nbytes}} > hlen)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05382}05382             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5d6c4308ab386a5653117e3853b2dc46}{tx\_ofld\_frames\_lso\_hdr\_splits}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05383}05383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05384}05384             \textcolor{comment}{/* split the first BD into header/data making the fw job easy */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05385}05385             nbds++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05386}05386             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_aa2b4b38e4363471f0bd37b8df755885a}{nbd}} = htole16(nbds);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05387}05387             tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_ac54397107d6b8e7ef6ea41ba4aa8ca7c}{nbytes}} = htole16(hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05388}05388 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05389}05389             bd\_prod = \mbox{\hyperlink{bxe_8h_a8e4f75baab93cc20f1f31507cddc3551}{TX\_BD\_NEXT}}(bd\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05390}05390 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05391}05391             \textcolor{comment}{/* new transmit BD after the tx\_parse\_bd */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05392}05392             tx\_data\_bd = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}}[\mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(bd\_prod)].\mbox{\hyperlink{unioneth__tx__bd__types_a5e350fba5ea888cf4c5f051327a5dbe4}{reg\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05393}05393             tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_a0f07d3ab34b8c086c977b4a81efdf7af}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(segs[0].ds\_addr + hlen));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05394}05394             tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_ac47542006cd136f5e2223a419f1812e3}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(segs[0].ds\_addr + hlen));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05395}05395             tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_a50c038f6806b4268ba872e6cd08feb39}{nbytes}}  = htole16(segs[0].ds\_len -\/ hlen);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05396}05396             \textcolor{keywordflow}{if} (tx\_total\_pkt\_size\_bd == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05397}05397                 tx\_total\_pkt\_size\_bd = tx\_data\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05398}05398             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05399}05399 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05400}05400             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05401}05401                   \textcolor{stringliteral}{"{}TSO split header size is \%d (\%x:\%x) nbds \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05402}05402                   le16toh(tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_ac54397107d6b8e7ef6ea41ba4aa8ca7c}{nbytes}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05403}05403                   le32toh(tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_adb008618936571265d7409e41fae9290}{addr\_hi}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05404}05404                   le32toh(tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a5836a8d811b3c1178cf402d10512b8d2}{addr\_lo}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05405}05405                   nbds);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05406}05406         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05407}05407 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05408}05408         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05409}05409             \mbox{\hyperlink{bxe_8c_a9a517dd26ccc034128ae94202dc76fa9}{bxe\_set\_pbd\_lso\_e2}}(m0, \&pbd\_e2\_parsing\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05410}05410         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05411}05411             \mbox{\hyperlink{bxe_8c_adac16d479e8758ac9af66694b4571388}{bxe\_set\_pbd\_lso}}(m0, pbd\_e1x);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05412}05412         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05413}05413     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05414}05414 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05415}05415     \textcolor{keywordflow}{if} (pbd\_e2\_parsing\_data) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05416}05416         pbd\_e2-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e2_a6b7fb3e1c8bb43b25315d74f312b4893}{parsing\_data}} = htole32(pbd\_e2\_parsing\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05417}05417     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05418}05418 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05419}05419     \textcolor{comment}{/* prepare remaining BDs, start tx bd contains first seg/frag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05420}05420     \textcolor{keywordflow}{for} (i = 1; i < nsegs ; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05421}05421         bd\_prod = \mbox{\hyperlink{bxe_8h_a8e4f75baab93cc20f1f31507cddc3551}{TX\_BD\_NEXT}}(bd\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05422}05422         tx\_data\_bd = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}}[\mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(bd\_prod)].\mbox{\hyperlink{unioneth__tx__bd__types_a5e350fba5ea888cf4c5f051327a5dbe4}{reg\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05423}05423         tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_ac47542006cd136f5e2223a419f1812e3}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(segs[i].ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05424}05424         tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_a0f07d3ab34b8c086c977b4a81efdf7af}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(segs[i].ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05425}05425         tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_a50c038f6806b4268ba872e6cd08feb39}{nbytes}}  = htole16(segs[i].ds\_len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05426}05426         \textcolor{keywordflow}{if} (tx\_total\_pkt\_size\_bd == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05427}05427             tx\_total\_pkt\_size\_bd = tx\_data\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05428}05428         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05429}05429         total\_pkt\_size += tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_a50c038f6806b4268ba872e6cd08feb39}{nbytes}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05430}05430     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05431}05431 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05432}05432     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}}, \textcolor{stringliteral}{"{}last bd \%p\(\backslash\)n"{}}, tx\_data\_bd);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05433}05433 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05434}05434     \textcolor{keywordflow}{if} (tx\_total\_pkt\_size\_bd != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05435}05435         tx\_total\_pkt\_size\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_a4b116e955299797bba547518dec85332}{total\_pkt\_bytes}} = total\_pkt\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05436}05436     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05437}05437 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05438}05438     \textcolor{keywordflow}{if} (\_\_predict\_false(sc-\/>\mbox{\hyperlink{structbxe__softc_a5f4eec668b4a624c50d20ac0da6d34cf}{debug}} \& \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05439}05439         tmp\_bd = tx\_buf-\/>\mbox{\hyperlink{structbxe__sw__tx__bd_a4173070105376bca63f29e08e1271f00}{first\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05440}05440         \textcolor{keywordflow}{for} (i = 0; i < nbds; i++)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05441}05441         \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05442}05442             \textcolor{keywordflow}{if} (i == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05443}05443                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05444}05444                       \textcolor{stringliteral}{"{}TX Strt: \%p bd=\%d nbd=\%d vlan=0x\%x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05445}05445                       \textcolor{stringliteral}{"{}bd\_flags=0x\%x hdr\_nbds=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05446}05446                       tx\_start\_bd,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05447}05447                       tmp\_bd,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05448}05448                       le16toh(tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_aa2b4b38e4363471f0bd37b8df755885a}{nbd}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05449}05449                       le16toh(tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a35428356f4033945ee14c05dfd71c0b0}{vlan\_or\_ethertype}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05450}05450                       tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a63c8822df04b8ea678827f63bf7e85e2}{bd\_flags}}.\mbox{\hyperlink{structeth__tx__bd__flags_a74d94b6c4d3c963473c95b61324ecbc5}{as\_bitfield}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05451}05451                       (tx\_start\_bd-\/>\mbox{\hyperlink{structeth__tx__start__bd_a83c5180fc7309618e97f738c15b3b75e}{general\_data}} \& \mbox{\hyperlink{ecore__hsi_8h_adb784e05dc142750cbd464d37a61bf69}{ETH\_TX\_START\_BD\_HDR\_NBDS}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05452}05452             \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (i == 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05453}05453                 \textcolor{keywordflow}{if} (pbd\_e1x) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05454}05454                     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05455}05455                           \textcolor{stringliteral}{"{}-\/> Prse: \%p bd=\%d global=0x\%x ip\_hlen\_w=\%u "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05456}05456                           \textcolor{stringliteral}{"{}ip\_id=\%u lso\_mss=\%u tcp\_flags=0x\%x csum=0x\%x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05457}05457                           \textcolor{stringliteral}{"{}tcp\_seq=\%u total\_hlen\_w=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05458}05458                           pbd\_e1x,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05459}05459                           tmp\_bd,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05460}05460                           pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_aaa8bfceb11c39e6dbdff82e45a035a19}{global\_data}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05461}05461                           pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ae2bc5eda83982571e1f7f74e160c9b67}{ip\_hlen\_w}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05462}05462                           pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ac0ca5c531fdcc5f6e068035d62731e9a}{ip\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05463}05463                           pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_a5df2af8191399d232adfdd7f8f028a6d}{lso\_mss}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05464}05464                           pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ad7df5508498e2d26a94f88ecfb3ae495}{tcp\_flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05465}05465                           pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ac20661e183046ef8ff80a7f5a8164560}{tcp\_pseudo\_csum}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05466}05466                           pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_a6df65d13ff066a37c8430fb8d3aab473}{tcp\_send\_seq}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05467}05467                           le16toh(pbd\_e1x-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e1x_ae3f03bd1f32d8d2fded9820db5c6dd61}{total\_hlen\_w}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05468}05468                 \} \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* if (pbd\_e2) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05469}05469                     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05470}05470                           \textcolor{stringliteral}{"{}-\/> Parse: \%p bd=\%d dst=\%02x:\%02x:\%02x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05471}05471                           \textcolor{stringliteral}{"{}src=\%02x:\%02x:\%02x parsing\_data=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05472}05472                           pbd\_e2,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05473}05473                           tmp\_bd,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05474}05474                           pbd\_e2-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e2_ab67015d9e86605a1bbf64b82bdd6301f}{data}}.\mbox{\hyperlink{unioneth__mac__addr__or__tunnel__data_a312b38b87d1f6933015d6bc00624ba2f}{mac\_addr}}.dst\_hi,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05475}05475                           pbd\_e2-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e2_ab67015d9e86605a1bbf64b82bdd6301f}{data}}.\mbox{\hyperlink{unioneth__mac__addr__or__tunnel__data_a312b38b87d1f6933015d6bc00624ba2f}{mac\_addr}}.dst\_mid,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05476}05476                           pbd\_e2-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e2_ab67015d9e86605a1bbf64b82bdd6301f}{data}}.\mbox{\hyperlink{unioneth__mac__addr__or__tunnel__data_a312b38b87d1f6933015d6bc00624ba2f}{mac\_addr}}.dst\_lo,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05477}05477                           pbd\_e2-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e2_ab67015d9e86605a1bbf64b82bdd6301f}{data}}.\mbox{\hyperlink{unioneth__mac__addr__or__tunnel__data_a312b38b87d1f6933015d6bc00624ba2f}{mac\_addr}}.src\_hi,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05478}05478                           pbd\_e2-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e2_ab67015d9e86605a1bbf64b82bdd6301f}{data}}.\mbox{\hyperlink{unioneth__mac__addr__or__tunnel__data_a312b38b87d1f6933015d6bc00624ba2f}{mac\_addr}}.src\_mid,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05479}05479                           pbd\_e2-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e2_ab67015d9e86605a1bbf64b82bdd6301f}{data}}.\mbox{\hyperlink{unioneth__mac__addr__or__tunnel__data_a312b38b87d1f6933015d6bc00624ba2f}{mac\_addr}}.src\_lo,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05480}05480                           pbd\_e2-\/>\mbox{\hyperlink{structeth__tx__parse__bd__e2_a6b7fb3e1c8bb43b25315d74f312b4893}{parsing\_data}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05481}05481                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05482}05482             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05483}05483 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05484}05484             \textcolor{keywordflow}{if} (i != 1) \{ \textcolor{comment}{/* skip parse db as it doesn't hold data */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05485}05485                 tx\_data\_bd = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}}[\mbox{\hyperlink{bxe_8h_a0c7b21e489d8d32b86c25fe8120d38e8}{TX\_BD}}(tmp\_bd)].\mbox{\hyperlink{unioneth__tx__bd__types_a5e350fba5ea888cf4c5f051327a5dbe4}{reg\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05486}05486                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05487}05487                       \textcolor{stringliteral}{"{}-\/> Frag: \%p bd=\%d nbytes=\%d hi=0x\%x lo: 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05488}05488                       tx\_data\_bd,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05489}05489                       tmp\_bd,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05490}05490                       le16toh(tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_a50c038f6806b4268ba872e6cd08feb39}{nbytes}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05491}05491                       le32toh(tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_a0f07d3ab34b8c086c977b4a81efdf7af}{addr\_hi}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05492}05492                       le32toh(tx\_data\_bd-\/>\mbox{\hyperlink{structeth__tx__bd_ac47542006cd136f5e2223a419f1812e3}{addr\_lo}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05493}05493             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05494}05494 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05495}05495             tmp\_bd = \mbox{\hyperlink{bxe_8h_a8e4f75baab93cc20f1f31507cddc3551}{TX\_BD\_NEXT}}(tmp\_bd);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05496}05496         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05497}05497     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05498}05498 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05499}05499     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aab8874704ef120b91009c7ce1980d068}{DBG\_TX}}, \textcolor{stringliteral}{"{}doorbell: nbds=\%d bd=\%u\(\backslash\)n"{}}, nbds, bd\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05500}05500 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05501}05501     \textcolor{comment}{/* update TX BD producer index value for next TX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05502}05502     bd\_prod = \mbox{\hyperlink{bxe_8h_a8e4f75baab93cc20f1f31507cddc3551}{TX\_BD\_NEXT}}(bd\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05503}05503 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05504}05504     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05505}05505 \textcolor{comment}{     * If the chain of tx\_bd's describing this frame is adjacent to or spans}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05506}05506 \textcolor{comment}{     * an eth\_tx\_next\_bd element then we need to increment the nbds value.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05507}05507 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05508}05508     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a29630219a86919a6212527bbd5bad5c4}{TX\_BD\_IDX}}(bd\_prod) < nbds) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05509}05509         nbds++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05510}05510     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05511}05511 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05512}05512     \textcolor{comment}{/* don't allow reordering of writes for nbd and packets */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05513}05513     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05514}05514 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05515}05515     fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac39c1f1fb50b4bef5f4c81eae40172fb}{tx\_db}}.\mbox{\hyperlink{unionbxe__db__prod_ad339cd93a130fefd4635c2eda1002611}{data}}.prod += nbds;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05516}05516 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05517}05517     \textcolor{comment}{/* producer points to the next free tx\_bd at this point */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05518}05518     fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb97e5017aa43f9a4e43c5f302af8d30}{tx\_pkt\_prod}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05519}05519     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a8895cb72e0640491ef115fe0f8eee971}{tx\_bd\_prod}} = bd\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05520}05520 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05521}05521     \mbox{\hyperlink{bxe_8h_a169e7ffbd6ee61b85f7bd0afa6e90ee2}{DOORBELL}}(sc, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac39c1f1fb50b4bef5f4c81eae40172fb}{tx\_db}}.\mbox{\hyperlink{unionbxe__db__prod_adb266fc6e258dd54fb656f8285e0e2a5}{raw}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05522}05522 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05523}05523     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aa648fafd0e52bfdcf4c06632c8d9bd93}{tx\_pkts}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05524}05524 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05525}05525     \textcolor{comment}{/* Prevent speculative reads from getting ahead of the status block. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05526}05526     bus\_space\_barrier(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a1fce441aaa962f572d643140658a6e4c}{BAR0}}].\mbox{\hyperlink{structbxe__bar_ac5332e395c57aaf5ebdca5ff35d96cd3}{tag}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a1fce441aaa962f572d643140658a6e4c}{BAR0}}].\mbox{\hyperlink{structbxe__bar_a7de264b12dc05a944543a1f6817c17ec}{handle}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05527}05527                       0, 0, BUS\_SPACE\_BARRIER\_READ);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05528}05528 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05529}05529     \textcolor{comment}{/* Prevent speculative reads from getting ahead of the doorbell. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05530}05530     bus\_space\_barrier(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a44fa2ca32ff22e5eb7fa28ef39e50780}{BAR2}}].\mbox{\hyperlink{structbxe__bar_ac5332e395c57aaf5ebdca5ff35d96cd3}{tag}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a44fa2ca32ff22e5eb7fa28ef39e50780}{BAR2}}].\mbox{\hyperlink{structbxe__bar_a7de264b12dc05a944543a1f6817c17ec}{handle}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05531}05531                       0, 0, BUS\_SPACE\_BARRIER\_READ);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05532}05532 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05533}05533     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05534}05534 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05535}05535 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05536}05536 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05537}\mbox{\hyperlink{bxe_8c_a4a5ed01e53bb61af3d4202e0127b49d8}{05537}} \mbox{\hyperlink{bxe_8c_a4a5ed01e53bb61af3d4202e0127b49d8}{bxe\_tx\_start\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05538}05538                     if\_t ifp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05539}05539                     \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05540}05540 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05541}05541     \textcolor{keyword}{struct }mbuf *m = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05542}05542     \textcolor{keywordtype}{int} tx\_count = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05543}05543     uint16\_t tx\_bd\_avail;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05544}05544 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05545}05545     \mbox{\hyperlink{bxe_8h_a5d8040430885498c3d17cf1183112d7d}{BXE\_FP\_TX\_LOCK\_ASSERT}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05546}05546 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05547}05547     \textcolor{comment}{/* keep adding entries while there are frames to send */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05548}05548     \textcolor{keywordflow}{while} (!if\_sendq\_empty(ifp)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05549}05549 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05550}05550         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05551}05551 \textcolor{comment}{         * check for any frames to send}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05552}05552 \textcolor{comment}{         * dequeue can still be NULL even if queue is not empty}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05553}05553 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05554}05554         m = if\_dequeue(ifp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05555}05555         \textcolor{keywordflow}{if} (\_\_predict\_false(m == NULL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05556}05556             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05557}05557         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05558}05558 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05559}05559         \textcolor{comment}{/* the mbuf now belongs to us */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05560}05560         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5963bb719df461b095dcf277bb8983bb}{mbuf\_alloc\_tx}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05561}05561 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05562}05562         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05563}05563 \textcolor{comment}{         * Put the frame into the transmit ring. If we don't have room,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05564}05564 \textcolor{comment}{         * place the mbuf back at the head of the TX queue, set the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05565}05565 \textcolor{comment}{         * OACTIVE flag, and wait for the NIC to drain the chain.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05566}05566 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05567}05567         \textcolor{keywordflow}{if} (\_\_predict\_false(\mbox{\hyperlink{bxe_8c_a710078c9a6653e2d8965bca956ce98ed}{bxe\_tx\_encap}}(fp, \&m))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05568}05568             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a6c3eb5b8afbddaa506e5e73117ef49ba}{tx\_encap\_failures}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05569}05569             \textcolor{keywordflow}{if} (m != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05570}05570                 \textcolor{comment}{/* mark the TX queue as full and return the frame */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05571}05571                 if\_setdrvflagbits(ifp, IFF\_DRV\_OACTIVE, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05572}05572                 if\_sendq\_prepend(ifp, m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05573}05573                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5963bb719df461b095dcf277bb8983bb}{mbuf\_alloc\_tx}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05574}05574                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0c3b24e9433adcf999c63eb021d86ebe}{tx\_queue\_xoff}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05575}05575             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05576}05576 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05577}05577             \textcolor{comment}{/* stop looking for more work */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05578}05578             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05579}05579         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05580}05580 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05581}05581         \textcolor{comment}{/* the frame was enqueued successfully */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05582}05582         tx\_count++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05583}05583 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05584}05584         \textcolor{comment}{/* send a copy of the frame to any BPF listeners. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05585}05585         if\_etherbpfmtap(ifp, m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05586}05586 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05587}05587         tx\_bd\_avail = \mbox{\hyperlink{bxe_8c_a27bf9359a144fda14c7d1e9a988cd2f7}{bxe\_tx\_avail}}(sc, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05588}05588 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05589}05589         \textcolor{comment}{/* handle any completions if we're running low */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05590}05590         \textcolor{keywordflow}{if} (tx\_bd\_avail < \mbox{\hyperlink{bxe_8h_a17f028de99dbf0cf4373fcd9d9a728a0}{BXE\_TX\_CLEANUP\_THRESHOLD}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05591}05591             \textcolor{comment}{/* bxe\_txeof will set IFF\_DRV\_OACTIVE appropriately */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05592}05592             \mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{bxe\_txeof}}(sc, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05593}05593             \textcolor{keywordflow}{if} (if\_getdrvflags(ifp) \& IFF\_DRV\_OACTIVE) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05594}05594                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05595}05595             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05596}05596         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05597}05597     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05598}05598 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05599}05599     \textcolor{comment}{/* all TX packets were dequeued and/or the tx ring is full */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05600}05600     \textcolor{keywordflow}{if} (tx\_count > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05601}05601         \textcolor{comment}{/* reset the TX watchdog timeout timer */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05602}05602         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aad1db379ee18aa583fd47b943997ba19}{watchdog\_timer}} = \mbox{\hyperlink{bxe_8h_a83943d47061343cf64295018233b8b52}{BXE\_TX\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05603}05603     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05604}05604 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05605}05605 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05606}05606 \textcolor{comment}{/* Legacy (non-\/RSS) dispatch routine */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05607}05607 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05608}\mbox{\hyperlink{bxe_8c_a30e940d2b3c369ba3a9017b19a40b11e}{05608}} \mbox{\hyperlink{bxe_8c_a30e940d2b3c369ba3a9017b19a40b11e}{bxe\_tx\_start}}(if\_t ifp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05609}05609 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05610}05610     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05611}05611     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05612}05612 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05613}05613     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}} = if\_getsoftc(ifp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05614}05614 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05615}05615     \textcolor{keywordflow}{if} (!(if\_getdrvflags(ifp) \& IFF\_DRV\_RUNNING)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05616}05616         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Interface not running, ignoring transmit request\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05617}05617         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05618}05618     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05619}05619 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05620}05620     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05621}05621         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Interface link is down, ignoring transmit request\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05622}05622         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05623}05623     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05624}05624 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05625}05625     fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05626}05626 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05627}05627     \textcolor{keywordflow}{if} (if\_getdrvflags(ifp) \& IFF\_DRV\_OACTIVE) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05628}05628         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a9cd37ae7190f02712bb6bc8e6c59f170}{tx\_queue\_full\_return}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05629}05629         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05630}05630     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05631}05631 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05632}05632     \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05633}05633     \mbox{\hyperlink{bxe_8c_a4a5ed01e53bb61af3d4202e0127b49d8}{bxe\_tx\_start\_locked}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, ifp, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05634}05634     \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05635}05635 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05636}05636 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05637}05637 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05638}\mbox{\hyperlink{bxe_8c_a28364601d30c10812c7f00db1350ab4d}{05638}} \mbox{\hyperlink{bxe_8c_a28364601d30c10812c7f00db1350ab4d}{bxe\_tx\_mq\_start\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05639}05639                        if\_t                ifp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05640}05640                        \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05641}05641                        \textcolor{keyword}{struct} mbuf         *m)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05642}05642 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05643}05643     \textcolor{keyword}{struct }buf\_ring *tx\_br = fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05644}05644     \textcolor{keyword}{struct }mbuf *next;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05645}05645     \textcolor{keywordtype}{int} depth, rc, tx\_count;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05646}05646     uint16\_t tx\_bd\_avail;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05647}05647 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05648}05648     rc = tx\_count = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05649}05649 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05650}05650     \mbox{\hyperlink{bxe_8h_a5d8040430885498c3d17cf1183112d7d}{BXE\_FP\_TX\_LOCK\_ASSERT}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05651}05651 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05652}05652     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}})  \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05653}05653         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_ae33562046e4487d06664cfa80b395512}{bxe\_tx\_mq\_sc\_state\_failures}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05654}05654         \textcolor{keywordflow}{return} ENETDOWN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05655}05655     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05656}05656 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05657}05657     \textcolor{keywordflow}{if} (!tx\_br) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05658}05658         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Multiqueue TX and no buf\_ring!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05659}05659         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05660}05660     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05661}05661 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05662}05662     \textcolor{keywordflow}{if} (m != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05663}05663         rc = drbr\_enqueue(ifp, tx\_br, m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05664}05664         \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05665}05665             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a9054f547670a3c278f9b3a39b397d7b9}{tx\_soft\_errors}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05666}05666             \textcolor{keywordflow}{goto} bxe\_tx\_mq\_start\_locked\_exit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05667}05667         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05668}05668     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05669}05669 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05670}05670     \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}} || !(if\_getdrvflags(ifp) \& IFF\_DRV\_RUNNING)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05671}05671         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a052f94517ba55896ee78ad9cd91a77ea}{tx\_request\_link\_down\_failures}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05672}05672         \textcolor{keywordflow}{goto} bxe\_tx\_mq\_start\_locked\_exit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05673}05673     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05674}05674 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05675}05675     \textcolor{comment}{/* fetch the depth of the driver queue */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05676}05676     depth = drbr\_inuse(ifp, tx\_br);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05677}05677     \textcolor{keywordflow}{if} (depth > fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0ad0ba47b761f389d7769dd99a57619f}{tx\_max\_drbr\_queue\_depth}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05678}05678         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0ad0ba47b761f389d7769dd99a57619f}{tx\_max\_drbr\_queue\_depth}} = depth;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05679}05679     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05680}05680 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05681}05681     \textcolor{comment}{/* keep adding entries while there are frames to send */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05682}05682     \textcolor{keywordflow}{while} ((next = drbr\_peek(ifp, tx\_br)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05683}05683         \textcolor{comment}{/* handle any completions if we're running low */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05684}05684         tx\_bd\_avail = \mbox{\hyperlink{bxe_8c_a27bf9359a144fda14c7d1e9a988cd2f7}{bxe\_tx\_avail}}(sc, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05685}05685         \textcolor{keywordflow}{if} (tx\_bd\_avail < \mbox{\hyperlink{bxe_8h_a17f028de99dbf0cf4373fcd9d9a728a0}{BXE\_TX\_CLEANUP\_THRESHOLD}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05686}05686             \textcolor{comment}{/* bxe\_txeof will set IFF\_DRV\_OACTIVE appropriately */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05687}05687             \mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{bxe\_txeof}}(sc, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05688}05688             tx\_bd\_avail = \mbox{\hyperlink{bxe_8c_a27bf9359a144fda14c7d1e9a988cd2f7}{bxe\_tx\_avail}}(sc, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05689}05689             \textcolor{keywordflow}{if} (tx\_bd\_avail < (\mbox{\hyperlink{bxe_8h_a149090a58df685dfe042c45eeb204d56}{BXE\_TSO\_MAX\_SEGMENTS}} + 1)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05690}05690                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0e1cf2c3542163864317335f1a7451e3}{bd\_avail\_too\_less\_failures}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05691}05691                 m\_freem(next);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05692}05692                 drbr\_advance(ifp, tx\_br);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05693}05693                 rc = ENOBUFS;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05694}05694                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05695}05695             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05696}05696         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05697}05697 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05698}05698         \textcolor{comment}{/* the mbuf now belongs to us */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05699}05699         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5963bb719df461b095dcf277bb8983bb}{mbuf\_alloc\_tx}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05700}05700 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05701}05701         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05702}05702 \textcolor{comment}{         * Put the frame into the transmit ring. If we don't have room,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05703}05703 \textcolor{comment}{         * place the mbuf back at the head of the TX queue, set the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05704}05704 \textcolor{comment}{         * OACTIVE flag, and wait for the NIC to drain the chain.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05705}05705 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05706}05706         rc = \mbox{\hyperlink{bxe_8c_a710078c9a6653e2d8965bca956ce98ed}{bxe\_tx\_encap}}(fp, \&next);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05707}05707         \textcolor{keywordflow}{if} (\_\_predict\_false(rc != 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05708}05708             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a6c3eb5b8afbddaa506e5e73117ef49ba}{tx\_encap\_failures}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05709}05709             \textcolor{keywordflow}{if} (next != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05710}05710                 \textcolor{comment}{/* mark the TX queue as full and save the frame */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05711}05711                 if\_setdrvflagbits(ifp, IFF\_DRV\_OACTIVE, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05712}05712                 drbr\_putback(ifp, tx\_br, next);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05713}05713                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5963bb719df461b095dcf277bb8983bb}{mbuf\_alloc\_tx}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05714}05714                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a1160916525119d56e82cbcc7786b0b63}{tx\_frames\_deferred}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05715}05715             \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05716}05716                 drbr\_advance(ifp, tx\_br);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05717}05717 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05718}05718             \textcolor{comment}{/* stop looking for more work */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05719}05719             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05720}05720         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05721}05721 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05722}05722         \textcolor{comment}{/* the transmit frame was enqueued successfully */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05723}05723         tx\_count++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05724}05724 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05725}05725         \textcolor{comment}{/* send a copy of the frame to any BPF listeners */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05726}05726         if\_etherbpfmtap(ifp, next);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05727}05727 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05728}05728         drbr\_advance(ifp, tx\_br);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05729}05729     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05730}05730 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05731}05731     \textcolor{comment}{/* all TX packets were dequeued and/or the tx ring is full */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05732}05732     \textcolor{keywordflow}{if} (tx\_count > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05733}05733         \textcolor{comment}{/* reset the TX watchdog timeout timer */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05734}05734         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aad1db379ee18aa583fd47b943997ba19}{watchdog\_timer}} = \mbox{\hyperlink{bxe_8h_a83943d47061343cf64295018233b8b52}{BXE\_TX\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05735}05735     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05736}05736 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05737}05737 bxe\_tx\_mq\_start\_locked\_exit:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05738}05738     \textcolor{comment}{/* If we didn't drain the drbr, enqueue a task in the future to do it. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05739}05739     \textcolor{keywordflow}{if} (!drbr\_empty(ifp, tx\_br)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05740}05740         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a3be6e2a33d0f529efd4f248d4594b53e}{tx\_mq\_not\_empty}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05741}05741         taskqueue\_enqueue\_timeout(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad619c9f0f24a11d8ce137e64c49fb88b}{tx\_timeout\_task}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05742}05742     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05743}05743 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05744}05744     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05745}05745 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05746}05746 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05747}05747 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05748}\mbox{\hyperlink{bxe_8c_aa5dfd872b825984af3cbe103b19465a2}{05748}} \mbox{\hyperlink{bxe_8c_aa5dfd872b825984af3cbe103b19465a2}{bxe\_tx\_mq\_start\_deferred}}(\textcolor{keywordtype}{void} *arg,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05749}05749                          \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05750}05750 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05751}05751     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *)arg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05752}05752     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05753}05753     if\_t \mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} = sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05754}05754 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05755}05755     \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05756}05756     \mbox{\hyperlink{bxe_8c_a28364601d30c10812c7f00db1350ab4d}{bxe\_tx\_mq\_start\_locked}}(sc, \mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}, NULL);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05757}05757     \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05758}05758 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05759}05759 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05760}05760 \textcolor{comment}{/* Multiqueue (TSS) dispatch routine. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05761}05761 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05762}\mbox{\hyperlink{bxe_8c_aeb41473f0e499df6f5116980e42795ef}{05762}} \mbox{\hyperlink{bxe_8c_aeb41473f0e499df6f5116980e42795ef}{bxe\_tx\_mq\_start}}(\textcolor{keyword}{struct} ifnet *\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05763}05763                 \textcolor{keyword}{struct} mbuf  *m)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05764}05764 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05765}05765     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = if\_getsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05766}05766     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05767}05767     \textcolor{keywordtype}{int} fp\_index, rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05768}05768 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05769}05769     fp\_index = 0; \textcolor{comment}{/* default is the first queue */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05770}05770 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05771}05771     \textcolor{comment}{/* check if flowid is set */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05772}05772 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05773}05773     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_adfd8a1e634485d3695aeabc36a48f9d4}{BXE\_VALID\_FLOWID}}(m))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05774}05774         fp\_index = (m-\/>m\_pkthdr.flowid \% \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05775}05775 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05776}05776     fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[fp\_index];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05777}05777 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05778}05778     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}})  \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05779}05779         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_ae33562046e4487d06664cfa80b395512}{bxe\_tx\_mq\_sc\_state\_failures}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05780}05780         \textcolor{keywordflow}{return} ENETDOWN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05781}05781     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05782}05782 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05783}05783     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aa5b8c71972f1e1e8ac12f7c558d8ebfc}{BXE\_FP\_TX\_TRYLOCK}}(fp)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05784}05784         rc = \mbox{\hyperlink{bxe_8c_a28364601d30c10812c7f00db1350ab4d}{bxe\_tx\_mq\_start\_locked}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, ifp, fp, m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05785}05785         \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05786}05786     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05787}05787         rc = drbr\_enqueue(ifp, fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}}, m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05788}05788         taskqueue\_enqueue(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a10e00c04266e87eef5c9b6998b8aa692}{tx\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05789}05789     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05790}05790 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05791}05791     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05792}05792 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05793}05793 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05794}05794 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05795}\mbox{\hyperlink{bxe_8c_a8afddc02f1305a83bc03474445608fac}{05795}} \mbox{\hyperlink{bxe_8c_a8afddc02f1305a83bc03474445608fac}{bxe\_mq\_flush}}(\textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05796}05796 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05797}05797     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = if\_getsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05798}05798     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05799}05799     \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05800}05800     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05801}05801 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05802}05802     \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05803}05803         fp = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05804}05804 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05805}05805         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_acbd5188632fc27870212f8ab76173740}{state}} != \mbox{\hyperlink{bxe_8h_ad7bd122f3e080449e8a408f66fd5316d}{BXE\_FP\_STATE\_IRQ}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05806}05806             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Not clearing fp[\%02d] buf\_ring (state=\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05807}05807                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_acbd5188632fc27870212f8ab76173740}{state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05808}05808             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05809}05809         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05810}05810 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05811}05811         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05812}05812             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Clearing fp[\%02d] buf\_ring\(\backslash\)n"{}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05813}05813             \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05814}05814             \textcolor{keywordflow}{while} ((m = buf\_ring\_dequeue\_sc(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05815}05815                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05816}05816             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05817}05817             \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05818}05818         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05819}05819     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05820}05820 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05821}05821     if\_qflush(ifp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05822}05822 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05823}05823 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05824}05824 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05825}\mbox{\hyperlink{bxe_8c_a49596b823ddddf613c08050e6ea5658a}{05825}} \mbox{\hyperlink{bxe_8c_a49596b823ddddf613c08050e6ea5658a}{bxe\_cid\_ilt\_lines}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05826}05826 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05827}05827     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a591919023cb79063136fe9af3bd7851a}{IS\_SRIOV}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05828}05828         \textcolor{keywordflow}{return} ((\mbox{\hyperlink{bxe_8h_af234d9380f50ccbab4b6f7f73291555e}{BXE\_FIRST\_VF\_CID}} + \mbox{\hyperlink{bxe_8h_abc8162380d650420f77add6652a2893e}{BXE\_VF\_CIDS}}) / \mbox{\hyperlink{bxe_8h_a81dd6ad4ed0a8d03589b6137ca78c215}{ILT\_PAGE\_CIDS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05829}05829     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05830}05830     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_a3eac5b9db8078800a12690cfae25a2f2}{L2\_ILT\_LINES}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05831}05831 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05832}05832 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05833}05833 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05834}\mbox{\hyperlink{bxe_8c_ab7bef1458ec582e009f96d1e5c4041b3}{05834}} \mbox{\hyperlink{bxe_8c_ab7bef1458ec582e009f96d1e5c4041b3}{bxe\_ilt\_set\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05835}05835 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05836}05836     \textcolor{keyword}{struct }\mbox{\hyperlink{structilt__client__info}{ilt\_client\_info}} *ilt\_client;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05837}05837     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__ilt}{ecore\_ilt}} *ilt = sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05838}05838     uint16\_t line = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05839}05839 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05840}05840     ilt-\/>\mbox{\hyperlink{structecore__ilt_a2797730319d51141b736e5d4289ac30f}{start\_line}} = \mbox{\hyperlink{bxe_8h_a700fb5b3e5e119f5e538a22ef1a6aeaf}{FUNC\_ILT\_BASE}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05841}05841     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}ilt starts at line \%d\(\backslash\)n"{}}, ilt-\/>\mbox{\hyperlink{structecore__ilt_a2797730319d51141b736e5d4289ac30f}{start\_line}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05842}05842 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05843}05843     \textcolor{comment}{/* CDU */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05844}05844     ilt\_client = \&ilt-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[\mbox{\hyperlink{ecore__init_8h_a180551a73ce2e64fd1b0f673fdbbbb29}{ILT\_CLIENT\_CDU}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05845}05845     ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_ad04dd6692ca86708fc92df3ef580acbe}{client\_num}} = \mbox{\hyperlink{ecore__init_8h_a180551a73ce2e64fd1b0f673fdbbbb29}{ILT\_CLIENT\_CDU}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05846}05846     ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}} = \mbox{\hyperlink{bxe_8h_a7a59a1819ffc9873d642d2b02be444d4}{CDU\_ILT\_PAGE\_SZ}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05847}05847     ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}} = \mbox{\hyperlink{ecore__init_8h_a34a5dfc01efdda02a71f2ff694d1f252}{ILT\_CLIENT\_SKIP\_MEM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05848}05848     ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}} = line;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05849}05849     line += \mbox{\hyperlink{bxe_8c_a49596b823ddddf613c08050e6ea5658a}{bxe\_cid\_ilt\_lines}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05850}05850 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05851}05851     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05852}05852         line += \mbox{\hyperlink{bxe_8h_ae6c7759a8444f96ef631a2864413b5ae}{CNIC\_ILT\_LINES}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05853}05853     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05854}05854 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05855}05855     ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}} = (line -\/ 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05856}05856 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05857}05857     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05858}05858           \textcolor{stringliteral}{"{}ilt client[CDU]: start \%d, end \%d, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05859}05859           \textcolor{stringliteral}{"{}psz 0x\%x, flags 0x\%x, hw psz \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05860}05860           ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}}, ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05861}05861           ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05862}05862           ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05863}05863           \mbox{\hyperlink{bxe_8h_a4f0a7a8b9813cc2ba67d0ae15afe4feb}{ilog2}}(ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}} >> 12));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05864}05864 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05865}05865     \textcolor{comment}{/* QM */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05866}05866     \textcolor{keywordflow}{if} (\mbox{\hyperlink{ecore__init__ops_8h_a55eda8e897bc3959f54a06654a3dcabe}{QM\_INIT}}(sc-\/>\mbox{\hyperlink{structbxe__softc_a95756baba748982379d79c2a5cdb0518}{qm\_cid\_count}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05867}05867         ilt\_client = \&ilt-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[\mbox{\hyperlink{ecore__init_8h_aef9bd1c71d9076ef5f11b36e2a52570b}{ILT\_CLIENT\_QM}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05868}05868         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_ad04dd6692ca86708fc92df3ef580acbe}{client\_num}} = \mbox{\hyperlink{ecore__init_8h_aef9bd1c71d9076ef5f11b36e2a52570b}{ILT\_CLIENT\_QM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05869}05869         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}} = \mbox{\hyperlink{bxe_8h_a1d240e5382c9e22c403646a4784f66f5}{QM\_ILT\_PAGE\_SZ}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05870}05870         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05871}05871         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}} = line;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05872}05872 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05873}05873         \textcolor{comment}{/* 4 bytes for each cid */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05874}05874         line += \mbox{\hyperlink{bxe_8h_ae664e7492e37d324831caf2321ddda37}{DIV\_ROUND\_UP}}(sc-\/>\mbox{\hyperlink{structbxe__softc_a95756baba748982379d79c2a5cdb0518}{qm\_cid\_count}} * \mbox{\hyperlink{ecore__init__ops_8h_a8bc7e311b304b69dedb5479bc0862af7}{QM\_QUEUES\_PER\_FUNC}} * 4,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05875}05875                              \mbox{\hyperlink{bxe_8h_a1d240e5382c9e22c403646a4784f66f5}{QM\_ILT\_PAGE\_SZ}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05876}05876 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05877}05877         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}} = (line -\/ 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05878}05878 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05879}05879         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05880}05880               \textcolor{stringliteral}{"{}ilt client[QM]: start \%d, end \%d, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05881}05881               \textcolor{stringliteral}{"{}psz 0x\%x, flags 0x\%x, hw psz \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05882}05882               ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}}, ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05883}05883               ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}}, ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05884}05884               \mbox{\hyperlink{bxe_8h_a4f0a7a8b9813cc2ba67d0ae15afe4feb}{ilog2}}(ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}} >> 12));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05885}05885     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05886}05886 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05887}05887     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05888}05888         \textcolor{comment}{/* SRC */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05889}05889         ilt\_client = \&ilt-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[\mbox{\hyperlink{ecore__init_8h_a3bb86cf34637175d9faee697405602fa}{ILT\_CLIENT\_SRC}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05890}05890         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_ad04dd6692ca86708fc92df3ef580acbe}{client\_num}} = \mbox{\hyperlink{ecore__init_8h_a3bb86cf34637175d9faee697405602fa}{ILT\_CLIENT\_SRC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05891}05891         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}} = \mbox{\hyperlink{bxe_8h_a1e7e00ae452410642fe320953035c53b}{SRC\_ILT\_PAGE\_SZ}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05892}05892         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05893}05893         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}} = line;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05894}05894         line += \mbox{\hyperlink{bxe_8h_a3ce9a6d7598d4b9da8f695c329075e98}{SRC\_ILT\_LINES}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05895}05895         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}} = (line -\/ 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05896}05896 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05897}05897         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05898}05898               \textcolor{stringliteral}{"{}ilt client[SRC]: start \%d, end \%d, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05899}05899               \textcolor{stringliteral}{"{}psz 0x\%x, flags 0x\%x, hw psz \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05900}05900               ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}}, ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05901}05901               ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}}, ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05902}05902               \mbox{\hyperlink{bxe_8h_a4f0a7a8b9813cc2ba67d0ae15afe4feb}{ilog2}}(ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}} >> 12));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05903}05903 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05904}05904         \textcolor{comment}{/* TM */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05905}05905         ilt\_client = \&ilt-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[\mbox{\hyperlink{ecore__init_8h_a816e0c661a8523d460c2419dead0fc15}{ILT\_CLIENT\_TM}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05906}05906         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_ad04dd6692ca86708fc92df3ef580acbe}{client\_num}} = \mbox{\hyperlink{ecore__init_8h_a816e0c661a8523d460c2419dead0fc15}{ILT\_CLIENT\_TM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05907}05907         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}} = \mbox{\hyperlink{bxe_8h_ab10e45da8d8164139a33d05341e38a88}{TM\_ILT\_PAGE\_SZ}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05908}05908         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05909}05909         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}} = line;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05910}05910         line += \mbox{\hyperlink{bxe_8h_a36ef2c39ae0d182aa1e5e88c143941db}{TM\_ILT\_LINES}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05911}05911         ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}} = (line -\/ 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05912}05912 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05913}05913         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05914}05914               \textcolor{stringliteral}{"{}ilt client[TM]: start \%d, end \%d, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05915}05915               \textcolor{stringliteral}{"{}psz 0x\%x, flags 0x\%x, hw psz \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05916}05916               ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}}, ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05917}05917               ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}}, ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05918}05918               \mbox{\hyperlink{bxe_8h_a4f0a7a8b9813cc2ba67d0ae15afe4feb}{ilog2}}(ilt\_client-\/>\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}} >> 12));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05919}05919     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05920}05920 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05921}05921     KASSERT((line <= \mbox{\hyperlink{bxe_8h_aa1f5aca5410c8df219202ddd0d5eafc8}{ILT\_MAX\_LINES}}), (\textcolor{stringliteral}{"{}Invalid number of ILT lines!"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05922}05922 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05923}05923 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05924}05924 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05925}\mbox{\hyperlink{bxe_8c_aed5b773b4dd9bc0c5c63c49e8e3a0a7d}{05925}} \mbox{\hyperlink{bxe_8c_aed5b773b4dd9bc0c5c63c49e8e3a0a7d}{bxe\_set\_fp\_rx\_buf\_size}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05926}05926 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05927}05927     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05928}05928     uint32\_t rx\_buf\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05929}05929 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05930}05930     rx\_buf\_size = (\mbox{\hyperlink{ecore__fw__defs_8h_a9fa72350cc9e5cacea13852e4c5ea13f}{IP\_HEADER\_ALIGNMENT\_PADDING}} + \mbox{\hyperlink{bxe_8h_a0c8d25f2aa5e9ac966516442b13f8d62}{ETH\_OVERHEAD}} + sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05931}05931 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05932}05932     \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05933}05933         \textcolor{keywordflow}{if}(rx\_buf\_size <= MCLBYTES)\{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05934}05934             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_a8881f54a78b19b7b011b8a8b065ff6a8}{rx\_buf\_size}} = rx\_buf\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05935}05935             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_ab7d812607cee03c45efffc679003448c}{mbuf\_alloc\_size}} = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05936}05936         \}\textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (rx\_buf\_size <= MJUMPAGESIZE)\{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05937}05937             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_a8881f54a78b19b7b011b8a8b065ff6a8}{rx\_buf\_size}} = rx\_buf\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05938}05938             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_ab7d812607cee03c45efffc679003448c}{mbuf\_alloc\_size}} = MJUMPAGESIZE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05939}05939         \}\textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (rx\_buf\_size <= (MJUMPAGESIZE + MCLBYTES))\{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05940}05940             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_a8881f54a78b19b7b011b8a8b065ff6a8}{rx\_buf\_size}} = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05941}05941             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_ab7d812607cee03c45efffc679003448c}{mbuf\_alloc\_size}} = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05942}05942         \}\textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (rx\_buf\_size <= (2 * MJUMPAGESIZE))\{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05943}05943             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_a8881f54a78b19b7b011b8a8b065ff6a8}{rx\_buf\_size}} = MJUMPAGESIZE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05944}05944             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_ab7d812607cee03c45efffc679003448c}{mbuf\_alloc\_size}} = MJUMPAGESIZE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05945}05945         \}\textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05946}05946             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_a8881f54a78b19b7b011b8a8b065ff6a8}{rx\_buf\_size}} = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05947}05947             sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i].\mbox{\hyperlink{structbxe__fastpath_ab7d812607cee03c45efffc679003448c}{mbuf\_alloc\_size}} = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05948}05948         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05949}05949     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05950}05950 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05951}05951 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05952}05952 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05953}\mbox{\hyperlink{bxe_8c_a64e3b157952684fc9002cc23600a73d3}{05953}} \mbox{\hyperlink{bxe_8c_a64e3b157952684fc9002cc23600a73d3}{bxe\_alloc\_ilt\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05954}05954 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05955}05955     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05956}05956 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05957}05957     \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05958}05958          (\textcolor{keyword}{struct} \mbox{\hyperlink{structecore__ilt}{ecore\_ilt}} *)malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structecore__ilt}{ecore\_ilt}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05959}05959                                     M\_BXE\_ILT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05960}05960                                     (M\_NOWAIT | M\_ZERO))) == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05961}05961         rc = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05962}05962     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05963}05963 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05964}05964     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05965}05965 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05966}05966 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05967}05967 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05968}\mbox{\hyperlink{bxe_8c_aaf7a576faa83c4b1d34ec48352f0e62d}{05968}} \mbox{\hyperlink{bxe_8c_aaf7a576faa83c4b1d34ec48352f0e62d}{bxe\_alloc\_ilt\_lines\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05969}05969 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05970}05970     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05971}05971 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05972}05972     \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05973}05973          (\textcolor{keyword}{struct} \mbox{\hyperlink{structilt__line}{ilt\_line}} *)malloc((\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structilt__line}{ilt\_line}}) * \mbox{\hyperlink{bxe_8h_aa1f5aca5410c8df219202ddd0d5eafc8}{ILT\_MAX\_LINES}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05974}05974                                     M\_BXE\_ILT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05975}05975                                     (M\_NOWAIT | M\_ZERO))) == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05976}05976         rc = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05977}05977     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05978}05978 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05979}05979     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05980}05980 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05981}05981 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05982}05982 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05983}\mbox{\hyperlink{bxe_8c_a98a24e7f0dd5566ed2eb97e67cdc23d2}{05983}} \mbox{\hyperlink{bxe_8c_a98a24e7f0dd5566ed2eb97e67cdc23d2}{bxe\_free\_ilt\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05984}05984 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05985}05985     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05986}05986         free(sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}, M\_BXE\_ILT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05987}05987         sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05988}05988     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05989}05989 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05990}05990 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05991}05991 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05992}\mbox{\hyperlink{bxe_8c_a6081ac898d75eab41cbfc42b8002e59d}{05992}} \mbox{\hyperlink{bxe_8c_a6081ac898d75eab41cbfc42b8002e59d}{bxe\_free\_ilt\_lines\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05993}05993 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05994}05994     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05995}05995         free(sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}}, M\_BXE\_ILT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05996}05996         sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05997}05997     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05998}05998 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l05999}05999 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06000}06000 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06001}\mbox{\hyperlink{bxe_8c_aba6356efb089c0f887dea37803476f0a}{06001}} \mbox{\hyperlink{bxe_8c_aba6356efb089c0f887dea37803476f0a}{bxe\_free\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06002}06002 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06003}06003     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06004}06004 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06005}06005     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a3eac5b9db8078800a12690cfae25a2f2}{L2\_ILT\_LINES}}(sc); i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06006}06006         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_ac562cde8b6a4d4aa8c835d66d71a0c22}{vcxt\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06007}06007         sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_aa7c394b86d59729298ef3d484234b9e0}{vcxt}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06008}06008         sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_af52403fbd932284a763ddb9cd9ec1671}{size}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06009}06009     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06010}06010 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06011}06011     \mbox{\hyperlink{ecore__init__ops_8h_a9d18931e057cf6bdadc6e938c968164e}{ecore\_ilt\_mem\_op}}(sc, \mbox{\hyperlink{ecore__init__ops_8h_aa872fb2267b80a6f8e43d1c47667f78d}{ILT\_MEMOP\_FREE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06012}06012 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06013}06013     \mbox{\hyperlink{bxe_8c_a6081ac898d75eab41cbfc42b8002e59d}{bxe\_free\_ilt\_lines\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06014}06014 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06015}06015 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06016}06016 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06017}06017 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06018}\mbox{\hyperlink{bxe_8c_abf72f72346c48bed2d9f9552510dcdbd}{06018}} \mbox{\hyperlink{bxe_8c_abf72f72346c48bed2d9f9552510dcdbd}{bxe\_alloc\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06019}06019 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06020}06020 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06021}06021     \textcolor{keywordtype}{int} context\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06022}06022     \textcolor{keywordtype}{int} allocated;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06023}06023     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06024}06024 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06025}06025     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06026}06026 \textcolor{comment}{     * Allocate memory for CDU context:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06027}06027 \textcolor{comment}{     * This memory is allocated separately and not in the generic ILT}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06028}06028 \textcolor{comment}{     * functions because CDU differs in few aspects:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06029}06029 \textcolor{comment}{     * 1. There can be multiple entities allocating memory for context -\/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06030}06030 \textcolor{comment}{     * regular L2, CNIC, and SRIOV drivers. Each separately controls}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06031}06031 \textcolor{comment}{     * its own ILT lines.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06032}06032 \textcolor{comment}{     * 2. Since CDU page-\/size is not a single 4KB page (which is the case}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06033}06033 \textcolor{comment}{     * for the other ILT clients), to be efficient we want to support}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06034}06034 \textcolor{comment}{     * allocation of sub-\/page-\/size in the last entry.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06035}06035 \textcolor{comment}{     * 3. Context pointers are used by the driver to pass to FW / update}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06036}06036 \textcolor{comment}{     * the context (for the other ILT clients the pointers are used just to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06037}06037 \textcolor{comment}{     * free the memory during unload).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06038}06038 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06039}06039     context\_size = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{union }\mbox{\hyperlink{unioncdu__context}{cdu\_context}}) * \mbox{\hyperlink{bxe_8h_af3da40b9350c2890164c03ba2102bf8e}{BXE\_L2\_CID\_COUNT}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06040}06040     \textcolor{keywordflow}{for} (i = 0, allocated = 0; allocated < context\_size; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06041}06041         sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_af52403fbd932284a763ddb9cd9ec1671}{size}} = min(\mbox{\hyperlink{bxe_8h_a7a59a1819ffc9873d642d2b02be444d4}{CDU\_ILT\_PAGE\_SZ}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06042}06042                                   (context\_size -\/ allocated));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06043}06043 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06044}06044         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_af52403fbd932284a763ddb9cd9ec1671}{size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06045}06045                           \&sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_ac562cde8b6a4d4aa8c835d66d71a0c22}{vcxt\_dma}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06046}06046                           \textcolor{stringliteral}{"{}cdu context"{}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06047}06047             \mbox{\hyperlink{bxe_8c_aba6356efb089c0f887dea37803476f0a}{bxe\_free\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06048}06048             \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06049}06049         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06050}06050 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06051}06051         sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_aa7c394b86d59729298ef3d484234b9e0}{vcxt}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06052}06052             (\textcolor{keyword}{union }\mbox{\hyperlink{unioncdu__context}{cdu\_context}} *)sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_ac562cde8b6a4d4aa8c835d66d71a0c22}{vcxt\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06053}06053 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06054}06054         allocated += sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_af52403fbd932284a763ddb9cd9ec1671}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06055}06055     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06056}06056 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06057}06057     \mbox{\hyperlink{bxe_8c_aaf7a576faa83c4b1d34ec48352f0e62d}{bxe\_alloc\_ilt\_lines\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06058}06058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06059}06059     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}ilt=\%p start\_line=\%u lines=\%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06060}06060           sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_a2797730319d51141b736e5d4289ac30f}{start\_line}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06061}06061     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06062}06062         \textcolor{keywordflow}{for} (i = 0; i < 4; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06063}06063             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06064}06064                   \textcolor{stringliteral}{"{}c\%d page\_size=\%u start=\%u end=\%u num=\%u flags=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06065}06065                   i,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06066}06066                   sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[i].\mbox{\hyperlink{structilt__client__info_aaa3325ea120a298d6e91d6620b9153ec}{page\_size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06067}06067                   sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[i].\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06068}06068                   sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[i].\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06069}06069                   sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[i].\mbox{\hyperlink{structilt__client__info_ad04dd6692ca86708fc92df3ef580acbe}{client\_num}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06070}06070                   sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}}-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[i].\mbox{\hyperlink{structilt__client__info_a50f7f0fd960cc5abc3e6bcb106b4f008}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06071}06071         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06072}06072     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06073}06073     \textcolor{keywordflow}{if} (\mbox{\hyperlink{ecore__init__ops_8h_a9d18931e057cf6bdadc6e938c968164e}{ecore\_ilt\_mem\_op}}(sc, \mbox{\hyperlink{ecore__init__ops_8h_a9daef2e2caa21db9c4738675be0a15ee}{ILT\_MEMOP\_ALLOC}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06074}06074         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ecore\_ilt\_mem\_op ILT\_MEMOP\_ALLOC failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06075}06075         \mbox{\hyperlink{bxe_8c_aba6356efb089c0f887dea37803476f0a}{bxe\_free\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06076}06076         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06077}06077     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06078}06078 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06079}06079     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06080}06080 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06081}06081 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06082}06082 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06083}\mbox{\hyperlink{bxe_8c_a1b161fec88cf8f69d271e47f8cc9936e}{06083}} \mbox{\hyperlink{bxe_8c_a1b161fec88cf8f69d271e47f8cc9936e}{bxe\_free\_rx\_bd\_chain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06084}06084 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06085}06085     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06086}06086 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06087}06087     \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06088}06088         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06089}06089     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06090}06090 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06091}06091     \textcolor{comment}{/* free all mbufs and unload all maps */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06092}06092     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a1b91b1ae9468100c39d54b9e03c35bf3}{RX\_BD\_TOTAL}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06093}06093         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06094}06094             bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06095}06095                             fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06096}06096                             BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06097}06097             bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06098}06098                               fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06099}06099         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06100}06100 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06101}06101         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06102}06102             m\_freem(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06103}06103             fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06104}06104             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0f850d2e2103d0e6268465b9ca3994a9}{mbuf\_alloc\_rx}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06105}06105         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06106}06106     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06107}06107 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06108}06108 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06109}06109 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06110}\mbox{\hyperlink{bxe_8c_a8f3f159c69af898fe9242e99dbbe02ba}{06110}} \mbox{\hyperlink{bxe_8c_a8f3f159c69af898fe9242e99dbbe02ba}{bxe\_free\_tpa\_pool}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06111}06111 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06112}06112     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06113}06113     \textcolor{keywordtype}{int} i, max\_agg\_queues;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06114}06114 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06115}06115     sc = \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06116}06116 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06117}06117     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06118}06118         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06119}06119     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06120}06120 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06121}06121     max\_agg\_queues = \mbox{\hyperlink{bxe_8h_a17145ba166c4c2e66d36460bbc2e2992}{MAX\_AGG\_QS}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06122}06122 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06123}06123     \textcolor{comment}{/* release all mbufs and unload all DMA maps in the TPA pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06124}06124     \textcolor{keywordflow}{for} (i = 0; i < max\_agg\_queues; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06125}06125         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[i].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06126}06126             bus\_dmamap\_sync(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06127}06127                             \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[i].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06128}06128                             BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06129}06129             bus\_dmamap\_unload(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06130}06130                               \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[i].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06131}06131         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06132}06132 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06133}06133         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[i].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06134}06134             m\_freem(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[i].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06135}06135             \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[i].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06136}06136             \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a79b8e7bd9f431a24e6f0c7e39c0a91e9}{mbuf\_alloc\_tpa}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06137}06137         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06138}06138     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06139}06139 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06140}06140 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06141}06141 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06142}\mbox{\hyperlink{bxe_8c_a5a9670c12953de87872d4b8d19ac05e1}{06142}} \mbox{\hyperlink{bxe_8c_a5a9670c12953de87872d4b8d19ac05e1}{bxe\_free\_sge\_chain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06143}06143 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06144}06144     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06145}06145 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06146}06146     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06147}06147         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06148}06148     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06149}06149 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06150}06150     \textcolor{comment}{/* rree all mbufs and unload all maps */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06151}06151     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_ac88980fb49e9b3cf1d621acfe33b44b7}{RX\_SGE\_TOTAL}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06152}06152         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06153}06153             bus\_dmamap\_sync(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06154}06154                             \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06155}06155                             BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06156}06156             bus\_dmamap\_unload(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06157}06157                               \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06158}06158         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06159}06159 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06160}06160         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06161}06161             m\_freem(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06162}06162             \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[i].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06163}06163             \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aab8bdd1587f71f69f2a7144f4fd2ad51}{mbuf\_alloc\_sge}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06164}06164         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06165}06165     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06166}06166 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06167}06167 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06168}06168 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06169}\mbox{\hyperlink{bxe_8c_a7a62f7cb289e73886ab83bef2ba23505}{06169}} \mbox{\hyperlink{bxe_8c_a7a62f7cb289e73886ab83bef2ba23505}{bxe\_free\_fp\_buffers}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06170}06170 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06171}06171     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06172}06172     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06173}06173 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06174}06174     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06175}06175         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06176}06176 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06177}06177         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06178}06178             \textcolor{comment}{/* just in case bxe\_mq\_flush() wasn't called */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06179}06179             \textcolor{keywordflow}{if} (mtx\_initialized(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad088e8f37154c5703ca22582d90f4888}{tx\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06180}06180                 \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06181}06181 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06182}06182                 \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06183}06183                 \textcolor{keywordflow}{while} ((m = buf\_ring\_dequeue\_sc(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}})) != NULL)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06184}06184                     m\_freem(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06185}06185                 \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06186}06186             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06187}06187         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06188}06188 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06189}06189         \textcolor{comment}{/* free all RX buffers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06190}06190         \mbox{\hyperlink{bxe_8c_a1b161fec88cf8f69d271e47f8cc9936e}{bxe\_free\_rx\_bd\_chain}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06191}06191         \mbox{\hyperlink{bxe_8c_a8f3f159c69af898fe9242e99dbbe02ba}{bxe\_free\_tpa\_pool}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06192}06192         \mbox{\hyperlink{bxe_8c_a5a9670c12953de87872d4b8d19ac05e1}{bxe\_free\_sge\_chain}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06193}06193 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06194}06194         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0f850d2e2103d0e6268465b9ca3994a9}{mbuf\_alloc\_rx}} != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06195}06195             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}failed to claim all rx mbufs (\%d left)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06196}06196                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0f850d2e2103d0e6268465b9ca3994a9}{mbuf\_alloc\_rx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06197}06197         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06198}06198 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06199}06199         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aab8bdd1587f71f69f2a7144f4fd2ad51}{mbuf\_alloc\_sge}} != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06200}06200             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}failed to claim all sge mbufs (\%d left)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06201}06201                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aab8bdd1587f71f69f2a7144f4fd2ad51}{mbuf\_alloc\_sge}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06202}06202         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06203}06203 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06204}06204         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a79b8e7bd9f431a24e6f0c7e39c0a91e9}{mbuf\_alloc\_tpa}} != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06205}06205             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}failed to claim all sge mbufs (\%d left)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06206}06206                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a79b8e7bd9f431a24e6f0c7e39c0a91e9}{mbuf\_alloc\_tpa}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06207}06207         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06208}06208 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06209}06209         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5963bb719df461b095dcf277bb8983bb}{mbuf\_alloc\_tx}} != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06210}06210             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}failed to release tx mbufs (\%d left)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06211}06211                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a5963bb719df461b095dcf277bb8983bb}{mbuf\_alloc\_tx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06212}06212         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06213}06213 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06214}06214         \textcolor{comment}{/* XXX verify all mbufs were reclaimed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06215}06215     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06216}06216 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06217}06217 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06218}06218 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06219}\mbox{\hyperlink{bxe_8c_a5b3dc2834150b871a3524bd78b67e268}{06219}} \mbox{\hyperlink{bxe_8c_a5b3dc2834150b871a3524bd78b67e268}{bxe\_alloc\_rx\_bd\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06220}06220                      uint16\_t            prev\_index,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06221}06221                      uint16\_t            index)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06222}06222 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06223}06223     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__rx__bd}{bxe\_sw\_rx\_bd}} *rx\_buf;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06224}06224     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__bd}{eth\_rx\_bd}} *rx\_bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06225}06225     bus\_dma\_segment\_t segs[1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06226}06226     bus\_dmamap\_t map;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06227}06227     \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06228}06228     \textcolor{keywordtype}{int} nsegs, rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06229}06229 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06230}06230     rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06231}06231 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06232}06232     \textcolor{comment}{/* allocate the new RX BD mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06233}06233     m = m\_getjcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR, fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab7d812607cee03c45efffc679003448c}{mbuf\_alloc\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06234}06234     \textcolor{keywordflow}{if} (\_\_predict\_false(m == NULL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06235}06235         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a7de23b7c7529914ffac95c5017d2e849}{mbuf\_rx\_bd\_alloc\_failed}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06236}06236         \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06237}06237     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06238}06238 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06239}06239     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0f850d2e2103d0e6268465b9ca3994a9}{mbuf\_alloc\_rx}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06240}06240 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06241}06241     \textcolor{comment}{/* initialize the mbuf buffer length */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06242}06242     m-\/>m\_pkthdr.len = m-\/>m\_len = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a8881f54a78b19b7b011b8a8b065ff6a8}{rx\_buf\_size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06243}06243 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06244}06244     \textcolor{comment}{/* map the mbuf into non-\/paged pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06245}06245     rc = bus\_dmamap\_load\_mbuf\_sg(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06246}06246                                  fp-\/>\mbox{\hyperlink{structbxe__fastpath_a71f583af56a39c62de065f818908fb18}{rx\_mbuf\_spare\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06247}06247                                  m, segs, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06248}06248     \textcolor{keywordflow}{if} (\_\_predict\_false(rc != 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06249}06249         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aef3838d7de1ce36bba40c7c051d45461}{mbuf\_rx\_bd\_mapping\_failed}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06250}06250         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06251}06251         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a0f850d2e2103d0e6268465b9ca3994a9}{mbuf\_alloc\_rx}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06252}06252         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06253}06253     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06254}06254 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06255}06255     \textcolor{comment}{/* all mbufs must map to a single segment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06256}06256     KASSERT((nsegs == 1), (\textcolor{stringliteral}{"{}Too many segments, \%d returned!"{}}, nsegs));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06257}06257 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06258}06258     \textcolor{comment}{/* release any existing RX BD mbuf mappings */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06259}06259 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06260}06260     \textcolor{keywordflow}{if} (prev\_index != index) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06261}06261         rx\_buf = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[prev\_index];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06262}06262 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06263}06263         \textcolor{keywordflow}{if} (rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06264}06264             bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06265}06265                             BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06266}06266             bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06267}06267         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06268}06268 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06269}06269         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06270}06270 \textcolor{comment}{         * We only get here from bxe\_rxeof() when the maximum number}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06271}06271 \textcolor{comment}{         * of rx buffers is less than RX\_BD\_USABLE. bxe\_rxeof() already}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06272}06272 \textcolor{comment}{         * holds the mbuf in the prev\_index so it's OK to NULL it out}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06273}06273 \textcolor{comment}{         * here without concern of a memory leak.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06274}06274 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06275}06275         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[prev\_index].\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06276}06276     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06277}06277 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06278}06278     rx\_buf = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[index];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06279}06279 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06280}06280     \textcolor{keywordflow}{if} (rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06281}06281         bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06282}06282                         BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06283}06283         bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06284}06284     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06285}06285 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06286}06286     \textcolor{comment}{/* save the mbuf and mapping info for a future packet */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06287}06287     map = (prev\_index != index) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06288}06288               fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[prev\_index].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} : rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06289}06289     rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a71f583af56a39c62de065f818908fb18}{rx\_mbuf\_spare\_map}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06290}06290     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a71f583af56a39c62de065f818908fb18}{rx\_mbuf\_spare\_map}} = map;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06291}06291     bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06292}06292                     BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06293}06293     rx\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} = m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06294}06294 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06295}06295     rx\_bd = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb66bb2f7c9693cb39c166a9d032cb8e}{rx\_chain}}[index];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06296}06296     rx\_bd-\/>\mbox{\hyperlink{structeth__rx__bd_a6e57abf13f85b64d3112934b9381ebb1}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(segs[0].ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06297}06297     rx\_bd-\/>\mbox{\hyperlink{structeth__rx__bd_a3eeb582177d310625e629c2e85528f8e}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(segs[0].ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06298}06298 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06299}06299     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06300}06300 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06301}06301 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06302}06302 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06303}\mbox{\hyperlink{bxe_8c_a86a1707104c8fa67ce5e393b9e4b1c4c}{06303}} \mbox{\hyperlink{bxe_8c_a86a1707104c8fa67ce5e393b9e4b1c4c}{bxe\_alloc\_rx\_tpa\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06304}06304                       \textcolor{keywordtype}{int}                 queue)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06305}06305 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06306}06306     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__tpa__info}{bxe\_sw\_tpa\_info}} *tpa\_info = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[queue];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06307}06307     bus\_dma\_segment\_t segs[1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06308}06308     bus\_dmamap\_t map;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06309}06309     \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06310}06310     \textcolor{keywordtype}{int} nsegs;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06311}06311     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06312}06312 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06313}06313     \textcolor{comment}{/* allocate the new TPA mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06314}06314     m = m\_getjcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR, fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab7d812607cee03c45efffc679003448c}{mbuf\_alloc\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06315}06315     \textcolor{keywordflow}{if} (\_\_predict\_false(m == NULL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06316}06316         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_afb977de647d9fc5d9976fcc63d35d485}{mbuf\_rx\_tpa\_alloc\_failed}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06317}06317         \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06318}06318     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06319}06319 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06320}06320     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a79b8e7bd9f431a24e6f0c7e39c0a91e9}{mbuf\_alloc\_tpa}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06321}06321 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06322}06322     \textcolor{comment}{/* initialize the mbuf buffer length */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06323}06323     m-\/>m\_pkthdr.len = m-\/>m\_len = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a8881f54a78b19b7b011b8a8b065ff6a8}{rx\_buf\_size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06324}06324 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06325}06325     \textcolor{comment}{/* map the mbuf into non-\/paged pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06326}06326     rc = bus\_dmamap\_load\_mbuf\_sg(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06327}06327                                  fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7456c3e1d6adca60e06b2b33b5bdfcfa}{rx\_tpa\_info\_mbuf\_spare\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06328}06328                                  m, segs, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06329}06329     \textcolor{keywordflow}{if} (\_\_predict\_false(rc != 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06330}06330         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a6b43f0cb152cdab7cbe769515d07ecd5}{mbuf\_rx\_tpa\_mapping\_failed}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06331}06331         m\_free(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06332}06332         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a79b8e7bd9f431a24e6f0c7e39c0a91e9}{mbuf\_alloc\_tpa}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06333}06333         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06334}06334     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06335}06335 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06336}06336     \textcolor{comment}{/* all mbufs must map to a single segment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06337}06337     KASSERT((nsegs == 1), (\textcolor{stringliteral}{"{}Too many segments, \%d returned!"{}}, nsegs));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06338}06338 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06339}06339     \textcolor{comment}{/* release any existing TPA mbuf mapping */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06340}06340     \textcolor{keywordflow}{if} (tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06341}06341         bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06342}06342                         BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06343}06343         bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06344}06344     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06345}06345 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06346}06346     \textcolor{comment}{/* save the mbuf and mapping info for the TPA mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06347}06347     map = tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06348}06348     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7456c3e1d6adca60e06b2b33b5bdfcfa}{rx\_tpa\_info\_mbuf\_spare\_map}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06349}06349     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7456c3e1d6adca60e06b2b33b5bdfcfa}{rx\_tpa\_info\_mbuf\_spare\_map}} = map;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06350}06350     bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06351}06351                     BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06352}06352     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} = m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06353}06353     tpa\_info-\/>\mbox{\hyperlink{structbxe__sw__tpa__info_a7914f5245c8846cda23c548f6b628e4c}{seg}} = segs[0];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06354}06354 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06355}06355     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06356}06356 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06357}06357 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06358}06358 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06359}06359 \textcolor{comment}{ * Allocate an mbuf and assign it to the receive scatter gather chain. The}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06360}06360 \textcolor{comment}{ * caller must take care to save a copy of the existing mbuf in the SG mbuf}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06361}06361 \textcolor{comment}{ * chain.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06362}06362 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06363}06363 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06364}\mbox{\hyperlink{bxe_8c_a81c63cb0393f95e2bb71c860433432b8}{06364}} \mbox{\hyperlink{bxe_8c_a81c63cb0393f95e2bb71c860433432b8}{bxe\_alloc\_rx\_sge\_mbuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06365}06365                       uint16\_t            index)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06366}06366 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06367}06367     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__sw__rx__bd}{bxe\_sw\_rx\_bd}} *sge\_buf;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06368}06368     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__sge}{eth\_rx\_sge}} *sge;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06369}06369     bus\_dma\_segment\_t segs[1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06370}06370     bus\_dmamap\_t map;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06371}06371     \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06372}06372     \textcolor{keywordtype}{int} nsegs;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06373}06373     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06374}06374 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06375}06375     \textcolor{comment}{/* allocate a new SGE mbuf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06376}06376     m = m\_getjcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR, \mbox{\hyperlink{bxe_8h_a15377a31935aabe5f70cb3f06f700a6a}{SGE\_PAGE\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06377}06377     \textcolor{keywordflow}{if} (\_\_predict\_false(m == NULL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06378}06378         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a84ca44b12152ec6fe52f6dbc399999a0}{mbuf\_rx\_sge\_alloc\_failed}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06379}06379         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06380}06380     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06381}06381 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06382}06382     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aab8bdd1587f71f69f2a7144f4fd2ad51}{mbuf\_alloc\_sge}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06383}06383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06384}06384     \textcolor{comment}{/* initialize the mbuf buffer length */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06385}06385     m-\/>m\_pkthdr.len = m-\/>m\_len = \mbox{\hyperlink{bxe_8h_a15377a31935aabe5f70cb3f06f700a6a}{SGE\_PAGE\_SIZE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06386}06386 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06387}06387     \textcolor{comment}{/* map the SGE mbuf into non-\/paged pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06388}06388     rc = bus\_dmamap\_load\_mbuf\_sg(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06389}06389                                  fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1337c790695c865d9bc782d86848519f}{rx\_sge\_mbuf\_spare\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06390}06390                                  m, segs, \&nsegs, BUS\_DMA\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06391}06391     \textcolor{keywordflow}{if} (\_\_predict\_false(rc != 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06392}06392         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a6c9fb54493d1bda073508de1f1841326}{mbuf\_rx\_sge\_mapping\_failed}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06393}06393         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06394}06394         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aab8bdd1587f71f69f2a7144f4fd2ad51}{mbuf\_alloc\_sge}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06395}06395         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06396}06396     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06397}06397 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06398}06398     \textcolor{comment}{/* all mbufs must map to a single segment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06399}06399     KASSERT((nsegs == 1), (\textcolor{stringliteral}{"{}Too many segments, \%d returned!"{}}, nsegs));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06400}06400 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06401}06401     sge\_buf = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[index];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06402}06402 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06403}06403     \textcolor{comment}{/* release any existing SGE mbuf mapping */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06404}06404     \textcolor{keywordflow}{if} (sge\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06405}06405         bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}}, sge\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06406}06406                         BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06407}06407         bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}}, sge\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06408}06408     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06409}06409 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06410}06410     \textcolor{comment}{/* save the mbuf and mapping info for a future packet */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06411}06411     map = sge\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06412}06412     sge\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1337c790695c865d9bc782d86848519f}{rx\_sge\_mbuf\_spare\_map}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06413}06413     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1337c790695c865d9bc782d86848519f}{rx\_sge\_mbuf\_spare\_map}} = map;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06414}06414     bus\_dmamap\_sync(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}}, sge\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06415}06415                     BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06416}06416     sge\_buf-\/>\mbox{\hyperlink{structbxe__sw__rx__bd_ae299449f549a77b921c3afbc3df04bdd}{m}} = m;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06417}06417 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06418}06418     sge = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a5ce946c204a06742f088b9e56e17139b}{rx\_sge\_chain}}[index];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06419}06419     sge-\/>\mbox{\hyperlink{structeth__rx__sge_a1eada037af28958f747d9d85a55e5e9a}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(segs[0].ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06420}06420     sge-\/>\mbox{\hyperlink{structeth__rx__sge_af9aaee15368f0c47d9e416f95f855a89}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(segs[0].ds\_addr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06421}06421 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06422}06422     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06423}06423 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06424}06424 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06425}06425 \textcolor{keyword}{static} \_\_noinline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06426}\mbox{\hyperlink{bxe_8c_a6abc6b008b38626a1a036c760b3351b7}{06426}} \mbox{\hyperlink{bxe_8c_a6abc6b008b38626a1a036c760b3351b7}{bxe\_alloc\_fp\_buffers}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06427}06427 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06428}06428     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06429}06429     \textcolor{keywordtype}{int} i, j, rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06430}06430     \textcolor{keywordtype}{int} ring\_prod, cqe\_ring\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06431}06431     \textcolor{keywordtype}{int} max\_agg\_queues;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06432}06432 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06433}06433     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06434}06434         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06435}06435 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06436}06436         ring\_prod = cqe\_ring\_prod = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06437}06437         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9346adab23e93ce551b7c5b268c1555d}{rx\_bd\_cons}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06438}06438         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a00695efc5a0133b38e31029734b86646}{rx\_cq\_cons}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06439}06439 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06440}06440         \textcolor{comment}{/* allocate buffers for the RX BDs in RX BD chain */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06441}06441         \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ac7d7c8445e3a1ea0072269753b635864}{max\_rx\_bufs}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06442}06442             rc = \mbox{\hyperlink{bxe_8c_a5b3dc2834150b871a3524bd78b67e268}{bxe\_alloc\_rx\_bd\_mbuf}}(fp, ring\_prod, ring\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06443}06443             \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06444}06444                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}mbuf alloc fail for fp[\%02d] rx chain (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06445}06445                       i, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06446}06446                 \textcolor{keywordflow}{goto} bxe\_alloc\_fp\_buffers\_error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06447}06447             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06448}06448 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06449}06449             ring\_prod     = \mbox{\hyperlink{bxe_8h_a7f9cc8eb0efcb171a6f68878e24c0b0b}{RX\_BD\_NEXT}}(ring\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06450}06450             cqe\_ring\_prod = \mbox{\hyperlink{bxe_8h_aa6741ab00cec2255e98155570daf7168}{RCQ\_NEXT}}(cqe\_ring\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06451}06451         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06452}06452 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06453}06453         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2f3c58fb77796cd02e02122b4434bf32}{rx\_bd\_prod}} = ring\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06454}06454         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a94d71948ebaf04ecea42ac112f73f613}{rx\_cq\_prod}} = cqe\_ring\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06455}06455         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a1c4ea3f0c0b331d03ba2f27d779b20e3}{rx\_calls}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_a24d52499be00e9548994cd285df1d441}{rx\_pkts}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06456}06456 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06457}06457         max\_agg\_queues = \mbox{\hyperlink{bxe_8h_a17145ba166c4c2e66d36460bbc2e2992}{MAX\_AGG\_QS}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06458}06458 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06459}06459         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a61e85370b86d9141ecfe4d327acc40a5}{tpa\_enable}} = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06460}06460 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06461}06461         \textcolor{comment}{/* fill the TPA pool */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06462}06462         \textcolor{keywordflow}{for} (j = 0; j < max\_agg\_queues; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06463}06463             rc = \mbox{\hyperlink{bxe_8c_a86a1707104c8fa67ce5e393b9e4b1c4c}{bxe\_alloc\_rx\_tpa\_mbuf}}(fp, j);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06464}06464             \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06465}06465                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}mbuf alloc fail for fp[\%02d] TPA queue \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06466}06466                           i, j);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06467}06467                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a61e85370b86d9141ecfe4d327acc40a5}{tpa\_enable}} = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06468}06468                 \textcolor{keywordflow}{goto} bxe\_alloc\_fp\_buffers\_error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06469}06469             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06470}06470 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06471}06471             fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[j].\mbox{\hyperlink{structbxe__sw__tpa__info_a0c6ae08d44f0bfc9bca2e1ad1b759bf0}{state}} = \mbox{\hyperlink{bxe_8h_a7427aadfd79787081532943317c21008}{BXE\_TPA\_STATE\_STOP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06472}06472         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06473}06473 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06474}06474         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a61e85370b86d9141ecfe4d327acc40a5}{tpa\_enable}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06475}06475             \textcolor{comment}{/* fill the RX SGE chain */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06476}06476             ring\_prod = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06477}06477             \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe_8h_a960b12d9491b9b9cf42f55c0802d3ead}{RX\_SGE\_USABLE}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06478}06478                 rc = \mbox{\hyperlink{bxe_8c_a81c63cb0393f95e2bb71c860433432b8}{bxe\_alloc\_rx\_sge\_mbuf}}(fp, ring\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06479}06479                 \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06480}06480                     \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}mbuf alloc fail for fp[\%02d] SGE \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06481}06481                               i, ring\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06482}06482                     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a61e85370b86d9141ecfe4d327acc40a5}{tpa\_enable}} = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06483}06483                     ring\_prod = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06484}06484                     \textcolor{keywordflow}{goto} bxe\_alloc\_fp\_buffers\_error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06485}06485                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06486}06486 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06487}06487                 ring\_prod = \mbox{\hyperlink{bxe_8h_acb8f80b980fddbee686fc44c9618222c}{RX\_SGE\_NEXT}}(ring\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06488}06488             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06489}06489 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06490}06490             fp-\/>\mbox{\hyperlink{structbxe__fastpath_aea87649aeabb6bdea13f1275511fd6c9}{rx\_sge\_prod}} = ring\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06491}06491         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06492}06492     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06493}06493 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06494}06494     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06495}06495 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06496}06496 bxe\_alloc\_fp\_buffers\_error:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06497}06497 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06498}06498     \textcolor{comment}{/* unwind what was already allocated */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06499}06499     \mbox{\hyperlink{bxe_8c_a1b161fec88cf8f69d271e47f8cc9936e}{bxe\_free\_rx\_bd\_chain}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06500}06500     \mbox{\hyperlink{bxe_8c_a8f3f159c69af898fe9242e99dbbe02ba}{bxe\_free\_tpa\_pool}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06501}06501     \mbox{\hyperlink{bxe_8c_a5a9670c12953de87872d4b8d19ac05e1}{bxe\_free\_sge\_chain}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06502}06502 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06503}06503     \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06504}06504 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06505}06505 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06506}06506 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06507}\mbox{\hyperlink{bxe_8c_a5ed8b0cde61b05bee51f5a9925d30d55}{06507}} \mbox{\hyperlink{bxe_8c_a5ed8b0cde61b05bee51f5a9925d30d55}{bxe\_free\_fw\_stats\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06508}06508 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06509}06509     \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_adaeb29867856442428ecbe671f256145}{fw\_stats\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06510}06510 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06511}06511     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a2829682d39f95558b05b1422ba259447}{fw\_stats\_num}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06512}06512 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06513}06513     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ac66bceaf5ec45dd36505e85a692047e8}{fw\_stats\_req\_size}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06514}06514     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a2c3fbe23b4774241f30b0204ea9a8fc1}{fw\_stats\_req}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06515}06515     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf1e238777265bb9bc47ed71a8eb6001}{fw\_stats\_req\_mapping}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06516}06516 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06517}06517     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7ebfeb3942c9b62a2549c8a6865f68c2}{fw\_stats\_data\_size}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06518}06518     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a19824f4d0f55bfc6ddd61415701037db}{fw\_stats\_data}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06519}06519     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aecca2710e1fb926a62f32e81d88a29da}{fw\_stats\_data\_mapping}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06520}06520 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06521}06521 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06522}06522 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06523}\mbox{\hyperlink{bxe_8c_a241e8ad9197e2f0d46a7e7b917333c65}{06523}} \mbox{\hyperlink{bxe_8c_a241e8ad9197e2f0d46a7e7b917333c65}{bxe\_alloc\_fw\_stats\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06524}06524 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06525}06525     uint8\_t num\_queue\_stats;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06526}06526     \textcolor{keywordtype}{int} num\_groups;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06527}06527 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06528}06528     \textcolor{comment}{/* number of queues for statistics is number of eth queues */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06529}06529     num\_queue\_stats = \mbox{\hyperlink{bxe_8h_a0e54c6304ef347c44b91e310e0364ebb}{BXE\_NUM\_ETH\_QUEUES}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06530}06530 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06531}06531     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06532}06532 \textcolor{comment}{     * Total number of FW statistics requests =}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06533}06533 \textcolor{comment}{     *   1 for port stats + 1 for PF stats + num of queues}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06534}06534 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06535}06535     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a2829682d39f95558b05b1422ba259447}{fw\_stats\_num}} = (2 + num\_queue\_stats);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06536}06536 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06537}06537     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06538}06538 \textcolor{comment}{     * Request is built from stats\_query\_header and an array of}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06539}06539 \textcolor{comment}{     * stats\_query\_cmd\_group each of which contains STATS\_QUERY\_CMD\_COUNT}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06540}06540 \textcolor{comment}{     * rules. The real number or requests is configured in the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06541}06541 \textcolor{comment}{     * stats\_query\_header.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06542}06542 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06543}06543     num\_groups =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06544}06544         ((\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a2829682d39f95558b05b1422ba259447}{fw\_stats\_num}} / \mbox{\hyperlink{ecore__fw__defs_8h_a7f62e116308f7c7eb52bdeae0c994238}{STATS\_QUERY\_CMD\_COUNT}}) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06545}06545          ((\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a2829682d39f95558b05b1422ba259447}{fw\_stats\_num}} \% \mbox{\hyperlink{ecore__fw__defs_8h_a7f62e116308f7c7eb52bdeae0c994238}{STATS\_QUERY\_CMD\_COUNT}}) ? 1 : 0));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06546}06546 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06547}06547     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}stats fw\_stats\_num \%d num\_groups \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06548}06548           \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a2829682d39f95558b05b1422ba259447}{fw\_stats\_num}}, num\_groups);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06549}06549 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06550}06550     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ac66bceaf5ec45dd36505e85a692047e8}{fw\_stats\_req\_size}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06551}06551         (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structstats__query__header}{stats\_query\_header}}) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06552}06552          (num\_groups * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structstats__query__cmd__group}{stats\_query\_cmd\_group}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06553}06553 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06554}06554     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06555}06555 \textcolor{comment}{     * Data for statistics requests + stats\_counter.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06556}06556 \textcolor{comment}{     * stats\_counter holds per-\/STORM counters that are incremented when}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06557}06557 \textcolor{comment}{     * STORM has finished with the current request. Memory for FCoE}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06558}06558 \textcolor{comment}{     * offloaded statistics are counted anyway, even if they will not be sent.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06559}06559 \textcolor{comment}{     * VF stats are not accounted for here as the data of VF stats is stored}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06560}06560 \textcolor{comment}{     * in memory allocated by the VF, not here.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06561}06561 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06562}06562     sc-\/>\mbox{\hyperlink{structbxe__softc_a7ebfeb3942c9b62a2549c8a6865f68c2}{fw\_stats\_data\_size}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06563}06563         (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structstats__counter}{stats\_counter}}) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06564}06564          sizeof(struct \mbox{\hyperlink{structper__port__stats}{per\_port\_stats}}) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06565}06565          sizeof(struct \mbox{\hyperlink{structper__pf__stats}{per\_pf\_stats}}) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06566}06566          \textcolor{comment}{/* sizeof(struct fcoe\_statistics\_params) + */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06567}06567          (sizeof(struct \mbox{\hyperlink{structper__queue__stats}{per\_queue\_stats}}) * num\_queue\_stats));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06568}06568 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06569}06569     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, (sc-\/>\mbox{\hyperlink{structbxe__softc_ac66bceaf5ec45dd36505e85a692047e8}{fw\_stats\_req\_size}} + sc-\/>\mbox{\hyperlink{structbxe__softc_a7ebfeb3942c9b62a2549c8a6865f68c2}{fw\_stats\_data\_size}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06570}06570                       \&sc-\/>\mbox{\hyperlink{structbxe__softc_adaeb29867856442428ecbe671f256145}{fw\_stats\_dma}}, \textcolor{stringliteral}{"{}fw stats"{}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06571}06571         \mbox{\hyperlink{bxe_8c_a5ed8b0cde61b05bee51f5a9925d30d55}{bxe\_free\_fw\_stats\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06572}06572         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06573}06573     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06574}06574 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06575}06575     \textcolor{comment}{/* set up the shortcuts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06576}06576 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06577}06577     sc-\/>\mbox{\hyperlink{structbxe__softc_a2c3fbe23b4774241f30b0204ea9a8fc1}{fw\_stats\_req}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06578}06578         (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fw__stats__req}{bxe\_fw\_stats\_req}} *)sc-\/>\mbox{\hyperlink{structbxe__softc_adaeb29867856442428ecbe671f256145}{fw\_stats\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06579}06579     sc-\/>\mbox{\hyperlink{structbxe__softc_abf1e238777265bb9bc47ed71a8eb6001}{fw\_stats\_req\_mapping}} = sc-\/>\mbox{\hyperlink{structbxe__softc_adaeb29867856442428ecbe671f256145}{fw\_stats\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06580}06580 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06581}06581     sc-\/>\mbox{\hyperlink{structbxe__softc_a19824f4d0f55bfc6ddd61415701037db}{fw\_stats\_data}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06582}06582         (\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fw__stats__data}{bxe\_fw\_stats\_data}} *)((uint8\_t *)sc-\/>\mbox{\hyperlink{structbxe__softc_adaeb29867856442428ecbe671f256145}{fw\_stats\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06583}06583                                      sc-\/>\mbox{\hyperlink{structbxe__softc_ac66bceaf5ec45dd36505e85a692047e8}{fw\_stats\_req\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06584}06584     sc-\/>\mbox{\hyperlink{structbxe__softc_aecca2710e1fb926a62f32e81d88a29da}{fw\_stats\_data\_mapping}} = (sc-\/>\mbox{\hyperlink{structbxe__softc_adaeb29867856442428ecbe671f256145}{fw\_stats\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06585}06585                                  sc-\/>\mbox{\hyperlink{structbxe__softc_ac66bceaf5ec45dd36505e85a692047e8}{fw\_stats\_req\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06586}06586 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06587}06587     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}statistics request base address set to \%\#jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06588}06588           (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_abf1e238777265bb9bc47ed71a8eb6001}{fw\_stats\_req\_mapping}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06589}06589 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06590}06590     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}statistics data base address set to \%\#jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06591}06591           (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_aecca2710e1fb926a62f32e81d88a29da}{fw\_stats\_data\_mapping}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06592}06592 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06593}06593     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06594}06594 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06595}06595 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06596}06596 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06597}06597 \textcolor{comment}{ * Bits map:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06598}06598 \textcolor{comment}{ * 0-\/7  -\/ Engine0 load counter.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06599}06599 \textcolor{comment}{ * 8-\/15 -\/ Engine1 load counter.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06600}06600 \textcolor{comment}{ * 16   -\/ Engine0 RESET\_IN\_PROGRESS bit.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06601}06601 \textcolor{comment}{ * 17   -\/ Engine1 RESET\_IN\_PROGRESS bit.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06602}06602 \textcolor{comment}{ * 18   -\/ Engine0 ONE\_IS\_LOADED. Set when there is at least one active}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06603}06603 \textcolor{comment}{ *        function on the engine}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06604}06604 \textcolor{comment}{ * 19   -\/ Engine1 ONE\_IS\_LOADED.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06605}06605 \textcolor{comment}{ * 20   -\/ Chip reset flow bit. When set none-\/leader must wait for both engines}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06606}06606 \textcolor{comment}{ *        leader to complete (check for both RESET\_IN\_PROGRESS bits and not}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06607}06607 \textcolor{comment}{ *        for just the one belonging to its engine).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06608}06608 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06609}\mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{06609}} \textcolor{preprocessor}{\#define BXE\_RECOVERY\_GLOB\_REG     MISC\_REG\_GENERIC\_POR\_1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06610}\mbox{\hyperlink{bxe_8c_a35f24cdf2e14a9b96dbea84f31415d99}{06610}} \textcolor{preprocessor}{\#define BXE\_PATH0\_LOAD\_CNT\_MASK   0x000000ff}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06611}\mbox{\hyperlink{bxe_8c_a91de4a30826f76cbae5b8d1a2adb3637}{06611}} \textcolor{preprocessor}{\#define BXE\_PATH0\_LOAD\_CNT\_SHIFT  0}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06612}\mbox{\hyperlink{bxe_8c_a8aedfc6d2a7d72b020ba0b4323a27619}{06612}} \textcolor{preprocessor}{\#define BXE\_PATH1\_LOAD\_CNT\_MASK   0x0000ff00}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06613}\mbox{\hyperlink{bxe_8c_ac4641c731b3d6862341d19f2a6dbac08}{06613}} \textcolor{preprocessor}{\#define BXE\_PATH1\_LOAD\_CNT\_SHIFT  8}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06614}\mbox{\hyperlink{bxe_8c_ad97e1ff2005e07d327493fedea608934}{06614}} \textcolor{preprocessor}{\#define BXE\_PATH0\_RST\_IN\_PROG\_BIT 0x00010000}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06615}\mbox{\hyperlink{bxe_8c_a3c87f8ff7511ccd1f7be6e4acc6e1371}{06615}} \textcolor{preprocessor}{\#define BXE\_PATH1\_RST\_IN\_PROG\_BIT 0x00020000}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06616}\mbox{\hyperlink{bxe_8c_a8003b8ce57f5e9fd4e0198764bbc4728}{06616}} \textcolor{preprocessor}{\#define BXE\_GLOBAL\_RESET\_BIT      0x00040000}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06617}06617 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06618}06618 \textcolor{comment}{/* set the GLOBAL\_RESET bit, should be run under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06619}06619 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06620}\mbox{\hyperlink{bxe_8c_a7de36a383e6f8ea6b0d5b095d815875e}{06620}} \mbox{\hyperlink{bxe_8c_a7de36a383e6f8ea6b0d5b095d815875e}{bxe\_set\_reset\_global}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06621}06621 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06622}06622     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06623}06623     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06624}06624     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06625}06625     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}}, val | \mbox{\hyperlink{bxe_8c_a8003b8ce57f5e9fd4e0198764bbc4728}{BXE\_GLOBAL\_RESET\_BIT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06626}06626     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06627}06627 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06628}06628 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06629}06629 \textcolor{comment}{/* clear the GLOBAL\_RESET bit, should be run under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06630}06630 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06631}\mbox{\hyperlink{bxe_8c_a49992b73eae832caf26862cb9ec297a0}{06631}} \mbox{\hyperlink{bxe_8c_a49992b73eae832caf26862cb9ec297a0}{bxe\_clear\_reset\_global}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06632}06632 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06633}06633     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06634}06634     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06635}06635     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06636}06636     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}}, val \& (\string~\mbox{\hyperlink{bxe_8c_a8003b8ce57f5e9fd4e0198764bbc4728}{BXE\_GLOBAL\_RESET\_BIT}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06637}06637     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06638}06638 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06639}06639 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06640}06640 \textcolor{comment}{/* checks the GLOBAL\_RESET bit, should be run under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06641}06641 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06642}\mbox{\hyperlink{bxe_8c_ad688b2d4462c1d0051be7e1e0fc24eed}{06642}} \mbox{\hyperlink{bxe_8c_ad688b2d4462c1d0051be7e1e0fc24eed}{bxe\_reset\_is\_global}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06643}06643 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06644}06644     uint32\_t val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06645}06645     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}GLOB\_REG=0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06646}06646     \textcolor{keywordflow}{return} (val \& \mbox{\hyperlink{bxe_8c_a8003b8ce57f5e9fd4e0198764bbc4728}{BXE\_GLOBAL\_RESET\_BIT}}) ? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06647}06647 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06648}06648 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06649}06649 \textcolor{comment}{/* clear RESET\_IN\_PROGRESS bit for the engine, should be run under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06650}06650 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06651}\mbox{\hyperlink{bxe_8c_afada6c3eb66d779565ff4007ccbe4342}{06651}} \mbox{\hyperlink{bxe_8c_afada6c3eb66d779565ff4007ccbe4342}{bxe\_set\_reset\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06652}06652 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06653}06653     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06654}06654     uint32\_t bit = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? \mbox{\hyperlink{bxe_8c_a3c87f8ff7511ccd1f7be6e4acc6e1371}{BXE\_PATH1\_RST\_IN\_PROG\_BIT}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06655}06655                                  \mbox{\hyperlink{bxe_8c_ad97e1ff2005e07d327493fedea608934}{BXE\_PATH0\_RST\_IN\_PROG\_BIT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06656}06656 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06657}06657     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06658}06658 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06659}06659     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06660}06660     \textcolor{comment}{/* Clear the bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06661}06661     val \&= \string~bit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06662}06662     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06663}06663 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06664}06664     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06665}06665 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06666}06666 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06667}06667 \textcolor{comment}{/* set RESET\_IN\_PROGRESS for the engine, should be run under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06668}06668 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06669}\mbox{\hyperlink{bxe_8c_a07b21b9de3ef7ccde7111feae924a352}{06669}} \mbox{\hyperlink{bxe_8c_a07b21b9de3ef7ccde7111feae924a352}{bxe\_set\_reset\_in\_progress}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06670}06670 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06671}06671     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06672}06672     uint32\_t bit = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? \mbox{\hyperlink{bxe_8c_a3c87f8ff7511ccd1f7be6e4acc6e1371}{BXE\_PATH1\_RST\_IN\_PROG\_BIT}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06673}06673                                  \mbox{\hyperlink{bxe_8c_ad97e1ff2005e07d327493fedea608934}{BXE\_PATH0\_RST\_IN\_PROG\_BIT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06674}06674 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06675}06675     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06676}06676 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06677}06677     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06678}06678     \textcolor{comment}{/* Set the bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06679}06679     val |= bit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06680}06680     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06681}06681 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06682}06682     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06683}06683 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06684}06684 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06685}06685 \textcolor{comment}{/* check RESET\_IN\_PROGRESS bit for an engine, should be run under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06686}06686 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06687}\mbox{\hyperlink{bxe_8c_aa8e60d884e752f4c51c8a313f973d00d}{06687}} \mbox{\hyperlink{bxe_8c_aa8e60d884e752f4c51c8a313f973d00d}{bxe\_reset\_is\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06688}06688                   \textcolor{keywordtype}{int}              engine)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06689}06689 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06690}06690     uint32\_t val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06691}06691     uint32\_t bit = engine ? \mbox{\hyperlink{bxe_8c_a3c87f8ff7511ccd1f7be6e4acc6e1371}{BXE\_PATH1\_RST\_IN\_PROG\_BIT}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06692}06692                             \mbox{\hyperlink{bxe_8c_ad97e1ff2005e07d327493fedea608934}{BXE\_PATH0\_RST\_IN\_PROG\_BIT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06693}06693 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06694}06694     \textcolor{comment}{/* return false if bit is set */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06695}06695     \textcolor{keywordflow}{return} (val \& bit) ? FALSE : TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06696}06696 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06697}06697 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06698}06698 \textcolor{comment}{/* get the load status for an engine, should be run under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06699}06699 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06700}\mbox{\hyperlink{bxe_8c_abf586202f0932ef109178a8b30f26505}{06700}} \mbox{\hyperlink{bxe_8c_abf586202f0932ef109178a8b30f26505}{bxe\_get\_load\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06701}06701                     \textcolor{keywordtype}{int}              engine)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06702}06702 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06703}06703     uint32\_t mask = engine ? \mbox{\hyperlink{bxe_8c_a8aedfc6d2a7d72b020ba0b4323a27619}{BXE\_PATH1\_LOAD\_CNT\_MASK}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06704}06704                              \mbox{\hyperlink{bxe_8c_a35f24cdf2e14a9b96dbea84f31415d99}{BXE\_PATH0\_LOAD\_CNT\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06705}06705     uint32\_t shift = engine ? \mbox{\hyperlink{bxe_8c_ac4641c731b3d6862341d19f2a6dbac08}{BXE\_PATH1\_LOAD\_CNT\_SHIFT}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06706}06706                               \mbox{\hyperlink{bxe_8c_a91de4a30826f76cbae5b8d1a2adb3637}{BXE\_PATH0\_LOAD\_CNT\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06707}06707     uint32\_t val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06708}06708 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06709}06709     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Old value for GLOB\_REG=0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06710}06710 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06711}06711     val = ((val \& mask) >> shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06712}06712 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06713}06713     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Load mask engine \%d = 0x\%08x\(\backslash\)n"{}}, engine, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06714}06714 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06715}06715     \textcolor{keywordflow}{return} (val != 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06716}06716 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06717}06717 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06718}06718 \textcolor{comment}{/* set pf load mark */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06719}06719 \textcolor{comment}{/* XXX needs to be under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06720}06720 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06721}\mbox{\hyperlink{bxe_8c_ad8dd94cfc3f964499f2c22f369d74342}{06721}} \mbox{\hyperlink{bxe_8c_ad8dd94cfc3f964499f2c22f369d74342}{bxe\_set\_pf\_load}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06722}06722 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06723}06723     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06724}06724     uint32\_t val1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06725}06725     uint32\_t mask = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? \mbox{\hyperlink{bxe_8c_a8aedfc6d2a7d72b020ba0b4323a27619}{BXE\_PATH1\_LOAD\_CNT\_MASK}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06726}06726                                   \mbox{\hyperlink{bxe_8c_a35f24cdf2e14a9b96dbea84f31415d99}{BXE\_PATH0\_LOAD\_CNT\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06727}06727     uint32\_t shift = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? \mbox{\hyperlink{bxe_8c_ac4641c731b3d6862341d19f2a6dbac08}{BXE\_PATH1\_LOAD\_CNT\_SHIFT}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06728}06728                                    \mbox{\hyperlink{bxe_8c_a91de4a30826f76cbae5b8d1a2adb3637}{BXE\_PATH0\_LOAD\_CNT\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06729}06729 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06730}06730     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06731}06731 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06732}06732     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06733}06733     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Old value for GLOB\_REG=0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06734}06734 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06735}06735     \textcolor{comment}{/* get the current counter value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06736}06736     val1 = ((val \& mask) >> shift);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06737}06737 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06738}06738     \textcolor{comment}{/* set bit of this PF */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06739}06739     val1 |= (1 << \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06740}06740 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06741}06741     \textcolor{comment}{/* clear the old value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06742}06742     val \&= \string~mask;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06743}06743 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06744}06744     \textcolor{comment}{/* set the new one */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06745}06745     val |= ((val1 << shift) \& mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06746}06746 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06747}06747     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06748}06748 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06749}06749     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06750}06750 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06751}06751 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06752}06752 \textcolor{comment}{/* clear pf load mark */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06753}06753 \textcolor{comment}{/* XXX needs to be under rtnl lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06754}06754 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06755}\mbox{\hyperlink{bxe_8c_a3b974b2a5d6d0486240139fe74ec362d}{06755}} \mbox{\hyperlink{bxe_8c_a3b974b2a5d6d0486240139fe74ec362d}{bxe\_clear\_pf\_load}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06756}06756 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06757}06757     uint32\_t val1, val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06758}06758     uint32\_t mask = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? \mbox{\hyperlink{bxe_8c_a8aedfc6d2a7d72b020ba0b4323a27619}{BXE\_PATH1\_LOAD\_CNT\_MASK}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06759}06759                                   \mbox{\hyperlink{bxe_8c_a35f24cdf2e14a9b96dbea84f31415d99}{BXE\_PATH0\_LOAD\_CNT\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06760}06760     uint32\_t shift = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? \mbox{\hyperlink{bxe_8c_ac4641c731b3d6862341d19f2a6dbac08}{BXE\_PATH1\_LOAD\_CNT\_SHIFT}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06761}06761                                    \mbox{\hyperlink{bxe_8c_a91de4a30826f76cbae5b8d1a2adb3637}{BXE\_PATH0\_LOAD\_CNT\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06762}06762 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06763}06763     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06764}06764     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06765}06765     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Old GEN\_REG\_VAL=0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06766}06766 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06767}06767     \textcolor{comment}{/* get the current counter value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06768}06768     val1 = (val \& mask) >> shift;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06769}06769 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06770}06770     \textcolor{comment}{/* clear bit of that PF */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06771}06771     val1 \&= \string~(1 << \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06772}06772 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06773}06773     \textcolor{comment}{/* clear the old value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06774}06774     val \&= \string~mask;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06775}06775 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06776}06776     \textcolor{comment}{/* set the new one */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06777}06777     val |= ((val1 << shift) \& mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06778}06778 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06779}06779     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8c_a6a4859321a14ed5599473250f44c7c07}{BXE\_RECOVERY\_GLOB\_REG}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06780}06780     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1ebc4696cf80dd79fb2331842c1b1336}{HW\_LOCK\_RESOURCE\_RECOVERY\_REG}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06781}06781     \textcolor{keywordflow}{return} (val1 != 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06782}06782 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06783}06783 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06784}06784 \textcolor{comment}{/* send load requrest to mcp and analyze response */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06785}06785 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06786}\mbox{\hyperlink{bxe_8c_a0356368baf0b275984ef015d69e3452a}{06786}} \mbox{\hyperlink{bxe_8c_a0356368baf0b275984ef015d69e3452a}{bxe\_nic\_load\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06787}06787                      uint32\_t         *load\_code)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06788}06788 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06789}06789     \textcolor{comment}{/* init fw\_seq */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06790}06790     sc-\/>\mbox{\hyperlink{structbxe__softc_a4b58dae5cf487d519e80adf337151e7f}{fw\_seq}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06791}06791         (\mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, func\_mb[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc)].drv\_mb\_header) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06792}06792          \mbox{\hyperlink{ecore__hsi_8h_acad2d8569447c67283979c2706c2b421}{DRV\_MSG\_SEQ\_NUMBER\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06793}06793 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06794}06794     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}initial fw\_seq 0x\%04x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a4b58dae5cf487d519e80adf337151e7f}{fw\_seq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06795}06795 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06796}06796     \textcolor{comment}{/* get the current FW pulse sequence */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06797}06797     sc-\/>\mbox{\hyperlink{structbxe__softc_a3685352e604bc0843e4e32082cbc739e}{fw\_drv\_pulse\_wr\_seq}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06798}06798         (\mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, func\_mb[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc)].drv\_pulse\_mb) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06799}06799          \mbox{\hyperlink{ecore__hsi_8h_a864688d03b21f6e3e4986ef9f215db0d}{DRV\_PULSE\_SEQ\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06800}06800 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06801}06801     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}initial drv\_pulse 0x\%04x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06802}06802           sc-\/>\mbox{\hyperlink{structbxe__softc_a3685352e604bc0843e4e32082cbc739e}{fw\_drv\_pulse\_wr\_seq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06803}06803 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06804}06804     \textcolor{comment}{/* load request */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06805}06805     (*load\_code) = \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a32e9abf58bc46f82f5be4dd4a1a9cc93}{DRV\_MSG\_CODE\_LOAD\_REQ}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06806}06806                                   \mbox{\hyperlink{ecore__hsi_8h_a770c2b525cf9d546ae4df60d14dc65a8}{DRV\_MSG\_CODE\_LOAD\_REQ\_WITH\_LFA}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06807}06807 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06808}06808     \textcolor{comment}{/* if the MCP fails to respond we must abort */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06809}06809     \textcolor{keywordflow}{if} (!(*load\_code)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06810}06810         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MCP response failure!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06811}06811         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06812}06812     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06813}06813 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06814}06814     \textcolor{comment}{/* if MCP refused then must abort */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06815}06815     \textcolor{keywordflow}{if} ((*load\_code) == \mbox{\hyperlink{ecore__hsi_8h_ac002d9ae68aef1fc7799f3bb31222f39}{FW\_MSG\_CODE\_DRV\_LOAD\_REFUSED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06816}06816         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MCP refused load request\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06817}06817         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06818}06818     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06819}06819 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06820}06820     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06821}06821 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06822}06822 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06823}06823 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06824}06824 \textcolor{comment}{ * Check whether another PF has already loaded FW to chip. In virtualized}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06825}06825 \textcolor{comment}{ * environments a pf from anoth VM may have already initialized the device}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06826}06826 \textcolor{comment}{ * including loading FW.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06827}06827 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06828}06828 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06829}\mbox{\hyperlink{bxe_8c_a8feaf375217687b6ec4f9e0f9956331c}{06829}} \mbox{\hyperlink{bxe_8c_a8feaf375217687b6ec4f9e0f9956331c}{bxe\_nic\_load\_analyze\_req}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06830}06830                          uint32\_t         load\_code)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06831}06831 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06832}06832     uint32\_t my\_fw, loaded\_fw;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06833}06833 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06834}06834     \textcolor{comment}{/* is another pf loaded on this engine? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06835}06835     \textcolor{keywordflow}{if} ((load\_code != \mbox{\hyperlink{ecore__hsi_8h_a688ae0d21f8a14916456d2051fb14d54}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON\_CHIP}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06836}06836         (load\_code != \mbox{\hyperlink{ecore__hsi_8h_a56ed71995441ad66fb821f1fcf4b2753}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06837}06837         \textcolor{comment}{/* build my FW version dword */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06838}06838         my\_fw = (\mbox{\hyperlink{ecore__hsi_8h_ad3a9e153f38e4824308245620738b7f4}{BCM\_5710\_FW\_MAJOR\_VERSION}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06839}06839                  (\mbox{\hyperlink{ecore__hsi_8h_a22c2c67f8a123bba33bc3bf769082067}{BCM\_5710\_FW\_MINOR\_VERSION}} << 8 ) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06840}06840                  (\mbox{\hyperlink{ecore__hsi_8h_a064c82e8d8d4cb713d513a2381a493b7}{BCM\_5710\_FW\_REVISION\_VERSION}} << 16) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06841}06841                  (\mbox{\hyperlink{ecore__hsi_8h_abb796d03f79c6c6033ae6106ee1e57fb}{BCM\_5710\_FW\_ENGINEERING\_VERSION}} << 24));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06842}06842 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06843}06843         \textcolor{comment}{/* read loaded FW from chip */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06844}06844         loaded\_fw = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9b6e694a5a7023f52d32b0cdf36b4421}{XSEM\_REG\_PRAM}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06845}06845         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}loaded FW 0x\%08x / my FW 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06846}06846               loaded\_fw, my\_fw);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06847}06847 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06848}06848         \textcolor{comment}{/* abort nic load if version mismatch */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06849}06849         \textcolor{keywordflow}{if} (my\_fw != loaded\_fw) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06850}06850             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FW 0x\%08x already loaded (mine is 0x\%08x)"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06851}06851                   loaded\_fw, my\_fw);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06852}06852             \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06853}06853         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06854}06854     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06855}06855 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06856}06856     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06857}06857 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06858}06858 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06859}06859 \textcolor{comment}{/* mark PMF if applicable */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06860}06860 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06861}\mbox{\hyperlink{bxe_8c_ab0cd948eaed15a5cd1687a8a612a4166}{06861}} \mbox{\hyperlink{bxe_8c_ab0cd948eaed15a5cd1687a8a612a4166}{bxe\_nic\_load\_pmf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06862}06862                  uint32\_t         load\_code)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06863}06863 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06864}06864     uint32\_t ncsi\_oem\_data\_addr;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06865}06865 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06866}06866     \textcolor{keywordflow}{if} ((load\_code == \mbox{\hyperlink{ecore__hsi_8h_a56ed71995441ad66fb821f1fcf4b2753}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06867}06867         (load\_code == \mbox{\hyperlink{ecore__hsi_8h_a688ae0d21f8a14916456d2051fb14d54}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON\_CHIP}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06868}06868         (load\_code == \mbox{\hyperlink{ecore__hsi_8h_a55c05624df1c93e2fd6e05acc25ea0d1}{FW\_MSG\_CODE\_DRV\_LOAD\_PORT}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06869}06869         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06870}06870 \textcolor{comment}{         * Barrier here for ordering between the writing to sc-\/>port.pmf here}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06871}06871 \textcolor{comment}{         * and reading it from the periodic task.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06872}06872 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06873}06873         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06874}06874         mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06875}06875     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06876}06876         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06877}06877     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06878}06878 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06879}06879     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}pmf \%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06880}06880 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06881}06881     \textcolor{comment}{/* XXX needed? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06882}06882     \textcolor{keywordflow}{if} (load\_code == \mbox{\hyperlink{ecore__hsi_8h_a688ae0d21f8a14916456d2051fb14d54}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON\_CHIP}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06883}06883         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a9589edd1f6702afb76918ed934dd0fa6}{SHMEM2\_HAS}}(sc, ncsi\_oem\_data\_addr)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06884}06884             ncsi\_oem\_data\_addr = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, ncsi\_oem\_data\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06885}06885             \textcolor{keywordflow}{if} (ncsi\_oem\_data\_addr) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06886}06886                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06887}06887                        (ncsi\_oem\_data\_addr +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06888}06888                         offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structglob__ncsi__oem__data}{glob\_ncsi\_oem\_data}}, driver\_version)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06889}06889                        0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06890}06890             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06891}06891         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06892}06892     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06893}06893 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06894}06894 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06895}06895 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06896}\mbox{\hyperlink{bxe_8c_ae32c29c31951ee82cda3e99ad0f9a65d}{06896}} \mbox{\hyperlink{bxe_8c_ae32c29c31951ee82cda3e99ad0f9a65d}{bxe\_read\_mf\_cfg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06897}06897 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06898}06898     \textcolor{keywordtype}{int} n = (\mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(sc) ? 2 : 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06899}06899     \textcolor{keywordtype}{int} abs\_func;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06900}06900     \textcolor{keywordtype}{int} vn;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06901}06901 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06902}06902     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06903}06903         \textcolor{keywordflow}{return}; \textcolor{comment}{/* what should be the default bvalue in this case */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06904}06904     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06905}06905 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06906}06906     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06907}06907 \textcolor{comment}{     * The formula for computing the absolute function number is...}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06908}06908 \textcolor{comment}{     * For 2 port configuration (4 functions per port):}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06909}06909 \textcolor{comment}{     *   abs\_func = 2 * vn + SC\_PORT + SC\_PATH}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06910}06910 \textcolor{comment}{     * For 4 port configuration (2 functions per port):}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06911}06911 \textcolor{comment}{     *   abs\_func = 4 * vn + 2 * SC\_PORT + SC\_PATH}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06912}06912 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06913}06913     \textcolor{keywordflow}{for} (vn = \mbox{\hyperlink{ecore__hsi_8h_a9fb58d2f1975818374c8df9dba5c3d34}{VN\_0}}; vn < \mbox{\hyperlink{bxe_8h_a999e5648ea63285e8a63072a54c834ea}{SC\_MAX\_VN\_NUM}}(sc); vn++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06914}06914         abs\_func = (n * (2 * vn + \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)) + \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06915}06915         \textcolor{keywordflow}{if} (abs\_func >= \mbox{\hyperlink{ecore__hsi_8h_a5a82630770a01822c17d98d01fea1c35}{E1H\_FUNC\_MAX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06916}06916             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06917}06917         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06918}06918         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[vn] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06919}06919             \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[abs\_func].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06920}06920     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06921}06921 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06922}06922     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06923}06923         \mbox{\hyperlink{ecore__hsi_8h_a0fe10353bc51277ed397f58e4347d958}{FUNC\_MF\_CFG\_FUNC\_DISABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06924}06924         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}mf\_cfg function disabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06925}06925         sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} |= \mbox{\hyperlink{bxe_8h_ae259e37c454eb48694a93b14502c93ca}{BXE\_MF\_FUNC\_DIS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06926}06926     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06927}06927         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}mf\_cfg function enabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06928}06928         sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} \&= \string~BXE\_MF\_FUNC\_DIS;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06929}06929     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06930}06930 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06931}06931 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06932}06932 \textcolor{comment}{/* acquire split MCP access lock register */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06933}\mbox{\hyperlink{bxe_8c_a6ada608ab88e549ff94e861e9429543d}{06933}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_a6ada608ab88e549ff94e861e9429543d}{bxe\_acquire\_alr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06934}06934 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06935}06935     uint32\_t j, val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06936}06936 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06937}06937     \textcolor{keywordflow}{for} (j = 0; j < 1000; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06938}06938         val = (1UL << 31);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06939}06939         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad8fa6af1ac580ce103ff74446c43dac5}{GRCBASE\_MCP}} + 0x9c, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06940}06940         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad8fa6af1ac580ce103ff74446c43dac5}{GRCBASE\_MCP}} + 0x9c);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06941}06941         \textcolor{keywordflow}{if} (val \& (1L << 31))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06942}06942             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06943}06943 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06944}06944         DELAY(5000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06945}06945     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06946}06946 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06947}06947     \textcolor{keywordflow}{if} (!(val \& (1L << 31))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06948}06948         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Cannot acquire MCP access lock register\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06949}06949         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06950}06950     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06951}06951 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06952}06952     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06953}06953 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06954}06954 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06955}06955 \textcolor{comment}{/* release split MCP access lock register */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06956}\mbox{\hyperlink{bxe_8c_adc08a4e509f6809e01a0469de859aee0}{06956}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_adc08a4e509f6809e01a0469de859aee0}{bxe\_release\_alr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06957}06957 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06958}06958     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad8fa6af1ac580ce103ff74446c43dac5}{GRCBASE\_MCP}} + 0x9c, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06959}06959 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06960}06960 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06961}06961 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06962}\mbox{\hyperlink{bxe_8c_a5b49ebad92e9d5c181e4a357130f8950}{06962}} \mbox{\hyperlink{bxe_8c_a5b49ebad92e9d5c181e4a357130f8950}{bxe\_fan\_failure}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06963}06963 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06964}06964     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06965}06965     uint32\_t ext\_phy\_config;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06966}06966 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06967}06967     \textcolor{comment}{/* mark the failure */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06968}06968     ext\_phy\_config =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06969}06969         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_hw\_config[port].external\_phy\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06970}06970 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06971}06971     ext\_phy\_config \&= \string~PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_MASK;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06972}06972     ext\_phy\_config |= \mbox{\hyperlink{ecore__hsi_8h_adaef43e149dfc943116ba29e4ed531bb}{PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_FAILURE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06973}06973     \mbox{\hyperlink{bxe_8h_a796652c93e2f5179de2b8b6fde78ec78}{SHMEM\_WR}}(sc, dev\_info.port\_hw\_config[port].external\_phy\_config,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06974}06974              ext\_phy\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06975}06975 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06976}06976     \textcolor{comment}{/* log the failure */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06977}06977     \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}Fan Failure has caused the driver to shutdown "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06978}06978               \textcolor{stringliteral}{"{}the card to prevent permanent damage. "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06979}06979               \textcolor{stringliteral}{"{}Please contact OEM Support for assistance\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06980}06980 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06981}06981     \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06982}06982 \textcolor{preprocessor}{\#if 1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06983}06983     \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(sc, (\textcolor{stringliteral}{"{}Schedule task to handle fan failure\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06984}06984 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06985}06985     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06986}06986 \textcolor{comment}{     * Schedule device reset (unload)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06987}06987 \textcolor{comment}{     * This is due to some boards consuming sufficient power when driver is}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06988}06988 \textcolor{comment}{     * up to overheat if fan fails.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06989}06989 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06990}06990     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(BXE\_SP\_RTNL\_FAN\_FAILURE, \&sc-\/>sp\_rtnl\_state);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06991}06991     schedule\_delayed\_work(\&sc-\/>sp\_rtnl\_task, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06992}06992 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06993}06993 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06994}06994 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06995}06995 \textcolor{comment}{/* this function is called upon a link interrupt */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06996}06996 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06997}\mbox{\hyperlink{bxe_8c_a996941118f754fd3012390f40a0757fa}{06997}} \mbox{\hyperlink{bxe_8c_a996941118f754fd3012390f40a0757fa}{bxe\_link\_attn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06998}06998 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l06999}06999     uint32\_t pause\_enabled = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07000}07000     \textcolor{keyword}{struct }\mbox{\hyperlink{structhost__port__stats}{host\_port\_stats}} *pstats;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07001}07001     \textcolor{keywordtype}{int} cmng\_fns;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07002}07002     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07003}07003     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07004}07004 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07005}07005     \textcolor{comment}{/* Make sure that we are synced with the current statistics */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07006}07006     \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026ac9e9e0b6f7a6b265aca64124b6d1ff19}{STATS\_EVENT\_STOP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07007}07007     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}link\_vars phy\_flags : \%x\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_aabd3d7d38822e8bd809dd2a891b0e716}{phy\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07008}07008     \mbox{\hyperlink{bxe__elink_8c_a18d17393bbea1a583b018cff89248240}{elink\_link\_update}}(\&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07009}07009 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07010}07010     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07011}07011 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07012}07012         \textcolor{comment}{/* dropless flow control */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07013}07013         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) \&\& \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a8b8da0699d50a5a23337d8d251485f14}{dropless\_fc}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07014}07014             pause\_enabled = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07015}07015 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07016}07016             \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a42ebdfaebf1eef4cff6eb9520cf98409}{flow\_ctrl}} \& \mbox{\hyperlink{bxe__elink_8h_a7d5ad046cd81f291a31adb0a58a7e5b9}{ELINK\_FLOW\_CTRL\_TX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07017}07017                 pause\_enabled = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07018}07018             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07019}07019 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07020}07020             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07021}07021                    (\mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07022}07022                     \mbox{\hyperlink{ecore__fw__defs_8h_ac84cd702f1ebdaa106fe1c189b3e45d0}{USTORM\_ETH\_PAUSE\_ENABLED\_OFFSET}}(\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}))),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07023}07023                    pause\_enabled);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07024}07024         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07025}07025 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07026}07026         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a37e9ab50270d6d8bf09213396d9d700a}{mac\_type}} != \mbox{\hyperlink{bxe__elink_8h_ac8ce335975a4d4d1e827a2370a45d911}{ELINK\_MAC\_TYPE\_EMAC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07027}07027             pstats = \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, port\_stats);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07028}07028             \textcolor{comment}{/* reset old mac stats */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07029}07029             memset(\&(pstats-\/>\mbox{\hyperlink{structhost__port__stats_a4f85b1fc66f1ca7050243f3ec9528160}{mac\_stx}}[0]), 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structmac__stx}{mac\_stx}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07030}07030         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07031}07031 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07032}07032         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07033}07033             \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026a43f1987b65b6bd73bd7cfecc97eab89a}{STATS\_EVENT\_LINK\_UP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07034}07034             \textcolor{comment}{/* Restart tx when the link comes back. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07035}07035             \mbox{\hyperlink{bxe_8h_a1cb7bdf9bd5d0d7441582179871291ba}{FOR\_EACH\_ETH\_QUEUE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07036}07036                 fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07037}07037                 taskqueue\_enqueue(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a10e00c04266e87eef5c9b6998b8aa692}{tx\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07038}07038             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07039}07039         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07040}07040 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07041}07041     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07042}07042 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07043}07043     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}} \&\& \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a324c3d820f392e712f071dde6a4aa6ca}{line\_speed}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07044}07044         cmng\_fns = \mbox{\hyperlink{bxe_8c_ae3684edaf191533c7425a406f758cd0a}{bxe\_get\_cmng\_fns\_mode}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07045}07045 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07046}07046         \textcolor{keywordflow}{if} (cmng\_fns != \mbox{\hyperlink{bxe_8h_a70c051caed806e529769bfec2879d47c}{CMNG\_FNS\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07047}07047             \mbox{\hyperlink{bxe_8c_a2212c57e59956cf53b4f735141f87282}{bxe\_cmng\_fns\_init}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, FALSE, cmng\_fns);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07048}07048             \mbox{\hyperlink{bxe_8c_a52e02dd8452a48e1bdd61876d6d06ec1}{storm\_memset\_cmng}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ae45c3fa081c958a5b736fb1fab1fb6e5}{cmng}}, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07049}07049         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07050}07050             \textcolor{comment}{/* rate shaping and fairness are disabled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07051}07051             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}single function mode without fairness\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07052}07052         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07053}07053     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07054}07054 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07055}07055     \mbox{\hyperlink{bxe_8c_abcb5aa947ed64e7fe038dc31d304c608}{bxe\_link\_report\_locked}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07056}07056 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07057}07057     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07058}07058         ; \textcolor{comment}{// XXX bxe\_link\_sync\_notify(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07059}07059     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07060}07060 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07061}07061 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07062}07062 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07063}\mbox{\hyperlink{bxe_8c_ac352b8b78978529db9b2a891c26c86e9}{07063}} \mbox{\hyperlink{bxe_8c_ac352b8b78978529db9b2a891c26c86e9}{bxe\_attn\_int\_asserted}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07064}07064                       uint32\_t         asserted)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07065}07065 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07066}07066     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07067}07067     uint32\_t aeu\_addr = port ? \mbox{\hyperlink{ecore__reg_8h_a4fcd4215ad8e23c9de2d50c6b1bfa1aa}{MISC\_REG\_AEU\_MASK\_ATTN\_FUNC\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07068}07068                                \mbox{\hyperlink{ecore__reg_8h_ab4f826eb27e815cd197a08618e789f7b}{MISC\_REG\_AEU\_MASK\_ATTN\_FUNC\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07069}07069     uint32\_t nig\_int\_mask\_addr = port ? \mbox{\hyperlink{ecore__reg_8h_a83f04176fb551db6ea1fa327205c0522}{NIG\_REG\_MASK\_INTERRUPT\_PORT1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07070}07070                                         \mbox{\hyperlink{ecore__reg_8h_a806c07f7a1452151d7e9ecc5ccd55dca}{NIG\_REG\_MASK\_INTERRUPT\_PORT0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07071}07071     uint32\_t aeu\_mask;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07072}07072     uint32\_t nig\_mask = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07073}07073     uint32\_t \mbox{\hyperlink{structreg__addr}{reg\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07074}07074     uint32\_t igu\_acked;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07075}07075     uint32\_t cnt;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07076}07076 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07077}07077     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}} \& asserted) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07078}07078         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}IGU ERROR attn=0x\%08x\(\backslash\)n"{}}, asserted);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07079}07079     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07080}07080 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07081}07081     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a1c03b318c8c85fb7b3b312128d4f59b4}{HW\_LOCK\_RESOURCE\_PORT0\_ATT\_MASK}} + port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07082}07082 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07083}07083     aeu\_mask = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, aeu\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07084}07084 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07085}07085     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}aeu\_mask 0x\%08x newly asserted 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07086}07086           aeu\_mask, asserted);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07087}07087 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07088}07088     aeu\_mask \&= \string~(asserted \& 0x3ff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07089}07089 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07090}07090     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}new mask 0x\%08x\(\backslash\)n"{}}, aeu\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07091}07091 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07092}07092     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, aeu\_addr, aeu\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07093}07093 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07094}07094     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a1c03b318c8c85fb7b3b312128d4f59b4}{HW\_LOCK\_RESOURCE\_PORT0\_ATT\_MASK}} + port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07095}07095 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07096}07096     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}attn\_state 0x\%08x\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07097}07097     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}} |= asserted;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07098}07098     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}new state 0x\%08x\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07099}07099 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07100}07100     \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a61e0b88c4a39295c039523298f66d7ae}{ATTN\_HARD\_WIRED\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07101}07101         \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a16c8f72b77bde07788a4a93a096a6625}{ATTN\_NIG\_FOR\_FUNC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07102}07102 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07103}07103             \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07104}07104             \textcolor{comment}{/* save nig interrupt mask */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07105}07105             nig\_mask = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, nig\_int\_mask\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07106}07106 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07107}07107             \textcolor{comment}{/* If nig\_mask is not set, no need to call the update function */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07108}07108             \textcolor{keywordflow}{if} (nig\_mask) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07109}07109                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, nig\_int\_mask\_addr, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07110}07110 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07111}07111                 \mbox{\hyperlink{bxe_8c_a996941118f754fd3012390f40a0757fa}{bxe\_link\_attn}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07112}07112             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07113}07113 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07114}07114             \textcolor{comment}{/* handle unicore attn? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07115}07115         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07116}07116 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07117}07117         \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_aeb2e0cb103ac88d9ba2df6c54359cad1}{ATTN\_SW\_TIMER\_4\_FUNC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07118}07118             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}ATTN\_SW\_TIMER\_4\_FUNC!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07119}07119         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07120}07120 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07121}07121         \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_acaa00b791affde581818f07d93aa4d4d}{GPIO\_2\_FUNC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07122}07122             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}GPIO\_2\_FUNC!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07123}07123         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07124}07124 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07125}07125         \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_abadf5688f7581c4f67aedd72e1e4a323}{GPIO\_3\_FUNC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07126}07126             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}GPIO\_3\_FUNC!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07127}07127         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07128}07128 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07129}07129         \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a406b09171aa7ab4e913c924444be9041}{GPIO\_4\_FUNC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07130}07130             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}GPIO\_4\_FUNC!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07131}07131         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07132}07132 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07133}07133         \textcolor{keywordflow}{if} (port == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07134}07134             \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a61f88614325f86de6baf56ade7cda1e2}{ATTN\_GENERAL\_ATTN\_1}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07135}07135                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}ATTN\_GENERAL\_ATTN\_1!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07136}07136                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a7ae9dfadac149ea7afd690deff0b9f0d}{MISC\_REG\_AEU\_GENERAL\_ATTN\_1}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07137}07137             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07138}07138             \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_ab2ba050288a16d3451a0fd67ef460d7c}{ATTN\_GENERAL\_ATTN\_2}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07139}07139                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}ATTN\_GENERAL\_ATTN\_2!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07140}07140                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_af9e4c0bf0d5ec2cbe221d789a2b210c7}{MISC\_REG\_AEU\_GENERAL\_ATTN\_2}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07141}07141             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07142}07142             \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a075e055f5d97113971e73b931762ac55}{ATTN\_GENERAL\_ATTN\_3}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07143}07143                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}ATTN\_GENERAL\_ATTN\_3!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07144}07144                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_aaabf54930c0d3902397a8036331df8a2}{MISC\_REG\_AEU\_GENERAL\_ATTN\_3}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07145}07145             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07146}07146         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07147}07147             \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a8cd6948e2b4a952f9d588d156cea99d0}{ATTN\_GENERAL\_ATTN\_4}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07148}07148                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}ATTN\_GENERAL\_ATTN\_4!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07149}07149                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_aa16d951207ac1fb79e4c45c0b5d6a677}{MISC\_REG\_AEU\_GENERAL\_ATTN\_4}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07150}07150             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07151}07151             \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a235478b4e82f92ff7ebe76bc31ae5e79}{ATTN\_GENERAL\_ATTN\_5}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07152}07152                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}ATTN\_GENERAL\_ATTN\_5!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07153}07153                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_ac885ec207b2c51dac482ea809263e0e7}{MISC\_REG\_AEU\_GENERAL\_ATTN\_5}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07154}07154             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07155}07155             \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a009eab7b1b8c4ee833cd3ed850a66845}{ATTN\_GENERAL\_ATTN\_6}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07156}07156                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}ATTN\_GENERAL\_ATTN\_6!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07157}07157                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a16dba9cc4f8dd0884a0a4ec5360961bc}{MISC\_REG\_AEU\_GENERAL\_ATTN\_6}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07158}07158             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07159}07159         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07160}07160     \} \textcolor{comment}{/* hardwired */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07161}07161 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07162}07162     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07163}07163         \mbox{\hyperlink{structreg__addr}{reg\_addr}} = (\mbox{\hyperlink{ecore__reg_8h_aff36e3445ce3c30c4ce269f0c72da7a8}{HC\_REG\_COMMAND\_REG}} + port*32 + \mbox{\hyperlink{ecore__reg_8h_ab657570ce633f136277a9960cd28b800}{COMMAND\_REG\_ATTN\_BITS\_SET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07164}07164     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07165}07165         \mbox{\hyperlink{structreg__addr}{reg\_addr}} = (\mbox{\hyperlink{ecore__reg_8h_a2464666463aaf0d33403df59a27fa222}{BAR\_IGU\_INTMEM}} + \mbox{\hyperlink{ecore__reg_8h_a06f768cf51ca2d7544e0ea67659ad87c}{IGU\_CMD\_ATTN\_BIT\_SET\_UPPER}}*8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07166}07166     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07167}07167 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07168}07168     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}about to mask 0x\%08x at \%s addr 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07169}07169           asserted,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07170}07170           (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) ? \textcolor{stringliteral}{"{}HC"{}} : \textcolor{stringliteral}{"{}IGU"{}}, \mbox{\hyperlink{structreg__addr}{reg\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07171}07171     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{structreg__addr}{reg\_addr}}, asserted);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07172}07172 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07173}07173     \textcolor{comment}{/* now set back the mask */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07174}07174     \textcolor{keywordflow}{if} (asserted \& \mbox{\hyperlink{bxe_8h_a16c8f72b77bde07788a4a93a096a6625}{ATTN\_NIG\_FOR\_FUNC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07175}07175         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07176}07176 \textcolor{comment}{         * Verify that IGU ack through BAR was written before restoring}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07177}07177 \textcolor{comment}{         * NIG mask. This loop should exit after 2-\/3 iterations max.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07178}07178 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07179}07179         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} != \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07180}07180             cnt = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07181}07181 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07182}07182             \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07183}07183                 igu\_acked = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a482c3e53e1769ecb55ba62ccc6cd95c2}{IGU\_REG\_ATTENTION\_ACK\_BITS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07184}07184             \} \textcolor{keywordflow}{while} (((igu\_acked \& \mbox{\hyperlink{bxe_8h_a16c8f72b77bde07788a4a93a096a6625}{ATTN\_NIG\_FOR\_FUNC}}) == 0) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07185}07185                      (++cnt < \mbox{\hyperlink{bxe_8h_a0dd90f23514b49909bef9b57d2d65316}{MAX\_IGU\_ATTN\_ACK\_TO}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07186}07186 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07187}07187             \textcolor{keywordflow}{if} (!igu\_acked) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07188}07188                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Failed to verify IGU ack on time\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07189}07189             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07190}07190 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07191}07191             mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07192}07192         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07193}07193 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07194}07194         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, nig\_int\_mask\_addr, nig\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07195}07195 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07196}07196         \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07197}07197     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07198}07198 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07199}07199 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07200}07200 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07201}\mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{07201}} \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07202}07202                      \textcolor{keywordtype}{int}              idx,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07203}07203                      \textcolor{keyword}{const} \textcolor{keywordtype}{char}       *blk)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07204}07204 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07205}07205     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}\%s\%s"{}}, idx ? \textcolor{stringliteral}{"{}, "{}} : \textcolor{stringliteral}{"{}"{}}, blk);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07206}07206 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07207}07207 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07208}07208 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07209}\mbox{\hyperlink{bxe_8c_a667a073109281d9cbeed540ac00ba661}{07209}} \mbox{\hyperlink{bxe_8c_a667a073109281d9cbeed540ac00ba661}{bxe\_check\_blocks\_with\_parity0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07210}07210                               uint32\_t         sig,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07211}07211                               \textcolor{keywordtype}{int}              par\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07212}07212                               uint8\_t          print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07213}07213 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07214}07214     uint32\_t cur\_bit = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07215}07215     \textcolor{keywordtype}{int} i = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07216}07216 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07217}07217     \textcolor{keywordflow}{for} (i = 0; sig; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07218}07218         cur\_bit = ((uint32\_t)0x1 << i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07219}07219         \textcolor{keywordflow}{if} (sig \& cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07220}07220             \textcolor{keywordflow}{switch} (cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07221}07221             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a0c5b225827af15c59c7ac592d2e5957b}{AEU\_INPUTS\_ATTN\_BITS\_BRB\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07222}07222                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07223}07223                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}BRB"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07224}07224                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07225}07225             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a6cce3a3c0c0ab5b28f3b74a82571d986}{AEU\_INPUTS\_ATTN\_BITS\_PARSER\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07226}07226                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07227}07227                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}PARSER"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07228}07228                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07229}07229             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a0bfde2bbfd57a23013464619ed7a56d9}{AEU\_INPUTS\_ATTN\_BITS\_TSDM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07230}07230                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07231}07231                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}TSDM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07232}07232                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07233}07233             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a45b39a9993f52984a13fc1603c4aca68}{AEU\_INPUTS\_ATTN\_BITS\_SEARCHER\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07234}07234                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07235}07235                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}SEARCHER"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07236}07236                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07237}07237             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a29ae1f7b205272ab422339fdc311cdbf}{AEU\_INPUTS\_ATTN\_BITS\_TCM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07238}07238                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07239}07239                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}TCM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07240}07240                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07241}07241             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_af30512f324055f8c67729928f2d5642f}{AEU\_INPUTS\_ATTN\_BITS\_TSEMI\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07242}07242                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07243}07243                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}TSEMI"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07244}07244                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07245}07245             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_addb4a79e95ed950e588c734c4f14cd68}{AEU\_INPUTS\_ATTN\_BITS\_PBCLIENT\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07246}07246                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07247}07247                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}XPB"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07248}07248                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07249}07249             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07250}07250 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07251}07251             \textcolor{comment}{/* Clear the bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07252}07252             sig \&= \string~cur\_bit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07253}07253         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07254}07254     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07255}07255 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07256}07256     \textcolor{keywordflow}{return} (par\_num);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07257}07257 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07258}07258 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07259}07259 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07260}\mbox{\hyperlink{bxe_8c_a5ee559b71fb20dd3e297ec1cde92452c}{07260}} \mbox{\hyperlink{bxe_8c_a5ee559b71fb20dd3e297ec1cde92452c}{bxe\_check\_blocks\_with\_parity1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07261}07261                               uint32\_t         sig,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07262}07262                               \textcolor{keywordtype}{int}              par\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07263}07263                               uint8\_t          *global,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07264}07264                               uint8\_t          print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07265}07265 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07266}07266     \textcolor{keywordtype}{int} i = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07267}07267     uint32\_t cur\_bit = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07268}07268     \textcolor{keywordflow}{for} (i = 0; sig; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07269}07269         cur\_bit = ((uint32\_t)0x1 << i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07270}07270         \textcolor{keywordflow}{if} (sig \& cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07271}07271             \textcolor{keywordflow}{switch} (cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07272}07272             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a454dbdb321a26a8d5440726413fc20b5}{AEU\_INPUTS\_ATTN\_BITS\_PBF\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07273}07273                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07274}07274                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}PBF"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07275}07275                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07276}07276             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a11c11a80a1253f2f2cef0526a88fa53e}{AEU\_INPUTS\_ATTN\_BITS\_QM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07277}07277                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07278}07278                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}QM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07279}07279                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07280}07280             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a05dcc47d433873163c79534765e1de25}{AEU\_INPUTS\_ATTN\_BITS\_TIMERS\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07281}07281                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07282}07282                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}TM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07283}07283                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07284}07284             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a0e1aad05a947d5639c26558973b8e1a6}{AEU\_INPUTS\_ATTN\_BITS\_XSDM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07285}07285                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07286}07286                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}XSDM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07287}07287                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07288}07288             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_ae079f177cd291e31d91617396dbf07d9}{AEU\_INPUTS\_ATTN\_BITS\_XCM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07289}07289                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07290}07290                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}XCM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07291}07291                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07292}07292             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a7233ec86889003efe13cfe707d2f6d96}{AEU\_INPUTS\_ATTN\_BITS\_XSEMI\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07293}07293                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07294}07294                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}XSEMI"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07295}07295                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07296}07296             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_afd236fa741be789aa0308956ae26e128}{AEU\_INPUTS\_ATTN\_BITS\_DOORBELLQ\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07297}07297                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07298}07298                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}DOORBELLQ"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07299}07299                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07300}07300             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a0b572eb9a2b5a0a309625fc1dc95414b}{AEU\_INPUTS\_ATTN\_BITS\_NIG\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07301}07301                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07302}07302                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}NIG"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07303}07303                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07304}07304             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a95ff0bc1e23ae25f2b80eff2944a8d7e}{AEU\_INPUTS\_ATTN\_BITS\_VAUX\_PCI\_CORE\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07305}07305                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07306}07306                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}VAUX PCI CORE"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07307}07307                 *global = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07308}07308                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07309}07309             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_add1637b6acdf20aca36df2b7171edc8c}{AEU\_INPUTS\_ATTN\_BITS\_DEBUG\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07310}07310                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07311}07311                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}DEBUG"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07312}07312                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07313}07313             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_aa9389b5a5d1678328d3fc5e36c33cd62}{AEU\_INPUTS\_ATTN\_BITS\_USDM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07314}07314                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07315}07315                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}USDM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07316}07316                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07317}07317             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a22b6c46870fd8ba787e820be62bc085b}{AEU\_INPUTS\_ATTN\_BITS\_UCM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07318}07318                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07319}07319                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}UCM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07320}07320                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07321}07321             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_aeafb31fc17d86498e1dce8692da5fbfe}{AEU\_INPUTS\_ATTN\_BITS\_USEMI\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07322}07322                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07323}07323                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}USEMI"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07324}07324                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07325}07325             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_ae8a88c60e5fa32bc6f6adf9ec25cb39a}{AEU\_INPUTS\_ATTN\_BITS\_UPB\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07326}07326                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07327}07327                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}UPB"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07328}07328                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07329}07329             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a64987b26386a669c572738e3068a90a0}{AEU\_INPUTS\_ATTN\_BITS\_CSDM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07330}07330                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07331}07331                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}CSDM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07332}07332                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07333}07333             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a83990800b844d8e94ff1a81b9357fce8}{AEU\_INPUTS\_ATTN\_BITS\_CCM\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07334}07334                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07335}07335                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}CCM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07336}07336                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07337}07337             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07338}07338 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07339}07339             \textcolor{comment}{/* Clear the bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07340}07340             sig \&= \string~cur\_bit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07341}07341         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07342}07342     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07343}07343 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07344}07344     \textcolor{keywordflow}{return} (par\_num);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07345}07345 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07346}07346 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07347}07347 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07348}\mbox{\hyperlink{bxe_8c_af2e68f8a102457040e4d068e2c1aea4c}{07348}} \mbox{\hyperlink{bxe_8c_af2e68f8a102457040e4d068e2c1aea4c}{bxe\_check\_blocks\_with\_parity2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07349}07349                               uint32\_t         sig,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07350}07350                               \textcolor{keywordtype}{int}              par\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07351}07351                               uint8\_t          print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07352}07352 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07353}07353     uint32\_t cur\_bit = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07354}07354     \textcolor{keywordtype}{int} i = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07355}07355 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07356}07356     \textcolor{keywordflow}{for} (i = 0; sig; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07357}07357         cur\_bit = ((uint32\_t)0x1 << i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07358}07358         \textcolor{keywordflow}{if} (sig \& cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07359}07359             \textcolor{keywordflow}{switch} (cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07360}07360             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a280ce30a4184743403d3d59e6433d429}{AEU\_INPUTS\_ATTN\_BITS\_CSEMI\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07361}07361                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07362}07362                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}CSEMI"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07363}07363                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07364}07364             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_af67ff69b40fb0af4bc4dc6f77c4ef1ce}{AEU\_INPUTS\_ATTN\_BITS\_PXP\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07365}07365                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07366}07366                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}PXP"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07367}07367                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07368}07368             \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a80f34bc8a8029e660fd089abcfab7eea}{AEU\_IN\_ATTN\_BITS\_PXPPCICLOCKCLIENT\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07369}07369                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07370}07370                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}PXPPCICLOCKCLIENT"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07371}07371                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07372}07372             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a88da4aa70d0d68a2b4f583a485e54b1b}{AEU\_INPUTS\_ATTN\_BITS\_CFC\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07373}07373                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07374}07374                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}CFC"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07375}07375                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07376}07376             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_aa1325206834ab923218b8656b1cb4e7f}{AEU\_INPUTS\_ATTN\_BITS\_CDU\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07377}07377                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07378}07378                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}CDU"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07379}07379                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07380}07380             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a1ed14297f438f85bdc92cf40b115e58c}{AEU\_INPUTS\_ATTN\_BITS\_DMAE\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07381}07381                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07382}07382                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}DMAE"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07383}07383                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07384}07384             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a0fe400f99ff64ad04ccef022419e8f93}{AEU\_INPUTS\_ATTN\_BITS\_IGU\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07385}07385                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07386}07386                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}IGU"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07387}07387                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07388}07388             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_ad4c8b6ace44b3e2fc0ae80140e5050ba}{AEU\_INPUTS\_ATTN\_BITS\_MISC\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07389}07389                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07390}07390                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}MISC"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07391}07391                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07392}07392             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07393}07393 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07394}07394             \textcolor{comment}{/* Clear the bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07395}07395             sig \&= \string~cur\_bit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07396}07396         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07397}07397     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07398}07398 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07399}07399     \textcolor{keywordflow}{return} (par\_num);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07400}07400 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07401}07401 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07402}07402 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07403}\mbox{\hyperlink{bxe_8c_a342850f58745d10d1eae5537dc377ccf}{07403}} \mbox{\hyperlink{bxe_8c_a342850f58745d10d1eae5537dc377ccf}{bxe\_check\_blocks\_with\_parity3}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07404}07404                               uint32\_t         sig,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07405}07405                               \textcolor{keywordtype}{int}              par\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07406}07406                               uint8\_t          *global,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07407}07407                               uint8\_t          print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07408}07408 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07409}07409     uint32\_t cur\_bit = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07410}07410     \textcolor{keywordtype}{int} i = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07411}07411 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07412}07412     \textcolor{keywordflow}{for} (i = 0; sig; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07413}07413         cur\_bit = ((uint32\_t)0x1 << i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07414}07414         \textcolor{keywordflow}{if} (sig \& cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07415}07415             \textcolor{keywordflow}{switch} (cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07416}07416             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a62ac97b5522060742074ed276f1a6162}{AEU\_INPUTS\_ATTN\_BITS\_MCP\_LATCHED\_ROM\_PARITY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07417}07417                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07418}07418                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}MCP ROM"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07419}07419                 *global = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07420}07420                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07421}07421             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_ae1ce97eb9e503b34a3dee21b546302eb}{AEU\_INPUTS\_ATTN\_BITS\_MCP\_LATCHED\_UMP\_RX\_PARITY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07422}07422                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07423}07423                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07424}07424                               \textcolor{stringliteral}{"{}MCP UMP RX"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07425}07425                 *global = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07426}07426                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07427}07427             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a0ca7fe9d3036a50543f203b86105b1ff}{AEU\_INPUTS\_ATTN\_BITS\_MCP\_LATCHED\_UMP\_TX\_PARITY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07428}07428                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07429}07429                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07430}07430                               \textcolor{stringliteral}{"{}MCP UMP TX"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07431}07431                 *global = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07432}07432                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07433}07433             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a96a3b12e42b8b17d1f7364c31825a92a}{AEU\_INPUTS\_ATTN\_BITS\_MCP\_LATCHED\_SCPAD\_PARITY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07434}07434                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07435}07435                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07436}07436                               \textcolor{stringliteral}{"{}MCP SCPAD"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07437}07437                 *global = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07438}07438                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07439}07439             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07440}07440 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07441}07441             \textcolor{comment}{/* Clear the bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07442}07442             sig \&= \string~cur\_bit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07443}07443         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07444}07444     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07445}07445 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07446}07446     \textcolor{keywordflow}{return} (par\_num);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07447}07447 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07448}07448 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07449}07449 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07450}\mbox{\hyperlink{bxe_8c_a5e6799701f0b5c7d00a14c99a6ea8713}{07450}} \mbox{\hyperlink{bxe_8c_a5e6799701f0b5c7d00a14c99a6ea8713}{bxe\_check\_blocks\_with\_parity4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07451}07451                               uint32\_t         sig,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07452}07452                               \textcolor{keywordtype}{int}              par\_num,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07453}07453                               uint8\_t          print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07454}07454 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07455}07455     uint32\_t cur\_bit = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07456}07456     \textcolor{keywordtype}{int} i = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07457}07457 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07458}07458     \textcolor{keywordflow}{for} (i = 0; sig; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07459}07459         cur\_bit = ((uint32\_t)0x1 << i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07460}07460         \textcolor{keywordflow}{if} (sig \& cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07461}07461             \textcolor{keywordflow}{switch} (cur\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07462}07462             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a1e60f88ccaf9952ff0bf4d917cf645b1}{AEU\_INPUTS\_ATTN\_BITS\_PGLUE\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07463}07463                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07464}07464                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}PGLUE\_B"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07465}07465                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07466}07466             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__reg_8h_a85371c7f9d7f540a649cb9f2f0c9d0bf}{AEU\_INPUTS\_ATTN\_BITS\_ATC\_PARITY\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07467}07467                 \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07468}07468                     \mbox{\hyperlink{bxe_8c_aaf125e47f5dc50593b262791a26da916}{bxe\_print\_next\_block}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, par\_num++, \textcolor{stringliteral}{"{}ATC"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07469}07469                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07470}07470             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07471}07471 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07472}07472             \textcolor{comment}{/* Clear the bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07473}07473             sig \&= \string~cur\_bit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07474}07474         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07475}07475     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07476}07476 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07477}07477     \textcolor{keywordflow}{return} (par\_num);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07478}07478 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07479}07479 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07480}07480 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07481}\mbox{\hyperlink{bxe_8c_a2a35fb780171389e447b9ad896c6a941}{07481}} \mbox{\hyperlink{bxe_8c_a2a35fb780171389e447b9ad896c6a941}{bxe\_parity\_attn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07482}07482                 uint8\_t          *global,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07483}07483                 uint8\_t          print,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07484}07484                 uint32\_t         *sig)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07485}07485 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07486}07486     \textcolor{keywordtype}{int} par\_num = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07487}07487 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07488}07488     \textcolor{keywordflow}{if} ((sig[0] \& \mbox{\hyperlink{ecore__reg_8h_aa45c9a01360999ee19eab48ea1065f58}{HW\_PRTY\_ASSERT\_SET\_0}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07489}07489         (sig[1] \& \mbox{\hyperlink{ecore__reg_8h_a28b9b4b9d0aad1036675dd24f2ee5057}{HW\_PRTY\_ASSERT\_SET\_1}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07490}07490         (sig[2] \& \mbox{\hyperlink{ecore__reg_8h_a9e2d6bd5e0190e1fda0f9d225d35e9a0}{HW\_PRTY\_ASSERT\_SET\_2}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07491}07491         (sig[3] \& \mbox{\hyperlink{ecore__reg_8h_a07a2fbf7a5f81cc719dbcccc6c01e8e7}{HW\_PRTY\_ASSERT\_SET\_3}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07492}07492         (sig[4] \& \mbox{\hyperlink{ecore__reg_8h_a6e83dc1c7a835b0bff2c04ce07dbb700}{HW\_PRTY\_ASSERT\_SET\_4}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07493}07493         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Parity error: HW block parity attention:\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07494}07494                   \textcolor{stringliteral}{"{}[0]:0x\%08x [1]:0x\%08x [2]:0x\%08x [3]:0x\%08x [4]:0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07495}07495               (uint32\_t)(sig[0] \& \mbox{\hyperlink{ecore__reg_8h_aa45c9a01360999ee19eab48ea1065f58}{HW\_PRTY\_ASSERT\_SET\_0}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07496}07496               (uint32\_t)(sig[1] \& \mbox{\hyperlink{ecore__reg_8h_a28b9b4b9d0aad1036675dd24f2ee5057}{HW\_PRTY\_ASSERT\_SET\_1}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07497}07497               (uint32\_t)(sig[2] \& \mbox{\hyperlink{ecore__reg_8h_a9e2d6bd5e0190e1fda0f9d225d35e9a0}{HW\_PRTY\_ASSERT\_SET\_2}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07498}07498               (uint32\_t)(sig[3] \& \mbox{\hyperlink{ecore__reg_8h_a07a2fbf7a5f81cc719dbcccc6c01e8e7}{HW\_PRTY\_ASSERT\_SET\_3}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07499}07499               (uint32\_t)(sig[4] \& \mbox{\hyperlink{ecore__reg_8h_a6e83dc1c7a835b0bff2c04ce07dbb700}{HW\_PRTY\_ASSERT\_SET\_4}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07500}07500 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07501}07501         \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07502}07502             \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Parity errors detected in blocks: "{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07503}07503 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07504}07504         par\_num =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07505}07505             \mbox{\hyperlink{bxe_8c_a667a073109281d9cbeed540ac00ba661}{bxe\_check\_blocks\_with\_parity0}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, sig[0] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07506}07506                                           \mbox{\hyperlink{ecore__reg_8h_aa45c9a01360999ee19eab48ea1065f58}{HW\_PRTY\_ASSERT\_SET\_0}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07507}07507                                           par\_num, print);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07508}07508         par\_num =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07509}07509             \mbox{\hyperlink{bxe_8c_a5ee559b71fb20dd3e297ec1cde92452c}{bxe\_check\_blocks\_with\_parity1}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, sig[1] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07510}07510                                           \mbox{\hyperlink{ecore__reg_8h_a28b9b4b9d0aad1036675dd24f2ee5057}{HW\_PRTY\_ASSERT\_SET\_1}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07511}07511                                           par\_num, global, print);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07512}07512         par\_num =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07513}07513             \mbox{\hyperlink{bxe_8c_af2e68f8a102457040e4d068e2c1aea4c}{bxe\_check\_blocks\_with\_parity2}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, sig[2] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07514}07514                                           \mbox{\hyperlink{ecore__reg_8h_a9e2d6bd5e0190e1fda0f9d225d35e9a0}{HW\_PRTY\_ASSERT\_SET\_2}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07515}07515                                           par\_num, print);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07516}07516         par\_num =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07517}07517             \mbox{\hyperlink{bxe_8c_a342850f58745d10d1eae5537dc377ccf}{bxe\_check\_blocks\_with\_parity3}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, sig[3] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07518}07518                                           \mbox{\hyperlink{ecore__reg_8h_a07a2fbf7a5f81cc719dbcccc6c01e8e7}{HW\_PRTY\_ASSERT\_SET\_3}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07519}07519                                           par\_num, global, print);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07520}07520         par\_num =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07521}07521             \mbox{\hyperlink{bxe_8c_a5e6799701f0b5c7d00a14c99a6ea8713}{bxe\_check\_blocks\_with\_parity4}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, sig[4] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07522}07522                                           \mbox{\hyperlink{ecore__reg_8h_a6e83dc1c7a835b0bff2c04ce07dbb700}{HW\_PRTY\_ASSERT\_SET\_4}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07523}07523                                           par\_num, print);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07524}07524 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07525}07525         \textcolor{keywordflow}{if} (print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07526}07526             \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07527}07527 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07528}07528         \textcolor{keywordflow}{if}( *global == TRUE ) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07529}07529                 \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_a2627a44dbd6c4e828ab03c6d4502218e}{BXE\_ERR\_GLOBAL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07530}07530         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07531}07531 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07532}07532         \textcolor{keywordflow}{return} (TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07533}07533     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07534}07534 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07535}07535     \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07536}07536 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07537}07537 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07538}07538 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07539}\mbox{\hyperlink{bxe_8c_a91656b2ffc7fe1c9ff94a04e05056801}{07539}} \mbox{\hyperlink{bxe_8c_a91656b2ffc7fe1c9ff94a04e05056801}{bxe\_chk\_parity\_attn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07540}07540                     uint8\_t          *global,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07541}07541                     uint8\_t          print)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07542}07542 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07543}07543     \textcolor{keyword}{struct }\mbox{\hyperlink{structattn__route}{attn\_route}} attn = \{ \{0\} \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07544}07544     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07545}07545 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07546}07546     \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07547}07547         \textcolor{keywordflow}{return} FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07548}07548 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07549}07549     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[0] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa8ee65728cc277f541626a27c266acde}{MISC\_REG\_AEU\_AFTER\_INVERT\_1\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07550}07550     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[1] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a333f02537f652bffae9543e0245c2c2a}{MISC\_REG\_AEU\_AFTER\_INVERT\_2\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07551}07551     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[2] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_af4ffefd292772713f8258d7f65f060ca}{MISC\_REG\_AEU\_AFTER\_INVERT\_3\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07552}07552     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[3] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa3ff84112fc5c9530fb8e8ce13e9498b}{MISC\_REG\_AEU\_AFTER\_INVERT\_4\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07553}07553 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07554}07554     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07555}07555 \textcolor{comment}{     * Since MCP attentions can't be disabled inside the block, we need to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07556}07556 \textcolor{comment}{     * read AEU registers to see whether they're currently disabled}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07557}07557 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07558}07558     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[3] \&= ((\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, (!port ? \mbox{\hyperlink{ecore__reg_8h_a3e20553ed25f5061db4ce2a0970eb16e}{MISC\_REG\_AEU\_ENABLE4\_FUNC\_0\_OUT\_0}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07559}07559                                       : \mbox{\hyperlink{ecore__reg_8h_abba973e6b2050f2d927ac478dde0a2dd}{MISC\_REG\_AEU\_ENABLE4\_FUNC\_1\_OUT\_0}})) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07560}07560                          \mbox{\hyperlink{ecore__init_8h_a026abcd3e0fac742026067a6b3938367}{MISC\_AEU\_ENABLE\_MCP\_PRTY\_BITS}}) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07561}07561                         \string~\mbox{\hyperlink{ecore__init_8h_a026abcd3e0fac742026067a6b3938367}{MISC\_AEU\_ENABLE\_MCP\_PRTY\_BITS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07562}07562 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07563}07563 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07564}07564     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07565}07565         attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a629cfbe7997a7bf70f950887b779c5a7}{MISC\_REG\_AEU\_AFTER\_INVERT\_5\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07566}07566 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07567}07567     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a2a35fb780171389e447b9ad896c6a941}{bxe\_parity\_attn}}(sc, global, print, attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07568}07568 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07569}07569 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07570}07570 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07571}\mbox{\hyperlink{bxe_8c_aaa2d9ec562df10d133b935df488874d3}{07571}} \mbox{\hyperlink{bxe_8c_aaa2d9ec562df10d133b935df488874d3}{bxe\_attn\_int\_deasserted4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07572}07572                          uint32\_t         attn)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07573}07573 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07574}07574     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07575}07575     boolean\_t err\_flg = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07576}07576 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07577}07577     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_ace635aa523287dac34fe374d1a5c394e}{AEU\_INPUTS\_ATTN\_BITS\_PGLUE\_HW\_INTERRUPT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07578}07578         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad2250663e75542c8dcb5e1503ce95257}{PGLUE\_B\_REG\_PGLUE\_B\_INT\_STS\_CLR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07579}07579         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE hw attention 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07580}07580         err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07581}07581         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a5348dbed5b890fdc150cc91d5d486cf5}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_ADDRESS\_ERROR}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07582}07582             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_ADDRESS\_ERROR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07583}07583         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_accbf7cadec8264f7848c68d61ee1ea4c}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_INCORRECT\_RCV\_BEHAVIOR}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07584}07584             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_INCORRECT\_RCV\_BEHAVIOR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07585}07585         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_ab4beb57e24bfc96863eef1f1d264d6c5}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_WAS\_ERROR\_ATTN}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07586}07586             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_WAS\_ERROR\_ATTN\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07587}07587         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a8558ec6f376ae5a8b1db3fe96b481444}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_VF\_LENGTH\_VIOLATION\_ATTN}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07588}07588             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_VF\_LENGTH\_VIOLATION\_ATTN\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07589}07589         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a8dbc43a73398233781667edb384a8018}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_VF\_GRC\_SPACE\_VIOLATION\_ATTN}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07590}07590             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_VF\_GRC\_SPACE\_VIOLATION\_ATTN\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07591}07591         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_ac7cf42a8f629aa739c381b677b16f4b1}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_VF\_MSIX\_BAR\_VIOLATION\_ATTN}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07592}07592             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_VF\_MSIX\_BAR\_VIOLATION\_ATTN\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07593}07593         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a20a205252eaf76888c223c9e63515be9}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_TCPL\_ERROR\_ATTN}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07594}07594             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_TCPL\_ERROR\_ATTN\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07595}07595         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a9fc354e894693753753d7d69ec919167}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_TCPL\_IN\_TWO\_RCBS\_ATTN}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07596}07596             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_TCPL\_IN\_TWO\_RCBS\_ATTN\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07597}07597         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a7e4785d1b38f2129c6385d5e237525e2}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_CSSNOOP\_FIFO\_OVERFLOW}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07598}07598             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_CSSNOOP\_FIFO\_OVERFLOW\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07599}07599     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07600}07600 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07601}07601     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_a18785cba564005d97c4401f2435b9439}{AEU\_INPUTS\_ATTN\_BITS\_ATC\_HW\_INTERRUPT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07602}07602         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a09e423c835024296e1211b0d55e2e7b9}{ATC\_REG\_ATC\_INT\_STS\_CLR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07603}07603         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ATC hw attention 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07604}07604         err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07605}07605         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a079509aac20c84b0a06650836798325c}{ATC\_ATC\_INT\_STS\_REG\_ADDRESS\_ERROR}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07606}07606             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ATC\_ATC\_INT\_STS\_REG\_ADDRESS\_ERROR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07607}07607         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_aac85f6ec578adb854f0e9c8077c62589}{ATC\_ATC\_INT\_STS\_REG\_ATC\_TCPL\_TO\_NOT\_PEND}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07608}07608             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ATC\_ATC\_INT\_STS\_REG\_ATC\_TCPL\_TO\_NOT\_PEND\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07609}07609         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a8bdeac557aa973d85faced1f0e3790d5}{ATC\_ATC\_INT\_STS\_REG\_ATC\_GPA\_MULTIPLE\_HITS}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07610}07610             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ATC\_ATC\_INT\_STS\_REG\_ATC\_GPA\_MULTIPLE\_HITS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07611}07611         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a8cf6d97c64f2314729ebf8d6e6437cfa}{ATC\_ATC\_INT\_STS\_REG\_ATC\_RCPL\_TO\_EMPTY\_CNT}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07612}07612             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ATC\_ATC\_INT\_STS\_REG\_ATC\_RCPL\_TO\_EMPTY\_CNT\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07613}07613         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a895e7d4e6988f1849b2252804b2c77cc}{ATC\_ATC\_INT\_STS\_REG\_ATC\_TCPL\_ERROR}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07614}07614             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ATC\_ATC\_INT\_STS\_REG\_ATC\_TCPL\_ERROR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07615}07615         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_a05b3885c3bd2b1501d86850d725cd5e4}{ATC\_ATC\_INT\_STS\_REG\_ATC\_IREQ\_LESS\_THAN\_STU}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07616}07616             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ATC\_ATC\_INT\_STS\_REG\_ATC\_IREQ\_LESS\_THAN\_STU\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07617}07617     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07618}07618 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07619}07619     \textcolor{keywordflow}{if} (attn \& (\mbox{\hyperlink{ecore__reg_8h_a1e60f88ccaf9952ff0bf4d917cf645b1}{AEU\_INPUTS\_ATTN\_BITS\_PGLUE\_PARITY\_ERROR}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07620}07620                 \mbox{\hyperlink{ecore__reg_8h_a85371c7f9d7f540a649cb9f2f0c9d0bf}{AEU\_INPUTS\_ATTN\_BITS\_ATC\_PARITY\_ERROR}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07621}07621         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FATAL parity attention set4 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07622}07622               (uint32\_t)(attn \& (\mbox{\hyperlink{ecore__reg_8h_a1e60f88ccaf9952ff0bf4d917cf645b1}{AEU\_INPUTS\_ATTN\_BITS\_PGLUE\_PARITY\_ERROR}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07623}07623                                  \mbox{\hyperlink{ecore__reg_8h_a85371c7f9d7f540a649cb9f2f0c9d0bf}{AEU\_INPUTS\_ATTN\_BITS\_ATC\_PARITY\_ERROR}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07624}07624         err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07625}07625     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07626}07626     \textcolor{keywordflow}{if} (err\_flg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07627}07627         \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(sc, \mbox{\hyperlink{bxe_8h_a06cb3a04a7a684da90e9edb1f6264475}{BXE\_ERR\_MISC}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07628}07628         taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07629}07629             \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07630}07630     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07631}07631 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07632}07632 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07633}07633 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07634}07634 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07635}\mbox{\hyperlink{bxe_8c_a91dc68da655ca0ab316e804e29d0e14e}{07635}} \mbox{\hyperlink{bxe_8c_a91dc68da655ca0ab316e804e29d0e14e}{bxe\_e1h\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07636}07636 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07637}07637     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07638}07638 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07639}07639     \mbox{\hyperlink{bxe_8c_ae731d69bd5e491bceb7804c8c53407bf}{bxe\_tx\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07640}07640 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07641}07641     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac7750debed93c11358fbef94dd2d56ad}{NIG\_REG\_LLH0\_FUNC\_EN}} + port*8, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07642}07642 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07643}07643 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07644}07644 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07645}\mbox{\hyperlink{bxe_8c_ad771491ce80a227b3a8283f9bae83051}{07645}} \mbox{\hyperlink{bxe_8c_ad771491ce80a227b3a8283f9bae83051}{bxe\_e1h\_enable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07646}07646 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07647}07647     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07648}07648 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07649}07649     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac7750debed93c11358fbef94dd2d56ad}{NIG\_REG\_LLH0\_FUNC\_EN}} + port*8, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07650}07650 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07651}07651     \textcolor{comment}{// XXX bxe\_tx\_enable(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07652}07652 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07653}07653 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07654}07654 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07655}07655 \textcolor{comment}{ * called due to MCP event (on pmf):}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07656}07656 \textcolor{comment}{ *   reread new bandwidth configuration}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07657}07657 \textcolor{comment}{ *   configure FW}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07658}07658 \textcolor{comment}{ *   notify others function about the change}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07659}07659 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07660}07660 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07661}\mbox{\hyperlink{bxe_8c_a47b2885558e20e63bc25bc3c39e220ac}{07661}} \mbox{\hyperlink{bxe_8c_a47b2885558e20e63bc25bc3c39e220ac}{bxe\_config\_mf\_bw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07662}07662 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07663}07663     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07664}07664         \mbox{\hyperlink{bxe_8c_a2212c57e59956cf53b4f735141f87282}{bxe\_cmng\_fns\_init}}(sc, TRUE, \mbox{\hyperlink{bxe_8h_a0adf7ae1b4fd9f5e3932e151e751cc0e}{CMNG\_FNS\_MINMAX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07665}07665         \textcolor{comment}{// XXX bxe\_link\_sync\_notify(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07666}07666     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07667}07667 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07668}07668     \mbox{\hyperlink{bxe_8c_a52e02dd8452a48e1bdd61876d6d06ec1}{storm\_memset\_cmng}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ae45c3fa081c958a5b736fb1fab1fb6e5}{cmng}}, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07669}07669 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07670}07670 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07671}07671 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07672}\mbox{\hyperlink{bxe_8c_aac7c5a8ffb2b7ce2319d0d9c097fae8f}{07672}} \mbox{\hyperlink{bxe_8c_aac7c5a8ffb2b7ce2319d0d9c097fae8f}{bxe\_set\_mf\_bw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07673}07673 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07674}07674     \mbox{\hyperlink{bxe_8c_a47b2885558e20e63bc25bc3c39e220ac}{bxe\_config\_mf\_bw}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07675}07675     \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_abf6e5fec9550e291c095ee559b740792}{DRV\_MSG\_CODE\_SET\_MF\_BW\_ACK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07676}07676 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07677}07677 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07678}07678 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07679}\mbox{\hyperlink{bxe_8c_a41c93b0545de5a1198598bd0880f84d0}{07679}} \mbox{\hyperlink{bxe_8c_a41c93b0545de5a1198598bd0880f84d0}{bxe\_handle\_eee\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07680}07680 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07681}07681     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}EEE -\/ LLDP event\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07682}07682     \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a0f35b89a1c9e4f0da486e266f7ed739b}{DRV\_MSG\_CODE\_EEE\_RESULTS\_ACK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07683}07683 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07684}07684 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07685}\mbox{\hyperlink{bxe_8c_a9293f1c60923a14dc8449bf0181dfd26}{07685}} \textcolor{preprocessor}{\#define DRV\_INFO\_ETH\_STAT\_NUM\_MACS\_REQUIRED 3}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07686}07686 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07687}07687 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07688}\mbox{\hyperlink{bxe_8c_a08956032cc2f342071a06e4a269b8f2e}{07688}} \mbox{\hyperlink{bxe_8c_a08956032cc2f342071a06e4a269b8f2e}{bxe\_drv\_info\_ether\_stat}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07689}07689 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07690}07690     \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__stats__info}{eth\_stats\_info}} *ether\_stat =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07691}07691         \&sc-\/>\mbox{\hyperlink{structbxe__softc_a74f9cdf0652b5f8cf3b2c78bbb4ba1e9}{sp}}-\/>\mbox{\hyperlink{structbxe__slowpath_ae1ea05bd8a477d7c28e98e317e1eaee2}{drv\_info\_to\_mcp}}.\mbox{\hyperlink{uniondrv__info__to__mcp_a10e0f56451252ebc9c9a5c38574e3807}{ether\_stat}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07692}07692 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07693}07693     strlcpy(ether\_stat-\/>\mbox{\hyperlink{structeth__stats__info_a00622c90ea2989e57ebc97af39fc6504}{version}}, \mbox{\hyperlink{bxe_8c_a976c2e4222c6339043f2145097755339}{BXE\_DRIVER\_VERSION}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07694}07694             \mbox{\hyperlink{ecore__mfw__req_8h_a4f02dcc53a9a55f55ec5a5c9c8cb2fa3}{ETH\_STAT\_INFO\_VERSION\_LEN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07695}07695 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07696}07696     \textcolor{comment}{/* XXX (+ MAC\_PAD) taken from other driver... verify this is right */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07697}07697     sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[0].\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}}.\mbox{\hyperlink{structecore__vlan__mac__obj_aad92fdd9ec06b855fb64c1cf0bc1a8f9}{get\_n\_elements}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[0].\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07698}07698                                           \mbox{\hyperlink{bxe_8c_a9293f1c60923a14dc8449bf0181dfd26}{DRV\_INFO\_ETH\_STAT\_NUM\_MACS\_REQUIRED}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07699}07699                                           ether\_stat-\/>\mbox{\hyperlink{structeth__stats__info_a528dd2085b8d1f08d6c144b3b56fa27d}{mac\_local}} + \mbox{\hyperlink{ecore__sp_8h_ae5ed2b1812ad9dfbd59db9d386660c72}{MAC\_PAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07700}07700                                           \mbox{\hyperlink{ecore__sp_8h_ae5ed2b1812ad9dfbd59db9d386660c72}{MAC\_PAD}}, \mbox{\hyperlink{ecore__sp_8h_a9822d89774e0d6ddaa06503950130423}{ETH\_ALEN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07701}07701 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07702}07702     ether\_stat-\/>\mbox{\hyperlink{structeth__stats__info_acf2c20caed413788945ba23aa360a88d}{mtu\_size}} = sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07703}07703 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07704}07704     ether\_stat-\/>\mbox{\hyperlink{structeth__stats__info_aa3c9b588135fb4da815d990d8c1474e4}{feature\_flags}} |= \mbox{\hyperlink{ecore__mfw__req_8h_a427b477de4bf7e1cfaf44beabed93af8}{FEATURE\_ETH\_CHKSUM\_OFFLOAD\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07705}07705     \textcolor{keywordflow}{if} (if\_getcapenable(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& (IFCAP\_TSO4 | IFCAP\_TSO6)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07706}07706         ether\_stat-\/>\mbox{\hyperlink{structeth__stats__info_aa3c9b588135fb4da815d990d8c1474e4}{feature\_flags}} |= \mbox{\hyperlink{ecore__mfw__req_8h_acfd3b0b738b2b758d934203c290187c3}{FEATURE\_ETH\_LSO\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07707}07707     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07708}07708 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07709}07709     \textcolor{comment}{// XXX ether\_stat-\/>feature\_flags |= ???;}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07710}07710 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07711}07711     ether\_stat-\/>\mbox{\hyperlink{structeth__stats__info_a52f3660445211d90462c4afbb9653437}{promiscuous\_mode}} = 0; \textcolor{comment}{// (flags \& PROMISC) ? 1 : 0;}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07712}07712 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07713}07713     ether\_stat-\/>\mbox{\hyperlink{structeth__stats__info_aa06b06aa695148cf6fe87a99ef1e8817}{txq\_size}} = sc-\/>\mbox{\hyperlink{structbxe__softc_ae54ae6772bbb2b9435620aac68777c5f}{tx\_ring\_size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07714}07714     ether\_stat-\/>\mbox{\hyperlink{structeth__stats__info_a66b7c9a84a8a472282fd03090d90831b}{rxq\_size}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a1195901be35258ea09cc1795762d875d}{rx\_ring\_size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07715}07715 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07716}07716 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07717}07717 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07718}\mbox{\hyperlink{bxe_8c_a32229051e03ebff5b6abc3db95ff0763}{07718}} \mbox{\hyperlink{bxe_8c_a32229051e03ebff5b6abc3db95ff0763}{bxe\_handle\_drv\_info\_req}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07719}07719 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07720}07720     \textcolor{keyword}{enum} \mbox{\hyperlink{ecore__mfw__req_8h_a4f3b3ddeba373c6b226e92589c41e71a}{drv\_info\_opcode}} op\_code;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07721}07721     uint32\_t drv\_info\_ctl = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, drv\_info\_control);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07722}07722 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07723}07723     \textcolor{comment}{/* if drv\_info version supported by MFW doesn't match -\/ send NACK */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07724}07724     \textcolor{keywordflow}{if} ((drv\_info\_ctl \& \mbox{\hyperlink{ecore__hsi_8h_a504d7bba446ea034fedf4a597eb74647}{DRV\_INFO\_CONTROL\_VER\_MASK}}) != \mbox{\hyperlink{ecore__mfw__req_8h_a464c398fd52e76bea2387661065d82f2}{DRV\_INFO\_CUR\_VER}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07725}07725         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_afc696035be06ea06ccac2c05fb2ce72d}{DRV\_MSG\_CODE\_DRV\_INFO\_NACK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07726}07726         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07727}07727     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07728}07728 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07729}07729     op\_code = ((drv\_info\_ctl \& \mbox{\hyperlink{ecore__hsi_8h_ad8b8bc174fe824f1de92f86efc0dedbf}{DRV\_INFO\_CONTROL\_OP\_CODE\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07730}07730                \mbox{\hyperlink{ecore__hsi_8h_a579042fa05af02348fd97f53c23323fb}{DRV\_INFO\_CONTROL\_OP\_CODE\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07731}07731 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07732}07732     memset(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a74f9cdf0652b5f8cf3b2c78bbb4ba1e9}{sp}}-\/>\mbox{\hyperlink{structbxe__slowpath_ae1ea05bd8a477d7c28e98e317e1eaee2}{drv\_info\_to\_mcp}}, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{uniondrv__info__to__mcp}{drv\_info\_to\_mcp}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07733}07733 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07734}07734     \textcolor{keywordflow}{switch} (op\_code) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07735}07735     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__mfw__req_8h_a4f3b3ddeba373c6b226e92589c41e71aa02261d7df73b84e4bad30b0a891adae4}{ETH\_STATS\_OPCODE}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07736}07736         \mbox{\hyperlink{bxe_8c_a08956032cc2f342071a06e4a269b8f2e}{bxe\_drv\_info\_ether\_stat}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07737}07737         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07738}07738     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__mfw__req_8h_a4f3b3ddeba373c6b226e92589c41e71aa9bd4ae3f22dc6c6e9ea5e48b6adbeb9d}{FCOE\_STATS\_OPCODE}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07739}07739     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__mfw__req_8h_a4f3b3ddeba373c6b226e92589c41e71aac5717a29105a25f9f790bc100f4e7a8a}{ISCSI\_STATS\_OPCODE}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07740}07740     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07741}07741         \textcolor{comment}{/* if op code isn't supported -\/ send NACK */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07742}07742         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_afc696035be06ea06ccac2c05fb2ce72d}{DRV\_MSG\_CODE\_DRV\_INFO\_NACK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07743}07743         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07744}07744     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07745}07745 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07746}07746     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07747}07747 \textcolor{comment}{     * If we got drv\_info attn from MFW then these fields are defined in}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07748}07748 \textcolor{comment}{     * shmem2 for sure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07749}07749 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07750}07750     \mbox{\hyperlink{bxe_8h_a4f67d23feca46834d51501224c0c22f9}{SHMEM2\_WR}}(sc, drv\_info\_host\_addr\_lo,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07751}07751               \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(\mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, \mbox{\hyperlink{uniondrv__info__to__mcp}{drv\_info\_to\_mcp}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07752}07752     \mbox{\hyperlink{bxe_8h_a4f67d23feca46834d51501224c0c22f9}{SHMEM2\_WR}}(sc, drv\_info\_host\_addr\_hi,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07753}07753               \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(\mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, \mbox{\hyperlink{uniondrv__info__to__mcp}{drv\_info\_to\_mcp}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07754}07754 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07755}07755     \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a09900d6685db46fb8faa8a167a1821fd}{DRV\_MSG\_CODE\_DRV\_INFO\_ACK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07756}07756 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07757}07757 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07758}07758 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07759}\mbox{\hyperlink{bxe_8c_aa0a2fb548c920715b9b883825620eb8a}{07759}} \mbox{\hyperlink{bxe_8c_aa0a2fb548c920715b9b883825620eb8a}{bxe\_dcc\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07760}07760               uint32\_t         dcc\_event)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07761}07761 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07762}07762     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}dcc\_event 0x\%08x\(\backslash\)n"{}}, dcc\_event);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07763}07763 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07764}07764     \textcolor{keywordflow}{if} (dcc\_event \& \mbox{\hyperlink{ecore__hsi_8h_ac28784286325f5c5a17ab8282d5e771a}{DRV\_STATUS\_DCC\_DISABLE\_ENABLE\_PF}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07765}07765         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07766}07766 \textcolor{comment}{         * This is the only place besides the function initialization}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07767}07767 \textcolor{comment}{         * where the sc-\/>flags can change so it is done without any}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07768}07768 \textcolor{comment}{         * locks}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07769}07769 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07770}07770         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)] \& \mbox{\hyperlink{ecore__hsi_8h_a0fe10353bc51277ed397f58e4347d958}{FUNC\_MF\_CFG\_FUNC\_DISABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07771}07771             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}mf\_cfg function disabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07772}07772             sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} |= \mbox{\hyperlink{bxe_8h_ae259e37c454eb48694a93b14502c93ca}{BXE\_MF\_FUNC\_DIS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07773}07773             \mbox{\hyperlink{bxe_8c_a91dc68da655ca0ab316e804e29d0e14e}{bxe\_e1h\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07774}07774         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07775}07775             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}mf\_cfg function enabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07776}07776             sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} \&= \string~BXE\_MF\_FUNC\_DIS;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07777}07777             \mbox{\hyperlink{bxe_8c_ad771491ce80a227b3a8283f9bae83051}{bxe\_e1h\_enable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07778}07778         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07779}07779         dcc\_event \&= \string~DRV\_STATUS\_DCC\_DISABLE\_ENABLE\_PF;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07780}07780     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07781}07781 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07782}07782     \textcolor{keywordflow}{if} (dcc\_event \& \mbox{\hyperlink{ecore__hsi_8h_a8a1b86a16efb598ec7a421753dfb0717}{DRV\_STATUS\_DCC\_BANDWIDTH\_ALLOCATION}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07783}07783         \mbox{\hyperlink{bxe_8c_a47b2885558e20e63bc25bc3c39e220ac}{bxe\_config\_mf\_bw}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07784}07784         dcc\_event \&= \string~DRV\_STATUS\_DCC\_BANDWIDTH\_ALLOCATION;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07785}07785     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07786}07786 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07787}07787     \textcolor{comment}{/* Report results to MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07788}07788     \textcolor{keywordflow}{if} (dcc\_event)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07789}07789         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a5698387a8c0d0b20b4fb3d6405181fc0}{DRV\_MSG\_CODE\_DCC\_FAILURE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07790}07790     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07791}07791         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_af7901413ef9aef2714fed904da69bf1c}{DRV\_MSG\_CODE\_DCC\_OK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07792}07792 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07793}07793 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07794}07794 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07795}\mbox{\hyperlink{bxe_8c_a627ae7d5bb558b4d92c6efa796b8550b}{07795}} \mbox{\hyperlink{bxe_8c_a627ae7d5bb558b4d92c6efa796b8550b}{bxe\_pmf\_update}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07796}07796 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07797}07797     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07798}07798     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07799}07799 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07800}07800     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07801}07801     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}pmf \%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07802}07802 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07803}07803     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07804}07804 \textcolor{comment}{     * We need the mb() to ensure the ordering between the writing to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07805}07805 \textcolor{comment}{     * sc-\/>port.pmf here and reading it from the bxe\_periodic\_task().}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07806}07806 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07807}07807     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07808}07808 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07809}07809     \textcolor{comment}{/* queue a periodic task */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07810}07810     \textcolor{comment}{// XXX schedule task...}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07811}07811 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07812}07812     \textcolor{comment}{// XXX bxe\_dcbx\_pmf\_update(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07813}07813 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07814}07814     \textcolor{comment}{/* enable nig attention */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07815}07815     val = (0xff0f | (1 << (\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc) + 4)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07816}07816     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07817}07817         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a5e78f09d9fd794c58b65669a22779043}{HC\_REG\_TRAILING\_EDGE\_0}} + port*8, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07818}07818         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1a880b547de30d4c1acf8a13c6527d18}{HC\_REG\_LEADING\_EDGE\_0}} + port*8, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07819}07819     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07820}07820         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aed2a0f0a296d65a50ff05634c73b0a06}{IGU\_REG\_TRAILING\_EDGE\_LATCH}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07821}07821         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0e0d52da6a9442d5834260ecd9bd4d57}{IGU\_REG\_LEADING\_EDGE\_LATCH}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07822}07822     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07823}07823 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07824}07824     \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(sc, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026af2b3625fe5d10aa8c74a668076b210aa}{STATS\_EVENT\_PMF}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07825}07825 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07826}07826 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07827}07827 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07828}\mbox{\hyperlink{bxe_8c_a5439154686479828c6d430973041744c}{07828}} \mbox{\hyperlink{bxe_8c_a5439154686479828c6d430973041744c}{bxe\_mc\_assert}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07829}07829 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07830}07830     \textcolor{keywordtype}{char} last\_idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07831}07831     \textcolor{keywordtype}{int} i, rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07832}07832     uint32\_t row0, row1, row2, row3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07833}07833 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07834}07834     \textcolor{comment}{/* XSTORM */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07835}07835     last\_idx = \mbox{\hyperlink{bxe_8h_a91fae46e1d66e29d8bda5c1587d0e3ee}{REG\_RD8}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_ac772a67f8701550ad0eb40ceaec01147}{XSTORM\_ASSERT\_LIST\_INDEX\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07836}07836     \textcolor{keywordflow}{if} (last\_idx)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07837}07837         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}XSTORM\_ASSERT\_LIST\_INDEX 0x\%x\(\backslash\)n"{}}, last\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07838}07838 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07839}07839     \textcolor{comment}{/* print the asserts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07840}07840     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a76ee7edc1bb2fbacb5f446d44f45250e}{STORM\_ASSERT\_ARRAY\_SIZE}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07841}07841 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07842}07842         row0 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_aff11c56d9eaaee9941c0521a760d76a8}{XSTORM\_ASSERT\_LIST\_OFFSET}}(i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07843}07843         row1 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_aff11c56d9eaaee9941c0521a760d76a8}{XSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07844}07844         row2 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_aff11c56d9eaaee9941c0521a760d76a8}{XSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07845}07845         row3 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_aff11c56d9eaaee9941c0521a760d76a8}{XSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 12);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07846}07846 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07847}07847         \textcolor{keywordflow}{if} (row0 != \mbox{\hyperlink{ecore__fw__defs_8h_a8412461be64f32195bc06dd86c3885cd}{COMMON\_ASM\_INVALID\_ASSERT\_OPCODE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07848}07848             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}XSTORM\_ASSERT\_INDEX 0x\%x = 0x\%08x 0x\%08x 0x\%08x 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07849}07849                   i, row3, row2, row1, row0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07850}07850             rc++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07851}07851         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07852}07852             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07853}07853         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07854}07854     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07855}07855 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07856}07856     \textcolor{comment}{/* TSTORM */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07857}07857     last\_idx = \mbox{\hyperlink{bxe_8h_a91fae46e1d66e29d8bda5c1587d0e3ee}{REG\_RD8}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a049b8fda35e0683ab358131a0022724b}{TSTORM\_ASSERT\_LIST\_INDEX\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07858}07858     \textcolor{keywordflow}{if} (last\_idx) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07859}07859         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}TSTORM\_ASSERT\_LIST\_INDEX 0x\%x\(\backslash\)n"{}}, last\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07860}07860     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07861}07861 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07862}07862     \textcolor{comment}{/* print the asserts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07863}07863     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a76ee7edc1bb2fbacb5f446d44f45250e}{STORM\_ASSERT\_ARRAY\_SIZE}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07864}07864 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07865}07865         row0 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a24a4cf8447e845287edfb6a38d1577d6}{TSTORM\_ASSERT\_LIST\_OFFSET}}(i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07866}07866         row1 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a24a4cf8447e845287edfb6a38d1577d6}{TSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07867}07867         row2 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a24a4cf8447e845287edfb6a38d1577d6}{TSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07868}07868         row3 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a24a4cf8447e845287edfb6a38d1577d6}{TSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 12);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07869}07869 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07870}07870         \textcolor{keywordflow}{if} (row0 != \mbox{\hyperlink{ecore__fw__defs_8h_a8412461be64f32195bc06dd86c3885cd}{COMMON\_ASM\_INVALID\_ASSERT\_OPCODE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07871}07871             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}TSTORM\_ASSERT\_INDEX 0x\%x = 0x\%08x 0x\%08x 0x\%08x 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07872}07872                   i, row3, row2, row1, row0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07873}07873             rc++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07874}07874         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07875}07875             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07876}07876         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07877}07877     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07878}07878 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07879}07879     \textcolor{comment}{/* CSTORM */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07880}07880     last\_idx = \mbox{\hyperlink{bxe_8h_a91fae46e1d66e29d8bda5c1587d0e3ee}{REG\_RD8}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_af1d16ce4b38612ec84649b1d4c4b4ae6}{CSTORM\_ASSERT\_LIST\_INDEX\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07881}07881     \textcolor{keywordflow}{if} (last\_idx) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07882}07882         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}CSTORM\_ASSERT\_LIST\_INDEX 0x\%x\(\backslash\)n"{}}, last\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07883}07883     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07884}07884 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07885}07885     \textcolor{comment}{/* print the asserts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07886}07886     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a76ee7edc1bb2fbacb5f446d44f45250e}{STORM\_ASSERT\_ARRAY\_SIZE}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07887}07887 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07888}07888         row0 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a87f4a8d3c414f84617d850c344880fb7}{CSTORM\_ASSERT\_LIST\_OFFSET}}(i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07889}07889         row1 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a87f4a8d3c414f84617d850c344880fb7}{CSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07890}07890         row2 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a87f4a8d3c414f84617d850c344880fb7}{CSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07891}07891         row3 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a87f4a8d3c414f84617d850c344880fb7}{CSTORM\_ASSERT\_LIST\_OFFSET}}(i) + 12);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07892}07892 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07893}07893         \textcolor{keywordflow}{if} (row0 != \mbox{\hyperlink{ecore__fw__defs_8h_a8412461be64f32195bc06dd86c3885cd}{COMMON\_ASM\_INVALID\_ASSERT\_OPCODE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07894}07894             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}CSTORM\_ASSERT\_INDEX 0x\%x = 0x\%08x 0x\%08x 0x\%08x 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07895}07895                   i, row3, row2, row1, row0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07896}07896             rc++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07897}07897         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07898}07898             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07899}07899         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07900}07900     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07901}07901 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07902}07902     \textcolor{comment}{/* USTORM */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07903}07903     last\_idx = \mbox{\hyperlink{bxe_8h_a91fae46e1d66e29d8bda5c1587d0e3ee}{REG\_RD8}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_ab05bf02cff7a68489e74f06f51169c68}{USTORM\_ASSERT\_LIST\_INDEX\_OFFSET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07904}07904     \textcolor{keywordflow}{if} (last\_idx) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07905}07905         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}USTORM\_ASSERT\_LIST\_INDEX 0x\%x\(\backslash\)n"{}}, last\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07906}07906     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07907}07907 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07908}07908     \textcolor{comment}{/* print the asserts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07909}07909     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a76ee7edc1bb2fbacb5f446d44f45250e}{STORM\_ASSERT\_ARRAY\_SIZE}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07910}07910 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07911}07911         row0 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_adcc54d6e3a9c48e3395fe0c8de3a46fd}{USTORM\_ASSERT\_LIST\_OFFSET}}(i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07912}07912         row1 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_adcc54d6e3a9c48e3395fe0c8de3a46fd}{USTORM\_ASSERT\_LIST\_OFFSET}}(i) + 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07913}07913         row2 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_adcc54d6e3a9c48e3395fe0c8de3a46fd}{USTORM\_ASSERT\_LIST\_OFFSET}}(i) + 8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07914}07914         row3 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_adcc54d6e3a9c48e3395fe0c8de3a46fd}{USTORM\_ASSERT\_LIST\_OFFSET}}(i) + 12);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07915}07915 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07916}07916         \textcolor{keywordflow}{if} (row0 != \mbox{\hyperlink{ecore__fw__defs_8h_a8412461be64f32195bc06dd86c3885cd}{COMMON\_ASM\_INVALID\_ASSERT\_OPCODE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07917}07917             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}USTORM\_ASSERT\_INDEX 0x\%x = 0x\%08x 0x\%08x 0x\%08x 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07918}07918                   i, row3, row2, row1, row0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07919}07919             rc++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07920}07920         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07921}07921             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07922}07922         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07923}07923     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07924}07924 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07925}07925     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07926}07926 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07927}07927 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07928}07928 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07929}\mbox{\hyperlink{bxe_8c_a59b99b5c43251bdc255e308e9902d5dc}{07929}} \mbox{\hyperlink{bxe_8c_a59b99b5c43251bdc255e308e9902d5dc}{bxe\_attn\_int\_deasserted3}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07930}07930                          uint32\_t         attn)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07931}07931 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07932}07932     \textcolor{keywordtype}{int} func = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07933}07933     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07934}07934 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07935}07935     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_a88c456646ac3b7e83e727b79f5120cbd}{EVEREST\_GEN\_ATTN\_IN\_USE\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07936}07936 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07937}07937         \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{bxe_8h_a77f4b147f64b0a87397db990033561a6}{BXE\_PMF\_LINK\_ASSERT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07938}07938 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07939}07939             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac8012f0e27f8e86268ea8623f555b75f}{MISC\_REG\_AEU\_GENERAL\_ATTN\_12}} + func*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07940}07940             \mbox{\hyperlink{bxe_8c_ae32c29c31951ee82cda3e99ad0f9a65d}{bxe\_read\_mf\_cfg}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07941}07941             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07942}07942                 \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07943}07943             val = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, func\_mb[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc)].drv\_status);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07944}07944 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07945}07945             \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_a7b24b751f085a2f57b16cc4c7470b313}{DRV\_STATUS\_DCC\_EVENT\_MASK}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07946}07946                 \mbox{\hyperlink{bxe_8c_aa0a2fb548c920715b9b883825620eb8a}{bxe\_dcc\_event}}(sc, (val \& \mbox{\hyperlink{ecore__hsi_8h_a7b24b751f085a2f57b16cc4c7470b313}{DRV\_STATUS\_DCC\_EVENT\_MASK}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07947}07947 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07948}07948             \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_a262e7c5bc14e9d90c9d3bb6b0860793e}{DRV\_STATUS\_SET\_MF\_BW}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07949}07949                 \mbox{\hyperlink{bxe_8c_aac7c5a8ffb2b7ce2319d0d9c097fae8f}{bxe\_set\_mf\_bw}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07950}07950 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07951}07951             \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_a05441cb846d001c21b37e6870d6e8ee2}{DRV\_STATUS\_DRV\_INFO\_REQ}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07952}07952                 \mbox{\hyperlink{bxe_8c_a32229051e03ebff5b6abc3db95ff0763}{bxe\_handle\_drv\_info\_req}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07953}07953 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07954}07954             \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}} == 0) \&\& (val \& \mbox{\hyperlink{ecore__hsi_8h_ad898c1fc660c59b51b633fbac7903d12}{DRV\_STATUS\_PMF}}))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07955}07955                 \mbox{\hyperlink{bxe_8c_a627ae7d5bb558b4d92c6efa796b8550b}{bxe\_pmf\_update}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07956}07956 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07957}07957             \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_a02e4246932c82bc3812359c4776d41e3}{DRV\_STATUS\_EEE\_NEGOTIATION\_RESULTS}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07958}07958                 \mbox{\hyperlink{bxe_8c_a41c93b0545de5a1198598bd0880f84d0}{bxe\_handle\_eee\_event}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07959}07959 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07960}07960             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_abad0182bf6f4785ceaafc311c08994f6}{periodic\_flags}} \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07961}07961                 \mbox{\hyperlink{bxe__elink_8h_a766e02a1a83174a026ae0cbd6a090568}{ELINK\_PERIODIC\_FLAGS\_LINK\_EVENT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07962}07962                 \textcolor{comment}{/* sync with link */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07963}07963                 \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07964}07964                 sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_abad0182bf6f4785ceaafc311c08994f6}{periodic\_flags}} \&=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07965}07965                     \string~ELINK\_PERIODIC\_FLAGS\_LINK\_EVENT;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07966}07966                 \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07967}07967                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07968}07968                     ; \textcolor{comment}{// XXX bxe\_link\_sync\_notify(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07969}07969                 \mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{bxe\_link\_report}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07970}07970             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07971}07971 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07972}07972             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07973}07973 \textcolor{comment}{             * Always call it here: bxe\_link\_report() will}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07974}07974 \textcolor{comment}{             * prevent the link indication duplication.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07975}07975 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07976}07976             \mbox{\hyperlink{bxe_8c_a9c029beb080ac600e1ae282c2710195b}{bxe\_link\_status\_update}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07977}07977 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07978}07978         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{bxe_8h_acc027cc3cbb880c2badb0ee9015612f1}{BXE\_MC\_ASSERT\_BITS}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07979}07979 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07980}07980             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MC assert!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07981}07981             \mbox{\hyperlink{bxe_8c_a5439154686479828c6d430973041744c}{bxe\_mc\_assert}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07982}07982             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af2a9d64411401b8ff9c96237d6b588b4}{MISC\_REG\_AEU\_GENERAL\_ATTN\_10}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07983}07983             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a999d99268cb82547e0e30006303b62ff}{MISC\_REG\_AEU\_GENERAL\_ATTN\_9}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07984}07984             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af539dca0febd20980886955eca03f7d4}{MISC\_REG\_AEU\_GENERAL\_ATTN\_8}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07985}07985             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a50199f9aef4880b2d05e1c2b98a6146d}{MISC\_REG\_AEU\_GENERAL\_ATTN\_7}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07986}07986             \mbox{\hyperlink{bxe_8c_ac47171d7e9b0e9b346122f490afcbf5a}{bxe\_int\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07987}07987             \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(sc, \mbox{\hyperlink{bxe_8h_a9f56350b8c4251f7cb606d318be1b7cd}{BXE\_ERR\_MC\_ASSERT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07988}07988             taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07989}07989                 \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07990}07990         }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07991}07991         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{bxe_8h_afb8e50ca50156133e446d5cd40ebe26b}{BXE\_MCP\_ASSERT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07992}07992 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07993}07993             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MCP assert!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07994}07994             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a412fe7ef5b903e6967b4172471f98ee6}{MISC\_REG\_AEU\_GENERAL\_ATTN\_11}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07995}07995             \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(sc, \mbox{\hyperlink{bxe_8h_abd3b2aca516a25d2c703898cb9cf152e}{BXE\_ERR\_MCP\_ASSERT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07996}07996             taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07997}07997                 \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07998}07998             \mbox{\hyperlink{bxe_8c_ac47171d7e9b0e9b346122f490afcbf5a}{bxe\_int\_disable}}(sc);  \textcolor{comment}{/*avoid repetive assert alert */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l07999}07999 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08000}08000 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08001}08001         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08002}08002             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unknown HW assert! (attn 0x\%08x)\(\backslash\)n"{}}, attn);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08003}08003         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08004}08004     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08005}08005 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08006}08006     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_af402c4e7da07fc87e4fc2577fc04c36e}{EVEREST\_LATCHED\_ATTN\_IN\_USE\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08007}08007         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}LATCHED attention 0x\%08x (masked)\(\backslash\)n"{}}, attn);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08008}08008         \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{bxe_8h_a40183df9a4f0588dbc25596b9231285d}{BXE\_GRC\_TIMEOUT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08009}08009             val = \mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc) ? 0 : \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a363ea76e1fd81f201c9214dfa5de8d16}{MISC\_REG\_GRC\_TIMEOUT\_ATTN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08010}08010             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}GRC time-\/out 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08011}08011         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08012}08012         \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{bxe_8h_a4698f48707bd13212f0c20b94ecfdcb2}{BXE\_GRC\_RSV}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08013}08013             val = \mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc) ? 0 : \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a661f57f1bd83ac923df667cd180e27ac}{MISC\_REG\_GRC\_RSV\_ATTN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08014}08014             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}GRC reserved 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08015}08015         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08016}08016         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a5eeff032e073226fd3c2c8e2b834bb50}{MISC\_REG\_AEU\_CLR\_LATCH\_SIGNAL}}, 0x7ff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08017}08017     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08018}08018 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08019}08019 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08020}08020 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08021}\mbox{\hyperlink{bxe_8c_a4602580c847fd4fa334f92dd4bba35fe}{08021}} \mbox{\hyperlink{bxe_8c_a4602580c847fd4fa334f92dd4bba35fe}{bxe\_attn\_int\_deasserted2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08022}08022                          uint32\_t         attn)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08023}08023 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08024}08024     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08025}08025     \textcolor{keywordtype}{int} reg\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08026}08026     uint32\_t val0, mask0, val1, mask1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08027}08027     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08028}08028     boolean\_t err\_flg = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08029}08029 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08030}08030     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_aea71a3efc76c546c73e14820d47a7b98}{AEU\_INPUTS\_ATTN\_BITS\_CFC\_HW\_INTERRUPT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08031}08031         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_adb5a742059a490c20060216ca66b626e}{CFC\_REG\_CFC\_INT\_STS\_CLR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08032}08032         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}CFC hw attention 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08033}08033         \textcolor{comment}{/* CFC error attention */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08034}08034         \textcolor{keywordflow}{if} (val \& 0x2) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08035}08035             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FATAL error from CFC\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08036}08036             err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08037}08037         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08038}08038     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08039}08039 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08040}08040     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_a7380862953920a8bb25138b5e6ce1ef0}{AEU\_INPUTS\_ATTN\_BITS\_PXP\_HW\_INTERRUPT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08041}08041         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a936fe475119a1e6b4a4e7978763ab77a}{PXP\_REG\_PXP\_INT\_STS\_CLR\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08042}08042         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PXP hw attention-\/0 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08043}08043         \textcolor{comment}{/* RQ\_USDMDP\_FIFO\_OVERFLOW */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08044}08044         \textcolor{keywordflow}{if} (val \& 0x18000) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08045}08045             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FATAL error from PXP\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08046}08046             err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08047}08047         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08048}08048 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08049}08049         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08050}08050             val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa9b85d36e84446da74f142ecafa9a0fb}{PXP\_REG\_PXP\_INT\_STS\_CLR\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08051}08051             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PXP hw attention-\/1 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08052}08052             err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08053}08053         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08054}08054     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08055}08055 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08056}08056 \textcolor{preprocessor}{\#define PXP2\_EOP\_ERROR\_BIT  PXP2\_PXP2\_INT\_STS\_CLR\_0\_REG\_WR\_PGLUE\_EOP\_ERROR}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08057}08057 \textcolor{preprocessor}{\#define AEU\_PXP2\_HW\_INT\_BIT AEU\_INPUTS\_ATTN\_BITS\_PXPPCICLOCKCLIENT\_HW\_INTERRUPT}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08058}08058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08059}08059     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{bxe_8c_a466a8adfc1664502207c6f357e11a5cf}{AEU\_PXP2\_HW\_INT\_BIT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08060}08060         \textcolor{comment}{/*  CQ47854 workaround do not panic on}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08061}08061 \textcolor{comment}{         *  PXP2\_PXP2\_INT\_STS\_0\_REG\_WR\_PGLUE\_EOP\_ERROR}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08062}08062 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08063}08063         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08064}08064             mask0 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_abbaf846b043a1de56d7608564e75b4d8}{PXP2\_REG\_PXP2\_INT\_MASK\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08065}08065             val1 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a70aff477c5beef9d7880c5c3c53f02c6}{PXP2\_REG\_PXP2\_INT\_STS\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08066}08066             mask1 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a66308a964f2ae02cc0e80a2f285d0d08}{PXP2\_REG\_PXP2\_INT\_MASK\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08067}08067             val0 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a94fcd7f40874a68df5b102b322c6231e}{PXP2\_REG\_PXP2\_INT\_STS\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08068}08068             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08069}08069 \textcolor{comment}{             * If the only PXP2\_EOP\_ERROR\_BIT is set in}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08070}08070 \textcolor{comment}{             * STS0 and STS1 -\/ clear it}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08071}08071 \textcolor{comment}{             *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08072}08072 \textcolor{comment}{             * probably we lose additional attentions between}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08073}08073 \textcolor{comment}{             * STS0 and STS\_CLR0, in this case user will not}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08074}08074 \textcolor{comment}{             * be notified about them}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08075}08075 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08076}08076             \textcolor{keywordflow}{if} (val0 \& mask0 \& \mbox{\hyperlink{bxe_8c_a6f43f51fdefcf73acc56673900f9ac19}{PXP2\_EOP\_ERROR\_BIT}} \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08077}08077                 !(val1 \& mask1))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08078}08078                 val0 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0496140fe5ca7a16e1d55782de806880}{PXP2\_REG\_PXP2\_INT\_STS\_CLR\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08079}08079 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08080}08080             \textcolor{comment}{/* print the register, since no one can restore it */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08081}08081             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PXP2\_REG\_PXP2\_INT\_STS\_CLR\_0 0x\%08x\(\backslash\)n"{}}, val0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08082}08082 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08083}08083             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08084}08084 \textcolor{comment}{             * if PXP2\_PXP2\_INT\_STS\_0\_REG\_WR\_PGLUE\_EOP\_ERROR}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08085}08085 \textcolor{comment}{             * then notify}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08086}08086 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08087}08087             \textcolor{keywordflow}{if} (val0 \& \mbox{\hyperlink{bxe_8c_a6f43f51fdefcf73acc56673900f9ac19}{PXP2\_EOP\_ERROR\_BIT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08088}08088                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PXP2\_WR\_PGLUE\_EOP\_ERROR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08089}08089                 err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08090}08090 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08091}08091                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08092}08092 \textcolor{comment}{                 * if only PXP2\_PXP2\_INT\_STS\_0\_REG\_WR\_PGLUE\_EOP\_ERROR is}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08093}08093 \textcolor{comment}{                 * set then clear attention from PXP2 block without panic}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08094}08094 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08095}08095                 \textcolor{keywordflow}{if} (((val0 \& mask0) == \mbox{\hyperlink{bxe_8c_a6f43f51fdefcf73acc56673900f9ac19}{PXP2\_EOP\_ERROR\_BIT}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08096}08096                     ((val1 \& mask1) == 0))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08097}08097                     attn \&= \string~AEU\_PXP2\_HW\_INT\_BIT;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08098}08098             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08099}08099         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08100}08100     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08101}08101 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08102}08102     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_ac951b3cfefc0d7599cd6b6c085135ab8}{HW\_INTERRUT\_ASSERT\_SET\_2}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08103}08103         reg\_offset = (port ? \mbox{\hyperlink{ecore__reg_8h_ad25a31e7c437a56aeec050889264bad9}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_1\_OUT\_2}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08104}08104                              \mbox{\hyperlink{ecore__reg_8h_ac2aaf229b179aa6b3b7f7d7e1045410c}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_0\_OUT\_2}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08105}08105 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08106}08106         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, reg\_offset);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08107}08107         val \&= \string~(attn \& \mbox{\hyperlink{ecore__reg_8h_ac951b3cfefc0d7599cd6b6c085135ab8}{HW\_INTERRUT\_ASSERT\_SET\_2}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08108}08108         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, reg\_offset, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08109}08109 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08110}08110         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FATAL HW block attention set2 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08111}08111               (uint32\_t)(attn \& \mbox{\hyperlink{ecore__reg_8h_ac951b3cfefc0d7599cd6b6c085135ab8}{HW\_INTERRUT\_ASSERT\_SET\_2}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08112}08112         err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08113}08113         \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(sc, (\textcolor{stringliteral}{"{}HW block attention set2\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08114}08114     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08115}08115     \textcolor{keywordflow}{if}(err\_flg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08116}08116         \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(sc, \mbox{\hyperlink{bxe_8h_a2627a44dbd6c4e828ab03c6d4502218e}{BXE\_ERR\_GLOBAL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08117}08117         taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08118}08118            \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08119}08119     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08120}08120 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08121}08121 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08122}08122 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08123}08123 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08124}\mbox{\hyperlink{bxe_8c_ab10f9c441c7538413c3af986d09df89c}{08124}} \mbox{\hyperlink{bxe_8c_ab10f9c441c7538413c3af986d09df89c}{bxe\_attn\_int\_deasserted1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08125}08125                          uint32\_t         attn)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08126}08126 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08127}08127     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08128}08128     \textcolor{keywordtype}{int} reg\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08129}08129     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08130}08130     boolean\_t err\_flg = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08131}08131 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08132}08132     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_a0d801b813780829a113246cf8779540b}{AEU\_INPUTS\_ATTN\_BITS\_DOORBELLQ\_HW\_INTERRUPT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08133}08133         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6fed455e5f0e1aeae3626a1e33be7f6b}{DORQ\_REG\_DORQ\_INT\_STS\_CLR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08134}08134         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}DB hw attention 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08135}08135         \textcolor{comment}{/* DORQ discard attention */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08136}08136         \textcolor{keywordflow}{if} (val \& 0x2) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08137}08137             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FATAL error from DORQ\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08138}08138             err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08139}08139         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08140}08140     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08141}08141 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08142}08142     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_a957750caa55edb6f8578f33670d272d5}{HW\_INTERRUT\_ASSERT\_SET\_1}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08143}08143         reg\_offset = (port ? \mbox{\hyperlink{ecore__reg_8h_aff7851acb0db96e4250e49346d645796}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_1\_OUT\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08144}08144                              \mbox{\hyperlink{ecore__reg_8h_ab37142034852b557f71b6cb1d4ca8a51}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_0\_OUT\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08145}08145 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08146}08146         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, reg\_offset);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08147}08147         val \&= \string~(attn \& \mbox{\hyperlink{ecore__reg_8h_a957750caa55edb6f8578f33670d272d5}{HW\_INTERRUT\_ASSERT\_SET\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08148}08148         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, reg\_offset, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08149}08149 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08150}08150         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FATAL HW block attention set1 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08151}08151               (uint32\_t)(attn \& \mbox{\hyperlink{ecore__reg_8h_a957750caa55edb6f8578f33670d272d5}{HW\_INTERRUT\_ASSERT\_SET\_1}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08152}08152         err\_flg = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08153}08153         \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(sc, (\textcolor{stringliteral}{"{}HW block attention set1\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08154}08154     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08155}08155     \textcolor{keywordflow}{if}(err\_flg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08156}08156         \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(sc, \mbox{\hyperlink{bxe_8h_a06cb3a04a7a684da90e9edb1f6264475}{BXE\_ERR\_MISC}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08157}08157         taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08158}08158            \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08159}08159     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08160}08160 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08161}08161 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08162}08162 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08163}08163 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08164}\mbox{\hyperlink{bxe_8c_a7ad9ff33c0df2dfb55482d6c458a74c0}{08164}} \mbox{\hyperlink{bxe_8c_a7ad9ff33c0df2dfb55482d6c458a74c0}{bxe\_attn\_int\_deasserted0}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08165}08165                          uint32\_t         attn)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08166}08166 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08167}08167     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08168}08168     \textcolor{keywordtype}{int} reg\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08169}08169     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08170}08170 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08171}08171     reg\_offset = (port) ? \mbox{\hyperlink{ecore__reg_8h_a279a27ade0af5030215b6afd1b9d4c9c}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_1\_OUT\_0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08172}08172                           \mbox{\hyperlink{ecore__reg_8h_aff48db9d459a874195704e419d017636}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_0\_OUT\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08173}08173 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08174}08174     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_ab2e1fef03140f2cfa471fd5b3c7b85c7}{AEU\_INPUTS\_ATTN\_BITS\_SPIO5}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08175}08175         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, reg\_offset);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08176}08176         val \&= \string~AEU\_INPUTS\_ATTN\_BITS\_SPIO5;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08177}08177         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, reg\_offset, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08178}08178 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08179}08179         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}SPIO5 hw attention\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08180}08180 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08181}08181         \textcolor{comment}{/* Fan failure attention */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08182}08182         \mbox{\hyperlink{bxe__elink_8c_a1fa6cbd6e5a0ee7d86df41f2a00b5c71}{elink\_hw\_reset\_phy}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08183}08183         \mbox{\hyperlink{bxe_8c_a5b49ebad92e9d5c181e4a357130f8950}{bxe\_fan\_failure}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08184}08184     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08185}08185 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08186}08186     \textcolor{keywordflow}{if} ((attn \& sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ae05b1c30b7ece20704fbbca87082ad25}{aeu\_int\_mask}}) \&\& sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08187}08187         \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08188}08188         \mbox{\hyperlink{bxe__elink_8c_a40461d0a84a597ad0dd5928418bf287b}{elink\_handle\_module\_detect\_int}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08189}08189         \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08190}08190     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08191}08191 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08192}08192     \textcolor{keywordflow}{if} (attn \& \mbox{\hyperlink{ecore__reg_8h_a4504a50c8e6270aa5dbb34e3af721655}{HW\_INTERRUT\_ASSERT\_SET\_0}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08193}08193         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, reg\_offset);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08194}08194         val \&= \string~(attn \& \mbox{\hyperlink{ecore__reg_8h_a4504a50c8e6270aa5dbb34e3af721655}{HW\_INTERRUT\_ASSERT\_SET\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08195}08195         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, reg\_offset, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08196}08196 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08197}08197 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08198}08198         \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(sc, \mbox{\hyperlink{bxe_8h_a06cb3a04a7a684da90e9edb1f6264475}{BXE\_ERR\_MISC}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08199}08199         taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08200}08200            \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08201}08201 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08202}08202         \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(sc, (\textcolor{stringliteral}{"{}FATAL HW block attention set0 0x\%lx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08203}08203                        (attn \& \mbox{\hyperlink{ecore__reg_8h_a4504a50c8e6270aa5dbb34e3af721655}{HW\_INTERRUT\_ASSERT\_SET\_0}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08204}08204     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08205}08205 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08206}08206 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08207}08207 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08208}\mbox{\hyperlink{bxe_8c_ae023dc0420cc594e6e4735426ebecfc9}{08208}} \mbox{\hyperlink{bxe_8c_ae023dc0420cc594e6e4735426ebecfc9}{bxe\_attn\_int\_deasserted}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08209}08209                         uint32\_t         deasserted)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08210}08210 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08211}08211     \textcolor{keyword}{struct }\mbox{\hyperlink{structattn__route}{attn\_route}} attn;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08212}08212     \textcolor{keyword}{struct }\mbox{\hyperlink{structattn__route}{attn\_route}} *group\_mask;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08213}08213     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08214}08214     \textcolor{keywordtype}{int} index;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08215}08215     uint32\_t \mbox{\hyperlink{structreg__addr}{reg\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08216}08216     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08217}08217     uint32\_t aeu\_mask;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08218}08218     uint8\_t global = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08219}08219 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08220}08220     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08221}08221 \textcolor{comment}{     * Need to take HW lock because MCP or other port might also}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08222}08222 \textcolor{comment}{     * try to handle this event.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08223}08223 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08224}08224     \mbox{\hyperlink{bxe_8c_a6ada608ab88e549ff94e861e9429543d}{bxe\_acquire\_alr}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08225}08225 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08226}08226     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a91656b2ffc7fe1c9ff94a04e05056801}{bxe\_chk\_parity\_attn}}(sc, \&global, TRUE)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08227}08227         \textcolor{comment}{/* XXX}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08228}08228 \textcolor{comment}{         * In case of parity errors don't handle attentions so that}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08229}08229 \textcolor{comment}{         * other function would "{}see"{} parity errors.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08230}08230 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08231}08231         \textcolor{comment}{// XXX schedule a recovery task...}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08232}08232         \textcolor{comment}{/* disable HW interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08233}08233         \mbox{\hyperlink{bxe_8c_ac47171d7e9b0e9b346122f490afcbf5a}{bxe\_int\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08234}08234         \mbox{\hyperlink{bxe_8h_a274053e738710b96c0a7cda6616f16f9}{BXE\_SET\_ERROR\_BIT}}(sc, \mbox{\hyperlink{bxe_8h_ad3cbf2371e55dcb26c31b35b2f74bf9b}{BXE\_ERR\_PARITY}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08235}08235         taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08236}08236            \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08237}08237         \mbox{\hyperlink{bxe_8c_adc08a4e509f6809e01a0469de859aee0}{bxe\_release\_alr}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08238}08238         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08239}08239     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08240}08240 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08241}08241     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[0] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa8ee65728cc277f541626a27c266acde}{MISC\_REG\_AEU\_AFTER\_INVERT\_1\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08242}08242     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[1] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a333f02537f652bffae9543e0245c2c2a}{MISC\_REG\_AEU\_AFTER\_INVERT\_2\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08243}08243     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[2] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_af4ffefd292772713f8258d7f65f060ca}{MISC\_REG\_AEU\_AFTER\_INVERT\_3\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08244}08244     attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[3] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa3ff84112fc5c9530fb8e8ce13e9498b}{MISC\_REG\_AEU\_AFTER\_INVERT\_4\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08245}08245     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08246}08246         attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a629cfbe7997a7bf70f950887b779c5a7}{MISC\_REG\_AEU\_AFTER\_INVERT\_5\_FUNC\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08247}08247     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08248}08248         attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4] = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08249}08249     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08250}08250 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08251}08251     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}attn: 0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08252}08252           attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[0], attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[1], attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[2], attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[3], attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08253}08253 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08254}08254     \textcolor{keywordflow}{for} (index = 0; index < \mbox{\hyperlink{bxe_8h_a4be94046c812cf4b273d155bef344b98}{MAX\_DYNAMIC\_ATTN\_GRPS}}; index++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08255}08255         \textcolor{keywordflow}{if} (deasserted \& (1 << index)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08256}08256             group\_mask = \&sc-\/>\mbox{\hyperlink{structbxe__softc_abcba09d6d14eff9dd5b4d60b2138b040}{attn\_group}}[index];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08257}08257 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08258}08258             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08259}08259                   \textcolor{stringliteral}{"{}group[\%d]: 0x\%08x 0x\%08x 0x\%08x 0x\%08x 0x\%08x\(\backslash\)n"{}}, index,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08260}08260                   group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[0], group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[1],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08261}08261                   group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[2], group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[3],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08262}08262                   group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08263}08263 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08264}08264             \mbox{\hyperlink{bxe_8c_aaa2d9ec562df10d133b935df488874d3}{bxe\_attn\_int\_deasserted4}}(sc, attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4] \& group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08265}08265             \mbox{\hyperlink{bxe_8c_a59b99b5c43251bdc255e308e9902d5dc}{bxe\_attn\_int\_deasserted3}}(sc, attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[3] \& group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[3]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08266}08266             \mbox{\hyperlink{bxe_8c_ab10f9c441c7538413c3af986d09df89c}{bxe\_attn\_int\_deasserted1}}(sc, attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[1] \& group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[1]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08267}08267             \mbox{\hyperlink{bxe_8c_a4602580c847fd4fa334f92dd4bba35fe}{bxe\_attn\_int\_deasserted2}}(sc, attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[2] \& group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[2]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08268}08268             \mbox{\hyperlink{bxe_8c_a7ad9ff33c0df2dfb55482d6c458a74c0}{bxe\_attn\_int\_deasserted0}}(sc, attn.\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[0] \& group\_mask-\/>\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08269}08269         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08270}08270     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08271}08271 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08272}08272     \mbox{\hyperlink{bxe_8c_adc08a4e509f6809e01a0469de859aee0}{bxe\_release\_alr}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08273}08273 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08274}08274     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08275}08275         \mbox{\hyperlink{structreg__addr}{reg\_addr}} = (\mbox{\hyperlink{ecore__reg_8h_aff36e3445ce3c30c4ce269f0c72da7a8}{HC\_REG\_COMMAND\_REG}} + port*32 +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08276}08276                     \mbox{\hyperlink{ecore__reg_8h_a33d17403c6b963a29013433bfb445269}{COMMAND\_REG\_ATTN\_BITS\_CLR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08277}08277     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08278}08278         \mbox{\hyperlink{structreg__addr}{reg\_addr}} = (\mbox{\hyperlink{ecore__reg_8h_a2464666463aaf0d33403df59a27fa222}{BAR\_IGU\_INTMEM}} + \mbox{\hyperlink{ecore__reg_8h_adf50b2ce0d518cefe99b4ab8047f9e8c}{IGU\_CMD\_ATTN\_BIT\_CLR\_UPPER}}*8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08279}08279     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08280}08280 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08281}08281     val = \string~deasserted;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08282}08282     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08283}08283           \textcolor{stringliteral}{"{}about to mask 0x\%08x at \%s addr 0x\%08x\(\backslash\)n"{}}, val,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08284}08284           (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) ? \textcolor{stringliteral}{"{}HC"{}} : \textcolor{stringliteral}{"{}IGU"{}}, \mbox{\hyperlink{structreg__addr}{reg\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08285}08285     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{structreg__addr}{reg\_addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08286}08286 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08287}08287     \textcolor{keywordflow}{if} (\string~sc-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}} \& deasserted) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08288}08288         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}IGU error\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08289}08289     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08290}08290 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08291}08291     \mbox{\hyperlink{structreg__addr}{reg\_addr}} = port ? \mbox{\hyperlink{ecore__reg_8h_a4fcd4215ad8e23c9de2d50c6b1bfa1aa}{MISC\_REG\_AEU\_MASK\_ATTN\_FUNC\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08292}08292                       \mbox{\hyperlink{ecore__reg_8h_ab4f826eb27e815cd197a08618e789f7b}{MISC\_REG\_AEU\_MASK\_ATTN\_FUNC\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08293}08293 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08294}08294     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1c03b318c8c85fb7b3b312128d4f59b4}{HW\_LOCK\_RESOURCE\_PORT0\_ATT\_MASK}} + port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08295}08295 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08296}08296     aeu\_mask = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{structreg__addr}{reg\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08297}08297 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08298}08298     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}aeu\_mask 0x\%08x newly deasserted 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08299}08299           aeu\_mask, deasserted);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08300}08300     aeu\_mask |= (deasserted \& 0x3ff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08301}08301     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}new mask 0x\%08x\(\backslash\)n"{}}, aeu\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08302}08302 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08303}08303     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{structreg__addr}{reg\_addr}}, aeu\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08304}08304     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1c03b318c8c85fb7b3b312128d4f59b4}{HW\_LOCK\_RESOURCE\_PORT0\_ATT\_MASK}} + port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08305}08305 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08306}08306     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}attn\_state 0x\%08x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08307}08307     sc-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}} \&= \string~deasserted;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08308}08308     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}new state 0x\%08x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08309}08309 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08310}08310 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08311}08311 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08312}\mbox{\hyperlink{bxe_8c_a6f4470b8c8930b3316758adbe89c83b2}{08312}} \mbox{\hyperlink{bxe_8c_a6f4470b8c8930b3316758adbe89c83b2}{bxe\_attn\_int}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08313}08313 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08314}08314     \textcolor{comment}{/* read local copy of bits */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08315}08315     uint32\_t attn\_bits = le32toh(sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}}-\/>\mbox{\hyperlink{structhost__sp__status__block_a76040c72ce0abaf4c97ec0499fb2dcc3}{atten\_status\_block}}.\mbox{\hyperlink{structatten__sp__status__block_a58529b06a798fcbe78327949e22adca7}{attn\_bits}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08316}08316     uint32\_t attn\_ack = le32toh(sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}}-\/>\mbox{\hyperlink{structhost__sp__status__block_a76040c72ce0abaf4c97ec0499fb2dcc3}{atten\_status\_block}}.\mbox{\hyperlink{structatten__sp__status__block_ae7fa8f408c40d9b7c6f1d99994d6b670}{attn\_bits\_ack}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08317}08317     uint32\_t attn\_state = sc-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08318}08318 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08319}08319     \textcolor{comment}{/* look for changed bits */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08320}08320     uint32\_t asserted   =  attn\_bits \& \string~attn\_ack \& \string~attn\_state;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08321}08321     uint32\_t deasserted = \string~attn\_bits \&  attn\_ack \&  attn\_state;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08322}08322 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08323}08323     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08324}08324           \textcolor{stringliteral}{"{}attn\_bits 0x\%08x attn\_ack 0x\%08x asserted 0x\%08x deasserted 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08325}08325           attn\_bits, attn\_ack, asserted, deasserted);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08326}08326 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08327}08327     \textcolor{keywordflow}{if} (\string~(attn\_bits \string^ attn\_ack) \& (attn\_bits \string^ attn\_state)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08328}08328         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}BAD attention state\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08329}08329     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08330}08330 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08331}08331     \textcolor{comment}{/* handle bits that were raised */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08332}08332     \textcolor{keywordflow}{if} (asserted) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08333}08333         \mbox{\hyperlink{bxe_8c_ac352b8b78978529db9b2a891c26c86e9}{bxe\_attn\_int\_asserted}}(sc, asserted);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08334}08334     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08335}08335 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08336}08336     \textcolor{keywordflow}{if} (deasserted) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08337}08337         \mbox{\hyperlink{bxe_8c_ae023dc0420cc594e6e4735426ebecfc9}{bxe\_attn\_int\_deasserted}}(sc, deasserted);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08338}08338     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08339}08339 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08340}08340 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08341}08341 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08342}\mbox{\hyperlink{bxe_8c_a6e274913c96888a6a87526ed10c6b663}{08342}} \mbox{\hyperlink{bxe_8c_a6e274913c96888a6a87526ed10c6b663}{bxe\_update\_dsb\_idx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08343}08343 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08344}08344     \textcolor{keyword}{struct }\mbox{\hyperlink{structhost__sp__status__block}{host\_sp\_status\_block}} *def\_sb = sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08345}08345     uint16\_t rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08346}08346 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08347}08347     mb(); \textcolor{comment}{/* status block is written to by the chip */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08348}08348 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08349}08349     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a6ac25c55dffe3ee7693106e4342ea021}{def\_att\_idx}} != def\_sb-\/>\mbox{\hyperlink{structhost__sp__status__block_a76040c72ce0abaf4c97ec0499fb2dcc3}{atten\_status\_block}}.\mbox{\hyperlink{structatten__sp__status__block_a79493a072825986295bcbd0e3ed8cf47}{attn\_bits\_index}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08350}08350         sc-\/>\mbox{\hyperlink{structbxe__softc_a6ac25c55dffe3ee7693106e4342ea021}{def\_att\_idx}} = def\_sb-\/>\mbox{\hyperlink{structhost__sp__status__block_a76040c72ce0abaf4c97ec0499fb2dcc3}{atten\_status\_block}}.\mbox{\hyperlink{structatten__sp__status__block_a79493a072825986295bcbd0e3ed8cf47}{attn\_bits\_index}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08351}08351         rc |= \mbox{\hyperlink{bxe_8c_abf5ee2425a2a7809e26334200275ded7}{BXE\_DEF\_SB\_ATT\_IDX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08352}08352     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08353}08353 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08354}08354     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_af852c068296d25be2a977b8621cdbeaf}{def\_idx}} != def\_sb-\/>\mbox{\hyperlink{structhost__sp__status__block_a5fcc1e640abdbb18a7e9bf8e10f2ad26}{sp\_sb}}.\mbox{\hyperlink{structhc__sp__status__block_aad27ec794caf76328a7dcca527694ac4}{running\_index}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08355}08355         sc-\/>\mbox{\hyperlink{structbxe__softc_af852c068296d25be2a977b8621cdbeaf}{def\_idx}} = def\_sb-\/>\mbox{\hyperlink{structhost__sp__status__block_a5fcc1e640abdbb18a7e9bf8e10f2ad26}{sp\_sb}}.\mbox{\hyperlink{structhc__sp__status__block_aad27ec794caf76328a7dcca527694ac4}{running\_index}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08356}08356         rc |= \mbox{\hyperlink{bxe_8c_a96802f0fed286b1597566be24d49c60d}{BXE\_DEF\_SB\_IDX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08357}08357     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08358}08358 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08359}08359     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08360}08360 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08361}08361     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08362}08362 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08363}08363 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08364}08364 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__queue__sp__obj}{ecore\_queue\_sp\_obj}} *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08365}\mbox{\hyperlink{bxe_8c_a15e70ac980477992b1bc1aab57dd632f}{08365}} \mbox{\hyperlink{bxe_8c_a15e70ac980477992b1bc1aab57dd632f}{bxe\_cid\_to\_q\_obj}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08366}08366                  uint32\_t         cid)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08367}08367 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08368}08368     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}retrieving fp from cid \%d\(\backslash\)n"{}}, cid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08369}08369     \textcolor{keywordflow}{return} (\&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[\mbox{\hyperlink{bxe_8h_a2f6c710e7e591a0f98f4b71b600de9dd}{CID\_TO\_FP}}(cid, sc)].q\_obj);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08370}08370 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08371}08371 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08372}08372 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08373}\mbox{\hyperlink{bxe_8c_acce0b608027b171d617d83a6e52ef86f}{08373}} \mbox{\hyperlink{bxe_8c_acce0b608027b171d617d83a6e52ef86f}{bxe\_handle\_mcast\_eqe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08374}08374 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08375}08375     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__mcast__ramrod__params}{ecore\_mcast\_ramrod\_params}} rparam;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08376}08376     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08377}08377 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08378}08378     memset(\&rparam, 0, \textcolor{keyword}{sizeof}(rparam));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08379}08379 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08380}08380     rparam.\mbox{\hyperlink{structecore__mcast__ramrod__params_abc5cf4a8ad4c0247a4aeed544a262ac3}{mcast\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08381}08381 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08382}08382     \mbox{\hyperlink{bxe_8h_a35850806b8136932806ab9a1f7f77327}{BXE\_MCAST\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08383}08383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08384}08384     \textcolor{comment}{/* clear pending state for the last command */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08385}08385     sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}}.\mbox{\hyperlink{structecore__mcast__obj_a348be37bbbdcb4061bdca5b87d209c17}{raw}}.\mbox{\hyperlink{structecore__raw__obj_a44bc2642b74615767b466fc292a84c63}{clear\_pending}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}}.\mbox{\hyperlink{structecore__mcast__obj_a348be37bbbdcb4061bdca5b87d209c17}{raw}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08386}08386 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08387}08387     \textcolor{comment}{/* if there are pending mcast commands -\/ send them */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08388}08388     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}}.\mbox{\hyperlink{structecore__mcast__obj_a2b73f4d43e73f5578e6ec1e4eb9638cc}{check\_pending}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08389}08389         rc = \mbox{\hyperlink{ecore__sp_8c_afa16a6379ed01757caf80cbf7c9aa3f4}{ecore\_config\_mcast}}(sc, \&rparam, \mbox{\hyperlink{ecore__sp_8h_ac9e874ecf62c6b5d7ab51553b99d3958a308765f89aff54e43ee25f0a4a010e28}{ECORE\_MCAST\_CMD\_CONT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08390}08390         \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08391}08391             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08392}08392                 \textcolor{stringliteral}{"{}ERROR: Failed to send pending mcast commands (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08393}08393         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08394}08394     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08395}08395 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08396}08396     \mbox{\hyperlink{bxe_8h_a1a12eebcf647954bdcc60198134bccbd}{BXE\_MCAST\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08397}08397 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08398}08398 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08399}08399 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08400}\mbox{\hyperlink{bxe_8c_a5db26c2361e1ff5942bc62e53f23f94d}{08400}} \mbox{\hyperlink{bxe_8c_a5db26c2361e1ff5942bc62e53f23f94d}{bxe\_handle\_classification\_eqe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}      *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08401}08401                               \textcolor{keyword}{union} \mbox{\hyperlink{unionevent__ring__elem}{event\_ring\_elem}} *elem)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08402}08402 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08403}08403     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{structecore__mcast__ramrod__params_a43c3e52becfb66b5c60e2e5932249cfc}{ramrod\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08404}08404     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08405}08405     uint32\_t cid = elem-\/>\mbox{\hyperlink{unionevent__ring__elem_aabab8eec437a55143dd7f5c5e4e30a68}{message}}.\mbox{\hyperlink{structevent__ring__msg_a662b2f34d0030ea16f96f64996e6c020}{data}}.\mbox{\hyperlink{unionevent__data_ac2b2285d545d7d745cbd795fb263e400}{eth\_event}}.\mbox{\hyperlink{structeth__event__data_a12b0a912aa9bd920ba678427a73ec13d}{echo}} \& \mbox{\hyperlink{bxe_8h_adc015d9036bc1496d9efb7eb075a8bf7}{BXE\_SWCID\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08406}08406     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__vlan__mac__obj}{ecore\_vlan\_mac\_obj}} *vlan\_mac\_obj;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08407}08407 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08408}08408     \textcolor{comment}{/* always push next commands out, don't wait here */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08409}08409     bit\_set(\&ramrod\_flags, \mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181face3d408a9bc281e9b22b71144d4a00a2}{RAMROD\_CONT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08410}08410 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08411}08411     \textcolor{keywordflow}{switch} (le32toh(elem-\/>\mbox{\hyperlink{unionevent__ring__elem_aabab8eec437a55143dd7f5c5e4e30a68}{message}}.\mbox{\hyperlink{structevent__ring__msg_a662b2f34d0030ea16f96f64996e6c020}{data}}.\mbox{\hyperlink{unionevent__data_ac2b2285d545d7d745cbd795fb263e400}{eth\_event}}.\mbox{\hyperlink{structeth__event__data_a12b0a912aa9bd920ba678427a73ec13d}{echo}}) >> \mbox{\hyperlink{bxe_8h_a71d019d4d992bf47cdb0b3077e6ce2f8}{BXE\_SWCID\_SHIFT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08412}08412     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034ae82c26f1816a84e74164b04cf0263aca}{ECORE\_FILTER\_MAC\_PENDING}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08413}08413         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}Got SETUP\_MAC completions\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08414}08414         vlan\_mac\_obj = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[cid].\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08415}08415         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08416}08416 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08417}08417     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034a7bfdb3c242f340f8f9157f302afe1ba0}{ECORE\_FILTER\_MCAST\_PENDING}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08418}08418         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}Got SETUP\_MCAST completions\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08419}08419         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08420}08420 \textcolor{comment}{         * This is only relevant for 57710 where multicast MACs are}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08421}08421 \textcolor{comment}{         * configured as unicast MACs using the same ramrod.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08422}08422 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08423}08423         \mbox{\hyperlink{bxe_8c_acce0b608027b171d617d83a6e52ef86f}{bxe\_handle\_mcast\_eqe}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08424}08424         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08425}08425 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08426}08426     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08427}08427         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unsupported classification command: \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08428}08428               elem-\/>\mbox{\hyperlink{unionevent__ring__elem_aabab8eec437a55143dd7f5c5e4e30a68}{message}}.\mbox{\hyperlink{structevent__ring__msg_a662b2f34d0030ea16f96f64996e6c020}{data}}.\mbox{\hyperlink{unionevent__data_ac2b2285d545d7d745cbd795fb263e400}{eth\_event}}.\mbox{\hyperlink{structeth__event__data_a12b0a912aa9bd920ba678427a73ec13d}{echo}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08429}08429         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08430}08430     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08431}08431 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08432}08432     rc = vlan\_mac\_obj-\/>\mbox{\hyperlink{structecore__vlan__mac__obj_a4f5e7798eb3c06ecab1c68a1fc591767}{complete}}(sc, vlan\_mac\_obj, elem, \&ramrod\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08433}08433 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08434}08434     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08435}08435         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to schedule new commands (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08436}08436     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (rc > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08437}08437         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}Scheduled next pending commands...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08438}08438     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08439}08439 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08440}08440 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08441}08441 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08442}\mbox{\hyperlink{bxe_8c_a1eccb34dcc343d67639abd00afef0b6c}{08442}} \mbox{\hyperlink{bxe_8c_a1eccb34dcc343d67639abd00afef0b6c}{bxe\_handle\_rx\_mode\_eqe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}      *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08443}08443                        \textcolor{keyword}{union} \mbox{\hyperlink{unionevent__ring__elem}{event\_ring\_elem}} *elem)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08444}08444 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08445}08445     \mbox{\hyperlink{bxe_8c_ae306d262ff0fe2d113c110cd660e9b19}{bxe\_clear\_bit}}(\mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034aa41f7f61b38d8c20170c09ed945c1fca}{ECORE\_FILTER\_RX\_MODE\_PENDING}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08446}08446 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08447}08447     \textcolor{comment}{/* send rx\_mode command again if was requested */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08448}08448     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_af8691563e9e4141a061514786628bbc2}{bxe\_test\_and\_clear\_bit}}(\mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034acd92a024777ec987a1581edb5ca0b67c}{ECORE\_FILTER\_RX\_MODE\_SCHED}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08449}08449                                \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08450}08450         \mbox{\hyperlink{bxe_8c_a106c35ed5d61fb78b510d88e71a748b2}{bxe\_set\_storm\_rx\_mode}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08451}08451     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08452}08452 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08453}08453 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08454}08454 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08455}\mbox{\hyperlink{bxe_8c_a2e9dc18dd1093a0ea6ff5223a14c35b9}{08455}} \mbox{\hyperlink{bxe_8c_a2e9dc18dd1093a0ea6ff5223a14c35b9}{bxe\_update\_eq\_prod}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08456}08456                    uint16\_t         prod)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08457}08457 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08458}08458     \mbox{\hyperlink{bxe_8c_a94b80518ab58bc31e6dc0cd53996531f}{storm\_memset\_eq\_prod}}(sc, prod, \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08459}08459     wmb(); \textcolor{comment}{/* keep prod updates ordered */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08460}08460 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08461}08461 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08462}08462 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08463}\mbox{\hyperlink{bxe_8c_af6a7b506520ba0beb272666937248b92}{08463}} \mbox{\hyperlink{bxe_8c_af6a7b506520ba0beb272666937248b92}{bxe\_eq\_int}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08464}08464 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08465}08465     uint16\_t hw\_cons, sw\_cons, sw\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08466}08466     \textcolor{keyword}{union }\mbox{\hyperlink{unionevent__ring__elem}{event\_ring\_elem}} *elem;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08467}08467     uint8\_t echo;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08468}08468     uint32\_t cid;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08469}08469     uint8\_t opcode;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08470}08470     \textcolor{keywordtype}{int} spqe\_cnt = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08471}08471     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__queue__sp__obj}{ecore\_queue\_sp\_obj}} *q\_obj;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08472}08472     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__func__sp__obj}{ecore\_func\_sp\_obj}} *f\_obj = \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08473}08473     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__raw__obj}{ecore\_raw\_obj}} *rss\_raw = \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb1cadab33bcd85c5d28e3a17617af92}{rss\_conf\_obj}}.\mbox{\hyperlink{structecore__rss__config__obj_a69771c0698715ec0ac1aacb593c380be}{raw}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08474}08474 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08475}08475     hw\_cons = le16toh(*sc-\/>\mbox{\hyperlink{structbxe__softc_a348cb9fa801fb63c964384d8795e3da8}{eq\_cons\_sb}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08476}08476 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08477}08477     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08478}08478 \textcolor{comment}{     * The hw\_cons range is 1-\/255, 257 -\/ the sw\_cons range is 0-\/254, 256.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08479}08479 \textcolor{comment}{     * when we get to the next-\/page we need to adjust so the loop}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08480}08480 \textcolor{comment}{     * condition below will be met. The next element is the size of a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08481}08481 \textcolor{comment}{     * regular element and hence incrementing by 1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08482}08482 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08483}08483     \textcolor{keywordflow}{if} ((hw\_cons \& \mbox{\hyperlink{bxe_8h_a386dc42ac83e47558792dfa4008882c2}{EQ\_DESC\_MAX\_PAGE}}) == \mbox{\hyperlink{bxe_8h_a386dc42ac83e47558792dfa4008882c2}{EQ\_DESC\_MAX\_PAGE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08484}08484         hw\_cons++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08485}08485     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08486}08486 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08487}08487     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08488}08488 \textcolor{comment}{     * This function may never run in parallel with itself for a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08489}08489 \textcolor{comment}{     * specific sc and no need for a read memory barrier here.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08490}08490 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08491}08491     sw\_cons = sc-\/>\mbox{\hyperlink{structbxe__softc_a7f69d134909bb86c3e44d5a644f418d0}{eq\_cons}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08492}08492     sw\_prod = sc-\/>\mbox{\hyperlink{structbxe__softc_a48554fcb44848d021d560c59a588a152}{eq\_prod}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08493}08493 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08494}08494     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}},\textcolor{stringliteral}{"{}EQ: hw\_cons=\%u sw\_cons=\%u eq\_spq\_left=0x\%lx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08495}08495           hw\_cons, sw\_cons, atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aed766106b28f783ee287253ef2f39a20}{eq\_spq\_left}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08496}08496 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08497}08497     \textcolor{keywordflow}{for} (;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08498}08498          sw\_cons != hw\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08499}08499          sw\_prod = \mbox{\hyperlink{bxe_8h_ac51f285a5d028d2a01fe381497146b8e}{NEXT\_EQ\_IDX}}(sw\_prod), sw\_cons = \mbox{\hyperlink{bxe_8h_ac51f285a5d028d2a01fe381497146b8e}{NEXT\_EQ\_IDX}}(sw\_cons)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08500}08500 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08501}08501         elem = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a20e83974ee742b9647a11a5d8d696b44}{eq}}[\mbox{\hyperlink{bxe_8h_a7c4637d954e1a50611250b24532f45ed}{EQ\_DESC}}(sw\_cons)];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08502}08502 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08503}08503         \textcolor{comment}{/* elem CID originates from FW, actually LE */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08504}08504         \mbox{\hyperlink{structecore__raw__obj_a827df2851155fcc1893a7939849bdebb}{cid}} = \mbox{\hyperlink{bxe_8h_aa23f82e031204b15cef8824469b45863}{SW\_CID}}(elem-\/>\mbox{\hyperlink{unionevent__ring__elem_aabab8eec437a55143dd7f5c5e4e30a68}{message}}.\mbox{\hyperlink{structevent__ring__msg_a662b2f34d0030ea16f96f64996e6c020}{data}}.\mbox{\hyperlink{unionevent__data_abe02c7cf984999012573c3897b6cf9f1}{cfc\_del\_event}}.\mbox{\hyperlink{structcfc__del__event__data_a0c5fc4efeeaa22b346c1a54c71ddafab}{cid}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08505}08505         opcode = elem-\/>\mbox{\hyperlink{unionevent__ring__elem_aabab8eec437a55143dd7f5c5e4e30a68}{message}}.\mbox{\hyperlink{structevent__ring__msg_af5f684edab573a266408488ca4f51cdd}{opcode}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08506}08506 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08507}08507         \textcolor{comment}{/* handle eq element */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08508}08508         \textcolor{keywordflow}{switch} (opcode) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08509}08509 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08510}08510         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a9697f3b8cdf2ce62ae57c4a9b8a72936}{EVENT\_RING\_OPCODE\_STAT\_QUERY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08511}08511             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got statistics completion event \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08512}08512                   sc-\/>\mbox{\hyperlink{structbxe__softc_a3afae9de0b471078d3ea27f00b524c67}{stats\_comp}}++);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08513}08513             \textcolor{comment}{/* nothing to do with stats comp */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08514}08514             \textcolor{keywordflow}{goto} next\_spqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08515}08515 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08516}08516         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a26c27efa3bcf6f3a7c55d57de96ea18e}{EVENT\_RING\_OPCODE\_CFC\_DEL}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08517}08517             \textcolor{comment}{/* handle according to cid range */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08518}08518             \textcolor{comment}{/* we may want to verify here that the sc state is HALTING */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08519}08519             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got delete ramrod for MULTI[\%d]\(\backslash\)n"{}}, \mbox{\hyperlink{structecore__raw__obj_a827df2851155fcc1893a7939849bdebb}{cid}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08520}08520             q\_obj = \mbox{\hyperlink{bxe_8c_a15e70ac980477992b1bc1aab57dd632f}{bxe\_cid\_to\_q\_obj}}(sc, \mbox{\hyperlink{structecore__raw__obj_a827df2851155fcc1893a7939849bdebb}{cid}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08521}08521             \textcolor{keywordflow}{if} (q\_obj-\/>\mbox{\hyperlink{structecore__queue__sp__obj_a5d4a7697e0165d9c286494fc321a9ae9}{complete\_cmd}}(sc, q\_obj, \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a39cff6e8e4e1cae1ec96438e04ad9f81}{ECORE\_Q\_CMD\_CFC\_DEL}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08522}08522                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08523}08523             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08524}08524             \textcolor{keywordflow}{goto} next\_spqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08525}08525 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08526}08526         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4ae8a151a4a52d941ffc37ea4571b6cbc2}{EVENT\_RING\_OPCODE\_STOP\_TRAFFIC}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08527}08527             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got STOP TRAFFIC\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08528}08528             \textcolor{keywordflow}{if} (f\_obj-\/>\mbox{\hyperlink{structecore__func__sp__obj_a0240ada78747109faeb8ba635ab40f22}{complete\_cmd}}(sc, f\_obj, \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8aa8308ab054c84b3318f181eb90e72470}{ECORE\_F\_CMD\_TX\_STOP}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08529}08529                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08530}08530             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08531}08531             \textcolor{comment}{// XXX bxe\_dcbx\_set\_params(sc, BXE\_DCBX\_STATE\_TX\_PAUSED);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08532}08532             \textcolor{keywordflow}{goto} next\_spqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08533}08533 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08534}08534         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a09de8d70ac0c24d435bb9b43fc0eb6aa}{EVENT\_RING\_OPCODE\_START\_TRAFFIC}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08535}08535             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got START TRAFFIC\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08536}08536             \textcolor{keywordflow}{if} (f\_obj-\/>\mbox{\hyperlink{structecore__func__sp__obj_a0240ada78747109faeb8ba635ab40f22}{complete\_cmd}}(sc, f\_obj, \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8a3b93466499e99fba1ac5b2275e8acd44}{ECORE\_F\_CMD\_TX\_START}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08537}08537                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08538}08538             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08539}08539             \textcolor{comment}{// XXX bxe\_dcbx\_set\_params(sc, BXE\_DCBX\_STATE\_TX\_RELEASED);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08540}08540             \textcolor{keywordflow}{goto} next\_spqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08541}08541 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08542}08542         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a7665e58b843ad177859c1b4491b58f5d}{EVENT\_RING\_OPCODE\_FUNCTION\_UPDATE}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08543}08543             echo = elem-\/>\mbox{\hyperlink{unionevent__ring__elem_aabab8eec437a55143dd7f5c5e4e30a68}{message}}.\mbox{\hyperlink{structevent__ring__msg_a662b2f34d0030ea16f96f64996e6c020}{data}}.\mbox{\hyperlink{unionevent__data_a70ed382a5cead0f84939b676064ac2e5}{function\_update\_event}}.\mbox{\hyperlink{structfunction__update__event__data_a36a7c3fdc8b4bcec831b3f64a108d150}{echo}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08544}08544             \textcolor{keywordflow}{if} (echo == \mbox{\hyperlink{ecore__sp_8h_aabfcbcb5ac86a1edac4035264bc7d2b8abee933370e0aaeee414a363a90f435ba}{SWITCH\_UPDATE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08545}08545                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got FUNC\_SWITCH\_UPDATE ramrod\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08546}08546                 \textcolor{keywordflow}{if} (f\_obj-\/>\mbox{\hyperlink{structecore__func__sp__obj_a0240ada78747109faeb8ba635ab40f22}{complete\_cmd}}(sc, f\_obj,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08547}08547                                         \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8ac0471ba1121c4abe16fccc4ff1a4644c}{ECORE\_F\_CMD\_SWITCH\_UPDATE}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08548}08548                     \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08549}08549                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08550}08550             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08551}08551             \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08552}08552                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08553}08553                       \textcolor{stringliteral}{"{}AFEX: ramrod completed FUNCTION\_UPDATE\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08554}08554             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08555}08555             \textcolor{keywordflow}{goto} next\_spqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08556}08556 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08557}08557         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4abf518ab8c24c276bd868140043722f87}{EVENT\_RING\_OPCODE\_FORWARD\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08558}08558             q\_obj = \&\mbox{\hyperlink{bxe_8h_af01fb7033a4b90420e9ed71cb6d4efd6}{bxe\_fwd\_sp\_obj}}(sc, q\_obj);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08559}08559             \textcolor{keywordflow}{if} (q\_obj-\/>\mbox{\hyperlink{structecore__queue__sp__obj_a5d4a7697e0165d9c286494fc321a9ae9}{complete\_cmd}}(sc, q\_obj,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08560}08560                                     \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a315f7ab072d07b93c98062ea8ed819a4}{ECORE\_Q\_CMD\_SETUP\_TX\_ONLY}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08561}08561                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08562}08562             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08563}08563             \textcolor{keywordflow}{goto} next\_spqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08564}08564 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08565}08565         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a1e210ded114dcd3a7000ac0acae0e1f8}{EVENT\_RING\_OPCODE\_FUNCTION\_START}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08566}08566             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got FUNC\_START ramrod\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08567}08567             \textcolor{keywordflow}{if} (f\_obj-\/>\mbox{\hyperlink{structecore__func__sp__obj_a0240ada78747109faeb8ba635ab40f22}{complete\_cmd}}(sc, f\_obj, \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8a061d124f082a00b13c08ebb0cea2341e}{ECORE\_F\_CMD\_START}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08568}08568                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08569}08569             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08570}08570             \textcolor{keywordflow}{goto} next\_spqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08571}08571 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08572}08572         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a32b42ca18d7aa08b19612bcfd8e7ca66}{EVENT\_RING\_OPCODE\_FUNCTION\_STOP}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08573}08573             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got FUNC\_STOP ramrod\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08574}08574             \textcolor{keywordflow}{if} (f\_obj-\/>\mbox{\hyperlink{structecore__func__sp__obj_a0240ada78747109faeb8ba635ab40f22}{complete\_cmd}}(sc, f\_obj, \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8a8aabc2b25b4e5ab429fccbe90395cc36}{ECORE\_F\_CMD\_STOP}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08575}08575                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08576}08576             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08577}08577             \textcolor{keywordflow}{goto} next\_spqe;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08578}08578         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08579}08579 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08580}08580         \textcolor{keywordflow}{switch} (opcode | sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08581}08581         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a6e2b3fa04f76c2d1c10860c707617a00}{EVENT\_RING\_OPCODE\_RSS\_UPDATE\_RULES}} | \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08582}08582         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a6e2b3fa04f76c2d1c10860c707617a00}{EVENT\_RING\_OPCODE\_RSS\_UPDATE\_RULES}} | \mbox{\hyperlink{bxe_8h_afd212c243823aef9ce0df29dd125f422}{BXE\_STATE\_OPENING\_WAITING\_PORT}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08583}08583             \mbox{\hyperlink{structecore__raw__obj_a827df2851155fcc1893a7939849bdebb}{cid}} = elem-\/>\mbox{\hyperlink{unionevent__ring__elem_aabab8eec437a55143dd7f5c5e4e30a68}{message}}.\mbox{\hyperlink{structevent__ring__msg_a662b2f34d0030ea16f96f64996e6c020}{data}}.\mbox{\hyperlink{unionevent__data_ac2b2285d545d7d745cbd795fb263e400}{eth\_event}}.\mbox{\hyperlink{structeth__event__data_a12b0a912aa9bd920ba678427a73ec13d}{echo}} \& \mbox{\hyperlink{bxe_8h_adc015d9036bc1496d9efb7eb075a8bf7}{BXE\_SWCID\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08584}08584             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got RSS\_UPDATE ramrod. CID \%d\(\backslash\)n"{}}, \mbox{\hyperlink{structecore__raw__obj_a827df2851155fcc1893a7939849bdebb}{cid}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08585}08585             rss\_raw-\/>\mbox{\hyperlink{structecore__raw__obj_a44bc2642b74615767b466fc292a84c63}{clear\_pending}}(rss\_raw);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08586}08586             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08587}08587 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08588}08588         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a287409dde22a222af6c75edd45cd855f}{EVENT\_RING\_OPCODE\_SET\_MAC}} | \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08589}08589         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a287409dde22a222af6c75edd45cd855f}{EVENT\_RING\_OPCODE\_SET\_MAC}} | \mbox{\hyperlink{bxe_8h_a289a683aec0ccb4d099aca78ddcda0ff}{BXE\_STATE\_DIAG}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08590}08590         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a287409dde22a222af6c75edd45cd855f}{EVENT\_RING\_OPCODE\_SET\_MAC}} | \mbox{\hyperlink{bxe_8h_a371c6f1be71f0c49e3d82b22f49337d9}{BXE\_STATE\_CLOSING\_WAITING\_HALT}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08591}08591         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4aa81c68a3e51975ab32cbec19967fc5a9}{EVENT\_RING\_OPCODE\_CLASSIFICATION\_RULES}} | \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08592}08592         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4aa81c68a3e51975ab32cbec19967fc5a9}{EVENT\_RING\_OPCODE\_CLASSIFICATION\_RULES}} | \mbox{\hyperlink{bxe_8h_a289a683aec0ccb4d099aca78ddcda0ff}{BXE\_STATE\_DIAG}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08593}08593         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4aa81c68a3e51975ab32cbec19967fc5a9}{EVENT\_RING\_OPCODE\_CLASSIFICATION\_RULES}} | \mbox{\hyperlink{bxe_8h_a371c6f1be71f0c49e3d82b22f49337d9}{BXE\_STATE\_CLOSING\_WAITING\_HALT}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08594}08594             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got (un)set mac ramrod\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08595}08595             \mbox{\hyperlink{bxe_8c_a5db26c2361e1ff5942bc62e53f23f94d}{bxe\_handle\_classification\_eqe}}(sc, elem);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08596}08596             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08597}08597 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08598}08598         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a59302151322f816c806951f3795fdc42}{EVENT\_RING\_OPCODE\_MULTICAST\_RULES}} | \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08599}08599         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a59302151322f816c806951f3795fdc42}{EVENT\_RING\_OPCODE\_MULTICAST\_RULES}} | \mbox{\hyperlink{bxe_8h_a289a683aec0ccb4d099aca78ddcda0ff}{BXE\_STATE\_DIAG}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08600}08600         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a59302151322f816c806951f3795fdc42}{EVENT\_RING\_OPCODE\_MULTICAST\_RULES}} | \mbox{\hyperlink{bxe_8h_a371c6f1be71f0c49e3d82b22f49337d9}{BXE\_STATE\_CLOSING\_WAITING\_HALT}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08601}08601             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got mcast ramrod\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08602}08602             \mbox{\hyperlink{bxe_8c_acce0b608027b171d617d83a6e52ef86f}{bxe\_handle\_mcast\_eqe}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08603}08603             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08604}08604 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08605}08605         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a2c36a58a2674ad997022fe7f8a1613cb}{EVENT\_RING\_OPCODE\_FILTERS\_RULES}} | \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08606}08606         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a2c36a58a2674ad997022fe7f8a1613cb}{EVENT\_RING\_OPCODE\_FILTERS\_RULES}} | \mbox{\hyperlink{bxe_8h_a289a683aec0ccb4d099aca78ddcda0ff}{BXE\_STATE\_DIAG}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08607}08607         \textcolor{keywordflow}{case} (\mbox{\hyperlink{ecore__hsi_8h_a855fd9a010542af8053fd31ef6fadba4a2c36a58a2674ad997022fe7f8a1613cb}{EVENT\_RING\_OPCODE\_FILTERS\_RULES}} | \mbox{\hyperlink{bxe_8h_a371c6f1be71f0c49e3d82b22f49337d9}{BXE\_STATE\_CLOSING\_WAITING\_HALT}}):}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08608}08608             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}got rx\_mode ramrod\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08609}08609             \mbox{\hyperlink{bxe_8c_a1eccb34dcc343d67639abd00afef0b6c}{bxe\_handle\_rx\_mode\_eqe}}(sc, elem);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08610}08610             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08611}08611 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08612}08612         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08613}08613             \textcolor{comment}{/* unknown event log error and continue */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08614}08614             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unknown EQ event \%d, sc-\/>state 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08615}08615                   elem-\/>\mbox{\hyperlink{unionevent__ring__elem_aabab8eec437a55143dd7f5c5e4e30a68}{message}}.\mbox{\hyperlink{structevent__ring__msg_af5f684edab573a266408488ca4f51cdd}{opcode}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08616}08616         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08617}08617 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08618}08618 next\_spqe:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08619}08619         spqe\_cnt++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08620}08620     \} \textcolor{comment}{/* for */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08621}08621 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08622}08622     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08623}08623     atomic\_add\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aed766106b28f783ee287253ef2f39a20}{eq\_spq\_left}}, spqe\_cnt);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08624}08624 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08625}08625     sc-\/>\mbox{\hyperlink{structbxe__softc_a7f69d134909bb86c3e44d5a644f418d0}{eq\_cons}} = sw\_cons;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08626}08626     sc-\/>\mbox{\hyperlink{structbxe__softc_a48554fcb44848d021d560c59a588a152}{eq\_prod}} = sw\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08627}08627 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08628}08628     \textcolor{comment}{/* make sure that above mem writes were issued towards the memory */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08629}08629     wmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08630}08630 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08631}08631     \textcolor{comment}{/* update producer */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08632}08632     \mbox{\hyperlink{bxe_8c_a2e9dc18dd1093a0ea6ff5223a14c35b9}{bxe\_update\_eq\_prod}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a48554fcb44848d021d560c59a588a152}{eq\_prod}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08633}08633 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08634}08634 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08635}08635 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08636}\mbox{\hyperlink{bxe_8c_aa7d10ce01f5ebf6f80a47baed15ea59b}{08636}} \mbox{\hyperlink{bxe_8c_aa7d10ce01f5ebf6f80a47baed15ea59b}{bxe\_handle\_sp\_tq}}(\textcolor{keywordtype}{void} *context,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08637}08637                  \textcolor{keywordtype}{int}  pending)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08638}08638 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08639}08639     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08640}08640     uint16\_t status;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08641}08641 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08642}08642     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}-\/-\/-\/> SP TASK <-\/-\/-\/\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08643}08643 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08644}08644     \textcolor{comment}{/* what work needs to be performed? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08645}08645     status = \mbox{\hyperlink{bxe_8c_a6e274913c96888a6a87526ed10c6b663}{bxe\_update\_dsb\_idx}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08646}08646 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08647}08647     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}dsb status 0x\%04x\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08648}08648 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08649}08649     \textcolor{comment}{/* HW attentions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08650}08650     \textcolor{keywordflow}{if} (status \& \mbox{\hyperlink{bxe_8c_abf5ee2425a2a7809e26334200275ded7}{BXE\_DEF\_SB\_ATT\_IDX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08651}08651         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}-\/-\/-\/> ATTN INTR <-\/-\/-\/\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08652}08652         \mbox{\hyperlink{bxe_8c_a6f4470b8c8930b3316758adbe89c83b2}{bxe\_attn\_int}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08653}08653         status \&= \string~BXE\_DEF\_SB\_ATT\_IDX;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08654}08654     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08655}08655 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08656}08656     \textcolor{comment}{/* SP events: STAT\_QUERY and others */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08657}08657     \textcolor{keywordflow}{if} (status \& \mbox{\hyperlink{bxe_8c_a96802f0fed286b1597566be24d49c60d}{BXE\_DEF\_SB\_IDX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08658}08658         \textcolor{comment}{/* handle EQ completions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08659}08659         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}-\/-\/-\/> EQ INTR <-\/-\/-\/\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08660}08660         \mbox{\hyperlink{bxe_8c_af6a7b506520ba0beb272666937248b92}{bxe\_eq\_int}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08661}08661         \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08662}08662                    le16toh(sc-\/>\mbox{\hyperlink{structbxe__softc_af852c068296d25be2a977b8621cdbeaf}{def\_idx}}), \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08663}08663         status \&= \string~BXE\_DEF\_SB\_IDX;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08664}08664     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08665}08665 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08666}08666     \textcolor{comment}{/* if status is non zero then something went wrong */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08667}08667     \textcolor{keywordflow}{if} (\_\_predict\_false(status)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08668}08668         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Got an unknown SP interrupt! (0x\%04x)\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08669}08669     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08670}08670 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08671}08671     \textcolor{comment}{/* ack status block only if something was actually handled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08672}08672     \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15acaa87a3dcde4d68946835b794e3c321b}{ATTENTION\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08673}08673                le16toh(sc-\/>\mbox{\hyperlink{structbxe__softc_a6ac25c55dffe3ee7693106e4342ea021}{def\_att\_idx}}), \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a52689eae4ee0744b9fcdc3ca6062fb7c}{IGU\_INT\_ENABLE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08674}08674 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08675}08675     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08676}08676 \textcolor{comment}{     * Must be called after the EQ processing (since eq leads to sriov}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08677}08677 \textcolor{comment}{     * ramrod completion flows).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08678}08678 \textcolor{comment}{     * This flow may have been scheduled by the arrival of a ramrod}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08679}08679 \textcolor{comment}{     * completion, or by the sriov code rescheduling itself.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08680}08680 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08681}08681     \textcolor{comment}{// XXX bxe\_iov\_sp\_task(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08682}08682 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08683}08683 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08684}08684 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08685}08685 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08686}\mbox{\hyperlink{bxe_8c_ae847039a954f9e4ab1a6354cd3a1535d}{08686}} \mbox{\hyperlink{bxe_8c_ae847039a954f9e4ab1a6354cd3a1535d}{bxe\_handle\_fp\_tq}}(\textcolor{keywordtype}{void} *\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08687}08687                  \textcolor{keywordtype}{int}  pending)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08688}08688 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08689}08689     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *)context;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08690}08690     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08691}08691     uint8\_t more\_tx = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08692}08692     uint8\_t more\_rx = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08693}08693 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08694}08694     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}-\/-\/-\/> FP TASK QUEUE (\%d) <-\/-\/-\/\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08695}08695 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08696}08696     \textcolor{comment}{/* XXX}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08697}08697 \textcolor{comment}{     * IFF\_DRV\_RUNNING state can't be checked here since we process}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08698}08698 \textcolor{comment}{     * slowpath events on a client queue during setup. Instead}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08699}08699 \textcolor{comment}{     * we need to add a "{}process/continue"{} flag here that the driver}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08700}08700 \textcolor{comment}{     * can use to tell the task here not to do anything.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08701}08701 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08702}08702 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08703}08703     \textcolor{keywordflow}{if} (!(if\_getdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08704}08704         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08705}08705     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08706}08706 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08707}08707 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08708}08708     \textcolor{comment}{/* update the fastpath index */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08709}08709     \mbox{\hyperlink{bxe_8h_a731eedf8419a0ef01fc697c1beb6119d}{bxe\_update\_fp\_sb\_idx}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08710}08710 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08711}08711     \textcolor{comment}{/* XXX add loop here if ever support multiple tx CoS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08712}08712     \textcolor{comment}{/* fp-\/>txdata[cos] */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08713}08713     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a2386a1eee885f63fc4f65169c38bb1d8}{bxe\_has\_tx\_work}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08714}08714         \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08715}08715         more\_tx = \mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{bxe\_txeof}}(sc, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08716}08716         \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08717}08717     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08718}08718 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08719}08719     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a38e828ced0b431f68f948b69a67adf05}{bxe\_has\_rx\_work}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08720}08720         more\_rx = \mbox{\hyperlink{bxe_8c_a686ef9c83cbbe9b76a38c5c8cd87bd7c}{bxe\_rxeof}}(sc, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08721}08721     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08722}08722 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08723}08723     \textcolor{keywordflow}{if} (more\_rx \textcolor{comment}{/*|| more\_tx*/}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08724}08724         \textcolor{comment}{/* still more work to do */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08725}08725         taskqueue\_enqueue(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a03807e1c0e8b88148c6b117d2b864b15}{tq\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08726}08726         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08727}08727     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08728}08728 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08729}08729     \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08730}08730                le16toh(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a96231a72b99e8d1dcecd6b74985b71eb}{fp\_hc\_idx}}), \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a52689eae4ee0744b9fcdc3ca6062fb7c}{IGU\_INT\_ENABLE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08731}08731 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08732}08732 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08733}08733 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08734}\mbox{\hyperlink{bxe_8c_a0047f2fdf8f5001c01890e42fb8e1831}{08734}} \mbox{\hyperlink{bxe_8c_a0047f2fdf8f5001c01890e42fb8e1831}{bxe\_task\_fp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08735}08735 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08736}08736     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08737}08737     uint8\_t more\_tx = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08738}08738     uint8\_t more\_rx = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08739}08739 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08740}08740     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}-\/-\/-\/> FP TASK ISR (\%d) <-\/-\/-\/\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08741}08741 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08742}08742     \textcolor{comment}{/* update the fastpath index */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08743}08743     \mbox{\hyperlink{bxe_8h_a731eedf8419a0ef01fc697c1beb6119d}{bxe\_update\_fp\_sb\_idx}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08744}08744 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08745}08745     \textcolor{comment}{/* XXX add loop here if ever support multiple tx CoS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08746}08746     \textcolor{comment}{/* fp-\/>txdata[cos] */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08747}08747     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a2386a1eee885f63fc4f65169c38bb1d8}{bxe\_has\_tx\_work}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08748}08748         \mbox{\hyperlink{bxe_8h_a5092b0dc3266b5abaca13a9ec97d4473}{BXE\_FP\_TX\_LOCK}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08749}08749         more\_tx = \mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{bxe\_txeof}}(sc, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08750}08750         \mbox{\hyperlink{bxe_8h_a5aa9872697d2dbb83f8bb6e5144f4775}{BXE\_FP\_TX\_UNLOCK}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08751}08751     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08752}08752 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08753}08753     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a38e828ced0b431f68f948b69a67adf05}{bxe\_has\_rx\_work}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08754}08754         more\_rx = \mbox{\hyperlink{bxe_8c_a686ef9c83cbbe9b76a38c5c8cd87bd7c}{bxe\_rxeof}}(sc, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08755}08755     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08756}08756 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08757}08757     \textcolor{keywordflow}{if} (more\_rx \textcolor{comment}{/*|| more\_tx*/}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08758}08758         \textcolor{comment}{/* still more work to do, bail out if this ISR and process later */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08759}08759         taskqueue\_enqueue(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a03807e1c0e8b88148c6b117d2b864b15}{tq\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08760}08760         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08761}08761     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08762}08762 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08763}08763     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08764}08764 \textcolor{comment}{     * Here we write the fastpath index taken before doing any tx or rx work.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08765}08765 \textcolor{comment}{     * It is very well possible other hw events occurred up to this point and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08766}08766 \textcolor{comment}{     * they were actually processed accordingly above. Since we're going to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08767}08767 \textcolor{comment}{     * write an older fastpath index, an interrupt is coming which we might}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08768}08768 \textcolor{comment}{     * not do any work in.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08769}08769 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08770}08770     \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08771}08771                le16toh(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a96231a72b99e8d1dcecd6b74985b71eb}{fp\_hc\_idx}}), \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a52689eae4ee0744b9fcdc3ca6062fb7c}{IGU\_INT\_ENABLE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08772}08772 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08773}08773 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08774}08774 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08775}08775 \textcolor{comment}{ * Legacy interrupt entry point.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08776}08776 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08777}08777 \textcolor{comment}{ * Verifies that the controller generated the interrupt and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08778}08778 \textcolor{comment}{ * then calls a separate routine to handle the various}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08779}08779 \textcolor{comment}{ * interrupt causes: link, RX, and TX.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08780}08780 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08781}08781 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08782}\mbox{\hyperlink{bxe_8c_af8f929f4686234c53e4019f9e056a8ad}{08782}} \mbox{\hyperlink{bxe_8c_af8f929f4686234c53e4019f9e056a8ad}{bxe\_intr\_legacy}}(\textcolor{keywordtype}{void} *xsc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08783}08783 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08784}08784     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)xsc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08785}08785     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08786}08786     uint16\_t status, mask;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08787}08787     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08788}08788 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08789}08789     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}-\/-\/-\/> BXE INTx <-\/-\/-\/\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08790}08790 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08791}08791     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08792}08792 \textcolor{comment}{     * 0 for ustorm, 1 for cstorm}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08793}08793 \textcolor{comment}{     * the bits returned from ack\_int() are 0-\/15}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08794}08794 \textcolor{comment}{     * bit 0 = attention status block}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08795}08795 \textcolor{comment}{     * bit 1 = fast path status block}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08796}08796 \textcolor{comment}{     * a mask of 0x2 or more = tx/rx event}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08797}08797 \textcolor{comment}{     * a mask of 1 = slow path event}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08798}08798 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08799}08799 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08800}08800     status = \mbox{\hyperlink{bxe_8h_aaf2d752cd34446539edc84399c4d6ab0}{bxe\_ack\_int}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08801}08801 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08802}08802     \textcolor{comment}{/* the interrupt is not for us */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08803}08803     \textcolor{keywordflow}{if} (\_\_predict\_false(status == 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08804}08804         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}Not our interrupt!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08805}08805         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08806}08806     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08807}08807 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08808}08808     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}Interrupt status 0x\%04x\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08809}08809 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08810}08810     \mbox{\hyperlink{bxe_8h_a1cb7bdf9bd5d0d7441582179871291ba}{FOR\_EACH\_ETH\_QUEUE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08811}08811         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08812}08812         mask = (0x2 << (fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}} + \mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08813}08813         \textcolor{keywordflow}{if} (status \& mask) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08814}08814             \textcolor{comment}{/* acknowledge and disable further fastpath interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08815}08815             \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16abe7329ad1beb1efff4789b8bbbd8aff6}{IGU\_INT\_DISABLE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08816}08816             \mbox{\hyperlink{bxe_8c_a0047f2fdf8f5001c01890e42fb8e1831}{bxe\_task\_fp}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08817}08817             status \&= \string~mask;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08818}08818         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08819}08819     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08820}08820 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08821}08821     \textcolor{keywordflow}{if} (\_\_predict\_false(status \& 0x1)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08822}08822         \textcolor{comment}{/* acknowledge and disable further slowpath interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08823}08823         \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16abe7329ad1beb1efff4789b8bbbd8aff6}{IGU\_INT\_DISABLE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08824}08824 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08825}08825         \textcolor{comment}{/* schedule slowpath handler */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08826}08826         taskqueue\_enqueue(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0c2dcc3aed8cf5793969e531f580269e}{sp\_tq\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08827}08827 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08828}08828         status \&= \string~0x1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08829}08829     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08830}08830 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08831}08831     \textcolor{keywordflow}{if} (\_\_predict\_false(status)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08832}08832         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Unexpected fastpath status (0x\%08x)!\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08833}08833     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08834}08834 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08835}08835 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08836}08836 \textcolor{comment}{/* slowpath interrupt entry point */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08837}08837 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08838}\mbox{\hyperlink{bxe_8c_a683fe235bf6847c5120e292bef126514}{08838}} \mbox{\hyperlink{bxe_8c_a683fe235bf6847c5120e292bef126514}{bxe\_intr\_sp}}(\textcolor{keywordtype}{void} *xsc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08839}08839 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08840}08840     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)xsc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08841}08841 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08842}08842     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, (\mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}} | \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}), \textcolor{stringliteral}{"{}-\/-\/-\/> SP INTR <-\/-\/-\/\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08843}08843 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08844}08844     \textcolor{comment}{/* acknowledge and disable further slowpath interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08845}08845     \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16abe7329ad1beb1efff4789b8bbbd8aff6}{IGU\_INT\_DISABLE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08846}08846 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08847}08847     \textcolor{comment}{/* schedule slowpath handler */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08848}08848     taskqueue\_enqueue(sc-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a0c2dcc3aed8cf5793969e531f580269e}{sp\_tq\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08849}08849 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08850}08850 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08851}08851 \textcolor{comment}{/* fastpath interrupt entry point */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08852}08852 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08853}\mbox{\hyperlink{bxe_8c_a4312f2434eca383cf4567846ded70d29}{08853}} \mbox{\hyperlink{bxe_8c_a4312f2434eca383cf4567846ded70d29}{bxe\_intr\_fp}}(\textcolor{keywordtype}{void} *xfp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08854}08854 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08855}08855     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *)xfp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08856}08856     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08857}08857 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08858}08858     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}-\/-\/-\/> FP INTR \%d <-\/-\/-\/\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08859}08859 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08860}08860     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08861}08861           \textcolor{stringliteral}{"{}(cpu=\%d) MSI-\/X fp=\%d fw\_sb=\%d igu\_sb=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08862}08862           curcpu, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a210f7120d5922e380b3210ee6de6a625}{fw\_sb\_id}}, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08863}08863 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08864}08864     \textcolor{comment}{/* acknowledge and disable further fastpath interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08865}08865     \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, \mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16abe7329ad1beb1efff4789b8bbbd8aff6}{IGU\_INT\_DISABLE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08866}08866 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08867}08867     \mbox{\hyperlink{bxe_8c_a0047f2fdf8f5001c01890e42fb8e1831}{bxe\_task\_fp}}(\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08868}08868 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08869}08869 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08870}08870 \textcolor{comment}{/* Release all interrupts allocated by the driver. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08871}08871 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08872}\mbox{\hyperlink{bxe_8c_aa91fd1c1831cf7d6a8d01f13592565b5}{08872}} \mbox{\hyperlink{bxe_8c_aa91fd1c1831cf7d6a8d01f13592565b5}{bxe\_interrupt\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08873}08873 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08874}08874     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08875}08875 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08876}08876     \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08877}08877     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a8751ecbe17c1e745b0042dc7d6daed26}{INTR\_MODE\_INTX}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08878}08878         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Releasing legacy INTx vector\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08879}08879         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08880}08880             bus\_release\_resource(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08881}08881                                  SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08882}08882                                  sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08883}08883                                  sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08884}08884         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08885}08885         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08886}08886     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08887}08887         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08888}08888             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Releasing MSI vector \%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08889}08889             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}} \&\& sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08890}08890                 bus\_release\_resource(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08891}08891                                      SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08892}08892                                      sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08893}08893                                      sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08894}08894             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08895}08895         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08896}08896         pci\_release\_msi(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08897}08897         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08898}08898     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08899}08899         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08900}08900             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Releasing MSI-\/X vector \%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08901}08901             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}} \&\& sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08902}08902                 bus\_release\_resource(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08903}08903                                      SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08904}08904                                      sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08905}08905                                      sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08906}08906             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08907}08907         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08908}08908         pci\_release\_msi(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08909}08909         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08910}08910     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08911}08911         \textcolor{comment}{/* nothing to do as initial allocation failed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08912}08912         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08913}08913     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08914}08914 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08915}08915 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08916}08916 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08917}08917 \textcolor{comment}{ * This function determines and allocates the appropriate}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08918}08918 \textcolor{comment}{ * interrupt based on system capabilites and user request.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08919}08919 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08920}08920 \textcolor{comment}{ * The user may force a particular interrupt mode, specify}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08921}08921 \textcolor{comment}{ * the number of receive queues, specify the method for}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08922}08922 \textcolor{comment}{ * distribuitng received frames to receive queues, or use}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08923}08923 \textcolor{comment}{ * the default settings which will automatically select the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08924}08924 \textcolor{comment}{ * best supported combination.  In addition, the OS may or}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08925}08925 \textcolor{comment}{ * may not support certain combinations of these settings.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08926}08926 \textcolor{comment}{ * This routine attempts to reconcile the settings requested}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08927}08927 \textcolor{comment}{ * by the user with the capabilites available from the system}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08928}08928 \textcolor{comment}{ * to select the optimal combination of features.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08929}08929 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08930}08930 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08931}08931 \textcolor{comment}{ *   0 = Success, !0 = Failure.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08932}08932 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08933}08933 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08934}\mbox{\hyperlink{bxe_8c_a7ee987166661b7359d806a8c03662893}{08934}} \mbox{\hyperlink{bxe_8c_a7ee987166661b7359d806a8c03662893}{bxe\_interrupt\_alloc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08935}08935 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08936}08936     \textcolor{keywordtype}{int} msix\_count = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08937}08937     \textcolor{keywordtype}{int} msi\_count = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08938}08938     \textcolor{keywordtype}{int} num\_requested = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08939}08939     \textcolor{keywordtype}{int} num\_allocated = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08940}08940     \textcolor{keywordtype}{int} rid, i, j;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08941}08941     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08942}08942 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08943}08943     \textcolor{comment}{/* get the number of available MSI/MSI-\/X interrupts from the OS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08944}08944     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08945}08945         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} \& \mbox{\hyperlink{bxe_8h_a3e2c0aaf911e86628b74b189c0e1a3a8}{BXE\_MSIX\_CAPABLE\_FLAG}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08946}08946             msix\_count = pci\_msix\_count(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08947}08947         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08948}08948 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08949}08949         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} \& \mbox{\hyperlink{bxe_8h_a5a9a3bd22c6b1448c3a7927044be26eb}{BXE\_MSI\_CAPABLE\_FLAG}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08950}08950             msi\_count = pci\_msi\_count(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08951}08951         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08952}08952 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08953}08953         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\%d MSI and \%d MSI-\/X vectors available\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08954}08954               msi\_count, msix\_count);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08955}08955     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08956}08956 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08957}08957     \textcolor{keywordflow}{do} \{ \textcolor{comment}{/* try allocating MSI-\/X interrupt resources (at least 2) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08958}08958         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} != \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08959}08959             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08960}08960         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08961}08961 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08962}08962         \textcolor{keywordflow}{if} (((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} \& \mbox{\hyperlink{bxe_8h_a3e2c0aaf911e86628b74b189c0e1a3a8}{BXE\_MSIX\_CAPABLE\_FLAG}}) == 0) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08963}08963             (msix\_count < 2)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08964}08964             sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}; \textcolor{comment}{/* try MSI next */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08965}08965             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08966}08966         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08967}08967 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08968}08968         \textcolor{comment}{/* ask for the necessary number of MSI-\/X vectors */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08969}08969         num\_requested = min((sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} + 1), msix\_count);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08970}08970 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08971}08971         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Requesting \%d MSI-\/X vectors\(\backslash\)n"{}}, num\_requested);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08972}08972 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08973}08973         num\_allocated = num\_requested;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08974}08974         \textcolor{keywordflow}{if} ((rc = pci\_alloc\_msix(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \&num\_allocated)) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08975}08975             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MSI-\/X alloc failed! (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08976}08976             sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}; \textcolor{comment}{/* try MSI next */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08977}08977             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08978}08978         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08979}08979 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08980}08980         \textcolor{keywordflow}{if} (num\_allocated < 2) \{ \textcolor{comment}{/* possible? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08981}08981             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MSI-\/X allocation less than 2!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08982}08982             sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}; \textcolor{comment}{/* try MSI next */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08983}08983             pci\_release\_msi(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08984}08984             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08985}08985         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08986}08986 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08987}08987         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}MSI-\/X vectors Requested \%d and Allocated \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08988}08988               num\_requested, num\_allocated);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08989}08989 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08990}08990         \textcolor{comment}{/* best effort so use the number of vectors allocated to us */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08991}08991         sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}} = num\_allocated;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08992}08992         sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} = num\_allocated -\/ 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08993}08993 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08994}08994         rid = 1; \textcolor{comment}{/* initial resource identifier */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08995}08995 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08996}08996         \textcolor{comment}{/* allocate the MSI-\/X vectors */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08997}08997         \textcolor{keywordflow}{for} (i = 0; i < num\_allocated; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08998}08998             sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}} = (rid + i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l08999}08999 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09000}09000             \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09001}09001                  bus\_alloc\_resource\_any(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09002}09002                                         SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09003}09003                                         \&sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09004}09004                                         RF\_ACTIVE)) == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09005}09005                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to map MSI-\/X[\%d] (rid=\%d)!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09006}09006                       i, (rid + i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09007}09007 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09008}09008                 \textcolor{keywordflow}{for} (j = (i -\/ 1); j >= 0; j-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09009}09009                     bus\_release\_resource(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09010}09010                                          SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09011}09011                                          sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[j].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09012}09012                                          sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[j].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09013}09013                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09014}09014 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09015}09015                 sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09016}09016                 sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09017}09017                 sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}; \textcolor{comment}{/* try MSI next */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09018}09018                 pci\_release\_msi(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09019}09019                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09020}09020             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09021}09021 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09022}09022             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Mapped MSI-\/X[\%d] (rid=\%d)\(\backslash\)n"{}}, i, (rid + i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09023}09023         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09024}09024     \} \textcolor{keywordflow}{while} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09025}09025 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09026}09026     \textcolor{keywordflow}{do} \{ \textcolor{comment}{/* try allocating MSI vector resources (at least 2) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09027}09027         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} != \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09028}09028             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09029}09029         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09030}09030 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09031}09031         \textcolor{keywordflow}{if} (((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} \& \mbox{\hyperlink{bxe_8h_a5a9a3bd22c6b1448c3a7927044be26eb}{BXE\_MSI\_CAPABLE\_FLAG}}) == 0) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09032}09032             (msi\_count < 1)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09033}09033             sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_a8751ecbe17c1e745b0042dc7d6daed26}{INTR\_MODE\_INTX}}; \textcolor{comment}{/* try INTx next */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09034}09034             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09035}09035         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09036}09036 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09037}09037         \textcolor{comment}{/* ask for a single MSI vector */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09038}09038         num\_requested = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09039}09039 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09040}09040         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Requesting \%d MSI vectors\(\backslash\)n"{}}, num\_requested);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09041}09041 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09042}09042         num\_allocated = num\_requested;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09043}09043         \textcolor{keywordflow}{if} ((rc = pci\_alloc\_msi(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \&num\_allocated)) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09044}09044             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MSI alloc failed (\%d)!\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09045}09045             sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_a8751ecbe17c1e745b0042dc7d6daed26}{INTR\_MODE\_INTX}}; \textcolor{comment}{/* try INTx next */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09046}09046             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09047}09047         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09048}09048 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09049}09049         \textcolor{keywordflow}{if} (num\_allocated != 1) \{ \textcolor{comment}{/* possible? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09050}09050             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MSI allocation is not 1!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09051}09051             sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_a8751ecbe17c1e745b0042dc7d6daed26}{INTR\_MODE\_INTX}}; \textcolor{comment}{/* try INTx next */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09052}09052             pci\_release\_msi(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09053}09053             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09054}09054         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09055}09055 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09056}09056         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}MSI vectors Requested \%d and Allocated \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09057}09057               num\_requested, num\_allocated);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09058}09058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09059}09059         \textcolor{comment}{/* best effort so use the number of vectors allocated to us */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09060}09060         sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}} = num\_allocated;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09061}09061         sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} = num\_allocated;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09062}09062 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09063}09063         rid = 1; \textcolor{comment}{/* initial resource identifier */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09064}09064 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09065}09065         sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}} = rid;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09066}09066 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09067}09067         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09068}09068              bus\_alloc\_resource\_any(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09069}09069                                     SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09070}09070                                     \&sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09071}09071                                     RF\_ACTIVE)) == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09072}09072             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to map MSI[0] (rid=\%d)!\(\backslash\)n"{}}, rid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09073}09073             sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09074}09074             sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09075}09075             sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_a8751ecbe17c1e745b0042dc7d6daed26}{INTR\_MODE\_INTX}}; \textcolor{comment}{/* try INTx next */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09076}09076             pci\_release\_msi(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09077}09077             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09078}09078         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09079}09079 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09080}09080         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Mapped MSI[0] (rid=\%d)\(\backslash\)n"{}}, rid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09081}09081     \} \textcolor{keywordflow}{while} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09082}09082 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09083}09083     \textcolor{keywordflow}{do} \{ \textcolor{comment}{/* try allocating INTx vector resources */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09084}09084         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} != \mbox{\hyperlink{bxe_8h_a8751ecbe17c1e745b0042dc7d6daed26}{INTR\_MODE\_INTX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09085}09085             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09086}09086         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09087}09087 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09088}09088         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Requesting legacy INTx interrupt\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09089}09089 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09090}09090         \textcolor{comment}{/* only one vector for INTx */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09091}09091         sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09092}09092         sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09093}09093 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09094}09094         rid = 0; \textcolor{comment}{/* initial resource identifier */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09095}09095 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09096}09096         sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}} = rid;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09097}09097 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09098}09098         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09099}09099              bus\_alloc\_resource\_any(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09100}09100                                     SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09101}09101                                     \&sc-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a8e8414fb13db2dec0f9bdb7208f66cbb}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09102}09102                                     (RF\_ACTIVE | RF\_SHAREABLE))) == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09103}09103             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to map INTx (rid=\%d)!\(\backslash\)n"{}}, rid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09104}09104             sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09105}09105             sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09106}09106             sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} = -\/1; \textcolor{comment}{/* Failed! */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09107}09107             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09108}09108         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09109}09109 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09110}09110         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Mapped INTx (rid=\%d)\(\backslash\)n"{}}, rid);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09111}09111     \} \textcolor{keywordflow}{while} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09112}09112 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09113}09113     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == -\/1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09114}09114         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Interrupt Allocation: FAILED!!!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09115}09115         rc = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09116}09116     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09117}09117         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09118}09118               \textcolor{stringliteral}{"{}Interrupt Allocation: interrupt\_mode=\%d, num\_queues=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09119}09119               sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}}, sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09120}09120         rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09121}09121     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09122}09122 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09123}09123     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09124}09124 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09125}09125 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09126}09126 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09127}\mbox{\hyperlink{bxe_8c_afaf5ed29d000f45cc1191ed8e8e20c83}{09127}} \mbox{\hyperlink{bxe_8c_afaf5ed29d000f45cc1191ed8e8e20c83}{bxe\_interrupt\_detach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09128}09128 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09129}09129     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09130}09130     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09131}09131 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09132}09132     \textcolor{comment}{/* release interrupt resources */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09133}09133     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09134}09134         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}} \&\& \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_af21fb0eff01da30713384b8f87248b1d}{tag}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09135}09135             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Disabling interrupt vector \%d\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09136}09136             bus\_teardown\_intr(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i].\mbox{\hyperlink{structbxe__intr_af21fb0eff01da30713384b8f87248b1d}{tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09137}09137         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09138}09138     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09139}09139 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09140}09140     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09141}09141         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09142}09142         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09143}09143             taskqueue\_drain(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a03807e1c0e8b88148c6b117d2b864b15}{tq\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09144}09144             taskqueue\_drain(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a10e00c04266e87eef5c9b6998b8aa692}{tx\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09145}09145             \textcolor{keywordflow}{while} (taskqueue\_cancel\_timeout(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad619c9f0f24a11d8ce137e64c49fb88b}{tx\_timeout\_task}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09146}09146                 NULL))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09147}09147                 taskqueue\_drain\_timeout(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad619c9f0f24a11d8ce137e64c49fb88b}{tx\_timeout\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09148}09148         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09149}09149 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09150}09150         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09151}09151             fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09152}09152             \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09153}09153                 taskqueue\_free(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09154}09154                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09155}09155             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09156}09156         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09157}09157     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09158}09158 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09159}09159     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09160}09160         taskqueue\_drain(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0c2dcc3aed8cf5793969e531f580269e}{sp\_tq\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09161}09161         taskqueue\_free(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09162}09162         \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09163}09163     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09164}09164 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09165}09165 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09166}09166 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09167}09167 \textcolor{comment}{ * Enables interrupts and attach to the ISR.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09168}09168 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09169}09169 \textcolor{comment}{ * When using multiple MSI/MSI-\/X vectors the first vector}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09170}09170 \textcolor{comment}{ * is used for slowpath operations while all remaining}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09171}09171 \textcolor{comment}{ * vectors are used for fastpath operations.  If only a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09172}09172 \textcolor{comment}{ * single MSI/MSI-\/X vector is used (SINGLE\_ISR) then the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09173}09173 \textcolor{comment}{ * ISR must look for both slowpath and fastpath completions.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09174}09174 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09175}09175 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09176}\mbox{\hyperlink{bxe_8c_af4f1b847084fa10eb260873fa4e01504}{09176}} \mbox{\hyperlink{bxe_8c_af4f1b847084fa10eb260873fa4e01504}{bxe\_interrupt\_attach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09177}09177 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09178}09178     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09179}09179     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09180}09180     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09181}09181 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09182}09182     snprintf(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a57389c0e5023282c65b9821ab6755883}{sp\_tq\_name}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a57389c0e5023282c65b9821ab6755883}{sp\_tq\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09183}09183              \textcolor{stringliteral}{"{}bxe\%d\_sp\_tq"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09184}09184     TASK\_INIT(\&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0c2dcc3aed8cf5793969e531f580269e}{sp\_tq\_task}}, 0, \mbox{\hyperlink{bxe_8c_aa7d10ce01f5ebf6f80a47baed15ea59b}{bxe\_handle\_sp\_tq}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09185}09185     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}} = taskqueue\_create(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a57389c0e5023282c65b9821ab6755883}{sp\_tq\_name}}, M\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09186}09186                                  taskqueue\_thread\_enqueue,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09187}09187                                  \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09188}09188     taskqueue\_start\_threads(\&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aa731a29e9ed7472d1a97dc69399f9095}{sp\_tq}}, 1, PWAIT, \textcolor{comment}{/* lower priority */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09189}09189                             \textcolor{stringliteral}{"{}\%s"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a57389c0e5023282c65b9821ab6755883}{sp\_tq\_name}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09190}09190 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09191}09191 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09192}09192     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09193}09193         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09194}09194         snprintf(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9421274c32540b457147973036a759c4}{tq\_name}}, \textcolor{keyword}{sizeof}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9421274c32540b457147973036a759c4}{tq\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09195}09195                  \textcolor{stringliteral}{"{}bxe\%d\_fp\%d\_tq"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09196}09196         NET\_TASK\_INIT(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a03807e1c0e8b88148c6b117d2b864b15}{tq\_task}}, 0, \mbox{\hyperlink{bxe_8c_ae847039a954f9e4ab1a6354cd3a1535d}{bxe\_handle\_fp\_tq}}, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09197}09197         TASK\_INIT(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a10e00c04266e87eef5c9b6998b8aa692}{tx\_task}}, 0, \mbox{\hyperlink{bxe_8c_aa5dfd872b825984af3cbe103b19465a2}{bxe\_tx\_mq\_start\_deferred}}, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09198}09198         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}} = taskqueue\_create(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9421274c32540b457147973036a759c4}{tq\_name}}, M\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09199}09199                                   taskqueue\_thread\_enqueue,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09200}09200                                   \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09201}09201         TIMEOUT\_TASK\_INIT(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad619c9f0f24a11d8ce137e64c49fb88b}{tx\_timeout\_task}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09202}09202                           \mbox{\hyperlink{bxe_8c_aa5dfd872b825984af3cbe103b19465a2}{bxe\_tx\_mq\_start\_deferred}}, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09203}09203         taskqueue\_start\_threads(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a962de166a27fc7e407b7f96bcee6dabc}{tq}}, 1, PI\_NET, \textcolor{comment}{/* higher priority */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09204}09204                                 \textcolor{stringliteral}{"{}\%s"{}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9421274c32540b457147973036a759c4}{tq\_name}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09205}09205     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09206}09206 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09207}09207     \textcolor{comment}{/* setup interrupt handlers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09208}09208     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09209}09209         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Enabling slowpath MSI-\/X[0] vector\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09210}09210 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09211}09211         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09212}09212 \textcolor{comment}{         * Setup the interrupt handler. Note that we pass the driver instance}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09213}09213 \textcolor{comment}{         * to the interrupt handler for the slowpath.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09214}09214 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09215}09215         \textcolor{keywordflow}{if} ((rc = bus\_setup\_intr(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09216}09216                                  (INTR\_TYPE\_NET | INTR\_MPSAFE),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09217}09217                                  NULL, \mbox{\hyperlink{bxe_8c_a683fe235bf6847c5120e292bef126514}{bxe\_intr\_sp}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09218}09218                                  \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_af21fb0eff01da30713384b8f87248b1d}{tag}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09219}09219             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Failed to allocate MSI-\/X[0] vector (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09220}09220             \textcolor{keywordflow}{goto} bxe\_interrupt\_attach\_exit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09221}09221         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09222}09222 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09223}09223         bus\_describe\_intr(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09224}09224                           \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_af21fb0eff01da30713384b8f87248b1d}{tag}}, \textcolor{stringliteral}{"{}sp"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09225}09225 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09226}09226         \textcolor{comment}{/* bus\_bind\_intr(sc-\/>dev, sc-\/>intr[0].resource, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09227}09227 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09228}09228         \textcolor{comment}{/* initialize the fastpath vectors (note the first was used for sp) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09229}09229         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09230}09230             fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09231}09231             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Enabling MSI-\/X[\%d] vector\(\backslash\)n"{}}, (i + 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09232}09232 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09233}09233             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09234}09234 \textcolor{comment}{             * Setup the interrupt handler. Note that we pass the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09235}09235 \textcolor{comment}{             * fastpath context to the interrupt handler in this}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09236}09236 \textcolor{comment}{             * case.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09237}09237 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09238}09238             \textcolor{keywordflow}{if} ((rc = bus\_setup\_intr(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i + 1].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09239}09239                                      (INTR\_TYPE\_NET | INTR\_MPSAFE),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09240}09240                                      NULL, \mbox{\hyperlink{bxe_8c_a4312f2434eca383cf4567846ded70d29}{bxe\_intr\_fp}}, fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09241}09241                                      \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i + 1].\mbox{\hyperlink{structbxe__intr_af21fb0eff01da30713384b8f87248b1d}{tag}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09242}09242                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Failed to allocate MSI-\/X[\%d] vector (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09243}09243                       (i + 1), rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09244}09244                 \textcolor{keywordflow}{goto} bxe\_interrupt\_attach\_exit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09245}09245             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09246}09246 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09247}09247             bus\_describe\_intr(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i + 1].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09248}09248                               \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i + 1].\mbox{\hyperlink{structbxe__intr_af21fb0eff01da30713384b8f87248b1d}{tag}}, \textcolor{stringliteral}{"{}fp\%02d"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09249}09249 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09250}09250             \textcolor{comment}{/* bind the fastpath instance to a cpu */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09251}09251             \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} > 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09252}09252                 bus\_bind\_intr(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[i + 1].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09253}09253             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09254}09254 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09255}09255             fp-\/>\mbox{\hyperlink{structbxe__fastpath_acbd5188632fc27870212f8ab76173740}{state}} = \mbox{\hyperlink{bxe_8h_ad7bd122f3e080449e8a408f66fd5316d}{BXE\_FP\_STATE\_IRQ}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09256}09256         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09257}09257     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09258}09258         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Enabling MSI[0] vector\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09259}09259 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09260}09260         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09261}09261 \textcolor{comment}{         * Setup the interrupt handler. Note that we pass the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09262}09262 \textcolor{comment}{         * driver instance to the interrupt handler which}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09263}09263 \textcolor{comment}{         * will handle both the slowpath and fastpath.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09264}09264 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09265}09265         \textcolor{keywordflow}{if} ((rc = bus\_setup\_intr(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09266}09266                                  (INTR\_TYPE\_NET | INTR\_MPSAFE),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09267}09267                                  NULL, \mbox{\hyperlink{bxe_8c_af8f929f4686234c53e4019f9e056a8ad}{bxe\_intr\_legacy}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09268}09268                                  \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_af21fb0eff01da30713384b8f87248b1d}{tag}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09269}09269             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Failed to allocate MSI[0] vector (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09270}09270             \textcolor{keywordflow}{goto} bxe\_interrupt\_attach\_exit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09271}09271         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09272}09272 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09273}09273     \} \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* (sc-\/>interrupt\_mode == INTR\_MODE\_INTX) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09274}09274         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Enabling INTx interrupts\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09275}09275 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09276}09276         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09277}09277 \textcolor{comment}{         * Setup the interrupt handler. Note that we pass the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09278}09278 \textcolor{comment}{         * driver instance to the interrupt handler which}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09279}09279 \textcolor{comment}{         * will handle both the slowpath and fastpath.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09280}09280 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09281}09281         \textcolor{keywordflow}{if} ((rc = bus\_setup\_intr(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_a9f361986706a73b036a08fddef6513d4}{resource}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09282}09282                                  (INTR\_TYPE\_NET | INTR\_MPSAFE),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09283}09283                                  NULL, \mbox{\hyperlink{bxe_8c_af8f929f4686234c53e4019f9e056a8ad}{bxe\_intr\_legacy}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09284}09284                                  \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afb86411ed9df2d4dc2e0a2117580a135}{intr}}[0].\mbox{\hyperlink{structbxe__intr_af21fb0eff01da30713384b8f87248b1d}{tag}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09285}09285             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Failed to allocate INTx interrupt (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09286}09286             \textcolor{keywordflow}{goto} bxe\_interrupt\_attach\_exit;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09287}09287         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09288}09288     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09289}09289 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09290}09290 bxe\_interrupt\_attach\_exit:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09291}09291 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09292}09292     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09293}09293 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09294}09294 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09295}09295 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{bxe_8c_a554e8156b5e4e1dd4874d8f8e7c700b7}{bxe\_init\_hw\_common\_chip}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09296}09296 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{bxe_8c_a150bbbcff688497647bd566b92f52772}{bxe\_init\_hw\_common}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09297}09297 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{bxe_8c_a008a29ad2e1da1668eab151f8c3023ee}{bxe\_init\_hw\_port}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09298}09298 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{bxe_8c_ac855ad87d25635fff4f3ab54bcbfba87}{bxe\_init\_hw\_func}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09299}09299 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a7f7aade2e4006d9f59fa8dac2cd181e3}{bxe\_reset\_common}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09300}09300 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a935c1cf956bb9743cda9b33f81e118f6}{bxe\_reset\_port}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09301}09301 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_aacbeae78d36edf6f97894cebf7975757}{bxe\_reset\_func}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09302}09302 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{bxe_8c_aa05a5bf8a0d3e3af23c3f2f36d5b597d}{bxe\_gunzip\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09303}09303 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a521fdd38ddcfeda64d9f34f4abb25df4}{bxe\_gunzip\_end}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09304}09304 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{bxe_8c_aa8391729ddc4dffe9e9743833465d2e1}{bxe\_init\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09305}09305 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_adff9bc8b18f2118751d6ee7229c08554}{bxe\_release\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09306}09306 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09307}09307 \textcolor{keyword}{static} \textcolor{keyword}{struct}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09308}\mbox{\hyperlink{bxe_8c_a25e8a8c2e27410982b761b0445868364}{09308}} \mbox{\hyperlink{structecore__func__sp__drv__ops}{ecore\_func\_sp\_drv\_ops}} \mbox{\hyperlink{bxe_8c_a25e8a8c2e27410982b761b0445868364}{bxe\_func\_sp\_drv}} = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09309}09309     .\mbox{\hyperlink{structecore__func__sp__drv__ops_a2dfc9a79951660d4cd4c3aa93dd5a3c9}{init\_hw\_cmn\_chip}} = \mbox{\hyperlink{bxe_8c_a554e8156b5e4e1dd4874d8f8e7c700b7}{bxe\_init\_hw\_common\_chip}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09310}09310     .init\_hw\_cmn      = \mbox{\hyperlink{bxe_8c_a150bbbcff688497647bd566b92f52772}{bxe\_init\_hw\_common}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09311}09311     .init\_hw\_port     = \mbox{\hyperlink{bxe_8c_a008a29ad2e1da1668eab151f8c3023ee}{bxe\_init\_hw\_port}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09312}09312     .init\_hw\_func     = \mbox{\hyperlink{bxe_8c_ac855ad87d25635fff4f3ab54bcbfba87}{bxe\_init\_hw\_func}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09313}09313 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09314}09314     .reset\_hw\_cmn     = \mbox{\hyperlink{bxe_8c_a7f7aade2e4006d9f59fa8dac2cd181e3}{bxe\_reset\_common}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09315}09315     .reset\_hw\_port    = \mbox{\hyperlink{bxe_8c_a935c1cf956bb9743cda9b33f81e118f6}{bxe\_reset\_port}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09316}09316     .reset\_hw\_func    = \mbox{\hyperlink{bxe_8c_aacbeae78d36edf6f97894cebf7975757}{bxe\_reset\_func}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09317}09317 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09318}09318     .gunzip\_init      = \mbox{\hyperlink{bxe_8c_aa05a5bf8a0d3e3af23c3f2f36d5b597d}{bxe\_gunzip\_init}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09319}09319     .gunzip\_end       = \mbox{\hyperlink{bxe_8c_a521fdd38ddcfeda64d9f34f4abb25df4}{bxe\_gunzip\_end}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09320}09320 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09321}09321     .init\_fw          = \mbox{\hyperlink{bxe_8c_aa8391729ddc4dffe9e9743833465d2e1}{bxe\_init\_firmware}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09322}09322     .release\_fw       = \mbox{\hyperlink{bxe_8c_adff9bc8b18f2118751d6ee7229c08554}{bxe\_release\_firmware}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09323}09323 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09324}09324 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09325}09325 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09326}\mbox{\hyperlink{bxe_8c_a0e08040da46336e029e34e30cf886f21}{09326}} \mbox{\hyperlink{bxe_8c_a0e08040da46336e029e34e30cf886f21}{bxe\_init\_func\_obj}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09327}09327 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09328}09328     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ab8635fb9ce6cf45243a4e83c338680e7}{dmae\_ready}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09329}09329 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09330}09330     \mbox{\hyperlink{ecore__sp_8c_af5f7121500277de1f461767dcae5051f}{ecore\_init\_func\_obj}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09331}09331                         \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09332}09332                         \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, func\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09333}09333                         \mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, func\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09334}09334                         \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, func\_afex\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09335}09335                         \mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, func\_afex\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09336}09336                         \&\mbox{\hyperlink{bxe_8c_a25e8a8c2e27410982b761b0445868364}{bxe\_func\_sp\_drv}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09337}09337 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09338}09338 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09339}09339 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09340}\mbox{\hyperlink{bxe_8c_a93a0aeef1d6b322ca3db46c6516cd7c3}{09340}} \mbox{\hyperlink{bxe_8c_a93a0aeef1d6b322ca3db46c6516cd7c3}{bxe\_init\_hw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09341}09341             uint32\_t         load\_code)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09342}09342 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09343}09343     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__func__state__params}{ecore\_func\_state\_params}} func\_params = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09344}09344     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09345}09345 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09346}09346     \textcolor{comment}{/* prepare the parameters for function state transitions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09347}09347     bit\_set(\&func\_params.\mbox{\hyperlink{structecore__func__state__params_a741d53be8643b39cd77cc5a96a44c782}{ramrod\_flags}}, \mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09348}09348 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09349}09349     func\_params.\mbox{\hyperlink{structecore__func__state__params_a9d047bd98f6213c559509806e2abba82}{f\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09350}09350     func\_params.\mbox{\hyperlink{structecore__func__state__params_a91c5e00faef974965a04f21fa001b331}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8aef6cfe15c56ff45d4a34520843365bf7}{ECORE\_F\_CMD\_HW\_INIT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09351}09351 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09352}09352     func\_params.\mbox{\hyperlink{structecore__func__state__params_a8eae38735ab6131fefc5ca8ee928b734}{params}}.\mbox{\hyperlink{structecore__func__state__params_a6d5cf2c0f850400f262cbae70c8fae43}{hw\_init}}.\mbox{\hyperlink{structecore__func__hw__init__params_a790a8973c8e62345b90d1ce25bcaecd1}{load\_phase}} = load\_code;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09353}09353 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09354}09354     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09355}09355 \textcolor{comment}{     * Via a plethora of function pointers, we will eventually reach}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09356}09356 \textcolor{comment}{     * bxe\_init\_hw\_common(), bxe\_init\_hw\_port(), or bxe\_init\_hw\_func().}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09357}09357 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09358}09358     rc = \mbox{\hyperlink{ecore__sp_8c_a7e1322aba00d9db820211a49fd2e0c1e}{ecore\_func\_state\_change}}(sc, \&func\_params);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09359}09359 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09360}09360     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09361}09361 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09362}09362 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09363}09363 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09364}\mbox{\hyperlink{bxe_8c_a7a41cc634e8407171f64167bd5fe53bf}{09364}} \mbox{\hyperlink{bxe_8c_a7a41cc634e8407171f64167bd5fe53bf}{bxe\_fill}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09365}09365          uint32\_t         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09366}09366          \textcolor{keywordtype}{int}              fill,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09367}09367          uint32\_t         len)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09368}09368 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09369}09369     uint32\_t i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09370}09370 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09371}09371     \textcolor{keywordflow}{if} (!(len \% 4) \&\& !(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} \% 4)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09372}09372         \textcolor{keywordflow}{for} (i = 0; i < len; i += 4) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09373}09373             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + i), fill);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09374}09374         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09375}09375     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09376}09376         \textcolor{keywordflow}{for} (i = 0; i < len; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09377}09377             \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + i), fill);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09378}09378         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09379}09379     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09380}09380 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09381}09381 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09382}09382 \textcolor{comment}{/* writes FP SP data to FW -\/ data\_size in dwords */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09383}09383 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09384}\mbox{\hyperlink{bxe_8c_a2965aa00c5e247f807a3f9e938f55c4f}{09384}} \mbox{\hyperlink{bxe_8c_a2965aa00c5e247f807a3f9e938f55c4f}{bxe\_wr\_fp\_sb\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09385}09385                   \textcolor{keywordtype}{int}              fw\_sb\_id,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09386}09386                   uint32\_t         *sb\_data\_p,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09387}09387                   uint32\_t         data\_size)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09388}09388 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09389}09389     \textcolor{keywordtype}{int} index;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09390}09390 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09391}09391     \textcolor{keywordflow}{for} (index = 0; index < data\_size; index++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09392}09392         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09393}09393                (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09394}09394                 \mbox{\hyperlink{ecore__fw__defs_8h_a2efafcf30220661d28e9bb3722cd9a2d}{CSTORM\_STATUS\_BLOCK\_DATA\_OFFSET}}(fw\_sb\_id) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09395}09395                 (\textcolor{keyword}{sizeof}(uint32\_t) * index)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09396}09396                *(sb\_data\_p + index));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09397}09397     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09398}09398 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09399}09399 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09400}09400 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09401}\mbox{\hyperlink{bxe_8c_ad53ce40d6bfdca27a0bdba99457d86da}{09401}} \mbox{\hyperlink{bxe_8c_ad53ce40d6bfdca27a0bdba99457d86da}{bxe\_zero\_fp\_sb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09402}09402                \textcolor{keywordtype}{int}              fw\_sb\_id)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09403}09403 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09404}09404     \textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__data__e2}{hc\_status\_block\_data\_e2}} sb\_data\_e2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09405}09405     \textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__data__e1x}{hc\_status\_block\_data\_e1x}} sb\_data\_e1x;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09406}09406     uint32\_t *sb\_data\_p;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09407}09407     uint32\_t data\_size = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09408}09408 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09409}09409     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09410}09410         memset(\&sb\_data\_e2, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhc__status__block__data__e2}{hc\_status\_block\_data\_e2}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09411}09411         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.state = \mbox{\hyperlink{ecore__hsi_8h_ac6327c28b6bed775df6656e6e2761189a8952aa109b087c8cefdc64927f325b40}{SB\_DISABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09412}09412         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.vf\_valid = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09413}09413         sb\_data\_p = (uint32\_t *)\&sb\_data\_e2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09414}09414         data\_size = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__data__e2}{hc\_status\_block\_data\_e2}}) /}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09415}09415                      sizeof(uint32\_t));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09416}09416     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09417}09417         memset(\&sb\_data\_e1x, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhc__status__block__data__e1x}{hc\_status\_block\_data\_e1x}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09418}09418         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.state = \mbox{\hyperlink{ecore__hsi_8h_ac6327c28b6bed775df6656e6e2761189a8952aa109b087c8cefdc64927f325b40}{SB\_DISABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09419}09419         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.vf\_valid = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09420}09420         sb\_data\_p = (uint32\_t *)\&sb\_data\_e1x;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09421}09421         data\_size = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__data__e1x}{hc\_status\_block\_data\_e1x}}) /}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09422}09422                      sizeof(uint32\_t));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09423}09423     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09424}09424 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09425}09425     \mbox{\hyperlink{bxe_8c_a2965aa00c5e247f807a3f9e938f55c4f}{bxe\_wr\_fp\_sb\_data}}(sc, fw\_sb\_id, sb\_data\_p, data\_size);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09426}09426 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09427}09427     \mbox{\hyperlink{bxe_8c_a7a41cc634e8407171f64167bd5fe53bf}{bxe\_fill}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a8197ed443564bb0e13b8cd1721e402d1}{CSTORM\_STATUS\_BLOCK\_OFFSET}}(fw\_sb\_id)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09428}09428              0, \mbox{\hyperlink{ecore__fw__defs_8h_a3e80bb7f3a4f4edf82b694c328c395f4}{CSTORM\_STATUS\_BLOCK\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09429}09429     \mbox{\hyperlink{bxe_8c_a7a41cc634e8407171f64167bd5fe53bf}{bxe\_fill}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_ab38c9895fb9d49fdef7446965cdf9883}{CSTORM\_SYNC\_BLOCK\_OFFSET}}(fw\_sb\_id)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09430}09430              0, \mbox{\hyperlink{ecore__fw__defs_8h_a22fc53329d602c1669b8026705138212}{CSTORM\_SYNC\_BLOCK\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09431}09431 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09432}09432 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09433}09433 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09434}\mbox{\hyperlink{bxe_8c_a50118d35d6e60fd0814c5f6e7c2d86ea}{09434}} \mbox{\hyperlink{bxe_8c_a50118d35d6e60fd0814c5f6e7c2d86ea}{bxe\_wr\_sp\_sb\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}               *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09435}09435                   \textcolor{keyword}{struct} \mbox{\hyperlink{structhc__sp__status__block__data}{hc\_sp\_status\_block\_data}} *sp\_sb\_data)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09436}09436 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09437}09437     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09438}09438 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09439}09439     \textcolor{keywordflow}{for} (i = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09440}09440          i < (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhc__sp__status__block__data}{hc\_sp\_status\_block\_data}}) / sizeof(uint32\_t));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09441}09441          i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09442}09442         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09443}09443                (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09444}09444                 \mbox{\hyperlink{ecore__fw__defs_8h_aeebec8b2c56629d75e86a740329dc5fe}{CSTORM\_SP\_STATUS\_BLOCK\_DATA\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc)) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09445}09445                 (i * \textcolor{keyword}{sizeof}(uint32\_t))),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09446}09446                *((uint32\_t *)sp\_sb\_data + i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09447}09447     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09448}09448 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09449}09449 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09450}09450 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09451}\mbox{\hyperlink{bxe_8c_a2e202b23f04e9064e1505d91a2647344}{09451}} \mbox{\hyperlink{bxe_8c_a2e202b23f04e9064e1505d91a2647344}{bxe\_zero\_sp\_sb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09452}09452 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09453}09453     \textcolor{keyword}{struct }\mbox{\hyperlink{structhc__sp__status__block__data}{hc\_sp\_status\_block\_data}} sp\_sb\_data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09454}09454 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09455}09455     memset(\&sp\_sb\_data, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhc__sp__status__block__data}{hc\_sp\_status\_block\_data}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09456}09456 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09457}09457     sp\_sb\_data.state           = \mbox{\hyperlink{ecore__hsi_8h_ac6327c28b6bed775df6656e6e2761189a8952aa109b087c8cefdc64927f325b40}{SB\_DISABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09458}09458     sp\_sb\_data.\mbox{\hyperlink{structhc__sp__status__block__data_a52044bddfce8a0a18556447a6993b805}{p\_func}}.vf\_valid = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09459}09459 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09460}09460     \mbox{\hyperlink{bxe_8c_a50118d35d6e60fd0814c5f6e7c2d86ea}{bxe\_wr\_sp\_sb\_data}}(sc, \&sp\_sb\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09461}09461 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09462}09462     \mbox{\hyperlink{bxe_8c_a7a41cc634e8407171f64167bd5fe53bf}{bxe\_fill}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09463}09463              (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09464}09464               \mbox{\hyperlink{ecore__fw__defs_8h_a51316bd34b1cfd1b76e1b70d35af978e}{CSTORM\_SP\_STATUS\_BLOCK\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc))),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09465}09465               0, \mbox{\hyperlink{ecore__fw__defs_8h_aceb13348ee6e86c188feec758b5409f1}{CSTORM\_SP\_STATUS\_BLOCK\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09466}09466     \mbox{\hyperlink{bxe_8c_a7a41cc634e8407171f64167bd5fe53bf}{bxe\_fill}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09467}09467              (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09468}09468               \mbox{\hyperlink{ecore__fw__defs_8h_a2251fddb2b9be0371730335a18737cb6}{CSTORM\_SP\_SYNC\_BLOCK\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc))),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09469}09469               0, \mbox{\hyperlink{ecore__fw__defs_8h_a67df3c722c7c1cc84ea27deebabfcf43}{CSTORM\_SP\_SYNC\_BLOCK\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09470}09470 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09471}09471 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09472}09472 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09473}\mbox{\hyperlink{bxe_8c_a36f91d3004df8147e626e37ff5a23bc2}{09473}} \mbox{\hyperlink{bxe_8c_a36f91d3004df8147e626e37ff5a23bc2}{bxe\_setup\_ndsb\_state\_machine}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhc__status__block__sm}{hc\_status\_block\_sm}} *hc\_sm,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09474}09474                              \textcolor{keywordtype}{int}                       igu\_sb\_id,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09475}09475                              \textcolor{keywordtype}{int}                       igu\_seg\_id)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09476}09476 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09477}09477     hc\_sm-\/>igu\_sb\_id      = igu\_sb\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09478}09478     hc\_sm-\/>igu\_seg\_id     = igu\_seg\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09479}09479     hc\_sm-\/>timer\_value    = 0xFF;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09480}09480     hc\_sm-\/>\mbox{\hyperlink{structhc__status__block__sm_a5e66c7f2aad9dae6a9b8d79c8f085ff3}{time\_to\_expire}} = 0xFFFFFFFF;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09481}09481 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09482}09482 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09483}09483 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09484}\mbox{\hyperlink{bxe_8c_a504a7207a5837e720aef8cd8cf8aaaf0}{09484}} \mbox{\hyperlink{bxe_8c_a504a7207a5837e720aef8cd8cf8aaaf0}{bxe\_map\_sb\_state\_machines}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhc__index__data}{hc\_index\_data}} *index\_data)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09485}09485 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09486}09486     \textcolor{comment}{/* zero out state machine indices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09487}09487 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09488}09488     \textcolor{comment}{/* rx indices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09489}09489     index\_data[\mbox{\hyperlink{bxe_8h_ab58359d5d4b214fec145175f6a80a44a}{HC\_INDEX\_ETH\_RX\_CQ\_CONS}}].flags \&= \string~HC\_INDEX\_DATA\_SM\_ID;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09490}09490 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09491}09491     \textcolor{comment}{/* tx indices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09492}09492     index\_data[\mbox{\hyperlink{bxe_8h_a94c48826731288a0afe63fa35e894492}{HC\_INDEX\_OOO\_TX\_CQ\_CONS}}].flags      \&= \string~HC\_INDEX\_DATA\_SM\_ID;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09493}09493     index\_data[\mbox{\hyperlink{bxe_8h_a7f36f83db3bd471cd281b9c8b3354057}{HC\_INDEX\_ETH\_TX\_CQ\_CONS\_COS0}}].flags \&= \string~HC\_INDEX\_DATA\_SM\_ID;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09494}09494     index\_data[\mbox{\hyperlink{bxe_8h_acb37121638e3177e3bd314aad88181fb}{HC\_INDEX\_ETH\_TX\_CQ\_CONS\_COS1}}].flags \&= \string~HC\_INDEX\_DATA\_SM\_ID;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09495}09495     index\_data[\mbox{\hyperlink{bxe_8h_a0fbd7d78f446a9c753e87a6779f43269}{HC\_INDEX\_ETH\_TX\_CQ\_CONS\_COS2}}].flags \&= \string~HC\_INDEX\_DATA\_SM\_ID;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09496}09496 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09497}09497     \textcolor{comment}{/* map indices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09498}09498 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09499}09499     \textcolor{comment}{/* rx indices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09500}09500     index\_data[\mbox{\hyperlink{bxe_8h_ab58359d5d4b214fec145175f6a80a44a}{HC\_INDEX\_ETH\_RX\_CQ\_CONS}}].flags |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09501}09501         (\mbox{\hyperlink{bxe_8h_a04fa5f502dc0a99bf6babefd7e05c00a}{SM\_RX\_ID}} << HC\_INDEX\_DATA\_SM\_ID\_SHIFT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09502}09502 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09503}09503     \textcolor{comment}{/* tx indices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09504}09504     index\_data[\mbox{\hyperlink{bxe_8h_a94c48826731288a0afe63fa35e894492}{HC\_INDEX\_OOO\_TX\_CQ\_CONS}}].flags |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09505}09505         (\mbox{\hyperlink{bxe_8h_aa8351c5c12670b0fdc4bb0d3e1cf1ff0}{SM\_TX\_ID}} << HC\_INDEX\_DATA\_SM\_ID\_SHIFT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09506}09506     index\_data[\mbox{\hyperlink{bxe_8h_a7f36f83db3bd471cd281b9c8b3354057}{HC\_INDEX\_ETH\_TX\_CQ\_CONS\_COS0}}].flags |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09507}09507         (\mbox{\hyperlink{bxe_8h_aa8351c5c12670b0fdc4bb0d3e1cf1ff0}{SM\_TX\_ID}} << HC\_INDEX\_DATA\_SM\_ID\_SHIFT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09508}09508     index\_data[\mbox{\hyperlink{bxe_8h_acb37121638e3177e3bd314aad88181fb}{HC\_INDEX\_ETH\_TX\_CQ\_CONS\_COS1}}].flags |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09509}09509         (\mbox{\hyperlink{bxe_8h_aa8351c5c12670b0fdc4bb0d3e1cf1ff0}{SM\_TX\_ID}} << HC\_INDEX\_DATA\_SM\_ID\_SHIFT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09510}09510     index\_data[\mbox{\hyperlink{bxe_8h_a0fbd7d78f446a9c753e87a6779f43269}{HC\_INDEX\_ETH\_TX\_CQ\_CONS\_COS2}}].flags |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09511}09511         (\mbox{\hyperlink{bxe_8h_aa8351c5c12670b0fdc4bb0d3e1cf1ff0}{SM\_TX\_ID}} << HC\_INDEX\_DATA\_SM\_ID\_SHIFT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09512}09512 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09513}09513 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09514}09514 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09515}\mbox{\hyperlink{bxe_8c_abb0dd6f386f8d62d7b3936909507bad5}{09515}} \mbox{\hyperlink{bxe_8c_abb0dd6f386f8d62d7b3936909507bad5}{bxe\_init\_sb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09516}09516             bus\_addr\_t       busaddr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09517}09517             \textcolor{keywordtype}{int}              vfid,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09518}09518             uint8\_t          vf\_valid,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09519}09519             \textcolor{keywordtype}{int}              fw\_sb\_id,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09520}09520             \textcolor{keywordtype}{int}              igu\_sb\_id)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09521}09521 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09522}09522     \textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__data__e2}{hc\_status\_block\_data\_e2}}  sb\_data\_e2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09523}09523     \textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__data__e1x}{hc\_status\_block\_data\_e1x}} sb\_data\_e1x;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09524}09524     \textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__sm}{hc\_status\_block\_sm}}       *hc\_sm\_p;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09525}09525     uint32\_t *sb\_data\_p;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09526}09526     \textcolor{keywordtype}{int} igu\_seg\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09527}09527     \textcolor{keywordtype}{int} data\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09528}09528 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09529}09529     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09530}09530         igu\_seg\_id = \mbox{\hyperlink{bxe_8h_aaa2337477e1a7d68103488074631a5b8}{HC\_SEG\_ACCESS\_NORM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09531}09531     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09532}09532         igu\_seg\_id = \mbox{\hyperlink{ecore__hsi_8h_a54856097d196887fa81c3c8467fe978eabaf022dfe5fad77d542f633f9f67faf5}{IGU\_SEG\_ACCESS\_NORM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09533}09533     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09534}09534 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09535}09535     \mbox{\hyperlink{bxe_8c_ad53ce40d6bfdca27a0bdba99457d86da}{bxe\_zero\_fp\_sb}}(sc, fw\_sb\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09536}09536 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09537}09537     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09538}09538         memset(\&sb\_data\_e2, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhc__status__block__data__e2}{hc\_status\_block\_data\_e2}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09539}09539         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.state = \mbox{\hyperlink{ecore__hsi_8h_ac6327c28b6bed775df6656e6e2761189ae496c2e712d8f372b41c74d0b583ce9b}{SB\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09540}09540         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.pf\_id = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09541}09541         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.vf\_id = vfid;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09542}09542         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.vf\_valid = vf\_valid;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09543}09543         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.vnic\_id = \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09544}09544         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.same\_igu\_sb\_1b = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09545}09545         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.\mbox{\hyperlink{structhc__sb__data_a348c1a5e9b529ea8a80efa09c72f4001}{host\_sb\_addr}}.\mbox{\hyperlink{structregpair__native__t_a29aa2b67ac498a5b7df5eee6bc5dddff}{hi}} = \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(busaddr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09546}09546         sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.\mbox{\hyperlink{structhc__sb__data_a348c1a5e9b529ea8a80efa09c72f4001}{host\_sb\_addr}}.\mbox{\hyperlink{structregpair__native__t_a917dc04b8d46daa88f2f53157968bed1}{lo}} = \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(busaddr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09547}09547         hc\_sm\_p = sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_ac15eed0c7b6e754198b68aed00f81e87}{common}}.\mbox{\hyperlink{structhc__sb__data_ac1ab7edcedbc6b07be1184726261ca4f}{state\_machine}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09548}09548         sb\_data\_p = (uint32\_t *)\&sb\_data\_e2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09549}09549         data\_size = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__data__e2}{hc\_status\_block\_data\_e2}}) /}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09550}09550                      sizeof(uint32\_t));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09551}09551         \mbox{\hyperlink{bxe_8c_a504a7207a5837e720aef8cd8cf8aaaf0}{bxe\_map\_sb\_state\_machines}}(sb\_data\_e2.\mbox{\hyperlink{structhc__status__block__data__e2_a90c2d6a039d75b91c154258617df8c45}{index\_data}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09552}09552     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09553}09553         memset(\&sb\_data\_e1x, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhc__status__block__data__e1x}{hc\_status\_block\_data\_e1x}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09554}09554         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.state = \mbox{\hyperlink{ecore__hsi_8h_ac6327c28b6bed775df6656e6e2761189ae496c2e712d8f372b41c74d0b583ce9b}{SB\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09555}09555         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.pf\_id = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09556}09556         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.vf\_id = 0xff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09557}09557         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.vf\_valid = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09558}09558         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.\mbox{\hyperlink{structhc__sb__data_a469386c25fb06f4f9b5c37dc1438787e}{p\_func}}.vnic\_id = \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09559}09559         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.same\_igu\_sb\_1b = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09560}09560         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.\mbox{\hyperlink{structhc__sb__data_a348c1a5e9b529ea8a80efa09c72f4001}{host\_sb\_addr}}.\mbox{\hyperlink{structregpair__native__t_a29aa2b67ac498a5b7df5eee6bc5dddff}{hi}} = \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(busaddr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09561}09561         sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.\mbox{\hyperlink{structhc__sb__data_a348c1a5e9b529ea8a80efa09c72f4001}{host\_sb\_addr}}.\mbox{\hyperlink{structregpair__native__t_a917dc04b8d46daa88f2f53157968bed1}{lo}} = \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(busaddr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09562}09562         hc\_sm\_p = sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_ab220ccd93d19c9305cc13f9e554e8f8f}{common}}.\mbox{\hyperlink{structhc__sb__data_ac1ab7edcedbc6b07be1184726261ca4f}{state\_machine}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09563}09563         sb\_data\_p = (uint32\_t *)\&sb\_data\_e1x;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09564}09564         data\_size = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhc__status__block__data__e1x}{hc\_status\_block\_data\_e1x}}) /}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09565}09565                      sizeof(uint32\_t));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09566}09566         \mbox{\hyperlink{bxe_8c_a504a7207a5837e720aef8cd8cf8aaaf0}{bxe\_map\_sb\_state\_machines}}(sb\_data\_e1x.\mbox{\hyperlink{structhc__status__block__data__e1x_a590412fbc1e607585b16ac8b22a5e536}{index\_data}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09567}09567     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09568}09568 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09569}09569     \mbox{\hyperlink{bxe_8c_a36f91d3004df8147e626e37ff5a23bc2}{bxe\_setup\_ndsb\_state\_machine}}(\&hc\_sm\_p[\mbox{\hyperlink{bxe_8h_a04fa5f502dc0a99bf6babefd7e05c00a}{SM\_RX\_ID}}], igu\_sb\_id, igu\_seg\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09570}09570     \mbox{\hyperlink{bxe_8c_a36f91d3004df8147e626e37ff5a23bc2}{bxe\_setup\_ndsb\_state\_machine}}(\&hc\_sm\_p[\mbox{\hyperlink{bxe_8h_aa8351c5c12670b0fdc4bb0d3e1cf1ff0}{SM\_TX\_ID}}], igu\_sb\_id, igu\_seg\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09571}09571 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09572}09572     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Init FW SB \%d\(\backslash\)n"{}}, fw\_sb\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09573}09573 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09574}09574     \textcolor{comment}{/* write indices to HW -\/ PCI guarantees endianity of regpairs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09575}09575     \mbox{\hyperlink{bxe_8c_a2965aa00c5e247f807a3f9e938f55c4f}{bxe\_wr\_fp\_sb\_data}}(sc, fw\_sb\_id, sb\_data\_p, data\_size);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09576}09576 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09577}09577 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09578}09578 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09579}\mbox{\hyperlink{bxe_8c_a2aa505ed4b5c3b4d7142ee0d116b5073}{09579}} \mbox{\hyperlink{bxe_8c_a2aa505ed4b5c3b4d7142ee0d116b5073}{bxe\_fp\_qzone\_id}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09580}09580 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09581}09581     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09582}09582         \textcolor{keywordflow}{return} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}} + \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) * \mbox{\hyperlink{ecore__fw__defs_8h_a36ae3526508f9f84461f4a8012e36971}{ETH\_MAX\_RX\_CLIENTS\_E1H}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09583}09583     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09584}09584         \textcolor{keywordflow}{return} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09585}09585     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09586}09586 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09587}09587 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09588}09588 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09589}\mbox{\hyperlink{bxe_8c_ac1daa840069f72270bb5ebd6ecd79691}{09589}} \mbox{\hyperlink{bxe_8c_ac1daa840069f72270bb5ebd6ecd79691}{bxe\_rx\_ustorm\_prods\_offset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09590}09590                            \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09591}09591 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09592}09592     uint32\_t \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} = \mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09593}09593 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09594}09594     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09595}09595         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} += \mbox{\hyperlink{ecore__fw__defs_8h_a951a5a892884a81fc429b2a2d0454d7e}{USTORM\_RX\_PRODS\_E2\_OFFSET}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_af88547736adba8052e0b9d6f714e06f5}{cl\_qzone\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09596}09596     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09597}09597         \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} += \mbox{\hyperlink{ecore__fw__defs_8h_aaa8cfa383b43908ad2720cb603b6e0b1}{USTORM\_RX\_PRODS\_E1X\_OFFSET}}(\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc), fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09598}09598     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09599}09599 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09600}09600     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09601}09601 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09602}09602 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09603}09603 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09604}\mbox{\hyperlink{bxe_8c_ad96c923e6909f0b987b165afb0def448}{09604}} \mbox{\hyperlink{bxe_8c_ad96c923e6909f0b987b165afb0def448}{bxe\_init\_eth\_fp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09605}09605                 \textcolor{keywordtype}{int}              idx)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09606}09606 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09607}09607     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[idx];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09608}09608     uint32\_t cids[\mbox{\hyperlink{ecore__sp_8h_ae7942f5ecf36cdc090289f114040150d}{ECORE\_MULTI\_TX\_COS}}] = \{ 0 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09609}09609     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} q\_type = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09610}09610     \textcolor{keywordtype}{int} cos;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09611}09611 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09612}09612     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}    = \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09613}09613     fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}} = idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09614}09614 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09615}09615     fp-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}} = (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} + idx + \mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09616}09616     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a210f7120d5922e380b3210ee6de6a625}{fw\_sb\_id}} = (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_af761cf987daa6f7b013049904f425f46}{base\_fw\_ndsb}} + idx + \mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09617}09617 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09618}09618     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}} = (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09619}09619                     (\mbox{\hyperlink{bxe_8h_a52a850350a7c66d069b79f8fdfe12ef4}{SC\_L\_ID}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) + idx) :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09620}09620                     \textcolor{comment}{/* want client ID same as IGU SB ID for non-\/E1 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09621}09621                     fp-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09622}09622     fp-\/>\mbox{\hyperlink{structbxe__fastpath_af88547736adba8052e0b9d6f714e06f5}{cl\_qzone\_id}} = \mbox{\hyperlink{bxe_8c_a2aa505ed4b5c3b4d7142ee0d116b5073}{bxe\_fp\_qzone\_id}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09623}09623 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09624}09624     \textcolor{comment}{/* setup sb indices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09625}09625     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09626}09626         fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad03490969d4fb78f4f788625efa48e43}{sb\_index\_values}}  = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}.\mbox{\hyperlink{unionbxe__host__hc__status__block_a01245574fb45b11a6cfa2823a3fd550f}{e2\_sb}}-\/>\mbox{\hyperlink{structhost__hc__status__block__e2_afc4f0fed3ec26a6b96380b3f6f8b963f}{sb}}.\mbox{\hyperlink{structhc__status__block__e2_a23f177333da2eb4b21b788e0494b80e1}{index\_values}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09627}09627         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a978207d0334ef16591a3e38a96b188ea}{sb\_running\_index}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}.\mbox{\hyperlink{unionbxe__host__hc__status__block_a01245574fb45b11a6cfa2823a3fd550f}{e2\_sb}}-\/>\mbox{\hyperlink{structhost__hc__status__block__e2_afc4f0fed3ec26a6b96380b3f6f8b963f}{sb}}.\mbox{\hyperlink{structhc__status__block__e2_a8796a40120fba1b070f68e966e135bcb}{running\_index}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09628}09628     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09629}09629         fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad03490969d4fb78f4f788625efa48e43}{sb\_index\_values}}  = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}.\mbox{\hyperlink{unionbxe__host__hc__status__block_a65c697eb8d691f344079abea7e013542}{e1x\_sb}}-\/>\mbox{\hyperlink{structhost__hc__status__block__e1x_aa04c011bb7085c45a24c8674c4f3c3bf}{sb}}.\mbox{\hyperlink{structhc__status__block__e1x_adaf96abed8be588dbda94b51f0e30f49}{index\_values}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09630}09630         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a978207d0334ef16591a3e38a96b188ea}{sb\_running\_index}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}.\mbox{\hyperlink{unionbxe__host__hc__status__block_a65c697eb8d691f344079abea7e013542}{e1x\_sb}}-\/>\mbox{\hyperlink{structhost__hc__status__block__e1x_aa04c011bb7085c45a24c8674c4f3c3bf}{sb}}.\mbox{\hyperlink{structhc__status__block__e1x_ac4e1b38a6832893f8690f7bcc7a0f5b5}{running\_index}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09631}09631     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09632}09632 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09633}09633     \textcolor{comment}{/* init shortcut */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09634}09634     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a0acd9befb425d80397f4b4859885fc0f}{ustorm\_rx\_prods\_offset}} = \mbox{\hyperlink{bxe_8c_ac1daa840069f72270bb5ebd6ecd79691}{bxe\_rx\_ustorm\_prods\_offset}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09635}09635 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09636}09636     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a56f3586de2bf71291d0838302f3fa7f1}{rx\_cq\_cons\_sb}} = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad03490969d4fb78f4f788625efa48e43}{sb\_index\_values}}[\mbox{\hyperlink{bxe_8h_ab58359d5d4b214fec145175f6a80a44a}{HC\_INDEX\_ETH\_RX\_CQ\_CONS}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09637}09637 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09638}09638     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09639}09639 \textcolor{comment}{     * XXX If multiple CoS is ever supported then each fastpath structure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09640}09640 \textcolor{comment}{     * will need to maintain tx producer/consumer/dma/etc values *per* CoS.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09641}09641 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09642}09642     \textcolor{keywordflow}{for} (cos = 0; cos < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_acd82fee11a36e84b5e3ed957dd47cd79}{max\_cos}}; cos++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09643}09643         cids[cos] = idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09644}09644     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09645}09645     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a3dc4c1d3159c9ddf3935b81f7fd031f7}{tx\_cons\_sb}} = \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad03490969d4fb78f4f788625efa48e43}{sb\_index\_values}}[\mbox{\hyperlink{bxe_8h_a7f36f83db3bd471cd281b9c8b3354057}{HC\_INDEX\_ETH\_TX\_CQ\_CONS\_COS0}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09646}09646 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09647}09647     \textcolor{comment}{/* nothing more for a VF to do */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09648}09648     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a564b2f75c1d5338c4625919e871035bb}{IS\_VF}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09649}09649         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09650}09650     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09651}09651 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09652}09652     \mbox{\hyperlink{bxe_8c_abb0dd6f386f8d62d7b3936909507bad5}{bxe\_init\_sb}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a018a5dd30470e1e6a4d70e907d82ef65}{sb\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, \mbox{\hyperlink{bxe_8h_a9454214ff85568c5481db30675367ee6}{BXE\_VF\_ID\_INVALID}}, FALSE,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09653}09653                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a210f7120d5922e380b3210ee6de6a625}{fw\_sb\_id}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09654}09654 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09655}09655     \mbox{\hyperlink{bxe_8h_a731eedf8419a0ef01fc697c1beb6119d}{bxe\_update\_fp\_sb\_idx}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09656}09656 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09657}09657     \textcolor{comment}{/* Configure Queue State object */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09658}09658     bit\_set(\&q\_type, \mbox{\hyperlink{ecore__sp_8h_a952191af467c6b122a201ebf80a7acb7aba2b3a6cf4270892f3aa82afda4713c0}{ECORE\_Q\_TYPE\_HAS\_RX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09659}09659     bit\_set(\&q\_type, \mbox{\hyperlink{ecore__sp_8h_a952191af467c6b122a201ebf80a7acb7aca287418d1112b9d1be0eedb3546185b}{ECORE\_Q\_TYPE\_HAS\_TX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09660}09660 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09661}09661     \mbox{\hyperlink{ecore__sp_8c_a1497560d7e507459ccd8992505930803}{ecore\_init\_queue\_obj}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09662}09662                          \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[idx].\mbox{\hyperlink{structbxe__sp__objs_a351dc74bae42d4614c457b9bd4d2e5cf}{q\_obj}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09663}09663                          fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09664}09664                          cids,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09665}09665                          \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_acd82fee11a36e84b5e3ed957dd47cd79}{max\_cos}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09666}09666                          \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09667}09667                          \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, q\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09668}09668                          \mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, q\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09669}09669                          q\_type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09670}09670 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09671}09671     \textcolor{comment}{/* configure classification DBs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09672}09672     \mbox{\hyperlink{ecore__sp_8c_a414bf9575a336f743d2a764b34f87eb3}{ecore\_init\_mac\_obj}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09673}09673                        \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}[idx].\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09674}09674                        fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09675}09675                        idx,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09676}09676                        \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09677}09677                        \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, mac\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09678}09678                        \mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, mac\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09679}09679                        \mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034ae82c26f1816a84e74164b04cf0263aca}{ECORE\_FILTER\_MAC\_PENDING}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09680}09680                        \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09681}09681                        \mbox{\hyperlink{ecore__sp_8h_ae93d3d20970bfb9f3b0c3d6fd510d30dabd6e69f078bea632d31e3c864152b4ae}{ECORE\_OBJ\_TYPE\_RX\_TX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09682}09682                        \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7f6ae9f5036235d5488b2bec4ab07231}{macs\_pool}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09683}09683 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09684}09684     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}fp[\%d]: sb=\%p cl\_id=\%d fw\_sb=\%d igu\_sb=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09685}09685           idx, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}.\mbox{\hyperlink{unionbxe__host__hc__status__block_a01245574fb45b11a6cfa2823a3fd550f}{e2\_sb}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a210f7120d5922e380b3210ee6de6a625}{fw\_sb\_id}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09686}09686 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09687}09687 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09688}09688 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09689}\mbox{\hyperlink{bxe_8c_a6b2eba231052d5cb25e75779ef7a1ce7}{09689}} \mbox{\hyperlink{bxe_8c_a6b2eba231052d5cb25e75779ef7a1ce7}{bxe\_update\_rx\_prod}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09690}09690                    \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09691}09691                    uint16\_t            \mbox{\hyperlink{structbxe__fastpath_a2f3c58fb77796cd02e02122b4434bf32}{rx\_bd\_prod}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09692}09692                    uint16\_t            \mbox{\hyperlink{structbxe__fastpath_a94d71948ebaf04ecea42ac112f73f613}{rx\_cq\_prod}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09693}09693                    uint16\_t            \mbox{\hyperlink{structbxe__fastpath_aea87649aeabb6bdea13f1275511fd6c9}{rx\_sge\_prod}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09694}09694 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09695}09695     \textcolor{keyword}{struct }\mbox{\hyperlink{structustorm__eth__rx__producers}{ustorm\_eth\_rx\_producers}} rx\_prods = \{ 0 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09696}09696     uint32\_t i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09697}09697 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09698}09698     \textcolor{comment}{/* update producers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09699}09699     rx\_prods.bd\_prod  = rx\_bd\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09700}09700     rx\_prods.cqe\_prod = rx\_cq\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09701}09701     rx\_prods.sge\_prod = rx\_sge\_prod;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09702}09702 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09703}09703     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09704}09704 \textcolor{comment}{     * Make sure that the BD and SGE data is updated before updating the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09705}09705 \textcolor{comment}{     * producers since FW might read the BD/SGE right after the producer}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09706}09706 \textcolor{comment}{     * is updated.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09707}09707 \textcolor{comment}{     * This is only applicable for weak-\/ordered memory model archs such}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09708}09708 \textcolor{comment}{     * as IA-\/64. The following barrier is also mandatory since FW will}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09709}09709 \textcolor{comment}{     * assumes BDs must have buffers.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09710}09710 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09711}09711     wmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09712}09712 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09713}09713     \textcolor{keywordflow}{for} (i = 0; i < (\textcolor{keyword}{sizeof}(rx\_prods) / 4); i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09714}09714         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09715}09715                (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a0acd9befb425d80397f4b4859885fc0f}{ustorm\_rx\_prods\_offset}} + (i * 4)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09716}09716                ((uint32\_t *)\&rx\_prods)[i]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09717}09717     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09718}09718 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09719}09719     wmb(); \textcolor{comment}{/* keep prod updates ordered */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09720}09720 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09721}09721     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_a4085ac592bcc72cb40bc07e4387b48a1}{DBG\_RX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09722}09722           \textcolor{stringliteral}{"{}RX fp[\%d]: wrote prods bd\_prod=\%u cqe\_prod=\%u sge\_prod=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09723}09723           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, rx\_bd\_prod, rx\_cq\_prod, rx\_sge\_prod);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09724}09724 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09725}09725 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09726}09726 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09727}\mbox{\hyperlink{bxe_8c_aa88bd0cc27e8271ac761e5818b03c58b}{09727}} \mbox{\hyperlink{bxe_8c_aa88bd0cc27e8271ac761e5818b03c58b}{bxe\_init\_rx\_rings}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09728}09728 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09729}09729     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09730}09730     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09731}09731 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09732}09732     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09733}09733         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09734}09734 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09735}09735         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a9346adab23e93ce551b7c5b268c1555d}{rx\_bd\_cons}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09736}09736 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09737}09737         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09738}09738 \textcolor{comment}{         * Activate the BD ring...}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09739}09739 \textcolor{comment}{         * Warning, this will generate an interrupt (to the TSTORM)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09740}09740 \textcolor{comment}{         * so this can only be done after the chip is initialized}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09741}09741 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09742}09742         \mbox{\hyperlink{bxe_8c_a6b2eba231052d5cb25e75779ef7a1ce7}{bxe\_update\_rx\_prod}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09743}09743                            fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2f3c58fb77796cd02e02122b4434bf32}{rx\_bd\_prod}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09744}09744                            fp-\/>\mbox{\hyperlink{structbxe__fastpath_a94d71948ebaf04ecea42ac112f73f613}{rx\_cq\_prod}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09745}09745                            fp-\/>\mbox{\hyperlink{structbxe__fastpath_aea87649aeabb6bdea13f1275511fd6c9}{rx\_sge\_prod}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09746}09746 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09747}09747         \textcolor{keywordflow}{if} (i != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09748}09748             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09749}09749         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09750}09750 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09751}09751         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09752}09752             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09753}09753                    (\mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09754}09754                     \mbox{\hyperlink{ecore__fw__defs_8h_ac3a36e4990c51a9bdcbd42d333d8ab9a}{USTORM\_MEM\_WORKAROUND\_ADDRESS\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}))),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09755}09755                    \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09756}09756             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09757}09757                    (\mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09758}09758                     \mbox{\hyperlink{ecore__fw__defs_8h_ac3a36e4990c51a9bdcbd42d333d8ab9a}{USTORM\_MEM\_WORKAROUND\_ADDRESS\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) + 4),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09759}09759                    \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09760}09760         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09761}09761     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09762}09762 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09763}09763 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09764}09764 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09765}\mbox{\hyperlink{bxe_8c_a526e873fa1ec19c653e558dfc772e56d}{09765}} \mbox{\hyperlink{bxe_8c_a526e873fa1ec19c653e558dfc772e56d}{bxe\_init\_tx\_ring\_one}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09766}09766 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09767}09767     \mbox{\hyperlink{bxe_8h_a85842d21414d875b22dcb39a7162e63a}{SET\_FLAG}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac39c1f1fb50b4bef5f4c81eae40172fb}{tx\_db}}.\mbox{\hyperlink{unionbxe__db__prod_ad339cd93a130fefd4635c2eda1002611}{data}}.header.data, \mbox{\hyperlink{ecore__hsi_8h_a4b7925dac5765998b35c9887057f0716}{DOORBELL\_HDR\_T\_DB\_TYPE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09768}09768     fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac39c1f1fb50b4bef5f4c81eae40172fb}{tx\_db}}.\mbox{\hyperlink{unionbxe__db__prod_ad339cd93a130fefd4635c2eda1002611}{data}}.zero\_fill1 = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09769}09769     fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac39c1f1fb50b4bef5f4c81eae40172fb}{tx\_db}}.\mbox{\hyperlink{unionbxe__db__prod_ad339cd93a130fefd4635c2eda1002611}{data}}.prod = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09770}09770 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09771}09771     fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb97e5017aa43f9a4e43c5f302af8d30}{tx\_pkt\_prod}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09772}09772     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4fb28a798b123d9d554100f51c89e2f5}{tx\_pkt\_cons}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09773}09773     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a8895cb72e0640491ef115fe0f8eee971}{tx\_bd\_prod}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09774}09774     fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa16de8d88d7655a6d9c075ed8b09d1f3}{tx\_bd\_cons}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09775}09775     fp-\/>\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}}.\mbox{\hyperlink{structbxe__eth__q__stats_aa648fafd0e52bfdcf4c06632c8d9bd93}{tx\_pkts}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09776}09776 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09777}09777 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09778}09778 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09779}\mbox{\hyperlink{bxe_8c_aa86c1477e0f0bc6dbfed3b6c3e8c7afc}{09779}} \mbox{\hyperlink{bxe_8c_aa86c1477e0f0bc6dbfed3b6c3e8c7afc}{bxe\_init\_tx\_rings}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09780}09780 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09781}09781     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09782}09782 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09783}09783     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09784}09784         \mbox{\hyperlink{bxe_8c_a526e873fa1ec19c653e558dfc772e56d}{bxe\_init\_tx\_ring\_one}}(\&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09785}09785     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09786}09786 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09787}09787 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09788}09788 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09789}\mbox{\hyperlink{bxe_8c_a48a0b9af7e147d5ae14cd46b9f24ecea}{09789}} \mbox{\hyperlink{bxe_8c_a48a0b9af7e147d5ae14cd46b9f24ecea}{bxe\_init\_def\_sb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09790}09790 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09791}09791     \textcolor{keyword}{struct }\mbox{\hyperlink{structhost__sp__status__block}{host\_sp\_status\_block}} *def\_sb = sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09792}09792     bus\_addr\_t mapping = sc-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09793}09793     \textcolor{keywordtype}{int} igu\_sp\_sb\_index;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09794}09794     \textcolor{keywordtype}{int} igu\_seg\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09795}09795     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09796}09796     \textcolor{keywordtype}{int} func = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09797}09797     \textcolor{keywordtype}{int} reg\_offset, reg\_offset\_en5;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09798}09798     uint64\_t section;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09799}09799     \textcolor{keywordtype}{int} index, sindex;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09800}09800     \textcolor{keyword}{struct }\mbox{\hyperlink{structhc__sp__status__block__data}{hc\_sp\_status\_block\_data}} sp\_sb\_data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09801}09801 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09802}09802     memset(\&sp\_sb\_data, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhc__sp__status__block__data}{hc\_sp\_status\_block\_data}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09803}09803 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09804}09804     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09805}09805         igu\_sp\_sb\_index = \mbox{\hyperlink{bxe_8h_a3867a436cdc160b1ff10daf6a013d83b}{DEF\_SB\_IGU\_ID}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09806}09806         igu\_seg\_id = \mbox{\hyperlink{bxe_8h_add9fdf5f2dd5f82ae97153d185248ac8}{HC\_SEG\_ACCESS\_DEF}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09807}09807     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09808}09808         igu\_sp\_sb\_index = sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09809}09809         igu\_seg\_id = \mbox{\hyperlink{ecore__hsi_8h_a54856097d196887fa81c3c8467fe978ea9a097404a7c5fe7e7f2d42fcaa54fc83}{IGU\_SEG\_ACCESS\_DEF}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09810}09810     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09811}09811 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09812}09812     \textcolor{comment}{/* attentions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09813}09813     section = ((uint64\_t)mapping +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09814}09814                offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structhost__sp__status__block}{host\_sp\_status\_block}}, atten\_status\_block));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09815}09815     def\_sb-\/>\mbox{\hyperlink{structhost__sp__status__block_a76040c72ce0abaf4c97ec0499fb2dcc3}{atten\_status\_block}}.\mbox{\hyperlink{structatten__sp__status__block_aded5a695ba3121c51d223dfa831cf8f8}{status\_block\_id}} = igu\_sp\_sb\_index;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09816}09816     sc-\/>\mbox{\hyperlink{structbxe__softc_a0261db8eeb07cc916ea75663c7560c64}{attn\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09817}09817 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09818}09818     reg\_offset = (port) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09819}09819                      \mbox{\hyperlink{ecore__reg_8h_a279a27ade0af5030215b6afd1b9d4c9c}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_1\_OUT\_0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09820}09820                      \mbox{\hyperlink{ecore__reg_8h_aff48db9d459a874195704e419d017636}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_0\_OUT\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09821}09821     reg\_offset\_en5 = (port) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09822}09822                          \mbox{\hyperlink{ecore__reg_8h_a6507950b492e72664b107e530407f75d}{MISC\_REG\_AEU\_ENABLE5\_FUNC\_1\_OUT\_0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09823}09823                          \mbox{\hyperlink{ecore__reg_8h_aa8489d6854d255316046bf9543f67d41}{MISC\_REG\_AEU\_ENABLE5\_FUNC\_0\_OUT\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09824}09824 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09825}09825     \textcolor{keywordflow}{for} (index = 0; index < \mbox{\hyperlink{bxe_8h_a4be94046c812cf4b273d155bef344b98}{MAX\_DYNAMIC\_ATTN\_GRPS}}; index++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09826}09826         \textcolor{comment}{/* take care of sig[0]..sig[4] */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09827}09827         \textcolor{keywordflow}{for} (sindex = 0; sindex < 4; sindex++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09828}09828             sc-\/>\mbox{\hyperlink{structbxe__softc_abcba09d6d14eff9dd5b4d60b2138b040}{attn\_group}}[index].\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[sindex] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09829}09829                 \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, (reg\_offset + (sindex * 0x4) + (0x10 * index)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09830}09830         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09831}09831 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09832}09832         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09833}09833             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09834}09834 \textcolor{comment}{             * enable5 is separate from the rest of the registers,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09835}09835 \textcolor{comment}{             * and the address skip is 4 and not 16 between the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09836}09836 \textcolor{comment}{             * different groups}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09837}09837 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09838}09838             sc-\/>\mbox{\hyperlink{structbxe__softc_abcba09d6d14eff9dd5b4d60b2138b040}{attn\_group}}[index].\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09839}09839                 \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, (reg\_offset\_en5 + (0x4 * index)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09840}09840         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09841}09841             sc-\/>\mbox{\hyperlink{structbxe__softc_abcba09d6d14eff9dd5b4d60b2138b040}{attn\_group}}[index].\mbox{\hyperlink{structattn__route_a0fb5a2f8d2ba31bbafdd994d1bb835a0}{sig}}[4] = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09842}09842         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09843}09843     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09844}09844 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09845}09845     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09846}09846         reg\_offset = (port) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09847}09847                          \mbox{\hyperlink{ecore__reg_8h_a94849cbbb6b0e580d73645cdcaf59797}{HC\_REG\_ATTN\_MSG1\_ADDR\_L}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09848}09848                          \mbox{\hyperlink{ecore__reg_8h_ad6a7bfa1a12c7b746bfbd69de63d97ae}{HC\_REG\_ATTN\_MSG0\_ADDR\_L}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09849}09849         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, reg\_offset, \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(section));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09850}09850         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (reg\_offset + 4), \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(section));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09851}09851     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09852}09852         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a14bf984baba2dfb6d9a6a0049bc8c307}{IGU\_REG\_ATTN\_MSG\_ADDR\_L}}, \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(section));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09853}09853         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aaead34a5165bed6e2dee3b62e6794f95}{IGU\_REG\_ATTN\_MSG\_ADDR\_H}}, \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(section));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09854}09854     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09855}09855 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09856}09856     section = ((uint64\_t)mapping +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09857}09857                offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structhost__sp__status__block}{host\_sp\_status\_block}}, sp\_sb));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09858}09858 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09859}09859     \mbox{\hyperlink{bxe_8c_a2e202b23f04e9064e1505d91a2647344}{bxe\_zero\_sp\_sb}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09860}09860 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09861}09861     \textcolor{comment}{/* PCI guarantees endianity of regpair */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09862}09862     sp\_sb\_data.state           = \mbox{\hyperlink{ecore__hsi_8h_ac6327c28b6bed775df6656e6e2761189ae496c2e712d8f372b41c74d0b583ce9b}{SB\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09863}09863     sp\_sb\_data.\mbox{\hyperlink{structhc__sp__status__block__data_a8c92b8f6c058cb011a363d600edbf7e6}{host\_sb\_addr}}.\mbox{\hyperlink{structregpair__native__t_a917dc04b8d46daa88f2f53157968bed1}{lo}} = \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(section);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09864}09864     sp\_sb\_data.\mbox{\hyperlink{structhc__sp__status__block__data_a8c92b8f6c058cb011a363d600edbf7e6}{host\_sb\_addr}}.\mbox{\hyperlink{structregpair__native__t_a29aa2b67ac498a5b7df5eee6bc5dddff}{hi}} = \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(section);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09865}09865     sp\_sb\_data.igu\_sb\_id       = igu\_sp\_sb\_index;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09866}09866     sp\_sb\_data.igu\_seg\_id      = igu\_seg\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09867}09867     sp\_sb\_data.\mbox{\hyperlink{structhc__sp__status__block__data_a52044bddfce8a0a18556447a6993b805}{p\_func}}.pf\_id    = func;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09868}09868     sp\_sb\_data.\mbox{\hyperlink{structhc__sp__status__block__data_a52044bddfce8a0a18556447a6993b805}{p\_func}}.vnic\_id  = \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09869}09869     sp\_sb\_data.\mbox{\hyperlink{structhc__sp__status__block__data_a52044bddfce8a0a18556447a6993b805}{p\_func}}.vf\_id    = 0xff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09870}09870 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09871}09871     \mbox{\hyperlink{bxe_8c_a50118d35d6e60fd0814c5f6e7c2d86ea}{bxe\_wr\_sp\_sb\_data}}(sc, \&sp\_sb\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09872}09872 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09873}09873     \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a52689eae4ee0744b9fcdc3ca6062fb7c}{IGU\_INT\_ENABLE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09874}09874 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09875}09875 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09876}09876 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09877}\mbox{\hyperlink{bxe_8c_a1bf62312afa2fa805a04bc269d84699a}{09877}} \mbox{\hyperlink{bxe_8c_a1bf62312afa2fa805a04bc269d84699a}{bxe\_init\_sp\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09878}09878 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09879}09879     atomic\_store\_rel\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_abb5f0e2502a85ee8e234550ee0ad0a55}{cq\_spq\_left}}, \mbox{\hyperlink{bxe_8h_a97c1c61bc159e37e54bac332f41b3738}{MAX\_SPQ\_PENDING}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09880}09880     sc-\/>\mbox{\hyperlink{structbxe__softc_ace6d811b17e2065696ebe680fb2e27fd}{spq\_prod\_idx}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09881}09881     sc-\/>\mbox{\hyperlink{structbxe__softc_a38e2ccf086879342eeec40474a22b0e3}{dsb\_sp\_prod}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}}-\/>\mbox{\hyperlink{structhost__sp__status__block_a5fcc1e640abdbb18a7e9bf8e10f2ad26}{sp\_sb}}.\mbox{\hyperlink{structhc__sp__status__block_ab60fb1c63deea3149b624857cbff6dab}{index\_values}}[\mbox{\hyperlink{bxe_8h_a858c6e82b3da6e9094f39a6950e31494}{HC\_SP\_INDEX\_ETH\_DEF\_CONS}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09882}09882     sc-\/>\mbox{\hyperlink{structbxe__softc_a671332a7386b3d2a88f8382c9db8b2cf}{spq\_prod\_bd}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a118b7ddd116d503983abc8bb596b4778}{spq}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09883}09883     sc-\/>\mbox{\hyperlink{structbxe__softc_a1345d43ff7704933724053b0a067953d}{spq\_last\_bd}} = (sc-\/>\mbox{\hyperlink{structbxe__softc_a671332a7386b3d2a88f8382c9db8b2cf}{spq\_prod\_bd}} + \mbox{\hyperlink{bxe_8h_ac03b8618e86f0982a74712558499220e}{MAX\_SP\_DESC\_CNT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09884}09884 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09885}09885 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09886}09886 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09887}\mbox{\hyperlink{bxe_8c_aaaa90039e92dcdade68ed8770e563371}{09887}} \mbox{\hyperlink{bxe_8c_aaaa90039e92dcdade68ed8770e563371}{bxe\_init\_eq\_ring}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09888}09888 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09889}09889     \textcolor{keyword}{union }\mbox{\hyperlink{unionevent__ring__elem}{event\_ring\_elem}} *elem;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09890}09890     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09891}09891 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09892}09892     \textcolor{keywordflow}{for} (i = 1; i <= \mbox{\hyperlink{bxe_8h_a013204b66c5bead2467b6d3808b10f4e}{NUM\_EQ\_PAGES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09893}09893         elem = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a20e83974ee742b9647a11a5d8d696b44}{eq}}[\mbox{\hyperlink{bxe_8h_a52427378b0e45b253eeb4e8b49734318}{EQ\_DESC\_CNT\_PAGE}} * i -\/ 1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09894}09894 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09895}09895         elem-\/>\mbox{\hyperlink{unionevent__ring__elem_ad92b7a3c0d905f1baf674df0f5122327}{next\_page}}.\mbox{\hyperlink{structevent__ring__next_a635ec60f42c21e8ae33504307812c4b7}{addr}}.\mbox{\hyperlink{structregpair__t_afadda4afbbbed42148e10d7dccc574ba}{hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09896}09896                                                  \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09897}09897                                                  (i \% \mbox{\hyperlink{bxe_8h_a013204b66c5bead2467b6d3808b10f4e}{NUM\_EQ\_PAGES}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09898}09898         elem-\/>\mbox{\hyperlink{unionevent__ring__elem_ad92b7a3c0d905f1baf674df0f5122327}{next\_page}}.\mbox{\hyperlink{structevent__ring__next_a635ec60f42c21e8ae33504307812c4b7}{addr}}.\mbox{\hyperlink{structregpair__t_a28917d5821a6427eb1adba4c0ba7a4b8}{lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09899}09899                                                  \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09900}09900                                                  (i \% \mbox{\hyperlink{bxe_8h_a013204b66c5bead2467b6d3808b10f4e}{NUM\_EQ\_PAGES}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09901}09901     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09902}09902 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09903}09903     sc-\/>\mbox{\hyperlink{structbxe__softc_a7f69d134909bb86c3e44d5a644f418d0}{eq\_cons}}    = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09904}09904     sc-\/>\mbox{\hyperlink{structbxe__softc_a48554fcb44848d021d560c59a588a152}{eq\_prod}}    = \mbox{\hyperlink{bxe_8h_a74317c885d9e0d859713810015cc29be}{NUM\_EQ\_DESC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09905}09905     sc-\/>\mbox{\hyperlink{structbxe__softc_a348cb9fa801fb63c964384d8795e3da8}{eq\_cons\_sb}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}}-\/>\mbox{\hyperlink{structhost__sp__status__block_a5fcc1e640abdbb18a7e9bf8e10f2ad26}{sp\_sb}}.\mbox{\hyperlink{structhc__sp__status__block_ab60fb1c63deea3149b624857cbff6dab}{index\_values}}[\mbox{\hyperlink{bxe_8h_aee0370f8422af69c8f85f8465e67e7e9}{HC\_SP\_INDEX\_EQ\_CONS}}];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09906}09906 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09907}09907     atomic\_store\_rel\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aed766106b28f783ee287253ef2f39a20}{eq\_spq\_left}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09908}09908                           (min((\mbox{\hyperlink{bxe_8h_ac03b8618e86f0982a74712558499220e}{MAX\_SP\_DESC\_CNT}} -\/ \mbox{\hyperlink{bxe_8h_a97c1c61bc159e37e54bac332f41b3738}{MAX\_SPQ\_PENDING}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09909}09909                                \mbox{\hyperlink{bxe_8h_a74317c885d9e0d859713810015cc29be}{NUM\_EQ\_DESC}}) -\/ 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09910}09910 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09911}09911 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09912}09912 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09913}\mbox{\hyperlink{bxe_8c_a37c5df5b5217b7114a7e749d02223107}{09913}} \mbox{\hyperlink{bxe_8c_a37c5df5b5217b7114a7e749d02223107}{bxe\_init\_internal\_common}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09914}09914 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09915}09915     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09916}09916 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09917}09917     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09918}09918 \textcolor{comment}{     * Zero this manually as its initialization is currently missing}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09919}09919 \textcolor{comment}{     * in the initTool.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09920}09920 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09921}09921     \textcolor{keywordflow}{for} (i = 0; i < (\mbox{\hyperlink{ecore__fw__defs_8h_aed91837a53210b3178b2b3052761985d}{USTORM\_AGG\_DATA\_SIZE}} >> 2); i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09922}09922         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09923}09923                (\mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a550ec3b6cd7c864b9c46e972f8534552}{USTORM\_AGG\_DATA\_OFFSET}} + (i * 4)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09924}09924                0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09925}09925     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09926}09926 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09927}09927     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09928}09928         \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_aed3d476de2050fc28bf832714bcc7256}{CSTORM\_IGU\_MODE\_OFFSET}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09929}09929                 \mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc) ? \mbox{\hyperlink{ecore__hsi_8h_a6017ea3d4482688801114cfd28cdaafba3f996c0e3c7d0a32c3a5ea5adb6738aa}{HC\_IGU\_BC\_MODE}} : \mbox{\hyperlink{ecore__hsi_8h_a6017ea3d4482688801114cfd28cdaafbaf61d12f8334e8887b71a82624fc3ba08}{HC\_IGU\_NBC\_MODE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09930}09930     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09931}09931 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09932}09932 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09933}09933 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09934}\mbox{\hyperlink{bxe_8c_a2fc491f747f516b1c8cdbe7f09b49b4d}{09934}} \mbox{\hyperlink{bxe_8c_a2fc491f747f516b1c8cdbe7f09b49b4d}{bxe\_init\_internal}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09935}09935                   uint32\_t         load\_code)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09936}09936 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09937}09937     \textcolor{keywordflow}{switch} (load\_code) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09938}09938     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a56ed71995441ad66fb821f1fcf4b2753}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09939}09939     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a688ae0d21f8a14916456d2051fb14d54}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON\_CHIP}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09940}09940         \mbox{\hyperlink{bxe_8c_a37c5df5b5217b7114a7e749d02223107}{bxe\_init\_internal\_common}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09941}09941         \textcolor{comment}{/* no break */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09942}09942 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09943}09943     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a55c05624df1c93e2fd6e05acc25ea0d1}{FW\_MSG\_CODE\_DRV\_LOAD\_PORT}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09944}09944         \textcolor{comment}{/* nothing to do */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09945}09945         \textcolor{comment}{/* no break */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09946}09946 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09947}09947     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_ae351e81091525dc547b47825e91ac914}{FW\_MSG\_CODE\_DRV\_LOAD\_FUNCTION}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09948}09948         \textcolor{comment}{/* internal memory per function is initialized inside bxe\_pf\_init */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09949}09949         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09950}09950 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09951}09951     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09952}09952         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unknown load\_code (0x\%x) from MCP\(\backslash\)n"{}}, load\_code);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09953}09953         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09954}09954     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09955}09955 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09956}09956 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09957}09957 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09958}\mbox{\hyperlink{bxe_8c_aa69416fea46836f85733692c04126e2d}{09958}} \mbox{\hyperlink{bxe_8c_aa69416fea46836f85733692c04126e2d}{storm\_memset\_func\_cfg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}                         *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09959}09959                       \textcolor{keyword}{struct} \mbox{\hyperlink{structtstorm__eth__function__common__config}{tstorm\_eth\_function\_common\_config}} *tcfg,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09960}09960                       uint16\_t                                  abs\_fid)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09961}09961 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09962}09962     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09963}09963     \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09964}09964 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09965}09965     \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (\mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09966}09966             \mbox{\hyperlink{ecore__fw__defs_8h_a4ec62c17209b0d3f7423e9698764b4af}{TSTORM\_FUNCTION\_COMMON\_CONFIG\_OFFSET}}(abs\_fid));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09967}09967     \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structtstorm__eth__function__common__config}{tstorm\_eth\_function\_common\_config}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09968}09968     \mbox{\hyperlink{bxe_8c_ab05cdbe02d08b583d1714e0f5db5d42d}{ecore\_storm\_memset\_struct}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}}, (uint32\_t *)tcfg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09969}09969 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09970}09970 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09971}09971 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09972}\mbox{\hyperlink{bxe_8c_a80cd7ffb87b80a5ff823eee62dca086f}{09972}} \mbox{\hyperlink{bxe_8c_a80cd7ffb87b80a5ff823eee62dca086f}{bxe\_func\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}            *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09973}09973               \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__func__init__params}{bxe\_func\_init\_params}} *p)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09974}09974 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09975}09975     \textcolor{keyword}{struct }\mbox{\hyperlink{structtstorm__eth__function__common__config}{tstorm\_eth\_function\_common\_config}} tcfg = \{ 0 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09976}09976 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09977}09977     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09978}09978         \mbox{\hyperlink{bxe_8c_aa69416fea46836f85733692c04126e2d}{storm\_memset\_func\_cfg}}(sc, \&tcfg, p-\/>\mbox{\hyperlink{structbxe__func__init__params_ae171be3d9eb487e360f941449815d138}{func\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09979}09979     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09980}09980 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09981}09981     \textcolor{comment}{/* Enable the function in the FW */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09982}09982     \mbox{\hyperlink{bxe_8c_ad32ce7372db57e61624daece369dd72b}{storm\_memset\_vf\_to\_pf}}(sc, p-\/>\mbox{\hyperlink{structbxe__func__init__params_ae171be3d9eb487e360f941449815d138}{func\_id}}, p-\/>\mbox{\hyperlink{structbxe__func__init__params_a81246659fe1f7f64fc101f3028080e12}{pf\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09983}09983     \mbox{\hyperlink{bxe_8c_acee0b5b0a75d3bd0b3d1c11ca684f90c}{storm\_memset\_func\_en}}(sc, p-\/>\mbox{\hyperlink{structbxe__func__init__params_ae171be3d9eb487e360f941449815d138}{func\_id}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09984}09984 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09985}09985     \textcolor{comment}{/* spq */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09986}09986     \textcolor{keywordflow}{if} (p-\/>\mbox{\hyperlink{structbxe__func__init__params_acc1a422766e9f9f4bd9a8a4dc62a1278}{func\_flgs}} \& \mbox{\hyperlink{bxe_8h_abf61882fedca89c59a001c111488c9a0}{FUNC\_FLG\_SPQ}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09987}09987         \mbox{\hyperlink{bxe_8c_a6f782bb17238baa46ac431fc65043bc4}{storm\_memset\_spq\_addr}}(sc, p-\/>\mbox{\hyperlink{structbxe__func__init__params_ab55eb0e99d8a74f3956618d0a58b1c40}{spq\_map}}, p-\/>\mbox{\hyperlink{structbxe__func__init__params_ae171be3d9eb487e360f941449815d138}{func\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09988}09988         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09989}09989                (\mbox{\hyperlink{ecore__reg_8h_a83d9053ce3e02eb316fcd86d46e9ce9b}{XSEM\_REG\_FAST\_MEMORY}} + \mbox{\hyperlink{ecore__fw__defs_8h_ad6771c43bed6d6af3cd484905214120a}{XSTORM\_SPQ\_PROD\_OFFSET}}(p-\/>\mbox{\hyperlink{structbxe__func__init__params_ae171be3d9eb487e360f941449815d138}{func\_id}})),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09990}09990                p-\/>\mbox{\hyperlink{structbxe__func__init__params_ace84ad24d488a405dd9172662069126a}{spq\_prod}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09991}09991     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09992}09992 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09993}09993 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09994}09994 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09995}09995 \textcolor{comment}{ * Calculates the sum of vn\_min\_rates.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09996}09996 \textcolor{comment}{ * It's needed for further normalizing of the min\_rates.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09997}09997 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09998}09998 \textcolor{comment}{ *   sum of vn\_min\_rates.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l09999}09999 \textcolor{comment}{ *     or}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10000}10000 \textcolor{comment}{ *   0 -\/ if all the min\_rates are 0.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10001}10001 \textcolor{comment}{ * In the later case fainess algorithm should be deactivated.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10002}10002 \textcolor{comment}{ * If all min rates are not zero then those that are zeroes will be set to 1.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10003}10003 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10004}10004 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10005}\mbox{\hyperlink{bxe_8c_a47c6341c1d91a4da5197b9d2ee3b1258}{10005}} \mbox{\hyperlink{bxe_8c_a47c6341c1d91a4da5197b9d2ee3b1258}{bxe\_calc\_vn\_min}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}       *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10006}10006                 \textcolor{keyword}{struct} \mbox{\hyperlink{structcmng__init__input}{cmng\_init\_input}} *input)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10007}10007 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10008}10008     uint32\_t vn\_cfg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10009}10009     uint32\_t vn\_min\_rate;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10010}10010     \textcolor{keywordtype}{int} all\_zero = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10011}10011     \textcolor{keywordtype}{int} vn;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10012}10012 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10013}10013     \textcolor{keywordflow}{for} (vn = \mbox{\hyperlink{ecore__hsi_8h_a9fb58d2f1975818374c8df9dba5c3d34}{VN\_0}}; vn < \mbox{\hyperlink{bxe_8h_a999e5648ea63285e8a63072a54c834ea}{SC\_MAX\_VN\_NUM}}(sc); vn++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10014}10014         vn\_cfg = sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[vn];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10015}10015         vn\_min\_rate = (((vn\_cfg \& \mbox{\hyperlink{ecore__hsi_8h_ab70b343e6cf8a85542c9421b7da0f43b}{FUNC\_MF\_CFG\_MIN\_BW\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10016}10016                         \mbox{\hyperlink{ecore__hsi_8h_ae4f43c3505853037e527490c48986051}{FUNC\_MF\_CFG\_MIN\_BW\_SHIFT}}) * 100);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10017}10017 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10018}10018         \textcolor{keywordflow}{if} (vn\_cfg \& \mbox{\hyperlink{ecore__hsi_8h_a3953fb2d49d89b0b8d76e54292f71b7f}{FUNC\_MF\_CFG\_FUNC\_HIDE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10019}10019             \textcolor{comment}{/* skip hidden VNs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10020}10020             vn\_min\_rate = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10021}10021         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!vn\_min\_rate) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10022}10022             \textcolor{comment}{/* If min rate is zero -\/ set it to 100 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10023}10023             vn\_min\_rate = \mbox{\hyperlink{bxe_8h_a317d9b686215cac74b09e10bef72353c}{DEF\_MIN\_RATE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10024}10024         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10025}10025             all\_zero = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10026}10026         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10027}10027 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10028}10028         input-\/>\mbox{\hyperlink{structcmng__init__input_a8ff4252cf45e9f76a018b764423c9ce2}{vnic\_min\_rate}}[vn] = vn\_min\_rate;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10029}10029     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10030}10030 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10031}10031     \textcolor{comment}{/* if ETS or all min rates are zeros -\/ disable fairness */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10032}10032     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe__dcb_8h_ab2b9de8842e19cba76d5a8136fcd0d26}{BXE\_IS\_ETS\_ENABLED}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10033}10033         input-\/>\mbox{\hyperlink{structcmng__init__input_a840fc4de617dc432d479e1e212dd4c59}{flags}}.\mbox{\hyperlink{structcmng__flags__per__port_aa60591cedb178b71e9f7767caadd01b6}{cmng\_enables}} \&= \string~CMNG\_FLAGS\_PER\_PORT\_FAIRNESS\_VN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10034}10034         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Fairness disabled (ETS)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10035}10035     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (all\_zero) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10036}10036         input-\/>\mbox{\hyperlink{structcmng__init__input_a840fc4de617dc432d479e1e212dd4c59}{flags}}.\mbox{\hyperlink{structcmng__flags__per__port_aa60591cedb178b71e9f7767caadd01b6}{cmng\_enables}} \&= \string~CMNG\_FLAGS\_PER\_PORT\_FAIRNESS\_VN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10037}10037         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10038}10038               \textcolor{stringliteral}{"{}Fariness disabled (all MIN values are zeroes)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10039}10039     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10040}10040         input-\/>\mbox{\hyperlink{structcmng__init__input_a840fc4de617dc432d479e1e212dd4c59}{flags}}.\mbox{\hyperlink{structcmng__flags__per__port_aa60591cedb178b71e9f7767caadd01b6}{cmng\_enables}} |= \mbox{\hyperlink{ecore__hsi_8h_aa40985d0b3f1df0afe229a255e4681b9}{CMNG\_FLAGS\_PER\_PORT\_FAIRNESS\_VN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10041}10041     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10042}10042 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10043}10043 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10044}10044 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint16\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10045}\mbox{\hyperlink{bxe_8c_a253f62d4acb55c44606d68409c7e6c38}{10045}} \mbox{\hyperlink{bxe_8c_a253f62d4acb55c44606d68409c7e6c38}{bxe\_extract\_max\_cfg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10046}10046                     uint32\_t         \mbox{\hyperlink{structmf__cfg}{mf\_cfg}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10047}10047 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10048}10048     uint16\_t max\_cfg = ((\mbox{\hyperlink{structmf__cfg}{mf\_cfg}} \& \mbox{\hyperlink{ecore__hsi_8h_aafe9b5da0d850d9ab973f3a2a570778a}{FUNC\_MF\_CFG\_MAX\_BW\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10049}10049                         \mbox{\hyperlink{ecore__hsi_8h_af0ffbcf643d2fa7a7a9746219954ab53}{FUNC\_MF\_CFG\_MAX\_BW\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10050}10050 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10051}10051     \textcolor{keywordflow}{if} (!max\_cfg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10052}10052         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Max BW configured to 0 -\/ using 100 instead\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10053}10053         max\_cfg = 100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10054}10054     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10055}10055 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10056}10056     \textcolor{keywordflow}{return} (max\_cfg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10057}10057 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10058}10058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10059}10059 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10060}\mbox{\hyperlink{bxe_8c_a23e1e74ab43c008a88999e4700e30ce0}{10060}} \mbox{\hyperlink{bxe_8c_a23e1e74ab43c008a88999e4700e30ce0}{bxe\_calc\_vn\_max}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}       *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10061}10061                 \textcolor{keywordtype}{int}                    vn,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10062}10062                 \textcolor{keyword}{struct} \mbox{\hyperlink{structcmng__init__input}{cmng\_init\_input}} *input)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10063}10063 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10064}10064     uint16\_t vn\_max\_rate;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10065}10065     uint32\_t vn\_cfg = sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[vn];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10066}10066     uint32\_t max\_cfg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10067}10067 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10068}10068     \textcolor{keywordflow}{if} (vn\_cfg \& \mbox{\hyperlink{ecore__hsi_8h_a3953fb2d49d89b0b8d76e54292f71b7f}{FUNC\_MF\_CFG\_FUNC\_HIDE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10069}10069         vn\_max\_rate = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10070}10070     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10071}10071         max\_cfg = \mbox{\hyperlink{bxe_8c_a253f62d4acb55c44606d68409c7e6c38}{bxe\_extract\_max\_cfg}}(sc, vn\_cfg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10072}10072 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10073}10073         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab69a549c7c8c515be9b1c947eb7ecfca}{IS\_MF\_SI}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10074}10074             \textcolor{comment}{/* max\_cfg in percents of linkspeed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10075}10075             vn\_max\_rate = ((sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a324c3d820f392e712f071dde6a4aa6ca}{line\_speed}} * max\_cfg) / 100);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10076}10076         \} \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* SD modes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10077}10077             \textcolor{comment}{/* max\_cfg is absolute in 100Mb units */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10078}10078             vn\_max\_rate = (max\_cfg * 100);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10079}10079         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10080}10080     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10081}10081 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10082}10082     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}vn \%d: vn\_max\_rate \%d\(\backslash\)n"{}}, vn, vn\_max\_rate);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10083}10083 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10084}10084     input-\/>\mbox{\hyperlink{structcmng__init__input_abec0a34998fcfa9c35bc3ef6ca2edf9d}{vnic\_max\_rate}}[vn] = vn\_max\_rate;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10085}10085 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10086}10086 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10087}10087 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10088}\mbox{\hyperlink{bxe_8c_a2212c57e59956cf53b4f735141f87282}{10088}} \mbox{\hyperlink{bxe_8c_a2212c57e59956cf53b4f735141f87282}{bxe\_cmng\_fns\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10089}10089                   uint8\_t          read\_cfg,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10090}10090                   uint8\_t          cmng\_type)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10091}10091 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10092}10092     \textcolor{keyword}{struct }\mbox{\hyperlink{structcmng__init__input}{cmng\_init\_input}} input;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10093}10093     \textcolor{keywordtype}{int} vn;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10094}10094 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10095}10095     memset(\&input, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcmng__init__input}{cmng\_init\_input}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10096}10096 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10097}10097     input.\mbox{\hyperlink{structcmng__init__input_aa04bba58627a48d27b55307f124a4ae2}{port\_rate}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a324c3d820f392e712f071dde6a4aa6ca}{line\_speed}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10098}10098 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10099}10099     \textcolor{keywordflow}{if} (cmng\_type == \mbox{\hyperlink{bxe_8h_a0adf7ae1b4fd9f5e3932e151e751cc0e}{CMNG\_FNS\_MINMAX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10100}10100         \textcolor{comment}{/* read mf conf from shmem */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10101}10101         \textcolor{keywordflow}{if} (read\_cfg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10102}10102             \mbox{\hyperlink{bxe_8c_ae32c29c31951ee82cda3e99ad0f9a65d}{bxe\_read\_mf\_cfg}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10103}10103         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10104}10104 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10105}10105         \textcolor{comment}{/* get VN min rate and enable fairness if not 0 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10106}10106         \mbox{\hyperlink{bxe_8c_a47c6341c1d91a4da5197b9d2ee3b1258}{bxe\_calc\_vn\_min}}(sc, \&input);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10107}10107 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10108}10108         \textcolor{comment}{/* get VN max rate */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10109}10109         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10110}10110             \textcolor{keywordflow}{for} (vn = \mbox{\hyperlink{ecore__hsi_8h_a9fb58d2f1975818374c8df9dba5c3d34}{VN\_0}}; vn < \mbox{\hyperlink{bxe_8h_a999e5648ea63285e8a63072a54c834ea}{SC\_MAX\_VN\_NUM}}(sc); vn++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10111}10111                 \mbox{\hyperlink{bxe_8c_a23e1e74ab43c008a88999e4700e30ce0}{bxe\_calc\_vn\_max}}(sc, vn, \&input);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10112}10112             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10113}10113         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10114}10114 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10115}10115         \textcolor{comment}{/* always enable rate shaping and fairness */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10116}10116         input.\mbox{\hyperlink{structcmng__init__input_a840fc4de617dc432d479e1e212dd4c59}{flags}}.\mbox{\hyperlink{structcmng__flags__per__port_aa60591cedb178b71e9f7767caadd01b6}{cmng\_enables}} |= \mbox{\hyperlink{ecore__hsi_8h_ab8fc03ffa03cb19998acf27f7bae0c74}{CMNG\_FLAGS\_PER\_PORT\_RATE\_SHAPING\_VN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10117}10117 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10118}10118         \mbox{\hyperlink{ecore__init_8h_abe9ab499f95224501190e2dd4ab4e755}{ecore\_init\_cmng}}(\&input, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ae45c3fa081c958a5b736fb1fab1fb6e5}{cmng}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10119}10119         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10120}10120     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10121}10121 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10122}10122     \textcolor{comment}{/* rate shaping and fairness are disabled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10123}10123     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}rate shaping and fairness have been disabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10124}10124 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10125}10125 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10126}10126 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10127}\mbox{\hyperlink{bxe_8c_ae3684edaf191533c7425a406f758cd0a}{10127}} \mbox{\hyperlink{bxe_8c_ae3684edaf191533c7425a406f758cd0a}{bxe\_get\_cmng\_fns\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10128}10128 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10129}10129     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10130}10130         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_a70c051caed806e529769bfec2879d47c}{CMNG\_FNS\_NONE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10131}10131     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10132}10132 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10133}10133     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10134}10134         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_a0adf7ae1b4fd9f5e3932e151e751cc0e}{CMNG\_FNS\_MINMAX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10135}10135     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10136}10136 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10137}10137     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_a70c051caed806e529769bfec2879d47c}{CMNG\_FNS\_NONE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10138}10138 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10139}10139 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10140}10140 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10141}\mbox{\hyperlink{bxe_8c_a52e02dd8452a48e1bdd61876d6d06ec1}{10141}} \mbox{\hyperlink{bxe_8c_a52e02dd8452a48e1bdd61876d6d06ec1}{storm\_memset\_cmng}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10142}10142                   \textcolor{keyword}{struct} \mbox{\hyperlink{structcmng__init}{cmng\_init}} *cmng,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10143}10143                   uint8\_t          port)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10144}10144 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10145}10145     \textcolor{keywordtype}{int} vn;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10146}10146     \textcolor{keywordtype}{int} func;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10147}10147     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10148}10148     \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10149}10149 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10150}10150     \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (\mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10151}10151             \mbox{\hyperlink{ecore__fw__defs_8h_a6e7785a77e4f44ba44d96057715992a8}{XSTORM\_CMNG\_PER\_PORT\_VARS\_OFFSET}}(port));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10152}10152     \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structcmng__struct__per__port}{cmng\_struct\_per\_port}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10153}10153     \mbox{\hyperlink{bxe_8c_ab05cdbe02d08b583d1714e0f5db5d42d}{ecore\_storm\_memset\_struct}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}}, (uint32\_t *)\&cmng-\/>\mbox{\hyperlink{structcmng__init_aa6068853b824490971dcd6e8361c93e4}{port}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10154}10154 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10155}10155     \textcolor{keywordflow}{for} (vn = \mbox{\hyperlink{ecore__hsi_8h_a9fb58d2f1975818374c8df9dba5c3d34}{VN\_0}}; vn < \mbox{\hyperlink{bxe_8h_a999e5648ea63285e8a63072a54c834ea}{SC\_MAX\_VN\_NUM}}(sc); vn++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10156}10156         func = \mbox{\hyperlink{bxe_8h_ace6bb2d92ff97bd688f0b66e600783a9}{func\_by\_vn}}(sc, vn);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10157}10157 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10158}10158         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (\mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10159}10159                 \mbox{\hyperlink{ecore__fw__defs_8h_ab93caeeff5add94607834843a60bacb7}{XSTORM\_RATE\_SHAPING\_PER\_VN\_VARS\_OFFSET}}(func));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10160}10160         \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structrate__shaping__vars__per__vn}{rate\_shaping\_vars\_per\_vn}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10161}10161         \mbox{\hyperlink{bxe_8c_ab05cdbe02d08b583d1714e0f5db5d42d}{ecore\_storm\_memset\_struct}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10162}10162                                   (uint32\_t *)\&cmng-\/>\mbox{\hyperlink{structcmng__init_a3aa7e98b6376e944673723e4255768d8}{vnic}}.\mbox{\hyperlink{structcmng__vnic_a84a0c0cc55fd6af638edf8f578a00071}{vnic\_max\_rate}}[vn]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10163}10163 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10164}10164         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (\mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10165}10165                 \mbox{\hyperlink{ecore__fw__defs_8h_a665bc4949efa21431654f8eb2b989345}{XSTORM\_FAIRNESS\_PER\_VN\_VARS\_OFFSET}}(func));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10166}10166         \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structfairness__vars__per__vn}{fairness\_vars\_per\_vn}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10167}10167         \mbox{\hyperlink{bxe_8c_ab05cdbe02d08b583d1714e0f5db5d42d}{ecore\_storm\_memset\_struct}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10168}10168                                   (uint32\_t *)\&cmng-\/>\mbox{\hyperlink{structcmng__init_a3aa7e98b6376e944673723e4255768d8}{vnic}}.\mbox{\hyperlink{structcmng__vnic_aa1f55e5226fe3449684ba22d82b96269}{vnic\_min\_rate}}[vn]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10169}10169     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10170}10170 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10171}10171 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10172}10172 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10173}\mbox{\hyperlink{bxe_8c_aadbb525d9b10045894939793191485d9}{10173}} \mbox{\hyperlink{bxe_8c_aadbb525d9b10045894939793191485d9}{bxe\_pf\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10174}10174 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10175}10175     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__func__init__params}{bxe\_func\_init\_params}} func\_init = \{ 0 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10176}10176     \textcolor{keyword}{struct }\mbox{\hyperlink{structevent__ring__data}{event\_ring\_data}} eq\_data = \{ \{ 0 \} \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10177}10177     uint16\_t \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10178}10178 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10179}10179     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10180}10180         \textcolor{comment}{/* reset IGU PF statistics: MSIX + ATTN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10181}10181         \textcolor{comment}{/* PF */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10182}10182         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10183}10183                (\mbox{\hyperlink{ecore__reg_8h_a556b2be32e116870caafc189bc946581}{IGU\_REG\_STATISTIC\_NUM\_MESSAGE\_SENT}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10184}10184                 (\mbox{\hyperlink{bxe_8h_afdba8c2d2e0ed6405b60497189095154}{BXE\_IGU\_STAS\_MSG\_VF\_CNT}} * 4) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10185}10185                 ((\mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(sc) ? \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc) : \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)) * 4)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10186}10186                0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10187}10187         \textcolor{comment}{/* ATTN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10188}10188         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10189}10189                (\mbox{\hyperlink{ecore__reg_8h_a556b2be32e116870caafc189bc946581}{IGU\_REG\_STATISTIC\_NUM\_MESSAGE\_SENT}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10190}10190                 (\mbox{\hyperlink{bxe_8h_afdba8c2d2e0ed6405b60497189095154}{BXE\_IGU\_STAS\_MSG\_VF\_CNT}} * 4) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10191}10191                 (\mbox{\hyperlink{bxe_8h_aa944634feaba85ca401a86b818d4659b}{BXE\_IGU\_STAS\_MSG\_PF\_CNT}} * 4) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10192}10192                 ((\mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(sc) ? \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc) : \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)) * 4)),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10193}10193                0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10194}10194     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10195}10195 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10196}10196     \textcolor{comment}{/* function setup flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10197}10197     \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} = (\mbox{\hyperlink{bxe_8h_a2eb8dabdb808a87da339b25c4a52284f}{FUNC\_FLG\_STATS}} | \mbox{\hyperlink{bxe_8h_a702b48d937249078dd3132bb1ce15dd3}{FUNC\_FLG\_LEADING}} | \mbox{\hyperlink{bxe_8h_abf61882fedca89c59a001c111488c9a0}{FUNC\_FLG\_SPQ}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10198}10198 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10199}10199     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10200}10200 \textcolor{comment}{     * This flag is relevant for E1x only.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10201}10201 \textcolor{comment}{     * E2 doesn't have a TPA configuration in a function level.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10202}10202 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10203}10203     \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} |= (if\_getcapenable(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFCAP\_LRO) ? \mbox{\hyperlink{bxe_8h_af9d73bc3afa532591cfcbbba3e85c28a}{FUNC\_FLG\_TPA}} : 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10204}10204 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10205}10205     func\_init.\mbox{\hyperlink{structbxe__func__init__params_acc1a422766e9f9f4bd9a8a4dc62a1278}{func\_flgs}} = \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10206}10206     func\_init.\mbox{\hyperlink{structbxe__func__init__params_a81246659fe1f7f64fc101f3028080e12}{pf\_id}}     = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10207}10207     func\_init.\mbox{\hyperlink{structbxe__func__init__params_ae171be3d9eb487e360f941449815d138}{func\_id}}   = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10208}10208     func\_init.\mbox{\hyperlink{structbxe__func__init__params_ab55eb0e99d8a74f3956618d0a58b1c40}{spq\_map}}   = sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10209}10209     func\_init.\mbox{\hyperlink{structbxe__func__init__params_ace84ad24d488a405dd9172662069126a}{spq\_prod}}  = sc-\/>\mbox{\hyperlink{structbxe__softc_ace6d811b17e2065696ebe680fb2e27fd}{spq\_prod\_idx}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10210}10210 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10211}10211     \mbox{\hyperlink{bxe_8c_a80cd7ffb87b80a5ff823eee62dca086f}{bxe\_func\_init}}(sc, \&func\_init);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10212}10212 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10213}10213     memset(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ae45c3fa081c958a5b736fb1fab1fb6e5}{cmng}}, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcmng__struct__per__port}{cmng\_struct\_per\_port}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10214}10214 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10215}10215     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10216}10216 \textcolor{comment}{     * Congestion management values depend on the link rate.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10217}10217 \textcolor{comment}{     * There is no active link so initial link rate is set to 10Gbps.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10218}10218 \textcolor{comment}{     * When the link comes up the congestion management values are}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10219}10219 \textcolor{comment}{     * re-\/calculated according to the actual link rate.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10220}10220 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10221}10221     sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a324c3d820f392e712f071dde6a4aa6ca}{line\_speed}} = \mbox{\hyperlink{bxe_8h_a8faae1c4e8d606cc1edf9131252d9fbc}{SPEED\_10000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10222}10222     \mbox{\hyperlink{bxe_8c_a2212c57e59956cf53b4f735141f87282}{bxe\_cmng\_fns\_init}}(sc, TRUE, \mbox{\hyperlink{bxe_8c_ae3684edaf191533c7425a406f758cd0a}{bxe\_get\_cmng\_fns\_mode}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10223}10223 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10224}10224     \textcolor{comment}{/* Only the PMF sets the HW */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10225}10225     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10226}10226         \mbox{\hyperlink{bxe_8c_a52e02dd8452a48e1bdd61876d6d06ec1}{storm\_memset\_cmng}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ae45c3fa081c958a5b736fb1fab1fb6e5}{cmng}}, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10227}10227     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10228}10228 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10229}10229     \textcolor{comment}{/* init Event Queue -\/ PCI bus guarantees correct endainity */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10230}10230     eq\_data.\mbox{\hyperlink{structevent__ring__data_a71bf41cf464a18318f8377d175cbf43b}{base\_addr}}.\mbox{\hyperlink{structregpair__native__t_a29aa2b67ac498a5b7df5eee6bc5dddff}{hi}} = \mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10231}10231     eq\_data.\mbox{\hyperlink{structevent__ring__data_a71bf41cf464a18318f8377d175cbf43b}{base\_addr}}.\mbox{\hyperlink{structregpair__native__t_a917dc04b8d46daa88f2f53157968bed1}{lo}} = \mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10232}10232     eq\_data.producer     = sc-\/>\mbox{\hyperlink{structbxe__softc_a48554fcb44848d021d560c59a588a152}{eq\_prod}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10233}10233     eq\_data.index\_id     = \mbox{\hyperlink{bxe_8h_aee0370f8422af69c8f85f8465e67e7e9}{HC\_SP\_INDEX\_EQ\_CONS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10234}10234     eq\_data.sb\_id        = \mbox{\hyperlink{bxe_8h_a580ce0199640b03605fd9ca942a32bde}{DEF\_SB\_ID}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10235}10235     \mbox{\hyperlink{bxe_8c_a7261cde8df5f4bdd195875d9557dcefd}{storm\_memset\_eq\_data}}(sc, \&eq\_data, \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10236}10236 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10237}10237 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10238}10238 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10239}\mbox{\hyperlink{bxe_8c_a1143f55055908ea1e9854d1ded31114e}{10239}} \mbox{\hyperlink{bxe_8c_a1143f55055908ea1e9854d1ded31114e}{bxe\_hc\_int\_enable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10240}10240 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10241}10241     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10242}10242     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (port) ? \mbox{\hyperlink{ecore__reg_8h_a7ac5b708269e36b577935bbf69304c37}{HC\_REG\_CONFIG\_1}} : \mbox{\hyperlink{ecore__reg_8h_a2b823b00b743b26386d2b45bc39f2b53}{HC\_REG\_CONFIG\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10243}10243     uint32\_t val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10244}10244     uint8\_t msix = (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}}) ? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10245}10245     uint8\_t single\_msix = ((sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10246}10246                            (sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}} == 1)) ? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10247}10247     uint8\_t msi = (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}) ? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10248}10248 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10249}10249     \textcolor{keywordflow}{if} (msix) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10250}10250         val \&= \string~(\mbox{\hyperlink{ecore__reg_8h_a8b34e733f3fa6a42a1bb4b8ec733f837}{HC\_CONFIG\_0\_REG\_SINGLE\_ISR\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10251}10251                  \mbox{\hyperlink{ecore__reg_8h_a60efd53587ae8d39d620d0474dc384a1}{HC\_CONFIG\_0\_REG\_INT\_LINE\_EN\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10252}10252         val |= (\mbox{\hyperlink{ecore__reg_8h_a9a62938590f3db80afcc21e76e096015}{HC\_CONFIG\_0\_REG\_MSI\_MSIX\_INT\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10253}10253                 \mbox{\hyperlink{ecore__reg_8h_afc171072f273bf3855db4220ebe5f458}{HC\_CONFIG\_0\_REG\_ATTN\_BIT\_EN\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10254}10254         \textcolor{keywordflow}{if} (single\_msix) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10255}10255             val |= \mbox{\hyperlink{ecore__reg_8h_a8b34e733f3fa6a42a1bb4b8ec733f837}{HC\_CONFIG\_0\_REG\_SINGLE\_ISR\_EN\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10256}10256         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10257}10257     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (msi) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10258}10258         val \&= \string~HC\_CONFIG\_0\_REG\_INT\_LINE\_EN\_0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10259}10259         val |= (\mbox{\hyperlink{ecore__reg_8h_a8b34e733f3fa6a42a1bb4b8ec733f837}{HC\_CONFIG\_0\_REG\_SINGLE\_ISR\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10260}10260                 \mbox{\hyperlink{ecore__reg_8h_a9a62938590f3db80afcc21e76e096015}{HC\_CONFIG\_0\_REG\_MSI\_MSIX\_INT\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10261}10261                 \mbox{\hyperlink{ecore__reg_8h_afc171072f273bf3855db4220ebe5f458}{HC\_CONFIG\_0\_REG\_ATTN\_BIT\_EN\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10262}10262     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10263}10263         val |= (\mbox{\hyperlink{ecore__reg_8h_a8b34e733f3fa6a42a1bb4b8ec733f837}{HC\_CONFIG\_0\_REG\_SINGLE\_ISR\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10264}10264                 \mbox{\hyperlink{ecore__reg_8h_a9a62938590f3db80afcc21e76e096015}{HC\_CONFIG\_0\_REG\_MSI\_MSIX\_INT\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10265}10265                 \mbox{\hyperlink{ecore__reg_8h_a60efd53587ae8d39d620d0474dc384a1}{HC\_CONFIG\_0\_REG\_INT\_LINE\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10266}10266                 \mbox{\hyperlink{ecore__reg_8h_afc171072f273bf3855db4220ebe5f458}{HC\_CONFIG\_0\_REG\_ATTN\_BIT\_EN\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10267}10267 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10268}10268         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10269}10269             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}write \%x to HC \%d (addr 0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10270}10270                   val, port, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10271}10271 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10272}10272             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10273}10273 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10274}10274             val \&= \string~HC\_CONFIG\_0\_REG\_MSI\_MSIX\_INT\_EN\_0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10275}10275         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10276}10276     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10277}10277 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10278}10278     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10279}10279         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_ace9c70a98871c38061f55ac178ed0421}{HC\_REG\_INT\_MASK}} + port*4), 0x1FFFF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10280}10280     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10281}10281 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10282}10282     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}write \%x to HC \%d (addr 0x\%x) mode \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10283}10283           val, port, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, ((msix) ? \textcolor{stringliteral}{"{}MSI-\/X"{}} : ((msi) ? \textcolor{stringliteral}{"{}MSI"{}} : \textcolor{stringliteral}{"{}INTx"{}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10284}10284 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10285}10285     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10286}10286 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10287}10287     \textcolor{comment}{/* ensure that HC\_CONFIG is written before leading/trailing edge config */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10288}10288     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10289}10289 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10290}10290     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10291}10291         \textcolor{comment}{/* init leading/trailing edge */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10292}10292         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10293}10293             val = (0xee0f | (1 << (\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc) + 4)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10294}10294             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10295}10295                 \textcolor{comment}{/* enable nig and gpio3 attention */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10296}10296                 val |= 0x1100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10297}10297             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10298}10298         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10299}10299             val = 0xffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10300}10300         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10301}10301 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10302}10302         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a5e78f09d9fd794c58b65669a22779043}{HC\_REG\_TRAILING\_EDGE\_0}} + port*8), val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10303}10303         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_a1a880b547de30d4c1acf8a13c6527d18}{HC\_REG\_LEADING\_EDGE\_0}} + port*8), val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10304}10304     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10305}10305 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10306}10306     \textcolor{comment}{/* make sure that interrupts are indeed enabled from here on */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10307}10307     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10308}10308 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10309}10309 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10310}10310 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10311}\mbox{\hyperlink{bxe_8c_a8d4847d322b4b1496cbe93dc980b020f}{10311}} \mbox{\hyperlink{bxe_8c_a8d4847d322b4b1496cbe93dc980b020f}{bxe\_igu\_int\_enable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10312}10312 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10313}10313     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10314}10314     uint8\_t msix = (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}}) ? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10315}10315     uint8\_t single\_msix = ((sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10316}10316                            (sc-\/>\mbox{\hyperlink{structbxe__softc_a8f57201111a0ee2b7ab793da3fcf2050}{intr\_count}} == 1)) ? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10317}10317     uint8\_t msi = (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}}) ? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10318}10318 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10319}10319     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10320}10320 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10321}10321     \textcolor{keywordflow}{if} (msix) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10322}10322         val \&= \string~(\mbox{\hyperlink{ecore__reg_8h_a655bb832115d143b7eb21dcc7823761e}{IGU\_PF\_CONF\_INT\_LINE\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10323}10323                  \mbox{\hyperlink{ecore__reg_8h_a98013a0f9bd53ed91fe284826d4cfca3}{IGU\_PF\_CONF\_SINGLE\_ISR\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10324}10324         val |= (\mbox{\hyperlink{ecore__reg_8h_ab55a528a21aab89503924776d9adf78a}{IGU\_PF\_CONF\_MSI\_MSIX\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10325}10325                 \mbox{\hyperlink{ecore__reg_8h_a7e5e18bf08a867a919c770b4079b6536}{IGU\_PF\_CONF\_ATTN\_BIT\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10326}10326         \textcolor{keywordflow}{if} (single\_msix) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10327}10327             val |= \mbox{\hyperlink{ecore__reg_8h_a98013a0f9bd53ed91fe284826d4cfca3}{IGU\_PF\_CONF\_SINGLE\_ISR\_EN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10328}10328         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10329}10329     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (msi) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10330}10330         val \&= \string~IGU\_PF\_CONF\_INT\_LINE\_EN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10331}10331         val |= (\mbox{\hyperlink{ecore__reg_8h_ab55a528a21aab89503924776d9adf78a}{IGU\_PF\_CONF\_MSI\_MSIX\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10332}10332                 \mbox{\hyperlink{ecore__reg_8h_a7e5e18bf08a867a919c770b4079b6536}{IGU\_PF\_CONF\_ATTN\_BIT\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10333}10333                 \mbox{\hyperlink{ecore__reg_8h_a98013a0f9bd53ed91fe284826d4cfca3}{IGU\_PF\_CONF\_SINGLE\_ISR\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10334}10334     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10335}10335         val \&= \string~IGU\_PF\_CONF\_MSI\_MSIX\_EN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10336}10336         val |= (\mbox{\hyperlink{ecore__reg_8h_a655bb832115d143b7eb21dcc7823761e}{IGU\_PF\_CONF\_INT\_LINE\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10337}10337                 \mbox{\hyperlink{ecore__reg_8h_a7e5e18bf08a867a919c770b4079b6536}{IGU\_PF\_CONF\_ATTN\_BIT\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10338}10338                 \mbox{\hyperlink{ecore__reg_8h_a98013a0f9bd53ed91fe284826d4cfca3}{IGU\_PF\_CONF\_SINGLE\_ISR\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10339}10339     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10340}10340 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10341}10341     \textcolor{comment}{/* clean previous status -\/ need to configure igu prior to ack*/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10342}10342     \textcolor{keywordflow}{if} ((!msix) || single\_msix) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10343}10343         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10344}10344         \mbox{\hyperlink{bxe_8h_aaf2d752cd34446539edc84399c4d6ab0}{bxe\_ack\_int}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10345}10345     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10346}10346 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10347}10347     val |= \mbox{\hyperlink{ecore__reg_8h_a8b8d1b27a38e573f1833a7045c50deed}{IGU\_PF\_CONF\_FUNC\_EN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10348}10348 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10349}10349     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}write 0x\%x to IGU mode \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10350}10350           val, ((msix) ? \textcolor{stringliteral}{"{}MSI-\/X"{}} : ((msi) ? \textcolor{stringliteral}{"{}MSI"{}} : \textcolor{stringliteral}{"{}INTx"{}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10351}10351 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10352}10352     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10353}10353 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10354}10354     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10355}10355 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10356}10356     \textcolor{comment}{/* init leading/trailing edge */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10357}10357     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10358}10358         val = (0xee0f | (1 << (\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc) + 4)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10359}10359         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10360}10360             \textcolor{comment}{/* enable nig and gpio3 attention */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10361}10361             val |= 0x1100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10362}10362         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10363}10363     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10364}10364         val = 0xffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10365}10365     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10366}10366 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10367}10367     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aed2a0f0a296d65a50ff05634c73b0a06}{IGU\_REG\_TRAILING\_EDGE\_LATCH}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10368}10368     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0e0d52da6a9442d5834260ecd9bd4d57}{IGU\_REG\_LEADING\_EDGE\_LATCH}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10369}10369 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10370}10370     \textcolor{comment}{/* make sure that interrupts are indeed enabled from here on */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10371}10371     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10372}10372 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10373}10373 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10374}10374 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10375}\mbox{\hyperlink{bxe_8c_a8835d6e00772e39c89de0a05078a2c48}{10375}} \mbox{\hyperlink{bxe_8c_a8835d6e00772e39c89de0a05078a2c48}{bxe\_int\_enable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10376}10376 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10377}10377     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10378}10378         \mbox{\hyperlink{bxe_8c_a1143f55055908ea1e9854d1ded31114e}{bxe\_hc\_int\_enable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10379}10379     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10380}10380         \mbox{\hyperlink{bxe_8c_a8d4847d322b4b1496cbe93dc980b020f}{bxe\_igu\_int\_enable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10381}10381     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10382}10382 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10383}10383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10384}10384 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10385}\mbox{\hyperlink{bxe_8c_aa91da50d13dd3c05e6e3e81fad0c6055}{10385}} \mbox{\hyperlink{bxe_8c_aa91da50d13dd3c05e6e3e81fad0c6055}{bxe\_hc\_int\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10386}10386 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10387}10387     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10388}10388     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (port) ? \mbox{\hyperlink{ecore__reg_8h_a7ac5b708269e36b577935bbf69304c37}{HC\_REG\_CONFIG\_1}} : \mbox{\hyperlink{ecore__reg_8h_a2b823b00b743b26386d2b45bc39f2b53}{HC\_REG\_CONFIG\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10389}10389     uint32\_t val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10390}10390 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10391}10391     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10392}10392 \textcolor{comment}{     * In E1 we must use only PCI configuration space to disable MSI/MSIX}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10393}10393 \textcolor{comment}{     * capablility. It's forbidden to disable IGU\_PF\_CONF\_MSI\_MSIX\_EN in HC}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10394}10394 \textcolor{comment}{     * block}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10395}10395 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10396}10396     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10397}10397         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10398}10398 \textcolor{comment}{         * Since IGU\_PF\_CONF\_MSI\_MSIX\_EN still always on use mask register}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10399}10399 \textcolor{comment}{         * to prevent from HC sending interrupts after we exit the function}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10400}10400 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10401}10401         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_ace9c70a98871c38061f55ac178ed0421}{HC\_REG\_INT\_MASK}} + port*4), 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10402}10402 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10403}10403         val \&= \string~(\mbox{\hyperlink{ecore__reg_8h_a8b34e733f3fa6a42a1bb4b8ec733f837}{HC\_CONFIG\_0\_REG\_SINGLE\_ISR\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10404}10404                  \mbox{\hyperlink{ecore__reg_8h_a60efd53587ae8d39d620d0474dc384a1}{HC\_CONFIG\_0\_REG\_INT\_LINE\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10405}10405                  \mbox{\hyperlink{ecore__reg_8h_afc171072f273bf3855db4220ebe5f458}{HC\_CONFIG\_0\_REG\_ATTN\_BIT\_EN\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10406}10406     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10407}10407         val \&= \string~(\mbox{\hyperlink{ecore__reg_8h_a8b34e733f3fa6a42a1bb4b8ec733f837}{HC\_CONFIG\_0\_REG\_SINGLE\_ISR\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10408}10408                  \mbox{\hyperlink{ecore__reg_8h_a9a62938590f3db80afcc21e76e096015}{HC\_CONFIG\_0\_REG\_MSI\_MSIX\_INT\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10409}10409                  \mbox{\hyperlink{ecore__reg_8h_a60efd53587ae8d39d620d0474dc384a1}{HC\_CONFIG\_0\_REG\_INT\_LINE\_EN\_0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10410}10410                  \mbox{\hyperlink{ecore__reg_8h_afc171072f273bf3855db4220ebe5f458}{HC\_CONFIG\_0\_REG\_ATTN\_BIT\_EN\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10411}10411     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10412}10412 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10413}10413     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}write \%x to HC \%d (addr 0x\%x)\(\backslash\)n"{}}, val, port, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10414}10414 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10415}10415     \textcolor{comment}{/* flush all outstanding writes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10416}10416     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10417}10417 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10418}10418     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10419}10419     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}) != val) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10420}10420         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}proper val not read from HC IGU!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10421}10421     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10422}10422 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10423}10423 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10424}10424 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10425}\mbox{\hyperlink{bxe_8c_ac7547dc19cfd75c0d3839c037112348a}{10425}} \mbox{\hyperlink{bxe_8c_ac7547dc19cfd75c0d3839c037112348a}{bxe\_igu\_int\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10426}10426 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10427}10427     uint32\_t val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10428}10428 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10429}10429     val \&= \string~(\mbox{\hyperlink{ecore__reg_8h_ab55a528a21aab89503924776d9adf78a}{IGU\_PF\_CONF\_MSI\_MSIX\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10430}10430              \mbox{\hyperlink{ecore__reg_8h_a655bb832115d143b7eb21dcc7823761e}{IGU\_PF\_CONF\_INT\_LINE\_EN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10431}10431              \mbox{\hyperlink{ecore__reg_8h_a7e5e18bf08a867a919c770b4079b6536}{IGU\_PF\_CONF\_ATTN\_BIT\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10432}10432 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10433}10433     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab6c05076d6604424128ee11b1f3f0427}{DBG\_INTR}}, \textcolor{stringliteral}{"{}write \%x to IGU\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10434}10434 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10435}10435     \textcolor{comment}{/* flush all outstanding writes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10436}10436     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10437}10437 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10438}10438     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10439}10439     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}}) != val) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10440}10440         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}proper val not read from IGU!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10441}10441     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10442}10442 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10443}10443 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10444}10444 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10445}\mbox{\hyperlink{bxe_8c_ac47171d7e9b0e9b346122f490afcbf5a}{10445}} \mbox{\hyperlink{bxe_8c_ac47171d7e9b0e9b346122f490afcbf5a}{bxe\_int\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10446}10446 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10447}10447     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10448}10448         \mbox{\hyperlink{bxe_8c_aa91da50d13dd3c05e6e3e81fad0c6055}{bxe\_hc\_int\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10449}10449     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10450}10450         \mbox{\hyperlink{bxe_8c_ac7547dc19cfd75c0d3839c037112348a}{bxe\_igu\_int\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10451}10451     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10452}10452 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10453}10453 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10454}10454 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10455}\mbox{\hyperlink{bxe_8c_a266f8bdb764a5a75f8848a3b34daebae}{10455}} \mbox{\hyperlink{bxe_8c_a266f8bdb764a5a75f8848a3b34daebae}{bxe\_nic\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10456}10456              \textcolor{keywordtype}{int}              load\_code)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10457}10457 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10458}10458     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10459}10459 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10460}10460     \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10461}10461         \mbox{\hyperlink{bxe_8c_ad96c923e6909f0b987b165afb0def448}{bxe\_init\_eth\_fp}}(sc, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10462}10462     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10463}10463 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10464}10464     rmb(); \textcolor{comment}{/* ensure status block indices were read */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10465}10465 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10466}10466     \mbox{\hyperlink{bxe_8c_aa88bd0cc27e8271ac761e5818b03c58b}{bxe\_init\_rx\_rings}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10467}10467     \mbox{\hyperlink{bxe_8c_aa86c1477e0f0bc6dbfed3b6c3e8c7afc}{bxe\_init\_tx\_rings}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10468}10468 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10469}10469     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a564b2f75c1d5338c4625919e871035bb}{IS\_VF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10470}10470         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10471}10471     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10472}10472 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10473}10473     \textcolor{comment}{/* initialize MOD\_ABS interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10474}10474     \mbox{\hyperlink{bxe__elink_8c_a1a346f0f81c2c1659bf7ca447dc0be4e}{elink\_init\_mod\_abs\_int}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10475}10475                            sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10476}10476                            sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a97c45ddd35325a82a07dba52c261cd30}{shmem\_base}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10477}10477                            sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2ea341c2b43f033f56e70c9a5cd63e0d}{shmem2\_base}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10478}10478                            \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10479}10479 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10480}10480     \mbox{\hyperlink{bxe_8c_a48a0b9af7e147d5ae14cd46b9f24ecea}{bxe\_init\_def\_sb}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10481}10481     \mbox{\hyperlink{bxe_8c_a6e274913c96888a6a87526ed10c6b663}{bxe\_update\_dsb\_idx}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10482}10482     \mbox{\hyperlink{bxe_8c_a1bf62312afa2fa805a04bc269d84699a}{bxe\_init\_sp\_ring}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10483}10483     \mbox{\hyperlink{bxe_8c_aaaa90039e92dcdade68ed8770e563371}{bxe\_init\_eq\_ring}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10484}10484     \mbox{\hyperlink{bxe_8c_a2fc491f747f516b1c8cdbe7f09b49b4d}{bxe\_init\_internal}}(sc, load\_code);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10485}10485     \mbox{\hyperlink{bxe_8c_aadbb525d9b10045894939793191485d9}{bxe\_pf\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10486}10486     \mbox{\hyperlink{bxe__stats_8c_a8d74db9bdd731197852968f25a83a0dc}{bxe\_stats\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10487}10487 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10488}10488     \textcolor{comment}{/* flush all before enabling interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10489}10489     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10490}10490 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10491}10491     \mbox{\hyperlink{bxe_8c_a8835d6e00772e39c89de0a05078a2c48}{bxe\_int\_enable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10492}10492 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10493}10493     \textcolor{comment}{/* check for SPIO5 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10494}10494     \mbox{\hyperlink{bxe_8c_a7ad9ff33c0df2dfb55482d6c458a74c0}{bxe\_attn\_int\_deasserted0}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10495}10495                              \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10496}10496                                     (\mbox{\hyperlink{ecore__reg_8h_aa8ee65728cc277f541626a27c266acde}{MISC\_REG\_AEU\_AFTER\_INVERT\_1\_FUNC\_0}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10497}10497                                      \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)*4)) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10498}10498                              \mbox{\hyperlink{ecore__reg_8h_ab2e1fef03140f2cfa471fd5b3c7b85c7}{AEU\_INPUTS\_ATTN\_BITS\_SPIO5}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10499}10499 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10500}10500 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10501}10501 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10502}\mbox{\hyperlink{bxe_8c_aabff41d42fa0415c38d163314c626c9c}{10502}} \mbox{\hyperlink{bxe_8c_aabff41d42fa0415c38d163314c626c9c}{bxe\_init\_objs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10503}10503 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10504}10504     \textcolor{comment}{/* mcast rules must be added to tx if tx switching is enabled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10505}10505     \mbox{\hyperlink{ecore__sp_8h_ae93d3d20970bfb9f3b0c3d6fd510d30d}{ecore\_obj\_type}} o\_type =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10506}10506         (sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} \& \mbox{\hyperlink{bxe_8h_a643fc97e6bb5d37901c3296fc37b8f90}{BXE\_TX\_SWITCHING}}) ? \mbox{\hyperlink{ecore__sp_8h_ae93d3d20970bfb9f3b0c3d6fd510d30dabd6e69f078bea632d31e3c864152b4ae}{ECORE\_OBJ\_TYPE\_RX\_TX}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10507}10507                                          \mbox{\hyperlink{ecore__sp_8h_ae93d3d20970bfb9f3b0c3d6fd510d30daf909af0344364ccedb48e21bee5da1e7}{ECORE\_OBJ\_TYPE\_RX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10508}10508 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10509}10509     \textcolor{comment}{/* RX\_MODE controlling object */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10510}10510     \mbox{\hyperlink{ecore__sp_8c_a9f93a409a8dbaf5d836f559d5993d13d}{ecore\_init\_rx\_mode\_obj}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_aa9174b987f3725f779ba1f34c9478828}{rx\_mode\_obj}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10511}10511 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10512}10512     \textcolor{comment}{/* multicast configuration controlling object */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10513}10513     \mbox{\hyperlink{ecore__sp_8c_aeb51964ed99ee112bae932b64405c603}{ecore\_init\_mcast\_obj}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10514}10514                          \&sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10515}10515                          sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0].\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10516}10516                          sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0].\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10517}10517                          \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10518}10518                          \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10519}10519                          \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, mcast\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10520}10520                          \mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, mcast\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10521}10521                          \mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034a7bfdb3c242f340f8f9157f302afe1ba0}{ECORE\_FILTER\_MCAST\_PENDING}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10522}10522                          \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10523}10523                          o\_type);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10524}10524 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10525}10525     \textcolor{comment}{/* Setup CAM credit pools */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10526}10526     \mbox{\hyperlink{ecore__sp_8c_a9e638d965c9a11da55250c6429f60ded}{ecore\_init\_mac\_credit\_pool}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10527}10527                                \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7f6ae9f5036235d5488b2bec4ab07231}{macs\_pool}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10528}10528                                \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10529}10529                                \mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc) ? \mbox{\hyperlink{bxe_8h_a8659b8d6069081564bfaddb8211fd499}{VNICS\_PER\_PORT}}(sc) :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10530}10530                                                  \mbox{\hyperlink{bxe_8h_ac6e6f224df2707de5bd4f5a04747fbef}{VNICS\_PER\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10531}10531 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10532}10532     \mbox{\hyperlink{ecore__sp_8c_a99389484b7a549263513828b7043c7c5}{ecore\_init\_vlan\_credit\_pool}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10533}10533                                 \&sc-\/>\mbox{\hyperlink{structbxe__softc_a5542d8cbf261fb4884c50f08541e1242}{vlans\_pool}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10534}10534                                 \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc) >> 1,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10535}10535                                 \mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc) ? \mbox{\hyperlink{bxe_8h_a8659b8d6069081564bfaddb8211fd499}{VNICS\_PER\_PORT}}(sc) :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10536}10536                                                   \mbox{\hyperlink{bxe_8h_ac6e6f224df2707de5bd4f5a04747fbef}{VNICS\_PER\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10537}10537 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10538}10538     \textcolor{comment}{/* RSS configuration object */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10539}10539     \mbox{\hyperlink{ecore__sp_8c_a1cc1ab9dba69d0b15228d3785b2c429d}{ecore\_init\_rss\_config\_obj}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10540}10540                               \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb1cadab33bcd85c5d28e3a17617af92}{rss\_conf\_obj}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10541}10541                               sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0].\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10542}10542                               sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0].\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10543}10543                               \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10544}10544                               \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10545}10545                               \mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, rss\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10546}10546                               \mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, rss\_rdata),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10547}10547                               \mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034a48fe2399aeae34bbe24d6b3bbf1284bc}{ECORE\_FILTER\_RSS\_CONF\_PENDING}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10548}10548                               \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}}, \mbox{\hyperlink{ecore__sp_8h_ae93d3d20970bfb9f3b0c3d6fd510d30daf909af0344364ccedb48e21bee5da1e7}{ECORE\_OBJ\_TYPE\_RX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10549}10549 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10550}10550 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10551}10551 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10552}10552 \textcolor{comment}{ * Initialize the function. This must be called before sending CLIENT\_SETUP}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10553}10553 \textcolor{comment}{ * for the first client.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10554}10554 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10555}10555 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10556}\mbox{\hyperlink{bxe_8c_ac4848c1ebb01250940159cb9b4ad4315}{10556}} \mbox{\hyperlink{bxe_8c_ac4848c1ebb01250940159cb9b4ad4315}{bxe\_func\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10557}10557 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10558}10558     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__func__state__params}{ecore\_func\_state\_params}} func\_params = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10559}10559     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__func__start__params}{ecore\_func\_start\_params}} *start\_params = \&func\_params.\mbox{\hyperlink{structecore__func__state__params_a8eae38735ab6131fefc5ca8ee928b734}{params}}.\mbox{\hyperlink{structecore__func__state__params_a8668c03dd9c3cc16f80b9dd1d887aa6a}{start}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10560}10560 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10561}10561     \textcolor{comment}{/* Prepare parameters for function state transitions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10562}10562     bit\_set(\&func\_params.\mbox{\hyperlink{structecore__func__state__params_a741d53be8643b39cd77cc5a96a44c782}{ramrod\_flags}}, \mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10563}10563 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10564}10564     func\_params.\mbox{\hyperlink{structecore__func__state__params_a9d047bd98f6213c559509806e2abba82}{f\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac714420644accfea1d301ea6b4fb8f57}{func\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10565}10565     func\_params.\mbox{\hyperlink{structecore__func__state__params_a91c5e00faef974965a04f21fa001b331}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a691b112aac33adee48c355a358ae1db8a061d124f082a00b13c08ebb0cea2341e}{ECORE\_F\_CMD\_START}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10566}10566 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10567}10567     \textcolor{comment}{/* Function parameters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10568}10568     start\_params-\/>\mbox{\hyperlink{structecore__func__start__params_af3269aeb3f00a9c003deed67e5c82e7d}{mf\_mode}}     = sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10569}10569     start\_params-\/>\mbox{\hyperlink{structecore__func__start__params_ae573aec133dd78751d6df7eeae7ad0a3}{sd\_vlan\_tag}} = \mbox{\hyperlink{bxe_8h_a2bdf5604b397316681ae5b4ecfbdc553}{OVLAN}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10570}10570 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10571}10571     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc) || \mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10572}10572         start\_params-\/>\mbox{\hyperlink{structecore__func__start__params_a9014ab729cb7298f45506c790309c895}{network\_cos\_mode}} = \mbox{\hyperlink{ecore__hsi_8h_a7d3a0c7e4e20b8b1a8ee2ea3378c8e81a9cb17ead09c11adb498cc2e6272035d7}{STATIC\_COS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10573}10573     \} \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* CHIP\_IS\_E1X */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10574}10574         start\_params-\/>\mbox{\hyperlink{structecore__func__start__params_a9014ab729cb7298f45506c790309c895}{network\_cos\_mode}} = \mbox{\hyperlink{ecore__hsi_8h_a7d3a0c7e4e20b8b1a8ee2ea3378c8e81a6961cc606d6baad4918348881776ab37}{FW\_WRR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10575}10575     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10576}10576 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10577}10577     \textcolor{comment}{//start\_params-\/>gre\_tunnel\_mode = 0;}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10578}10578     \textcolor{comment}{//start\_params-\/>gre\_tunnel\_rss  = 0;}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10579}10579 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10580}10580     \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__sp_8c_a7e1322aba00d9db820211a49fd2e0c1e}{ecore\_func\_state\_change}}(sc, \&func\_params));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10581}10581 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10582}10582 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10583}10583 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10584}\mbox{\hyperlink{bxe_8c_ac92bd4a821d19305e1e7810951283474}{10584}} \mbox{\hyperlink{bxe_8c_ac92bd4a821d19305e1e7810951283474}{bxe\_set\_power\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10585}10585                     uint8\_t          state)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10586}10586 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10587}10587     uint16\_t pmcsr;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10588}10588 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10589}10589     \textcolor{comment}{/* If there is no power capability, silently succeed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10590}10590     \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} \& \mbox{\hyperlink{bxe_8h_a321e324c6872c79cea7cf48d589d6d72}{BXE\_PM\_CAPABLE\_FLAG}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10591}10591         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}No power capability\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10592}10592         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10593}10593     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10594}10594 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10595}10595     pmcsr = pci\_read\_config(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10596}10596                             (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a8840bb68978b0115bfc2bf86febad20d}{pcie\_pm\_cap\_reg}} + PCIR\_POWER\_STATUS),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10597}10597                             2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10598}10598 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10599}10599     \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10600}10600     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a0d294d030355eb0d4097dc557cac6b58}{PCI\_PM\_D0}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10601}10601         pci\_write\_config(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10602}10602                          (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a8840bb68978b0115bfc2bf86febad20d}{pcie\_pm\_cap\_reg}} + PCIR\_POWER\_STATUS),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10603}10603                          ((pmcsr \& \string~PCIM\_PSTAT\_DMASK) | PCIM\_PSTAT\_PME), 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10604}10604 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10605}10605         \textcolor{keywordflow}{if} (pmcsr \& PCIM\_PSTAT\_DMASK) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10606}10606             \textcolor{comment}{/* delay required during transition out of D3hot */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10607}10607             DELAY(20000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10608}10608         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10609}10609 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10610}10610         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10611}10611 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10612}10612     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_ad277d1b54abecb64cd33b81db85bfe4a}{PCI\_PM\_D3hot}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10613}10613         \textcolor{comment}{/* XXX if there are other clients above don't shut down the power */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10614}10614 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10615}10615         \textcolor{comment}{/* don't shut down the power for emulation and FPGA */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10616}10616         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10617}10617             \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10618}10618         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10619}10619 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10620}10620         pmcsr \&= \string~PCIM\_PSTAT\_DMASK;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10621}10621         pmcsr |= PCIM\_PSTAT\_D3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10622}10622 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10623}10623         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_aab430e328aa13c5c191e14430177c25e}{wol}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10624}10624             pmcsr |= PCIM\_PSTAT\_PMEENABLE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10625}10625         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10626}10626 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10627}10627         pci\_write\_config(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10628}10628                          (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a8840bb68978b0115bfc2bf86febad20d}{pcie\_pm\_cap\_reg}} + PCIR\_POWER\_STATUS),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10629}10629                          pmcsr, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10630}10630 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10631}10631         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10632}10632 \textcolor{comment}{         * No more memory access after this point until device is brought back}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10633}10633 \textcolor{comment}{         * to D0 state.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10634}10634 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10635}10635         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10636}10636 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10637}10637     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10638}10638         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Can't support PCI power state = 0x\%x pmcsr 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10639}10639             state, pmcsr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10640}10640         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10641}10641     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10642}10642 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10643}10643     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10644}10644 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10645}10645 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10646}10646 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10647}10647 \textcolor{comment}{/* return true if succeeded to acquire the lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10648}10648 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10649}\mbox{\hyperlink{bxe_8c_a1cb2225fcc98caad38a3607a6aafeee6}{10649}} \mbox{\hyperlink{bxe_8c_a1cb2225fcc98caad38a3607a6aafeee6}{bxe\_trylock\_hw\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10650}10650                     uint32\_t         resource)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10651}10651 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10652}10652     uint32\_t lock\_status;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10653}10653     uint32\_t resource\_bit = (1 << resource);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10654}10654     \textcolor{keywordtype}{int} func = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10655}10655     uint32\_t hw\_lock\_control\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10656}10656 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10657}10657     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Trying to take a resource lock 0x\%x\(\backslash\)n"{}}, resource);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10658}10658 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10659}10659     \textcolor{comment}{/* Validating that the resource is within range */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10660}10660     \textcolor{keywordflow}{if} (resource > \mbox{\hyperlink{ecore__reg_8h_a15df0c7ae29fadd30fdeea93705f39d7}{HW\_LOCK\_MAX\_RESOURCE\_VALUE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10661}10661         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10662}10662               \textcolor{stringliteral}{"{}resource(0x\%x) > HW\_LOCK\_MAX\_RESOURCE\_VALUE(0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10663}10663               resource, \mbox{\hyperlink{ecore__reg_8h_a15df0c7ae29fadd30fdeea93705f39d7}{HW\_LOCK\_MAX\_RESOURCE\_VALUE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10664}10664         \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10665}10665     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10666}10666 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10667}10667     \textcolor{keywordflow}{if} (func <= 5) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10668}10668         hw\_lock\_control\_reg = (\mbox{\hyperlink{ecore__reg_8h_af27e5ee55b5ebe5d7684e8a5e1dc5c22}{MISC\_REG\_DRIVER\_CONTROL\_1}} + func*8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10669}10669     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10670}10670         hw\_lock\_control\_reg = (\mbox{\hyperlink{ecore__reg_8h_a65a694d0ee5eff4429fb120b44cae68a}{MISC\_REG\_DRIVER\_CONTROL\_7}} + (func -\/ 6)*8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10671}10671     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10672}10672 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10673}10673     \textcolor{comment}{/* try to acquire the lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10674}10674     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, hw\_lock\_control\_reg + 4, resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10675}10675     lock\_status = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, hw\_lock\_control\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10676}10676     \textcolor{keywordflow}{if} (lock\_status \& resource\_bit) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10677}10677         \textcolor{keywordflow}{return} (TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10678}10678     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10679}10679 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10680}10680     \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to get a resource lock 0x\%x func \%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10681}10681         \textcolor{stringliteral}{"{}lock\_status 0x\%x resource\_bit 0x\%x\(\backslash\)n"{}}, resource, func,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10682}10682         lock\_status, resource\_bit);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10683}10683 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10684}10684     \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10685}10685 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10686}10686 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10687}10687 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10688}10688 \textcolor{comment}{ * Get the recovery leader resource id according to the engine this function}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10689}10689 \textcolor{comment}{ * belongs to. Currently only only 2 engines is supported.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10690}10690 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10691}10691 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10692}\mbox{\hyperlink{bxe_8c_a4cd470b45a4be9c0598aaa26faf0368c}{10692}} \mbox{\hyperlink{bxe_8c_a4cd470b45a4be9c0598aaa26faf0368c}{bxe\_get\_leader\_lock\_resource}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10693}10693 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10694}10694     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10695}10695         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__reg_8h_a324c80e90149b85952289d02751cab27}{HW\_LOCK\_RESOURCE\_RECOVERY\_LEADER\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10696}10696     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10697}10697         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__reg_8h_a17d0c066805632d20d5a05038652f232}{HW\_LOCK\_RESOURCE\_RECOVERY\_LEADER\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10698}10698     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10699}10699 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10700}10700 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10701}10701 \textcolor{comment}{/* try to acquire a leader lock for current engine */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10702}10702 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10703}\mbox{\hyperlink{bxe_8c_ad9cfd4a8a15df94a0a900aa15d658489}{10703}} \mbox{\hyperlink{bxe_8c_ad9cfd4a8a15df94a0a900aa15d658489}{bxe\_trylock\_leader\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10704}10704 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10705}10705     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a1cb2225fcc98caad38a3607a6aafeee6}{bxe\_trylock\_hw\_lock}}(sc, \mbox{\hyperlink{bxe_8c_a4cd470b45a4be9c0598aaa26faf0368c}{bxe\_get\_leader\_lock\_resource}}(sc)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10706}10706 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10707}10707 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10708}10708 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10709}\mbox{\hyperlink{bxe_8c_a2d21d8c7d71506277952a301e154ec1f}{10709}} \mbox{\hyperlink{bxe_8c_a2d21d8c7d71506277952a301e154ec1f}{bxe\_release\_leader\_lock}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10710}10710 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10711}10711     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{bxe_8c_a4cd470b45a4be9c0598aaa26faf0368c}{bxe\_get\_leader\_lock\_resource}}(sc)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10712}10712 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10713}10713 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10714}10714 \textcolor{comment}{/* close gates \#2, \#3 and \#4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10715}10715 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10716}\mbox{\hyperlink{bxe_8c_a5f13d74a1f90275e300763d37db2fb57}{10716}} \mbox{\hyperlink{bxe_8c_a5f13d74a1f90275e300763d37db2fb57}{bxe\_set\_234\_gates}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10717}10717                   uint8\_t          close)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10718}10718 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10719}10719     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10720}10720 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10721}10721     \textcolor{comment}{/* gates \#2 and \#4a are closed/opened for "{}not E1"{} only */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10722}10722     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10723}10723         \textcolor{comment}{/* \#4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10724}10724         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8f37cbb39270af8816b5fb22e6e0097f}{PXP\_REG\_HST\_DISCARD\_DOORBELLS}}, !!close);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10725}10725         \textcolor{comment}{/* \#2 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10726}10726         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8c3051cff57cfa4e7ac8aa2f0dc9b5a2}{PXP\_REG\_HST\_DISCARD\_INTERNAL\_WRITES}}, !!close);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10727}10727     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10728}10728 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10729}10729     \textcolor{comment}{/* \#3 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10730}10730     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10731}10731         \textcolor{comment}{/* prevent interrupts from HC on both ports */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10732}10732         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7ac5b708269e36b577935bbf69304c37}{HC\_REG\_CONFIG\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10733}10733         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7ac5b708269e36b577935bbf69304c37}{HC\_REG\_CONFIG\_1}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10734}10734                (!close) ? (val | \mbox{\hyperlink{ecore__reg_8h_a641195a944f24b477f872b049191e8f5}{HC\_CONFIG\_1\_REG\_BLOCK\_DISABLE\_1}}) :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10735}10735                (val \& \string~(uint32\_t)\mbox{\hyperlink{ecore__reg_8h_a641195a944f24b477f872b049191e8f5}{HC\_CONFIG\_1\_REG\_BLOCK\_DISABLE\_1}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10736}10736 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10737}10737         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a2b823b00b743b26386d2b45bc39f2b53}{HC\_REG\_CONFIG\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10738}10738         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a2b823b00b743b26386d2b45bc39f2b53}{HC\_REG\_CONFIG\_0}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10739}10739                (!close) ? (val | \mbox{\hyperlink{ecore__reg_8h_a48a15e73fec6afc2f0de6406486f3bde}{HC\_CONFIG\_0\_REG\_BLOCK\_DISABLE\_0}}) :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10740}10740                (val \& \string~(uint32\_t)\mbox{\hyperlink{ecore__reg_8h_a48a15e73fec6afc2f0de6406486f3bde}{HC\_CONFIG\_0\_REG\_BLOCK\_DISABLE\_0}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10741}10741     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10742}10742         \textcolor{comment}{/* Prevent incoming interrupts in IGU */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10743}10743         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf596bf128396259972d33e65a19bc20}{IGU\_REG\_BLOCK\_CONFIGURATION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10744}10744 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10745}10745         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf596bf128396259972d33e65a19bc20}{IGU\_REG\_BLOCK\_CONFIGURATION}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10746}10746                (!close) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10747}10747                (val | \mbox{\hyperlink{ecore__reg_8h_a0ceae05e284517198ad5123145da0509}{IGU\_BLOCK\_CONFIGURATION\_REG\_BLOCK\_ENABLE}}) :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10748}10748                (val \& \string~(uint32\_t)\mbox{\hyperlink{ecore__reg_8h_a0ceae05e284517198ad5123145da0509}{IGU\_BLOCK\_CONFIGURATION\_REG\_BLOCK\_ENABLE}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10749}10749     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10750}10750 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10751}10751     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\%s gates \#2, \#3 and \#4\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10752}10752           close ? \textcolor{stringliteral}{"{}closing"{}} : \textcolor{stringliteral}{"{}opening"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10753}10753 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10754}10754     wmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10755}10755 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10756}10756 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10757}10757 \textcolor{comment}{/* poll for pending writes bit, it should get cleared in no more than 1s */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10758}10758 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10759}\mbox{\hyperlink{bxe_8c_aa9c417a6ccdd8db16b851a457b38ff2a}{10759}} \mbox{\hyperlink{bxe_8c_aa9c417a6ccdd8db16b851a457b38ff2a}{bxe\_er\_poll\_igu\_vq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10760}10760 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10761}10761     uint32\_t cnt = 1000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10762}10762     uint32\_t pend\_bits = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10763}10763 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10764}10764     \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10765}10765         pend\_bits = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_abb498c580c8dc1de25bfdf34432591d8}{IGU\_REG\_PENDING\_BITS\_STATUS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10766}10766 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10767}10767         \textcolor{keywordflow}{if} (pend\_bits == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10768}10768             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10769}10769         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10770}10770 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10771}10771         DELAY(1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10772}10772     \} \textcolor{keywordflow}{while} (-\/-\/cnt > 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10773}10773 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10774}10774     \textcolor{keywordflow}{if} (cnt == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10775}10775         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Still pending IGU requests bits=0x\%08x!\(\backslash\)n"{}}, pend\_bits);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10776}10776         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10777}10777     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10778}10778 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10779}10779     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10780}10780 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10781}10781 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10782}\mbox{\hyperlink{bxe_8c_a2f09cf2b34f862918c7897139da34d7a}{10782}} \textcolor{preprocessor}{\#define SHARED\_MF\_CLP\_MAGIC  0x80000000 }\textcolor{comment}{/* 'magic' bit */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10783}10783 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10784}10784 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10785}\mbox{\hyperlink{bxe_8c_a3efbfc32a03f407ecbb476e28d4f1183}{10785}} \mbox{\hyperlink{bxe_8c_a3efbfc32a03f407ecbb476e28d4f1183}{bxe\_clp\_reset\_prep}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10786}10786                    uint32\_t         *magic\_val)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10787}10787 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10788}10788     \textcolor{comment}{/* Do some magic... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10789}10789     uint32\_t val = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, shared\_mf\_config.clp\_mb);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10790}10790     *magic\_val = val \& \mbox{\hyperlink{bxe_8c_a2f09cf2b34f862918c7897139da34d7a}{SHARED\_MF\_CLP\_MAGIC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10791}10791     \mbox{\hyperlink{bxe_8h_acf2ee245b113bcaffd8afceb6a8efc7a}{MFCFG\_WR}}(sc, shared\_mf\_config.clp\_mb, val | \mbox{\hyperlink{bxe_8c_a2f09cf2b34f862918c7897139da34d7a}{SHARED\_MF\_CLP\_MAGIC}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10792}10792 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10793}10793 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10794}10794 \textcolor{comment}{/* restore the value of the 'magic' bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10795}10795 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10796}\mbox{\hyperlink{bxe_8c_a958ce31e9e76352612f83577a3d468fb}{10796}} \mbox{\hyperlink{bxe_8c_a958ce31e9e76352612f83577a3d468fb}{bxe\_clp\_reset\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10797}10797                    uint32\_t         magic\_val)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10798}10798 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10799}10799     \textcolor{comment}{/* Restore the 'magic' bit value... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10800}10800     uint32\_t val = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, shared\_mf\_config.clp\_mb);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10801}10801     \mbox{\hyperlink{bxe_8h_acf2ee245b113bcaffd8afceb6a8efc7a}{MFCFG\_WR}}(sc, shared\_mf\_config.clp\_mb,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10802}10802               (val \& (\string~\mbox{\hyperlink{bxe_8c_a2f09cf2b34f862918c7897139da34d7a}{SHARED\_MF\_CLP\_MAGIC}})) | magic\_val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10803}10803 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10804}10804 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10805}10805 \textcolor{comment}{/* prepare for MCP reset, takes care of CLP configurations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10806}10806 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10807}\mbox{\hyperlink{bxe_8c_a2a3d4495c14a61a70e60aeda1c0d4b22}{10807}} \mbox{\hyperlink{bxe_8c_a2a3d4495c14a61a70e60aeda1c0d4b22}{bxe\_reset\_mcp\_prep}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10808}10808                    uint32\_t         *magic\_val)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10809}10809 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10810}10810     uint32\_t shmem;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10811}10811     uint32\_t validity\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10812}10812 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10813}10813     \textcolor{comment}{/* set `magic' bit in order to save MF config */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10814}10814     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10815}10815         \mbox{\hyperlink{bxe_8c_a3efbfc32a03f407ecbb476e28d4f1183}{bxe\_clp\_reset\_prep}}(sc, magic\_val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10816}10816     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10817}10817 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10818}10818     \textcolor{comment}{/* get shmem offset */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10819}10819     shmem = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac568628b825db5f7e7339932a19bcd2b}{MISC\_REG\_SHARED\_MEM\_ADDR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10820}10820     validity\_offset =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10821}10821         offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structshmem__region}{shmem\_region}}, validity\_map[\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10822}10822 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10823}10823     \textcolor{comment}{/* Clear validity map flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10824}10824     \textcolor{keywordflow}{if} (shmem > 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10825}10825         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, shmem + validity\_offset, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10826}10826     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10827}10827 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10828}10828 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10829}\mbox{\hyperlink{bxe_8c_a6f81d96cb7ac2b420a615a53b5193f40}{10829}} \textcolor{preprocessor}{\#define MCP\_TIMEOUT      5000   }\textcolor{comment}{/* 5 seconds (in ms) */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10830}\mbox{\hyperlink{bxe_8c_a8311cd5a6acce24a0710f889c56d7f5a}{10830}} \textcolor{preprocessor}{\#define MCP\_ONE\_TIMEOUT  100    }\textcolor{comment}{/* 100 ms */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10831}10831 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10832}10832 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10833}\mbox{\hyperlink{bxe_8c_ae8ed5bd512f5e00a3894b55a9ae52858}{10833}} \mbox{\hyperlink{bxe_8c_ae8ed5bd512f5e00a3894b55a9ae52858}{bxe\_mcp\_wait\_one}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10834}10834 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10835}10835     \textcolor{comment}{/* special handling for emulation and FPGA (10 times longer) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10836}10836     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10837}10837         DELAY((\mbox{\hyperlink{bxe_8c_a8311cd5a6acce24a0710f889c56d7f5a}{MCP\_ONE\_TIMEOUT}}*10) * 1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10838}10838     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10839}10839         DELAY((\mbox{\hyperlink{bxe_8c_a8311cd5a6acce24a0710f889c56d7f5a}{MCP\_ONE\_TIMEOUT}}) * 1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10840}10840     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10841}10841 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10842}10842 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10843}10843 \textcolor{comment}{/* initialize shmem\_base and waits for validity signature to appear */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10844}10844 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10845}\mbox{\hyperlink{bxe_8c_a9d2b2bc29e405e509106d246a44b09ed}{10845}} \mbox{\hyperlink{bxe_8c_a9d2b2bc29e405e509106d246a44b09ed}{bxe\_init\_shmem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10846}10846 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10847}10847     \textcolor{keywordtype}{int} cnt = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10848}10848     uint32\_t val = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10849}10849 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10850}10850     \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10851}10851         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a97c45ddd35325a82a07dba52c261cd30}{shmem\_base}}     =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10852}10852         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcde09ff5cb957a4d0ac0bf7b778fac6}{shmem\_base}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10853}10853             \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac568628b825db5f7e7339932a19bcd2b}{MISC\_REG\_SHARED\_MEM\_ADDR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10854}10854 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10855}10855         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a97c45ddd35325a82a07dba52c261cd30}{shmem\_base}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10856}10856             val = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, validity\_map[\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10857}10857             \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_a29dc5337a779da0326a7f64c2e4ce9a9}{SHR\_MEM\_VALIDITY\_MB}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10858}10858                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10859}10859         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10860}10860 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10861}10861         \mbox{\hyperlink{bxe_8c_ae8ed5bd512f5e00a3894b55a9ae52858}{bxe\_mcp\_wait\_one}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10862}10862 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10863}10863     \} \textcolor{keywordflow}{while} (cnt++ < (\mbox{\hyperlink{bxe_8c_a6f81d96cb7ac2b420a615a53b5193f40}{MCP\_TIMEOUT}} / \mbox{\hyperlink{bxe_8c_a8311cd5a6acce24a0710f889c56d7f5a}{MCP\_ONE\_TIMEOUT}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10864}10864 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10865}10865     \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}BAD MCP validity signature\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10866}10866 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10867}10867     \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10868}10868 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10869}10869 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10870}10870 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10871}\mbox{\hyperlink{bxe_8c_a5af3b677dc44f85d8026ec864ef2560e}{10871}} \mbox{\hyperlink{bxe_8c_a5af3b677dc44f85d8026ec864ef2560e}{bxe\_reset\_mcp\_comp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10872}10872                    uint32\_t         magic\_val)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10873}10873 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10874}10874     \textcolor{keywordtype}{int} rc = \mbox{\hyperlink{bxe_8c_a9d2b2bc29e405e509106d246a44b09ed}{bxe\_init\_shmem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10875}10875 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10876}10876     \textcolor{comment}{/* Restore the `magic' bit value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10877}10877     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10878}10878         \mbox{\hyperlink{bxe_8c_a958ce31e9e76352612f83577a3d468fb}{bxe\_clp\_reset\_done}}(sc, magic\_val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10879}10879     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10880}10880 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10881}10881     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10882}10882 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10883}10883 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10884}10884 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10885}\mbox{\hyperlink{bxe_8c_a42f0abf95392c0aff90588b5f4dc43a6}{10885}} \mbox{\hyperlink{bxe_8c_a42f0abf95392c0aff90588b5f4dc43a6}{bxe\_pxp\_prep}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10886}10886 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10887}10887     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10888}10888         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a210866bb934c05aab186ad2dbd5ab111}{PXP2\_REG\_RD\_START\_INIT}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10889}10889         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad7543670888f0d8cd2c871b2c7a2452b}{PXP2\_REG\_RQ\_RBC\_DONE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10890}10890         wmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10891}10891     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10892}10892 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10893}10893 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10894}10894 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10895}10895 \textcolor{comment}{ * Reset the whole chip except for:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10896}10896 \textcolor{comment}{ *      -\/ PCIE core}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10897}10897 \textcolor{comment}{ *      -\/ PCI Glue, PSWHST, PXP/PXP2 RF (all controlled by one reset bit)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10898}10898 \textcolor{comment}{ *      -\/ IGU}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10899}10899 \textcolor{comment}{ *      -\/ MISC (including AEU)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10900}10900 \textcolor{comment}{ *      -\/ GRC}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10901}10901 \textcolor{comment}{ *      -\/ RBCN, RBCP}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10902}10902 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10903}10903 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10904}\mbox{\hyperlink{bxe_8c_ae803d7de07017174ae732ef1b870f6f2}{10904}} \mbox{\hyperlink{bxe_8c_ae803d7de07017174ae732ef1b870f6f2}{bxe\_process\_kill\_chip\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10905}10905                             uint8\_t          global)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10906}10906 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10907}10907     uint32\_t not\_reset\_mask1, reset\_mask1, not\_reset\_mask2, reset\_mask2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10908}10908     uint32\_t global\_bits2, stay\_reset2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10909}10909 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10910}10910     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10911}10911 \textcolor{comment}{     * Bits that have to be set in reset\_mask2 if we want to reset 'global'}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10912}10912 \textcolor{comment}{     * (per chip) blocks.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10913}10913 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10914}10914     global\_bits2 =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10915}10915         \mbox{\hyperlink{ecore__reg_8h_a0b4f40ab8796c80c7531050ed5cdd3c8}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_MCP\_N\_RESET\_CMN\_CPU}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10916}10916         \mbox{\hyperlink{ecore__reg_8h_a3389ebb22090fd90c84c94aead28b638}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_MCP\_N\_RESET\_CMN\_CORE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10917}10917 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10918}10918     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10919}10919 \textcolor{comment}{     * Don't reset the following blocks.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10920}10920 \textcolor{comment}{     * Important: per port blocks (such as EMAC, BMAC, UMAC) can't be}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10921}10921 \textcolor{comment}{     *            reset, as in 4 port device they might still be owned}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10922}10922 \textcolor{comment}{     *            by the MCP (there is only one leader per path).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10923}10923 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10924}10924     not\_reset\_mask1 =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10925}10925         \mbox{\hyperlink{ecore__reg_8h_a81a4dc3bd1144b5cd91a14d298b39d0f}{MISC\_REGISTERS\_RESET\_REG\_1\_RST\_HC}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10926}10926         \mbox{\hyperlink{ecore__reg_8h_a8479bb88cdeb8489ffd1211a9d8983b0}{MISC\_REGISTERS\_RESET\_REG\_1\_RST\_PXPV}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10927}10927         \mbox{\hyperlink{ecore__reg_8h_a2d16dd77248f09c941c1486a755ceed8}{MISC\_REGISTERS\_RESET\_REG\_1\_RST\_PXP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10928}10928 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10929}10929     not\_reset\_mask2 =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10930}10930         \mbox{\hyperlink{ecore__reg_8h_aea449489e7505143a0e2e2cb9a93803f}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_PCI\_MDIO}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10931}10931         \mbox{\hyperlink{ecore__reg_8h_a0cb6296f0cebf5e3bc0c5c8b57eebbac}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_EMAC0\_HARD\_CORE}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10932}10932         \mbox{\hyperlink{ecore__reg_8h_ab5544e2ca250d5fcf89c1e956525599c}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_EMAC1\_HARD\_CORE}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10933}10933         \mbox{\hyperlink{ecore__reg_8h_a3f74fb7776eb9fea0bdeb08e3fd350cc}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_MISC\_CORE}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10934}10934         \mbox{\hyperlink{ecore__reg_8h_adbc9d7bb79d97489c487eb11466c3b8a}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_RBCN}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10935}10935         \mbox{\hyperlink{ecore__reg_8h_ac738031bf6e2754763f1f460e6efadd4}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_GRC}}  |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10936}10936         \mbox{\hyperlink{ecore__reg_8h_a2a1d0ddd90d3c258fa6c47ff25338490}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_MCP\_N\_RESET\_REG\_HARD\_CORE}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10937}10937         \mbox{\hyperlink{ecore__reg_8h_a61558cd910c37e25c0fd487135fe8005}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_MCP\_N\_HARD\_CORE\_RST\_B}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10938}10938         \mbox{\hyperlink{ecore__reg_8h_a48b5498e174ce884f2c11295b2a6ba70}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_ATC}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10939}10939         \mbox{\hyperlink{ecore__reg_8h_add9cfed59fef6935931593f26a45ae51}{MISC\_REGISTERS\_RESET\_REG\_2\_PGLC}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10940}10940         \mbox{\hyperlink{ecore__reg_8h_a464ea5755233ad3735879850ac0d7b0f}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_BMAC0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10941}10941         \mbox{\hyperlink{ecore__reg_8h_a8ebcdc9b14424ce3a809db9b315af11a}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_BMAC1}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10942}10942         \mbox{\hyperlink{ecore__reg_8h_a089dc4e84f79a17761bb22b32feec840}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_EMAC0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10943}10943         \mbox{\hyperlink{ecore__reg_8h_a65af89b980c3761b4b1d2c018914b5a4}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_EMAC1}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10944}10944         \mbox{\hyperlink{ecore__reg_8h_ae631fc3eec23f165899c0b29c5cc397e}{MISC\_REGISTERS\_RESET\_REG\_2\_UMAC0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10945}10945         \mbox{\hyperlink{ecore__reg_8h_a123483b4d854a66968e50057be6c1478}{MISC\_REGISTERS\_RESET\_REG\_2\_UMAC1}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10946}10946 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10947}10947     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10948}10948 \textcolor{comment}{     * Keep the following blocks in reset:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10949}10949 \textcolor{comment}{     *  -\/ all xxMACs are handled by the elink code.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10950}10950 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10951}10951     stay\_reset2 =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10952}10952         \mbox{\hyperlink{ecore__reg_8h_a4d00f634e657d14df6c7c3e1a70139a4}{MISC\_REGISTERS\_RESET\_REG\_2\_XMAC}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10953}10953         \mbox{\hyperlink{ecore__reg_8h_a2fab201fff75260ebd1751ca78475301}{MISC\_REGISTERS\_RESET\_REG\_2\_XMAC\_SOFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10954}10954 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10955}10955     \textcolor{comment}{/* Full reset masks according to the chip */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10956}10956     reset\_mask1 = 0xffffffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10957}10957 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10958}10958     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10959}10959         reset\_mask2 = 0xffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10960}10960     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10961}10961         reset\_mask2 = 0x1ffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10962}10962     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10963}10963         reset\_mask2 = 0xfffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10964}10964     \textcolor{keywordflow}{else} \textcolor{comment}{/* CHIP\_IS\_E3 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10965}10965         reset\_mask2 = 0x3ffffff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10966}10966 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10967}10967     \textcolor{comment}{/* Don't reset global blocks unless we need to */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10968}10968     \textcolor{keywordflow}{if} (!global)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10969}10969         reset\_mask2 \&= \string~global\_bits2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10970}10970 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10971}10971     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10972}10972 \textcolor{comment}{     * In case of attention in the QM, we need to reset PXP}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10973}10973 \textcolor{comment}{     * (MISC\_REGISTERS\_RESET\_REG\_2\_RST\_PXP\_RQ\_RD\_WR) before QM}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10974}10974 \textcolor{comment}{     * because otherwise QM reset would release 'close the gates' shortly}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10975}10975 \textcolor{comment}{     * before resetting the PXP, then the PSWRQ would send a write}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10976}10976 \textcolor{comment}{     * request to PGLUE. Then when PXP is reset, PGLUE would try to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10977}10977 \textcolor{comment}{     * read the payload data from PSWWR, but PSWWR would not}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10978}10978 \textcolor{comment}{     * respond. The write queue in PGLUE would stuck, dmae commands}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10979}10979 \textcolor{comment}{     * would not return. Therefore it's important to reset the second}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10980}10980 \textcolor{comment}{     * reset register (containing the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10981}10981 \textcolor{comment}{     * MISC\_REGISTERS\_RESET\_REG\_2\_RST\_PXP\_RQ\_RD\_WR bit) before the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10982}10982 \textcolor{comment}{     * first one (containing the MISC\_REGISTERS\_RESET\_REG\_1\_RST\_QM}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10983}10983 \textcolor{comment}{     * bit).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10984}10984 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10985}10985     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a4c4ad2259916df7a5b006055c3083926}{MISC\_REGISTERS\_RESET\_REG\_2\_CLEAR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10986}10986            reset\_mask2 \& (\string~not\_reset\_mask2));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10987}10987 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10988}10988     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_ae418017ed656db86eb2d5143fb42c181}{MISC\_REGISTERS\_RESET\_REG\_1\_CLEAR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10989}10989            reset\_mask1 \& (\string~not\_reset\_mask1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10990}10990 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10991}10991     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10992}10992     wmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10993}10993 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10994}10994     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a70170138a30f2fa16502ffd2972e9850}{MISC\_REGISTERS\_RESET\_REG\_2\_SET}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10995}10995            reset\_mask2 \& (\string~stay\_reset2));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10996}10996 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10997}10997     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10998}10998     wmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l10999}10999 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11000}11000     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a0c2f3bf148b2daccef768b3f892a7746}{MISC\_REGISTERS\_RESET\_REG\_1\_SET}}, reset\_mask1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11001}11001     wmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11002}11002 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11003}11003 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11004}11004 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11005}\mbox{\hyperlink{bxe_8c_acc7bc73aeccbf0148e58c4e34778c2af}{11005}} \mbox{\hyperlink{bxe_8c_acc7bc73aeccbf0148e58c4e34778c2af}{bxe\_process\_kill}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11006}11006                  uint8\_t          global)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11007}11007 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11008}11008     \textcolor{keywordtype}{int} cnt = 1000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11009}11009     uint32\_t val = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11010}11010     uint32\_t sr\_cnt, blk\_cnt, port\_is\_idle\_0, port\_is\_idle\_1, pgl\_exp\_rom2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11011}11011     uint32\_t tags\_63\_32 = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11012}11012 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11013}11013     \textcolor{comment}{/* Empty the Tetris buffer, wait for 1s */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11014}11014     \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11015}11015         sr\_cnt  = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a04a312506700af28c2f81dbde87fb82e}{PXP2\_REG\_RD\_SR\_CNT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11016}11016         blk\_cnt = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab7ec2f98067460aeb28f019367ee50e1}{PXP2\_REG\_RD\_BLK\_CNT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11017}11017         port\_is\_idle\_0 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_af934059668df8726d74ae8995ab8a604}{PXP2\_REG\_RD\_PORT\_IS\_IDLE\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11018}11018         port\_is\_idle\_1 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a171e76508f77ace02a9b80e19f64ddb8}{PXP2\_REG\_RD\_PORT\_IS\_IDLE\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11019}11019         pgl\_exp\_rom2 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9cdfd8ac4124c137d5df8025de85832e}{PXP2\_REG\_PGL\_EXP\_ROM2}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11020}11020         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11021}11021             tags\_63\_32 = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a97f3f9c2d47df2a4731a7b73d5cc4355}{PGLUE\_B\_REG\_TAGS\_63\_32}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11022}11022         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11023}11023 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11024}11024         \textcolor{keywordflow}{if} ((sr\_cnt == 0x7e) \&\& (blk\_cnt == 0xa0) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11025}11025             ((port\_is\_idle\_0 \& 0x1) == 0x1) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11026}11026             ((port\_is\_idle\_1 \& 0x1) == 0x1) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11027}11027             (pgl\_exp\_rom2 == 0xffffffff) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11028}11028             (!\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc) || (tags\_63\_32 == 0xffffffff)))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11029}11029             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11030}11030         DELAY(1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11031}11031     \} \textcolor{keywordflow}{while} (cnt-\/-\/ > 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11032}11032 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11033}11033     \textcolor{keywordflow}{if} (cnt <= 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11034}11034         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ERROR: Tetris buffer didn't get empty or there "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11035}11035                   \textcolor{stringliteral}{"{}are still outstanding read requests after 1s! "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11036}11036                   \textcolor{stringliteral}{"{}sr\_cnt=0x\%08x, blk\_cnt=0x\%08x, port\_is\_idle\_0=0x\%08x, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11037}11037                   \textcolor{stringliteral}{"{}port\_is\_idle\_1=0x\%08x, pgl\_exp\_rom2=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11038}11038               sr\_cnt, blk\_cnt, port\_is\_idle\_0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11039}11039               port\_is\_idle\_1, pgl\_exp\_rom2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11040}11040         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11041}11041     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11042}11042 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11043}11043     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11044}11044 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11045}11045     \textcolor{comment}{/* Close gates \#2, \#3 and \#4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11046}11046     \mbox{\hyperlink{bxe_8c_a5f13d74a1f90275e300763d37db2fb57}{bxe\_set\_234\_gates}}(sc, TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11047}11047 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11048}11048     \textcolor{comment}{/* Poll for IGU VQs for 57712 and newer chips */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11049}11049     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc) \&\& \mbox{\hyperlink{bxe_8c_aa9c417a6ccdd8db16b851a457b38ff2a}{bxe\_er\_poll\_igu\_vq}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11050}11050         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11051}11051     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11052}11052 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11053}11053     \textcolor{comment}{/* XXX indicate that "{}process kill"{} is in progress to MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11054}11054 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11055}11055     \textcolor{comment}{/* clear "{}unprepared"{} bit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11056}11056     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a078b1d0ddccd9a032572e65d186fec6c}{MISC\_REG\_UNPREPARED}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11057}11057     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11058}11058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11059}11059     \textcolor{comment}{/* Make sure all is written to the chip before the reset */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11060}11060     wmb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11061}11061 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11062}11062     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11063}11063 \textcolor{comment}{     * Wait for 1ms to empty GLUE and PCI-\/E core queues,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11064}11064 \textcolor{comment}{     * PSWHST, GRC and PSWRD Tetris buffer.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11065}11065 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11066}11066     DELAY(1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11067}11067 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11068}11068     \textcolor{comment}{/* Prepare to chip reset: */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11069}11069     \textcolor{comment}{/* MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11070}11070     \textcolor{keywordflow}{if} (global) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11071}11071         \mbox{\hyperlink{bxe_8c_a2a3d4495c14a61a70e60aeda1c0d4b22}{bxe\_reset\_mcp\_prep}}(sc, \&val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11072}11072     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11073}11073 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11074}11074     \textcolor{comment}{/* PXP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11075}11075     \mbox{\hyperlink{bxe_8c_a42f0abf95392c0aff90588b5f4dc43a6}{bxe\_pxp\_prep}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11076}11076     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11077}11077 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11078}11078     \textcolor{comment}{/* reset the chip */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11079}11079     \mbox{\hyperlink{bxe_8c_ae803d7de07017174ae732ef1b870f6f2}{bxe\_process\_kill\_chip\_reset}}(sc, global);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11080}11080     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11081}11081 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11082}11082     \textcolor{comment}{/* clear errors in PGB */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11083}11083     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11084}11084         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6b46ab7acef613c60ed32c200f81025b}{PGLUE\_B\_REG\_LATCHED\_ERRORS\_CLR}}, 0x7f);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11085}11085 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11086}11086     \textcolor{comment}{/* Recover after reset: */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11087}11087     \textcolor{comment}{/* MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11088}11088     \textcolor{keywordflow}{if} (global \&\& \mbox{\hyperlink{bxe_8c_a5af3b677dc44f85d8026ec864ef2560e}{bxe\_reset\_mcp\_comp}}(sc, val)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11089}11089         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11090}11090     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11091}11091 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11092}11092     \textcolor{comment}{/* XXX add resetting the NO\_MCP mode DB here */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11093}11093 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11094}11094     \textcolor{comment}{/* Open the gates \#2, \#3 and \#4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11095}11095     \mbox{\hyperlink{bxe_8c_a5f13d74a1f90275e300763d37db2fb57}{bxe\_set\_234\_gates}}(sc, FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11096}11096 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11097}11097     \textcolor{comment}{/* XXX}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11098}11098 \textcolor{comment}{     * IGU/AEU preparation bring back the AEU/IGU to a reset state}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11099}11099 \textcolor{comment}{     * re-\/enable attentions}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11100}11100 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11101}11101 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11102}11102     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11103}11103 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11104}11104 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11105}11105 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11106}\mbox{\hyperlink{bxe_8c_ab8b3a86c4bf8245e1dd5247efb2b6dd5}{11106}} \mbox{\hyperlink{bxe_8c_ab8b3a86c4bf8245e1dd5247efb2b6dd5}{bxe\_leader\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11107}11107 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11108}11108     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11109}11109     uint8\_t global = \mbox{\hyperlink{bxe_8c_ad688b2d4462c1d0051be7e1e0fc24eed}{bxe\_reset\_is\_global}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11110}11110     uint32\_t load\_code;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11111}11111 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11112}11112     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11113}11113 \textcolor{comment}{     * If not going to reset MCP, load "{}fake"{} driver to reset HW while}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11114}11114 \textcolor{comment}{     * driver is owner of the HW.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11115}11115 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11116}11116     \textcolor{keywordflow}{if} (!global \&\& !\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11117}11117         load\_code = \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a32e9abf58bc46f82f5be4dd4a1a9cc93}{DRV\_MSG\_CODE\_LOAD\_REQ}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11118}11118                                    \mbox{\hyperlink{ecore__hsi_8h_a770c2b525cf9d546ae4df60d14dc65a8}{DRV\_MSG\_CODE\_LOAD\_REQ\_WITH\_LFA}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11119}11119         \textcolor{keywordflow}{if} (!load\_code) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11120}11120             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MCP response failure, aborting\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11121}11121             rc = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11122}11122             \textcolor{keywordflow}{goto} exit\_leader\_reset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11123}11123         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11124}11124 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11125}11125         \textcolor{keywordflow}{if} ((load\_code != \mbox{\hyperlink{ecore__hsi_8h_a688ae0d21f8a14916456d2051fb14d54}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON\_CHIP}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11126}11126             (load\_code != \mbox{\hyperlink{ecore__hsi_8h_a56ed71995441ad66fb821f1fcf4b2753}{FW\_MSG\_CODE\_DRV\_LOAD\_COMMON}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11127}11127             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MCP unexpected response, aborting\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11128}11128             rc = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11129}11129             \textcolor{keywordflow}{goto} exit\_leader\_reset2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11130}11130         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11131}11131 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11132}11132         load\_code = \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a860eddf6065dcb5be14e9e21fcdfbda5}{DRV\_MSG\_CODE\_LOAD\_DONE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11133}11133         \textcolor{keywordflow}{if} (!load\_code) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11134}11134             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MCP response failure, aborting\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11135}11135             rc = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11136}11136             \textcolor{keywordflow}{goto} exit\_leader\_reset2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11137}11137         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11138}11138     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11139}11139 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11140}11140     \textcolor{comment}{/* try to recover after the failure */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11141}11141     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_acc7bc73aeccbf0148e58c4e34778c2af}{bxe\_process\_kill}}(sc, global)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11142}11142         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Something bad occurred on engine \%d!\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11143}11143         rc = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11144}11144         \textcolor{keywordflow}{goto} exit\_leader\_reset2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11145}11145     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11146}11146 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11147}11147     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11148}11148 \textcolor{comment}{     * Clear the RESET\_IN\_PROGRESS and RESET\_GLOBAL bits and update the driver}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11149}11149 \textcolor{comment}{     * state.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11150}11150 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11151}11151     \mbox{\hyperlink{bxe_8c_afada6c3eb66d779565ff4007ccbe4342}{bxe\_set\_reset\_done}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11152}11152     \textcolor{keywordflow}{if} (global) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11153}11153         \mbox{\hyperlink{bxe_8c_a49992b73eae832caf26862cb9ec297a0}{bxe\_clear\_reset\_global}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11154}11154     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11155}11155 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11156}11156 exit\_leader\_reset2:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11157}11157 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11158}11158     \textcolor{comment}{/* unload "{}fake driver"{} if it was loaded */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11159}11159     \textcolor{keywordflow}{if} (!global \&\& !\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11160}11160         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a28699b151f0e016fdf0f3ab2a320e66f}{DRV\_MSG\_CODE\_UNLOAD\_REQ\_WOL\_MCP}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11161}11161         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_afb079547add0c5714c954ea04b9659e7}{DRV\_MSG\_CODE\_UNLOAD\_DONE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11162}11162     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11163}11163 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11164}11164 exit\_leader\_reset:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11165}11165 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11166}11166     sc-\/>\mbox{\hyperlink{structbxe__softc_a58ff5b9b70ec4dba07f023959a63012b}{is\_leader}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11167}11167     \mbox{\hyperlink{bxe_8c_a2d21d8c7d71506277952a301e154ec1f}{bxe\_release\_leader\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11168}11168 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11169}11169     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11170}11170     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11171}11171 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11172}11172 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11173}11173 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11174}11174 \textcolor{comment}{ * prepare INIT transition, parameters configured:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11175}11175 \textcolor{comment}{ *   -\/ HC configuration}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11176}11176 \textcolor{comment}{ *   -\/ Queue's CDU context}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11177}11177 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11178}11178 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11179}\mbox{\hyperlink{bxe_8c_a66f921e734cfbc715465de0ecdd134dc}{11179}} \mbox{\hyperlink{bxe_8c_a66f921e734cfbc715465de0ecdd134dc}{bxe\_pf\_q\_prep\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}               *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11180}11180                    \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}            *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11181}11181                    \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__queue__init__params}{ecore\_queue\_init\_params}} *init\_params)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11182}11182 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11183}11183     uint8\_t cos;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11184}11184     \textcolor{keywordtype}{int} cxt\_index, cxt\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11185}11185 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11186}11186     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a4c6f52686cc397a1cfbc2c31e08df43c}{ECORE\_Q\_FLG\_HC}}, \&init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_a0c9bcfbf9ec5cb280e1eaeb82e9f124a}{rx}}.\mbox{\hyperlink{structecore__queue__init__params_a216bc8f177f6e25905cf1a356db9bab4}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11187}11187     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a4c6f52686cc397a1cfbc2c31e08df43c}{ECORE\_Q\_FLG\_HC}}, \&init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ac62871b3c7793e5326731357f69e0f30}{tx}}.\mbox{\hyperlink{structecore__queue__init__params_a216bc8f177f6e25905cf1a356db9bab4}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11188}11188 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11189}11189     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a7bc857c0e10900839a52bd92ba920c49}{ECORE\_Q\_FLG\_HC\_EN}}, \&init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_a0c9bcfbf9ec5cb280e1eaeb82e9f124a}{rx}}.\mbox{\hyperlink{structecore__queue__init__params_a216bc8f177f6e25905cf1a356db9bab4}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11190}11190     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a7bc857c0e10900839a52bd92ba920c49}{ECORE\_Q\_FLG\_HC\_EN}}, \&init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ac62871b3c7793e5326731357f69e0f30}{tx}}.\mbox{\hyperlink{structecore__queue__init__params_a216bc8f177f6e25905cf1a356db9bab4}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11191}11191 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11192}11192     \textcolor{comment}{/* HC rate */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11193}11193     init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_a0c9bcfbf9ec5cb280e1eaeb82e9f124a}{rx}}.\mbox{\hyperlink{structecore__queue__init__params_a886ded0f8779fe4d6c5341e6eae20b8a}{hc\_rate}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11194}11194         sc-\/>\mbox{\hyperlink{structbxe__softc_a32db16a6db7671ff174a455cbd77dc54}{hc\_rx\_ticks}} ? (1000000 / sc-\/>\mbox{\hyperlink{structbxe__softc_a32db16a6db7671ff174a455cbd77dc54}{hc\_rx\_ticks}}) : 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11195}11195     init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ac62871b3c7793e5326731357f69e0f30}{tx}}.\mbox{\hyperlink{structecore__queue__init__params_a886ded0f8779fe4d6c5341e6eae20b8a}{hc\_rate}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11196}11196         sc-\/>\mbox{\hyperlink{structbxe__softc_a52cb5c740f9b316f52e961000923be32}{hc\_tx\_ticks}} ? (1000000 / sc-\/>\mbox{\hyperlink{structbxe__softc_a52cb5c740f9b316f52e961000923be32}{hc\_tx\_ticks}}) : 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11197}11197 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11198}11198     \textcolor{comment}{/* FW SB ID */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11199}11199     init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_a0c9bcfbf9ec5cb280e1eaeb82e9f124a}{rx}}.\mbox{\hyperlink{structecore__queue__init__params_a6f5d9c404366d577f32d250a46bd1301}{fw\_sb\_id}} = init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ac62871b3c7793e5326731357f69e0f30}{tx}}.\mbox{\hyperlink{structecore__queue__init__params_a6f5d9c404366d577f32d250a46bd1301}{fw\_sb\_id}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a210f7120d5922e380b3210ee6de6a625}{fw\_sb\_id}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11200}11200 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11201}11201     \textcolor{comment}{/* CQ index among the SB indices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11202}11202     init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_a0c9bcfbf9ec5cb280e1eaeb82e9f124a}{rx}}.\mbox{\hyperlink{structecore__queue__init__params_a483d7b91fe7ae691bcfc6d606026a598}{sb\_cq\_index}} = \mbox{\hyperlink{bxe_8h_ab58359d5d4b214fec145175f6a80a44a}{HC\_INDEX\_ETH\_RX\_CQ\_CONS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11203}11203     init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ac62871b3c7793e5326731357f69e0f30}{tx}}.\mbox{\hyperlink{structecore__queue__init__params_a483d7b91fe7ae691bcfc6d606026a598}{sb\_cq\_index}} = \mbox{\hyperlink{bxe_8h_ad6ad694c6d2dee5c5f97caffc02f82b8}{HC\_INDEX\_ETH\_FIRST\_TX\_CQ\_CONS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11204}11204 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11205}11205     \textcolor{comment}{/* set maximum number of COSs supported by this queue */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11206}11206     init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ad706e700de0ddbd1dfa3323193146362}{max\_cos}} = sc-\/>\mbox{\hyperlink{structbxe__softc_acd82fee11a36e84b5e3ed957dd47cd79}{max\_cos}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11207}11207 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11208}11208     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}fp \%d setting queue params max cos to \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11209}11209           fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ad706e700de0ddbd1dfa3323193146362}{max\_cos}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11210}11210 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11211}11211     \textcolor{comment}{/* set the context pointers queue object */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11212}11212     \textcolor{keywordflow}{for} (cos = \mbox{\hyperlink{bxe_8h_aaef4892dade0bd4079046bf98614ab07}{FIRST\_TX\_COS\_INDEX}}; cos < init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ad706e700de0ddbd1dfa3323193146362}{max\_cos}}; cos++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11213}11213         \textcolor{comment}{/* XXX change index/cid here if ever support multiple tx CoS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11214}11214         \textcolor{comment}{/* fp-\/>txdata[cos]-\/>cid */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11215}11215         cxt\_index = fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}} / \mbox{\hyperlink{bxe_8h_a81dd6ad4ed0a8d03589b6137ca78c215}{ILT\_PAGE\_CIDS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11216}11216         cxt\_offset = fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}} -\/ (cxt\_index * \mbox{\hyperlink{bxe_8h_a81dd6ad4ed0a8d03589b6137ca78c215}{ILT\_PAGE\_CIDS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11217}11217         init\_params-\/>\mbox{\hyperlink{structecore__queue__init__params_ab6bc5aceb5eb398c6911172b669e11b8}{cxts}}[cos] = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[cxt\_index].\mbox{\hyperlink{structhw__context_aa7c394b86d59729298ef3d484234b9e0}{vcxt}}[cxt\_offset].\mbox{\hyperlink{unioncdu__context_a7b4c83228fde21d4f9e7a3d681fe72c0}{eth}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11218}11218     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11219}11219 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11220}11220 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11221}11221 \textcolor{comment}{/* set flags that are common for the Tx-\/only and not normal connections */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11222}11222 \textcolor{keyword}{static} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11223}\mbox{\hyperlink{bxe_8c_a4fb057cc6c96418a8cf9de1fae47a934}{11223}} \mbox{\hyperlink{bxe_8c_a4fb057cc6c96418a8cf9de1fae47a934}{bxe\_get\_common\_flags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11224}11224                      \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11225}11225                      uint8\_t             zero\_stats)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11226}11226 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11227}11227     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11228}11228 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11229}11229     \textcolor{comment}{/* PF driver will always initialize the Queue to an ACTIVE state */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11230}11230     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a7fdbfa4e8f99c93bd4c09aac1de0b675}{ECORE\_Q\_FLG\_ACTIVE}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11231}11231 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11232}11232     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11233}11233 \textcolor{comment}{     * tx only connections collect statistics (on the same index as the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11234}11234 \textcolor{comment}{     * parent connection). The statistics are zeroed when the parent}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11235}11235 \textcolor{comment}{     * connection is initialized.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11236}11236 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11237}11237 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11238}11238     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a9eda87213ae959f6ea5039e63cd31f92}{ECORE\_Q\_FLG\_STATS}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11239}11239     \textcolor{keywordflow}{if} (zero\_stats) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11240}11240         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a2dd3b2e198dd07f7cb0f5facda8a0f4c}{ECORE\_Q\_FLG\_ZERO\_STATS}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11241}11241     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11242}11242 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11243}11243     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11244}11244 \textcolor{comment}{     * tx only connections can support tx-\/switching, though their}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11245}11245 \textcolor{comment}{     * CoS-\/ness doesn't survive the loopback}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11246}11246 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11247}11247     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} \& \mbox{\hyperlink{bxe_8h_a643fc97e6bb5d37901c3296fc37b8f90}{BXE\_TX\_SWITCHING}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11248}11248         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a834f541723ec8767957ffe9566dfb1a3}{ECORE\_Q\_FLG\_TX\_SWITCH}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11249}11249     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11250}11250 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11251}11251     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a027b9be10668b2184f41effe52ca8780}{ECORE\_Q\_FLG\_PCSUM\_ON\_PKT}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11252}11252 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11253}11253     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11254}11254 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11255}11255 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11256}11256 \textcolor{keyword}{static} \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11257}\mbox{\hyperlink{bxe_8c_a8ae04f3902ea58937d2f56f6f88eef51}{11257}} \mbox{\hyperlink{bxe_8c_a8ae04f3902ea58937d2f56f6f88eef51}{bxe\_get\_q\_flags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11258}11258                 \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11259}11259                 uint8\_t             leading)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11260}11260 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11261}11261     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11262}11262 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11263}11263     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac6f96bf386e9fc529b007d013928c561}{IS\_MF\_SD}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11264}11264         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609ad6be361b3bbfccb805b2277dab2bc941}{ECORE\_Q\_FLG\_OV}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11265}11265     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11266}11266 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11267}11267     \textcolor{keywordflow}{if} (if\_getcapenable(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFCAP\_LRO) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11268}11268         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609af44e2cf2631304e7a462b3bba9b85aa2}{ECORE\_Q\_FLG\_TPA}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11269}11269         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609ae1c92fc54e838f0d573657aa82753f49}{ECORE\_Q\_FLG\_TPA\_IPV6}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11270}11270     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11271}11271 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11272}11272     \textcolor{keywordflow}{if} (leading) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11273}11273         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609ad324a5de840dcaba34ee850633b0dfb8}{ECORE\_Q\_FLG\_LEADING\_RSS}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11274}11274         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609a00cb2580fa2ec4321e34307d28a3d3a6}{ECORE\_Q\_FLG\_MCAST}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11275}11275     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11276}11276 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11277}11277     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a458e651af6690959efa2afb96be7d609ac0bd2dbbfd41dad3a0ca228edde73439}{ECORE\_Q\_FLG\_VLAN}}, \&\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11278}11278 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11279}11279     \textcolor{comment}{/* merge with common flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11280}11280     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} | \mbox{\hyperlink{bxe_8c_a4fb057cc6c96418a8cf9de1fae47a934}{bxe\_get\_common\_flags}}(sc, fp, TRUE));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11281}11281 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11282}11282 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11283}11283 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11284}\mbox{\hyperlink{bxe_8c_a89e7dc826f26ff33d5d038e4e1f82019}{11284}} \mbox{\hyperlink{bxe_8c_a89e7dc826f26ff33d5d038e4e1f82019}{bxe\_pf\_q\_prep\_general}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}                  *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11285}11285                       \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}               *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11286}11286                       \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__general__setup__params}{ecore\_general\_setup\_params}} *gen\_init,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11287}11287                       uint8\_t                           cos)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11288}11288 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11289}11289     gen\_init-\/>\mbox{\hyperlink{structecore__general__setup__params_a47c1dfceff8a7a2178e40902904d9437}{stat\_id}} = \mbox{\hyperlink{bxe_8h_a62c698bb371d363b56c006027b1f781a}{bxe\_stats\_id}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11290}11290     gen\_init-\/>\mbox{\hyperlink{structecore__general__setup__params_a66d49b36952452d2f82dcde9dbab30e3}{spcl\_id}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11291}11291     gen\_init-\/>\mbox{\hyperlink{structecore__general__setup__params_aac19e9981e30587e8214048b6ce653da}{mtu}} = sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11292}11292     gen\_init-\/>\mbox{\hyperlink{structecore__general__setup__params_af24eb9111e700b727dc25d1446fb7398}{cos}} = cos;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11293}11293 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11294}11294 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11295}11295 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11296}\mbox{\hyperlink{bxe_8c_a12c0a1edf8ed796141da05a1f0646b72}{11296}} \mbox{\hyperlink{bxe_8c_a12c0a1edf8ed796141da05a1f0646b72}{bxe\_pf\_rx\_q\_prep}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}              *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11297}11297                  \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}           *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11298}11298                  \textcolor{keyword}{struct} \mbox{\hyperlink{structrxq__pause__params}{rxq\_pause\_params}}       *pause,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11299}11299                  \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__rxq__setup__params}{ecore\_rxq\_setup\_params}} *rxq\_init)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11300}11300 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11301}11301     uint8\_t max\_sge = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11302}11302     uint16\_t sge\_sz = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11303}11303     uint16\_t tpa\_agg\_size = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11304}11304 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11305}11305     pause-\/>\mbox{\hyperlink{structrxq__pause__params_ade85a3dba9fb2fb283e25559cdfa5d09}{sge\_th\_lo}} = \mbox{\hyperlink{bxe_8h_a2328944f705000ac332ef97e09516ae9}{SGE\_TH\_LO}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11306}11306     pause-\/>\mbox{\hyperlink{structrxq__pause__params_a40e3796cecb0d4a46293e573545895de}{sge\_th\_hi}} = \mbox{\hyperlink{bxe_8h_a1ab7fec1a27bdeabb6e3fdad614f12d4}{SGE\_TH\_HI}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11307}11307 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11308}11308     \textcolor{comment}{/* validate SGE ring has enough to cross high threshold */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11309}11309     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a8b8da0699d50a5a23337d8d251485f14}{dropless\_fc}} \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11310}11310             (pause-\/>\mbox{\hyperlink{structrxq__pause__params_a40e3796cecb0d4a46293e573545895de}{sge\_th\_hi}} + \mbox{\hyperlink{bxe_8h_a169a0b06de41be9dc17fdfb03dd427db}{FW\_PREFETCH\_CNT}}) >}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11311}11311             (\mbox{\hyperlink{bxe_8h_af4b763bf218086fb8bac27a125bf86a4}{RX\_SGE\_USABLE\_PER\_PAGE}} * \mbox{\hyperlink{bxe_8h_ae9875871c72b8147f3bc813b2368db08}{RX\_SGE\_NUM\_PAGES}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11312}11312         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}sge ring threshold limit\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11313}11313     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11314}11314 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11315}11315     \textcolor{comment}{/* minimum max\_aggregation\_size is 2*MTU (two full buffers) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11316}11316     tpa\_agg\_size = (2 * sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11317}11317     \textcolor{keywordflow}{if} (tpa\_agg\_size < sc-\/>max\_aggregation\_size) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11318}11318         tpa\_agg\_size = sc-\/>\mbox{\hyperlink{structbxe__softc_aec29cc5df9811c16bca52bdf435cc4a3}{max\_aggregation\_size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11319}11319     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11320}11320 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11321}11321     max\_sge = \mbox{\hyperlink{bxe_8h_a635b2aaba996564912a54637018dced9}{SGE\_PAGE\_ALIGN}}(sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}}) >> \mbox{\hyperlink{bxe_8h_a44e17214a6a71a4a75413a4774cec965}{SGE\_PAGE\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11322}11322     max\_sge = ((max\_sge + \mbox{\hyperlink{bxe_8h_ac72d5e4b9829f5522271eedead1a2188}{PAGES\_PER\_SGE}} -\/ 1) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11323}11323                    (\string~(\mbox{\hyperlink{bxe_8h_ac72d5e4b9829f5522271eedead1a2188}{PAGES\_PER\_SGE}} -\/ 1))) >> \mbox{\hyperlink{bxe_8h_a8db035b7b528f883a79237e6c4f442e0}{PAGES\_PER\_SGE\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11324}11324     sge\_sz = (uint16\_t)min(\mbox{\hyperlink{bxe_8h_a5f4f8dc18d06a9f33459f216d7e915bf}{SGE\_PAGES}}, 0xffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11325}11325 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11326}11326     \textcolor{comment}{/* pause -\/ not for e1 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11327}11327     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11328}11328         pause-\/>\mbox{\hyperlink{structrxq__pause__params_a27ca66a4b69d6649fe90c0b926660d80}{bd\_th\_lo}} = \mbox{\hyperlink{bxe_8h_ac2e2dbf1c273bbf78e5260708533e4c7}{BD\_TH\_LO}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11329}11329         pause-\/>\mbox{\hyperlink{structrxq__pause__params_a6cedc8a6a96211ccbe1ea577fe01e278}{bd\_th\_hi}} = \mbox{\hyperlink{bxe_8h_a5a745bae5d9a9d409b28c7f9d9bcb529}{BD\_TH\_HI}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11330}11330 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11331}11331         pause-\/>\mbox{\hyperlink{structrxq__pause__params_a62ddfaaa5096b23070a62d80995a73b4}{rcq\_th\_lo}} = \mbox{\hyperlink{bxe_8h_a32646092fe5f2dfeeaf9affb65c5572c}{RCQ\_TH\_LO}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11332}11332         pause-\/>\mbox{\hyperlink{structrxq__pause__params_a65ecb32f247171fe2ec1e708cfc82a62}{rcq\_th\_hi}} = \mbox{\hyperlink{bxe_8h_aae3f00885cd8b1d6bc6288635b2fd2ee}{RCQ\_TH\_HI}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11333}11333 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11334}11334         \textcolor{comment}{/* validate rings have enough entries to cross high thresholds */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11335}11335         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a8b8da0699d50a5a23337d8d251485f14}{dropless\_fc}} \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11336}11336             pause-\/>\mbox{\hyperlink{structrxq__pause__params_a6cedc8a6a96211ccbe1ea577fe01e278}{bd\_th\_hi}} + \mbox{\hyperlink{bxe_8h_a169a0b06de41be9dc17fdfb03dd427db}{FW\_PREFETCH\_CNT}} >}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11337}11337             sc-\/>\mbox{\hyperlink{structbxe__softc_a1195901be35258ea09cc1795762d875d}{rx\_ring\_size}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11338}11338             \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}rx bd ring threshold limit\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11339}11339         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11340}11340 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11341}11341         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a8b8da0699d50a5a23337d8d251485f14}{dropless\_fc}} \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11342}11342             pause-\/>\mbox{\hyperlink{structrxq__pause__params_a65ecb32f247171fe2ec1e708cfc82a62}{rcq\_th\_hi}} + \mbox{\hyperlink{bxe_8h_a169a0b06de41be9dc17fdfb03dd427db}{FW\_PREFETCH\_CNT}} >}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11343}11343             \mbox{\hyperlink{bxe_8h_a17518816b5fca4f643cf28daa7acc55b}{RCQ\_NUM\_PAGES}} * \mbox{\hyperlink{bxe_8h_a3c399ab6abb015789ca49f721e3c5bf9}{RCQ\_USABLE\_PER\_PAGE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11344}11344             \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}rcq ring threshold limit\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11345}11345         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11346}11346 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11347}11347         pause-\/>\mbox{\hyperlink{structrxq__pause__params_a99f18468449bde69e7b9e7e7edf8af21}{pri\_map}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11348}11348     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11349}11349 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11350}11350     \textcolor{comment}{/* rxq setup */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11351}11351     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_ab38792ab0104f56aa06d12ac786c8e50}{dscr\_map}}   = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4987c39d05c289f627935f0b1661bec6}{rx\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11352}11352     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a2745fd4a9f614455ca3766339af4b54b}{sge\_map}}    = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a25b66543dacbc0212e674f98ff70eca3}{rx\_sge\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11353}11353     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_ab57416bfb7743b1b87e6f19cf732f1da}{rcq\_map}}    = fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11354}11354     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_afa6c33aebab318382ff9058b11a0ad9d}{rcq\_np\_map}} = (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} + \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11355}11355 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11356}11356     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11357}11357 \textcolor{comment}{     * This should be a maximum number of data bytes that may be}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11358}11358 \textcolor{comment}{     * placed on the BD (not including paddings).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11359}11359 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11360}11360     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a8a7aa879f8f0009b035d26a5f5ab3922}{buf\_sz}} = (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a8881f54a78b19b7b011b8a8b065ff6a8}{rx\_buf\_size}} -\/}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11361}11361                         \mbox{\hyperlink{ecore__fw__defs_8h_a9fa72350cc9e5cacea13852e4c5ea13f}{IP\_HEADER\_ALIGNMENT\_PADDING}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11362}11362 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11363}11363     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a45d81262b054595dae8a63a28954e6aa}{cl\_qzone\_id}}     = fp-\/>\mbox{\hyperlink{structbxe__fastpath_af88547736adba8052e0b9d6f714e06f5}{cl\_qzone\_id}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11364}11364     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a37507322bff47322736b3f40f467ee34}{tpa\_agg\_sz}}      = tpa\_agg\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11365}11365     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a64bf833f53e2e1490622337ac5352c21}{sge\_buf\_sz}}      = sge\_sz;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11366}11366     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a1bdecff57a589da17aca4e40b7063feb}{max\_sges\_pkt}}    = max\_sge;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11367}11367     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a55094d9ebc1e374ce29bde2b71d900af}{rss\_engine\_id}}   = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11368}11368     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a748b8a26ad4537426b8dde8542ce7ca8}{mcast\_engine\_id}} = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11369}11369 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11370}11370     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11371}11371 \textcolor{comment}{     * Maximum number or simultaneous TPA aggregation for this Queue.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11372}11372 \textcolor{comment}{     * For PF Clients it should be the maximum available number.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11373}11373 \textcolor{comment}{     * VF driver(s) may want to define it to a smaller value.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11374}11374 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11375}11375     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a96caa6d9547d212451296e95b108133e}{max\_tpa\_queues}} = \mbox{\hyperlink{bxe_8h_a17145ba166c4c2e66d36460bbc2e2992}{MAX\_AGG\_QS}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11376}11376 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11377}11377     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_ad3cbe8edb4885fdf9c774b9596bef76a}{cache\_line\_log}} = \mbox{\hyperlink{bxe_8h_a9d2841195887a02c99834a7de82cdfd8}{BXE\_RX\_ALIGN\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11378}11378     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a6965eb8f12aa277beb1562f812e47133}{fw\_sb\_id}} = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a210f7120d5922e380b3210ee6de6a625}{fw\_sb\_id}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11379}11379 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11380}11380     rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a17702f37868085411adfb3a056186567}{sb\_cq\_index}} = \mbox{\hyperlink{bxe_8h_ab58359d5d4b214fec145175f6a80a44a}{HC\_INDEX\_ETH\_RX\_CQ\_CONS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11381}11381 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11382}11382     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11383}11383 \textcolor{comment}{     * configure silent vlan removal}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11384}11384 \textcolor{comment}{     * if multi function mode is afex, then mask default vlan}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11385}11385 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11386}11386     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ae7897d9ae4bc1c0e272f50940f76b8d4}{IS\_MF\_AFEX}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11387}11387         rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a76947ac5c6eb2f7545b098cd186d1173}{silent\_removal\_value}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11388}11388             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a2a5283094b96d1e39834c8b86301804d}{afex\_def\_vlan\_tag}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11389}11389         rxq\_init-\/>\mbox{\hyperlink{structecore__rxq__setup__params_a887342430c6ad94849b9c655adfc7c60}{silent\_removal\_mask}} = EVL\_VLID\_MASK;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11390}11390     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11391}11391 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11392}11392 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11393}11393 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11394}\mbox{\hyperlink{bxe_8c_afb402c8409f039fbfa97ebd3ee04a7b8}{11394}} \mbox{\hyperlink{bxe_8c_afb402c8409f039fbfa97ebd3ee04a7b8}{bxe\_pf\_tx\_q\_prep}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}              *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11395}11395                  \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}}           *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11396}11396                  \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__txq__setup__params}{ecore\_txq\_setup\_params}} *txq\_init,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11397}11397                  uint8\_t                       cos)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11398}11398 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11399}11399     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11400}11400 \textcolor{comment}{     * XXX If multiple CoS is ever supported then each fastpath structure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11401}11401 \textcolor{comment}{     * will need to maintain tx producer/consumer/dma/etc values *per* CoS.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11402}11402 \textcolor{comment}{     * fp-\/>txdata[cos]-\/>tx\_dma.paddr;}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11403}11403 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11404}11404     txq\_init-\/>\mbox{\hyperlink{structecore__txq__setup__params_a7a095575320fc9e321a38b7886a35a1c}{dscr\_map}}     = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a036a081fcc7076714f6a4926be8ae354}{tx\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11405}11405     txq\_init-\/>\mbox{\hyperlink{structecore__txq__setup__params_ada3af2e7988591e1666a7048c56a8808}{sb\_cq\_index}}  = \mbox{\hyperlink{bxe_8h_ad6ad694c6d2dee5c5f97caffc02f82b8}{HC\_INDEX\_ETH\_FIRST\_TX\_CQ\_CONS}} + cos;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11406}11406     txq\_init-\/>\mbox{\hyperlink{structecore__txq__setup__params_afcd51865a2092d2c8a44aa143d0f876a}{traffic\_type}} = \mbox{\hyperlink{ecore__hsi_8h_a8aaf3a2c4baf724cd91e64dff4af28f3af5824b77fc725644d4642c5bfb87323e}{LLFC\_TRAFFIC\_TYPE\_NW}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11407}11407     txq\_init-\/>\mbox{\hyperlink{structecore__txq__setup__params_a5c476e839463c621758fd37518009015}{fw\_sb\_id}}     = fp-\/>\mbox{\hyperlink{structbxe__fastpath_a210f7120d5922e380b3210ee6de6a625}{fw\_sb\_id}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11408}11408 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11409}11409     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11410}11410 \textcolor{comment}{     * set the TSS leading client id for TX classfication to the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11411}11411 \textcolor{comment}{     * leading RSS client id}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11412}11412 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11413}11413     txq\_init-\/>\mbox{\hyperlink{structecore__txq__setup__params_ade30b3c0e021ab819795ff6b634aef28}{tss\_leading\_cl\_id}} = \mbox{\hyperlink{bxe_8h_a2d0d5fd8a2054444b4bb96d87252ec21}{BXE\_FP}}(sc, 0, cl\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11414}11414 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11415}11415 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11416}11416 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11417}11417 \textcolor{comment}{ * This function performs 2 steps in a queue state machine:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11418}11418 \textcolor{comment}{ *   1) RESET-\/>INIT}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11419}11419 \textcolor{comment}{ *   2) INIT-\/>SETUP}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11420}11420 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11421}11421 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11422}\mbox{\hyperlink{bxe_8c_abb02a487428b152895667227b9325167}{11422}} \mbox{\hyperlink{bxe_8c_abb02a487428b152895667227b9325167}{bxe\_setup\_queue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11423}11423                 \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11424}11424                 uint8\_t             leading)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11425}11425 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11426}11426     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__queue__state__params}{ecore\_queue\_state\_params}} q\_params = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11427}11427     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__queue__setup__params}{ecore\_queue\_setup\_params}} *setup\_params =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11428}11428                         \&q\_params.\mbox{\hyperlink{structecore__queue__state__params_ae5d378efca7dbb25c4dd679a92ffed74}{params}}.\mbox{\hyperlink{structecore__queue__state__params_aaf010954f1213b79e56b80d0152244f9}{setup}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11429}11429     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11430}11430 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11431}11431     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}setting up queue \%d\(\backslash\)n"{}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11432}11432 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11433}11433     \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aff4860c3f2632669e99b1d01ccfe9a57}{igu\_sb\_id}}, \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a52689eae4ee0744b9fcdc3ca6062fb7c}{IGU\_INT\_ENABLE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11434}11434 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11435}11435     q\_params.\mbox{\hyperlink{structecore__queue__state__params_aa82261699d9e2173d45a77948c0c860f}{q\_obj}} = \&\mbox{\hyperlink{bxe_8h_a10daa98301153111a0edc1e899fa1575}{BXE\_SP\_OBJ}}(sc, fp).q\_obj;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11436}11436 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11437}11437     \textcolor{comment}{/* we want to wait for completion in this context */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11438}11438     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}}, \&q\_params.\mbox{\hyperlink{structecore__queue__state__params_aa98775b61ce0689a849b75f95869dfa5}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11439}11439 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11440}11440     \textcolor{comment}{/* prepare the INIT parameters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11441}11441     \mbox{\hyperlink{bxe_8c_a66f921e734cfbc715465de0ecdd134dc}{bxe\_pf\_q\_prep\_init}}(sc, fp, \&q\_params.\mbox{\hyperlink{structecore__queue__state__params_ae5d378efca7dbb25c4dd679a92ffed74}{params}}.\mbox{\hyperlink{structecore__queue__state__params_aaeb051f58f998e54a07970a31360993e}{init}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11442}11442 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11443}11443     \textcolor{comment}{/* Set the command */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11444}11444     q\_params.\mbox{\hyperlink{structecore__queue__state__params_a808f89ba4459a2f1f62406fe5e111ead}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a9efaf5f5cbe47809412dfbcbfee5f678}{ECORE\_Q\_CMD\_INIT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11445}11445 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11446}11446     \textcolor{comment}{/* Change the state to INIT */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11447}11447     rc = \mbox{\hyperlink{ecore__sp_8c_ac2191455ad3d3242f053d45f4eac5398}{ecore\_queue\_state\_change}}(sc, \&q\_params);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11448}11448     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11449}11449         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Queue(\%d) INIT failed rc = \%d\(\backslash\)n"{}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11450}11450         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11451}11451     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11452}11452 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11453}11453     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}init complete\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11454}11454 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11455}11455     \textcolor{comment}{/* now move the Queue to the SETUP state */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11456}11456     memset(setup\_params, 0, \textcolor{keyword}{sizeof}(*setup\_params));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11457}11457 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11458}11458     \textcolor{comment}{/* set Queue flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11459}11459     setup\_params-\/>\mbox{\hyperlink{structecore__queue__setup__params_aca394fd109ffeb3e5e024fdd2b134bda}{flags}} = \mbox{\hyperlink{bxe_8c_a8ae04f3902ea58937d2f56f6f88eef51}{bxe\_get\_q\_flags}}(sc, fp, leading);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11460}11460 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11461}11461     \textcolor{comment}{/* set general SETUP parameters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11462}11462     \mbox{\hyperlink{bxe_8c_a89e7dc826f26ff33d5d038e4e1f82019}{bxe\_pf\_q\_prep\_general}}(sc, fp, \&setup\_params-\/>\mbox{\hyperlink{structecore__queue__setup__params_a58bd26caca2c1905a828b623a16624ae}{gen\_params}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11463}11463                           \mbox{\hyperlink{bxe_8h_aaef4892dade0bd4079046bf98614ab07}{FIRST\_TX\_COS\_INDEX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11464}11464 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11465}11465     \mbox{\hyperlink{bxe_8c_a12c0a1edf8ed796141da05a1f0646b72}{bxe\_pf\_rx\_q\_prep}}(sc, fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11466}11466                      \&setup\_params-\/>\mbox{\hyperlink{structecore__queue__setup__params_a7c5b9abc327114597c20c74188c34f9a}{pause\_params}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11467}11467                      \&setup\_params-\/>\mbox{\hyperlink{structecore__queue__setup__params_aaa2c9866e4f6620838c19699c95289b3}{rxq\_params}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11468}11468 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11469}11469     \mbox{\hyperlink{bxe_8c_afb402c8409f039fbfa97ebd3ee04a7b8}{bxe\_pf\_tx\_q\_prep}}(sc, fp,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11470}11470                      \&setup\_params-\/>\mbox{\hyperlink{structecore__queue__setup__params_a3c97443902da5fa6335a029b25ceb06f}{txq\_params}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11471}11471                      \mbox{\hyperlink{bxe_8h_aaef4892dade0bd4079046bf98614ab07}{FIRST\_TX\_COS\_INDEX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11472}11472 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11473}11473     \textcolor{comment}{/* Set the command */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11474}11474     q\_params.\mbox{\hyperlink{structecore__queue__state__params_a808f89ba4459a2f1f62406fe5e111ead}{cmd}} = \mbox{\hyperlink{ecore__sp_8h_a39542f30acb6988ec47e58a0ddf4e3b6a666fa78465bdd0317f897b36de1033df}{ECORE\_Q\_CMD\_SETUP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11475}11475 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11476}11476     \textcolor{comment}{/* change the state to SETUP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11477}11477     rc = \mbox{\hyperlink{ecore__sp_8c_ac2191455ad3d3242f053d45f4eac5398}{ecore\_queue\_state\_change}}(sc, \&q\_params);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11478}11478     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11479}11479         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Queue(\%d) SETUP failed (rc = \%d)\(\backslash\)n"{}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11480}11480         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11481}11481     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11482}11482 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11483}11483     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11484}11484 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11485}11485 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11486}11486 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11487}\mbox{\hyperlink{bxe_8c_ac128f4c10dd29648fb9a395dbdf54bec}{11487}} \mbox{\hyperlink{bxe_8c_ac128f4c10dd29648fb9a395dbdf54bec}{bxe\_setup\_leading}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11488}11488 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11489}11489     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_abb02a487428b152895667227b9325167}{bxe\_setup\_queue}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0], TRUE));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11490}11490 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11491}11491 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11492}11492 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11493}\mbox{\hyperlink{bxe_8c_aefc092d2b3320e752b7611c227b34f5d}{11493}} \mbox{\hyperlink{bxe_8c_aefc092d2b3320e752b7611c227b34f5d}{bxe\_config\_rss\_pf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}            *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11494}11494                   \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__rss__config__obj}{ecore\_rss\_config\_obj}} *rss\_obj,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11495}11495                   uint8\_t                     config\_hash)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11496}11496 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11497}11497     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__config__rss__params}{ecore\_config\_rss\_params}} params = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11498}11498     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11499}11499 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11500}11500     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11501}11501 \textcolor{comment}{     * Although RSS is meaningless when there is a single HW queue we}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11502}11502 \textcolor{comment}{     * still need it enabled in order to have HW Rx hash generated.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11503}11503 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11504}11504 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11505}11505     params.\mbox{\hyperlink{structecore__config__rss__params_a06d586bb36633615e851f4e5428e1a45}{rss\_obj}} = \mbox{\hyperlink{structecore__config__rss__params_a06d586bb36633615e851f4e5428e1a45}{rss\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11506}11506 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11507}11507     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a54ab69a348a6366fbdf4d4f9696d1295}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11508}11508 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11509}11509     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a96a58e29e8dbf2b5bdeb775cba46556ea77ab514604269cb93f80b1cbadbaec42}{ECORE\_RSS\_MODE\_REGULAR}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a3ea4120750e7c4fcf1b9e6f958d4b4cc}{rss\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11510}11510 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11511}11511     \textcolor{comment}{/* RSS configuration */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11512}11512     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a96a58e29e8dbf2b5bdeb775cba46556ea75088b84076f3be9d66f6147a6876d4a}{ECORE\_RSS\_IPV4}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a3ea4120750e7c4fcf1b9e6f958d4b4cc}{rss\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11513}11513     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a96a58e29e8dbf2b5bdeb775cba46556ea708c351fd76fa5fd9dde8f2fe4152dde}{ECORE\_RSS\_IPV4\_TCP}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a3ea4120750e7c4fcf1b9e6f958d4b4cc}{rss\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11514}11514     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a96a58e29e8dbf2b5bdeb775cba46556ea351e1b32851d1214407a2294dfa0ba4a}{ECORE\_RSS\_IPV6}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a3ea4120750e7c4fcf1b9e6f958d4b4cc}{rss\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11515}11515     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a96a58e29e8dbf2b5bdeb775cba46556eada63230ac8192c0f3e7951882cde4c3b}{ECORE\_RSS\_IPV6\_TCP}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a3ea4120750e7c4fcf1b9e6f958d4b4cc}{rss\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11516}11516     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structecore__config__rss__params_a06d586bb36633615e851f4e5428e1a45}{rss\_obj}}-\/>\mbox{\hyperlink{structecore__rss__config__obj_a00d361199555cac27aa4eba3af49506c}{udp\_rss\_v4}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11517}11517         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a96a58e29e8dbf2b5bdeb775cba46556ea6d098c694e0996185e2fcaea8e081f1b}{ECORE\_RSS\_IPV4\_UDP}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a3ea4120750e7c4fcf1b9e6f958d4b4cc}{rss\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11518}11518     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11519}11519     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structecore__config__rss__params_a06d586bb36633615e851f4e5428e1a45}{rss\_obj}}-\/>\mbox{\hyperlink{structecore__rss__config__obj_ad463ff2899f4f7cb24f735ebe97e57c2}{udp\_rss\_v6}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11520}11520         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a96a58e29e8dbf2b5bdeb775cba46556ea89b0ccddab71b91fc9c57238bf910ba5}{ECORE\_RSS\_IPV6\_UDP}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a3ea4120750e7c4fcf1b9e6f958d4b4cc}{rss\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11521}11521     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11522}11522 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11523}11523     \textcolor{comment}{/* Hash bits */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11524}11524     params.\mbox{\hyperlink{structecore__config__rss__params_a65d4f7ef89f450f8c3f67cdbafc1c863}{rss\_result\_mask}} = \mbox{\hyperlink{bxe_8h_ac030aa620391e038ef22575032ed8312}{MULTI\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11525}11525 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11526}11526     memcpy(params.\mbox{\hyperlink{structecore__config__rss__params_afa9466beedcfb64b96edc71eed2bfc5e}{ind\_table}}, \mbox{\hyperlink{structecore__config__rss__params_a06d586bb36633615e851f4e5428e1a45}{rss\_obj}}-\/>\mbox{\hyperlink{structecore__rss__config__obj_a1a758646bf54c4f75922e10198fbf4fa}{ind\_table}}, \textcolor{keyword}{sizeof}(params.\mbox{\hyperlink{structecore__config__rss__params_afa9466beedcfb64b96edc71eed2bfc5e}{ind\_table}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11527}11527 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11528}11528     \textcolor{keywordflow}{if} (config\_hash) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11529}11529         \textcolor{comment}{/* RSS keys */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11530}11530         \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(params.\mbox{\hyperlink{structecore__config__rss__params_ae140c1973143da29d996190e97e5ef8d}{rss\_key}}) / 4; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11531}11531             params.\mbox{\hyperlink{structecore__config__rss__params_ae140c1973143da29d996190e97e5ef8d}{rss\_key}}[i] = arc4random();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11532}11532         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11533}11533 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11534}11534         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a96a58e29e8dbf2b5bdeb775cba46556ea60a8d50ba24f019b7d87038ddf05cb44}{ECORE\_RSS\_SET\_SRCH}}, \&params.\mbox{\hyperlink{structecore__config__rss__params_a3ea4120750e7c4fcf1b9e6f958d4b4cc}{rss\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11535}11535     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11536}11536 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11537}11537     \textcolor{keywordflow}{return} (\mbox{\hyperlink{ecore__sp_8c_af82fdd42fcb5507c76dfe86e6f0855ad}{ecore\_config\_rss}}(sc, \&params));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11538}11538 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11539}11539 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11540}11540 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11541}\mbox{\hyperlink{bxe_8c_abbbee8111cc70177e478c9040c4f7e15}{11541}} \mbox{\hyperlink{bxe_8c_abbbee8111cc70177e478c9040c4f7e15}{bxe\_config\_rss\_eth}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11542}11542                    uint8\_t          config\_hash)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11543}11543 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11544}11544     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_aefc092d2b3320e752b7611c227b34f5d}{bxe\_config\_rss\_pf}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeb1cadab33bcd85c5d28e3a17617af92}{rss\_conf\_obj}}, config\_hash));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11545}11545 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11546}11546 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11547}11547 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11548}\mbox{\hyperlink{bxe_8c_a13d3df2edda291805f4bf6b640a94f67}{11548}} \mbox{\hyperlink{bxe_8c_a13d3df2edda291805f4bf6b640a94f67}{bxe\_init\_rss\_pf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11549}11549 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11550}11550     uint8\_t num\_eth\_queues = \mbox{\hyperlink{bxe_8h_a0e54c6304ef347c44b91e310e0364ebb}{BXE\_NUM\_ETH\_QUEUES}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11551}11551     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11552}11552 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11553}11553     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11554}11554 \textcolor{comment}{     * Prepare the initial contents of the indirection table if}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11555}11555 \textcolor{comment}{     * RSS is enabled}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11556}11556 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11557}11557     \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_aeb1cadab33bcd85c5d28e3a17617af92}{rss\_conf\_obj}}.\mbox{\hyperlink{structecore__rss__config__obj_a1a758646bf54c4f75922e10198fbf4fa}{ind\_table}}); i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11558}11558         sc-\/>\mbox{\hyperlink{structbxe__softc_aeb1cadab33bcd85c5d28e3a17617af92}{rss\_conf\_obj}}.\mbox{\hyperlink{structecore__rss__config__obj_a1a758646bf54c4f75922e10198fbf4fa}{ind\_table}}[i] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11559}11559             (sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}-\/>\mbox{\hyperlink{structbxe__fastpath_a6641a4398153876bd8852369f0646450}{cl\_id}} + (i \% num\_eth\_queues));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11560}11560     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11561}11561 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11562}11562     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abbf81097fe91a950d918fa9173cc850d}{udp\_rss}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11563}11563         sc-\/>\mbox{\hyperlink{structbxe__softc_aeb1cadab33bcd85c5d28e3a17617af92}{rss\_conf\_obj}}.\mbox{\hyperlink{structecore__rss__config__obj_a00d361199555cac27aa4eba3af49506c}{udp\_rss\_v4}} = sc-\/>\mbox{\hyperlink{structbxe__softc_aeb1cadab33bcd85c5d28e3a17617af92}{rss\_conf\_obj}}.\mbox{\hyperlink{structecore__rss__config__obj_ad463ff2899f4f7cb24f735ebe97e57c2}{udp\_rss\_v6}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11564}11564     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11565}11565 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11566}11566     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11567}11567 \textcolor{comment}{     * For 57710 and 57711 SEARCHER configuration (rss\_keys) is}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11568}11568 \textcolor{comment}{     * per-\/port, so if explicit configuration is needed, do it only}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11569}11569 \textcolor{comment}{     * for a PMF.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11570}11570 \textcolor{comment}{     *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11571}11571 \textcolor{comment}{     * For 57712 and newer it's a per-\/function configuration.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11572}11572 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11573}11573     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_abbbee8111cc70177e478c9040c4f7e15}{bxe\_config\_rss\_eth}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}} || !\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11574}11574 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11575}11575 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11576}11576 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11577}\mbox{\hyperlink{bxe_8c_af25e977e245c4791429826af005b60a9}{11577}} \mbox{\hyperlink{bxe_8c_af25e977e245c4791429826af005b60a9}{bxe\_set\_mac\_one}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}          *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11578}11578                 uint8\_t                   *mac,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11579}11579                 \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__vlan__mac__obj}{ecore\_vlan\_mac\_obj}} *obj,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11580}11580                 uint8\_t                   set,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11581}11581                 \textcolor{keywordtype}{int}                       mac\_type,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11582}11582                 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long}             *\mbox{\hyperlink{structecore__config__rss__params_a54ab69a348a6366fbdf4d4f9696d1295}{ramrod\_flags}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11583}11583 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11584}11584     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__vlan__mac__ramrod__params}{ecore\_vlan\_mac\_ramrod\_params}} ramrod\_param;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11585}11585     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11586}11586 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11587}11587     memset(\&ramrod\_param, 0, \textcolor{keyword}{sizeof}(ramrod\_param));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11588}11588 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11589}11589     \textcolor{comment}{/* fill in general parameters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11590}11590     ramrod\_param.\mbox{\hyperlink{structecore__vlan__mac__ramrod__params_aa1cb60551a814ccc993a73a9e5e9fc56}{vlan\_mac\_obj}} = obj;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11591}11591     ramrod\_param.\mbox{\hyperlink{structecore__vlan__mac__ramrod__params_a9dc6f12a129ab07f812046f1ca38c4c8}{ramrod\_flags}} = *\mbox{\hyperlink{structecore__vlan__mac__ramrod__params_a9dc6f12a129ab07f812046f1ca38c4c8}{ramrod\_flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11592}11592 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11593}11593     \textcolor{comment}{/* fill a user request section if needed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11594}11594     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181face3d408a9bc281e9b22b71144d4a00a2}{RAMROD\_CONT}}, \mbox{\hyperlink{structecore__vlan__mac__ramrod__params_a9dc6f12a129ab07f812046f1ca38c4c8}{ramrod\_flags}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11595}11595         memcpy(ramrod\_param.\mbox{\hyperlink{structecore__vlan__mac__ramrod__params_aa5b31ab0324c0a90513c63bc2ff329e6}{user\_req}}.\mbox{\hyperlink{structecore__vlan__mac__data_a3e23a2c054e540d0a0aaf399e88fd878}{u}}.\mbox{\hyperlink{unionecore__classification__ramrod__data_a210e08a6ebdf2f5c4353d1ac10c46059}{mac}}.\mbox{\hyperlink{structecore__mac__ramrod__data_a3538cd56761400986008b6e59cb4ec0a}{mac}}, mac, \mbox{\hyperlink{ecore__sp_8h_a9822d89774e0d6ddaa06503950130423}{ETH\_ALEN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11596}11596 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11597}11597         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(mac\_type, \&ramrod\_param.\mbox{\hyperlink{structecore__vlan__mac__ramrod__params_aa5b31ab0324c0a90513c63bc2ff329e6}{user\_req}}.\mbox{\hyperlink{structecore__vlan__mac__data_a64b389602dbdcb6147a9e4eb1d473879}{vlan\_mac\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11598}11598 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11599}11599         \textcolor{comment}{/* Set the command: ADD or DEL */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11600}11600         ramrod\_param.\mbox{\hyperlink{structecore__vlan__mac__ramrod__params_aa5b31ab0324c0a90513c63bc2ff329e6}{user\_req}}.\mbox{\hyperlink{structecore__vlan__mac__data_a666c6e73b319a337cec06fdfcf1f1490}{cmd}} = (set) ? \mbox{\hyperlink{ecore__sp_8h_aa31a3cc5310a314dc0579b923f127ea4a508dc21e1c63335b48b9771b5acff320}{ECORE\_VLAN\_MAC\_ADD}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11601}11601                                             \mbox{\hyperlink{ecore__sp_8h_aa31a3cc5310a314dc0579b923f127ea4a652c9142810e5c8db38b2e9d2bb97862}{ECORE\_VLAN\_MAC\_DEL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11602}11602     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11603}11603 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11604}11604     rc = \mbox{\hyperlink{ecore__sp_8c_a2956a0acdec25e8487a2f5627911a8e6}{ecore\_config\_vlan\_mac}}(sc, \&ramrod\_param);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11605}11605 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11606}11606     \textcolor{keywordflow}{if} (rc == \mbox{\hyperlink{ecore__sp_8h_a48c6b14370f58f251f6bca873daa79b3adb9992d91337f982a95dbdb847024440}{ECORE\_EXISTS}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11607}11607         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}Failed to schedule ADD operations (EEXIST)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11608}11608         \textcolor{comment}{/* do not treat adding same MAC as error */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11609}11609         rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11610}11610     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11611}11611         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}\%s MAC failed (\%d)\(\backslash\)n"{}}, (set ? \textcolor{stringliteral}{"{}Set"{}} : \textcolor{stringliteral}{"{}Delete"{}}), rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11612}11612     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11613}11613 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11614}11614     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11615}11615 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11616}11616 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11617}11617 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11618}\mbox{\hyperlink{bxe_8c_a0bd6b369b8182071c382aca2d0288f3e}{11618}} \mbox{\hyperlink{bxe_8c_a0bd6b369b8182071c382aca2d0288f3e}{bxe\_set\_eth\_mac}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11619}11619                 uint8\_t          set)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11620}11620 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11621}11621     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{structecore__vlan__mac__ramrod__params_a9dc6f12a129ab07f812046f1ca38c4c8}{ramrod\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11622}11622 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11623}11623     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Adding Ethernet MAC\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11624}11624 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11625}11625     \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181fa88a1b11c976768a82c29bd57bb16b261}{RAMROD\_COMP\_WAIT}}, \&\mbox{\hyperlink{structecore__vlan__mac__ramrod__params_a9dc6f12a129ab07f812046f1ca38c4c8}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11626}11626 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11627}11627     \textcolor{comment}{/* Eth MAC is set on RSS leading client (fp[0]) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11628}11628     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_af25e977e245c4791429826af005b60a9}{bxe\_set\_mac\_one}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11629}11629                             \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}-\/>\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11630}11630                             set, \mbox{\hyperlink{ecore__sp_8h_a0ed680fdb405e7195d9f14032851eebba1b11e54e3712388924b06a7213a2f95c}{ECORE\_ETH\_MAC}}, \&\mbox{\hyperlink{structecore__vlan__mac__ramrod__params_a9dc6f12a129ab07f812046f1ca38c4c8}{ramrod\_flags}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11631}11631 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11632}11632 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11633}11633 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11634}\mbox{\hyperlink{bxe_8c_a5818dc1ef1981651afb43d64515b3d3a}{11634}} \mbox{\hyperlink{bxe_8c_a5818dc1ef1981651afb43d64515b3d3a}{bxe\_get\_cur\_phy\_idx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11635}11635 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11636}11636     uint32\_t sel\_phy\_idx = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11637}11637 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11638}11638     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_ae3c76bd0fa4419d7051a35ae7fc6ce45}{num\_phys}} <= 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11639}11639         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe__elink_8h_a7e557a0c651677024943229f99724e0a}{ELINK\_INT\_PHY}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11640}11640     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11641}11641 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11642}11642     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11643}11643         sel\_phy\_idx = \mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11644}11644         \textcolor{comment}{/* In case link is SERDES, check if the ELINK\_EXT\_PHY2 is the one */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11645}11645         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a8194d63a63012387c952556975049a67}{link\_status}} \& \mbox{\hyperlink{ecore__hsi_8h_a5a9422b13d407b851cc35fd913509cba}{LINK\_STATUS\_SERDES\_LINK}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11646}11646             (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe__elink_8h_ab6a87ff0342c6fdaaeb86619998c9473}{ELINK\_EXT\_PHY2}}].\mbox{\hyperlink{structelink__phy_af2d4ed8d545ee33335f3a8877ec52f53}{supported}} \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11647}11647              \mbox{\hyperlink{bxe__elink_8h_a15949ea3eb2d72e035a00abad8235ec9}{ELINK\_SUPPORTED\_FIBRE}}))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11648}11648             sel\_phy\_idx = \mbox{\hyperlink{bxe__elink_8h_ab6a87ff0342c6fdaaeb86619998c9473}{ELINK\_EXT\_PHY2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11649}11649     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11650}11650         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{bxe__elink_8c_af274b335932547dc59aa5734b496469d}{elink\_phy\_selection}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11651}11651         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a2dc72d40cc98112468772d4388353b9b}{PORT\_HW\_CFG\_PHY\_SELECTION\_HARDWARE\_DEFAULT}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11652}11652         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a2a9a04ab65e8a71a9c18fc735ef92b8d}{PORT\_HW\_CFG\_PHY\_SELECTION\_FIRST\_PHY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11653}11653         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_aa4a01fd39f429596b78c9bfea45d59a1}{PORT\_HW\_CFG\_PHY\_SELECTION\_FIRST\_PHY\_PRIORITY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11654}11654                sel\_phy\_idx = \mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11655}11655                \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11656}11656         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a141f985e110bce58bb1d94399c57b747}{PORT\_HW\_CFG\_PHY\_SELECTION\_SECOND\_PHY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11657}11657         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a90b0e5067ceb93f52ef568a2a91fb280}{PORT\_HW\_CFG\_PHY\_SELECTION\_SECOND\_PHY\_PRIORITY}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11658}11658                sel\_phy\_idx = \mbox{\hyperlink{bxe__elink_8h_ab6a87ff0342c6fdaaeb86619998c9473}{ELINK\_EXT\_PHY2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11659}11659                \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11660}11660         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11661}11661     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11662}11662 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11663}11663     \textcolor{keywordflow}{return} (sel\_phy\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11664}11664 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11665}11665 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11666}11666 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11667}\mbox{\hyperlink{bxe_8c_a4076cc1317dc700e3906fa6a55950093}{11667}} \mbox{\hyperlink{bxe_8c_a4076cc1317dc700e3906fa6a55950093}{bxe\_get\_link\_cfg\_idx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11668}11668 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11669}11669     uint32\_t sel\_phy\_idx = \mbox{\hyperlink{bxe_8c_a5818dc1ef1981651afb43d64515b3d3a}{bxe\_get\_cur\_phy\_idx}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11670}11670 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11671}11671     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11672}11672 \textcolor{comment}{     * The selected activated PHY is always after swapping (in case PHY}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11673}11673 \textcolor{comment}{     * swapping is enabled). So when swapping is enabled, we need to reverse}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11674}11674 \textcolor{comment}{     * the configuration}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11675}11675 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11676}11676 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11677}11677     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_ae04ce6fa3fbb7a61fe181ca4d2598e56}{multi\_phy\_config}} \& \mbox{\hyperlink{ecore__hsi_8h_ac702f36ff4a9993d8b7b20c9e10e68d3}{PORT\_HW\_CFG\_PHY\_SWAPPED\_ENABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11678}11678         \textcolor{keywordflow}{if} (sel\_phy\_idx == \mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11679}11679             sel\_phy\_idx = \mbox{\hyperlink{bxe__elink_8h_ab6a87ff0342c6fdaaeb86619998c9473}{ELINK\_EXT\_PHY2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11680}11680         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sel\_phy\_idx == \mbox{\hyperlink{bxe__elink_8h_ab6a87ff0342c6fdaaeb86619998c9473}{ELINK\_EXT\_PHY2}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11681}11681             sel\_phy\_idx = \mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11682}11682     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11683}11683 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11684}11684     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe__elink_8h_a6f1aa4763b4356eca91502faa9f5aad3}{ELINK\_LINK\_CONFIG\_IDX}}(sel\_phy\_idx));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11685}11685 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11686}11686 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11687}11687 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11688}\mbox{\hyperlink{bxe_8c_a04a48ef78afd7f4e17babaaffe56fd0c}{11688}} \mbox{\hyperlink{bxe_8c_a04a48ef78afd7f4e17babaaffe56fd0c}{bxe\_set\_requested\_fc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11689}11689 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11690}11690     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11691}11691 \textcolor{comment}{     * Initialize link parameters structure variables}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11692}11692 \textcolor{comment}{     * It is recommended to turn off RX FC for jumbo frames}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11693}11693 \textcolor{comment}{     * for better performance}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11694}11694 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11695}11695     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc) \&\& (sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}} > 5000)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11696}11696         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_adf3c1dc1c092467f11023ba7e196ca59}{req\_fc\_auto\_adv}} = \mbox{\hyperlink{bxe__elink_8h_a7d5ad046cd81f291a31adb0a58a7e5b9}{ELINK\_FLOW\_CTRL\_TX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11697}11697     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11698}11698         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_adf3c1dc1c092467f11023ba7e196ca59}{req\_fc\_auto\_adv}} = \mbox{\hyperlink{bxe__elink_8h_ab35b19a5f2c26451d69ffe62dabdd901}{ELINK\_FLOW\_CTRL\_BOTH}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11699}11699     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11700}11700 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11701}11701 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11702}11702 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11703}\mbox{\hyperlink{bxe_8c_a180390e1dd79f09c6c8eccca01f135d8}{11703}} \mbox{\hyperlink{bxe_8c_a180390e1dd79f09c6c8eccca01f135d8}{bxe\_calc\_fc\_adv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11704}11704 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11705}11705     uint8\_t cfg\_idx = \mbox{\hyperlink{bxe_8c_a4076cc1317dc700e3906fa6a55950093}{bxe\_get\_link\_cfg\_idx}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11706}11706 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11707}11707 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11708}11708     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[cfg\_idx] \&= \string~(\mbox{\hyperlink{bxe_8h_aee2eeffdcc45a932a3acd74540fc7727}{ADVERTISED\_Asym\_Pause}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11709}11709                                            \mbox{\hyperlink{bxe_8h_a19bc1b4974b67635f507eaf0ac755b80}{ADVERTISED\_Pause}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11710}11710 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11711}11711     \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_acdca4f1e73895e619f0fe5ba9e493031}{ieee\_fc}} \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11712}11712             \mbox{\hyperlink{bxe__elink_8c_ac420455b29ff028bf2a18d9f64076034}{MDIO\_COMBO\_IEEE0\_AUTO\_NEG\_ADV\_PAUSE\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11713}11713 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11714}11714     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8c_a4eddf1625d4ba0787e04691beb16e1d8}{MDIO\_COMBO\_IEEE0\_AUTO\_NEG\_ADV\_PAUSE\_BOTH}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11715}11715         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[cfg\_idx] |= (\mbox{\hyperlink{bxe_8h_aee2eeffdcc45a932a3acd74540fc7727}{ADVERTISED\_Asym\_Pause}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11716}11716                                           \mbox{\hyperlink{bxe_8h_a19bc1b4974b67635f507eaf0ac755b80}{ADVERTISED\_Pause}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11717}11717         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11718}11718 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11719}11719     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8c_af27909d7087d151689e7f5d361455287}{MDIO\_COMBO\_IEEE0\_AUTO\_NEG\_ADV\_PAUSE\_ASYMMETRIC}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11720}11720         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[cfg\_idx] |= \mbox{\hyperlink{bxe_8h_aee2eeffdcc45a932a3acd74540fc7727}{ADVERTISED\_Asym\_Pause}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11721}11721         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11722}11722 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11723}11723     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11724}11724         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11725}11725 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11726}11726     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11727}11727 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11728}11728 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11729}11729 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11730}\mbox{\hyperlink{bxe_8c_a7e544d96042fae5b8cd7595d3a10d18f}{11730}} \mbox{\hyperlink{bxe_8c_a7e544d96042fae5b8cd7595d3a10d18f}{bxe\_get\_mf\_speed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11731}11731 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11732}11732     uint16\_t line\_speed = sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a324c3d820f392e712f071dde6a4aa6ca}{line\_speed}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11733}11733     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11734}11734         uint16\_t maxCfg =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11735}11735             \mbox{\hyperlink{bxe_8c_a253f62d4acb55c44606d68409c7e6c38}{bxe\_extract\_max\_cfg}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11736}11736 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11737}11737         \textcolor{comment}{/* calculate the current MAX line speed limit for the MF devices */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11738}11738         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab69a549c7c8c515be9b1c947eb7ecfca}{IS\_MF\_SI}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11739}11739             line\_speed = (line\_speed * maxCfg) / 100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11740}11740         \} \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* SD mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11741}11741             uint16\_t vn\_max\_rate = maxCfg * 100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11742}11742 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11743}11743             \textcolor{keywordflow}{if} (vn\_max\_rate < line\_speed) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11744}11744                 line\_speed = vn\_max\_rate;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11745}11745             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11746}11746         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11747}11747     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11748}11748 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11749}11749     \textcolor{keywordflow}{return} (line\_speed);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11750}11750 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11751}11751 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11752}11752 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11753}\mbox{\hyperlink{bxe_8c_a94e09a4a4ca7e23b04c25ab76036709a}{11753}} \mbox{\hyperlink{bxe_8c_a94e09a4a4ca7e23b04c25ab76036709a}{bxe\_fill\_report\_data}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}            *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11754}11754                      \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__link__report__data}{bxe\_link\_report\_data}} *data)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11755}11755 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11756}11756     uint16\_t line\_speed = \mbox{\hyperlink{bxe_8c_a7e544d96042fae5b8cd7595d3a10d18f}{bxe\_get\_mf\_speed}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11757}11757 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11758}11758     memset(data, 0, \textcolor{keyword}{sizeof}(*data));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11759}11759 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11760}11760     \textcolor{comment}{/* fill the report data with the effective line speed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11761}11761     data-\/>\mbox{\hyperlink{structbxe__link__report__data_a52cfce0dbf9799512f98f3e578cbf3ef}{line\_speed}} = line\_speed;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11762}11762 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11763}11763     \textcolor{comment}{/* Link is down */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11764}11764     \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}} || (sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} \& \mbox{\hyperlink{bxe_8h_ae259e37c454eb48694a93b14502c93ca}{BXE\_MF\_FUNC\_DIS}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11765}11765         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06ca68b03a79ce859861f646199a99f97ff9}{BXE\_LINK\_REPORT\_LINK\_DOWN}}, \&data-\/>\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11766}11766     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11767}11767 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11768}11768     \textcolor{comment}{/* Full DUPLEX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11769}11769     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_aebc38ae85e8537694f2d303ba6e93117}{duplex}} == \mbox{\hyperlink{bxe__elink_8h_a6c8f66942aa4680d437e148526b7e65c}{DUPLEX\_FULL}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11770}11770         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06ca11816e6143f9f2ebe8d8516d55873526}{BXE\_LINK\_REPORT\_FULL\_DUPLEX}}, \&data-\/>\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11771}11771     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11772}11772 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11773}11773     \textcolor{comment}{/* Rx Flow Control is ON */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11774}11774     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a42ebdfaebf1eef4cff6eb9520cf98409}{flow\_ctrl}} \& \mbox{\hyperlink{bxe__elink_8h_ae94806d4c6b0ceb03127d793093020dd}{ELINK\_FLOW\_CTRL\_RX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11775}11775         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06cac9b67dd5f2a921b0674e1568a870553b}{BXE\_LINK\_REPORT\_RX\_FC\_ON}}, \&data-\/>\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11776}11776     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11777}11777 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11778}11778     \textcolor{comment}{/* Tx Flow Control is ON */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11779}11779     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a42ebdfaebf1eef4cff6eb9520cf98409}{flow\_ctrl}} \& \mbox{\hyperlink{bxe__elink_8h_a7d5ad046cd81f291a31adb0a58a7e5b9}{ELINK\_FLOW\_CTRL\_TX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11780}11780         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06caa950425eaae9910ce9952dcf302839be}{BXE\_LINK\_REPORT\_TX\_FC\_ON}}, \&data-\/>\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11781}11781     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11782}11782 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11783}11783 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11784}11784 \textcolor{comment}{/* report link status to OS, should be called under phy\_lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11785}11785 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11786}\mbox{\hyperlink{bxe_8c_abcb5aa947ed64e7fe038dc31d304c608}{11786}} \mbox{\hyperlink{bxe_8c_abcb5aa947ed64e7fe038dc31d304c608}{bxe\_link\_report\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11787}11787 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11788}11788     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__link__report__data}{bxe\_link\_report\_data}} cur\_data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11789}11789 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11790}11790     \textcolor{comment}{/* reread mf\_cfg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11791}11791     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc) \&\& !\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11792}11792         \mbox{\hyperlink{bxe_8c_ae32c29c31951ee82cda3e99ad0f9a65d}{bxe\_read\_mf\_cfg}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11793}11793     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11794}11794 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11795}11795     \textcolor{comment}{/* Read the current link report info */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11796}11796     \mbox{\hyperlink{bxe_8c_a94e09a4a4ca7e23b04c25ab76036709a}{bxe\_fill\_report\_data}}(sc, \&cur\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11797}11797 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11798}11798     \textcolor{comment}{/* Don't report link down or exactly the same link status twice */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11799}11799     \textcolor{keywordflow}{if} (!memcmp(\&cur\_data, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad7390ba94a6012f397d1afc277d24308}{last\_reported\_link}}, \textcolor{keyword}{sizeof}(cur\_data)) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11800}11800         (\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06ca68b03a79ce859861f646199a99f97ff9}{BXE\_LINK\_REPORT\_LINK\_DOWN}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11801}11801                       \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad7390ba94a6012f397d1afc277d24308}{last\_reported\_link}}.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11802}11802          \mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06ca68b03a79ce859861f646199a99f97ff9}{BXE\_LINK\_REPORT\_LINK\_DOWN}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11803}11803                       \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}}))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11804}11804         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11805}11805     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11806}11806 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11807}11807         \mbox{\hyperlink{bxe__elink_8h_a045180b52edcdd9c7e91a62c2f0e8095}{ELINK\_DEBUG\_P2}}(sc, \textcolor{stringliteral}{"{}Change in link status : cur\_data = \%x, last\_reported\_link = \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11808}11808                                         cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ad7390ba94a6012f397d1afc277d24308}{last\_reported\_link}}.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11809}11809     sc-\/>\mbox{\hyperlink{structbxe__softc_a29d251d7b23d5da1662769cf601e1aad}{link\_cnt}}++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11810}11810 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11811}11811         \mbox{\hyperlink{bxe__elink_8h_a357d30c7517cc9c0238f5ead3ef7e232}{ELINK\_DEBUG\_P1}}(sc, \textcolor{stringliteral}{"{}link status change count = \%x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a29d251d7b23d5da1662769cf601e1aad}{link\_cnt}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11812}11812     \textcolor{comment}{/* report new link params and remember the state for the next time */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11813}11813     memcpy(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad7390ba94a6012f397d1afc277d24308}{last\_reported\_link}}, \&cur\_data, \textcolor{keyword}{sizeof}(cur\_data));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11814}11814 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11815}11815     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06ca68b03a79ce859861f646199a99f97ff9}{BXE\_LINK\_REPORT\_LINK\_DOWN}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11816}11816                      \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11817}11817         if\_link\_state\_change(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, LINK\_STATE\_DOWN);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11818}11818     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11819}11819         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *duplex;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11820}11820         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *flow;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11821}11821 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11822}11822         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_af8691563e9e4141a061514786628bbc2}{bxe\_test\_and\_clear\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06ca11816e6143f9f2ebe8d8516d55873526}{BXE\_LINK\_REPORT\_FULL\_DUPLEX}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11823}11823                                    \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11824}11824             duplex = \textcolor{stringliteral}{"{}full"{}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11825}11825                         \mbox{\hyperlink{bxe__elink_8h_aa522dcae95aa9083792b5111ca199838}{ELINK\_DEBUG\_P0}}(sc, \textcolor{stringliteral}{"{}link set to full duplex\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11826}11826         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11827}11827             duplex = \textcolor{stringliteral}{"{}half"{}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11828}11828                         \mbox{\hyperlink{bxe__elink_8h_aa522dcae95aa9083792b5111ca199838}{ELINK\_DEBUG\_P0}}(sc, \textcolor{stringliteral}{"{}link set to half duplex\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11829}11829         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11830}11830 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11831}11831         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11832}11832 \textcolor{comment}{         * Handle the FC at the end so that only these flags would be}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11833}11833 \textcolor{comment}{         * possibly set. This way we may easily check if there is no FC}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11834}11834 \textcolor{comment}{         * enabled.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11835}11835 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11836}11836         \textcolor{keywordflow}{if} (cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11837}11837             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06cac9b67dd5f2a921b0674e1568a870553b}{BXE\_LINK\_REPORT\_RX\_FC\_ON}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11838}11838                              \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11839}11839                 \mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06caa950425eaae9910ce9952dcf302839be}{BXE\_LINK\_REPORT\_TX\_FC\_ON}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11840}11840                              \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11841}11841                 flow = \textcolor{stringliteral}{"{}ON -\/ receive \& transmit"{}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11842}11842             \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06cac9b67dd5f2a921b0674e1568a870553b}{BXE\_LINK\_REPORT\_RX\_FC\_ON}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11843}11843                                     \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11844}11844                        !\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06caa950425eaae9910ce9952dcf302839be}{BXE\_LINK\_REPORT\_TX\_FC\_ON}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11845}11845                                      \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11846}11846                 flow = \textcolor{stringliteral}{"{}ON -\/ receive"{}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11847}11847             \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06cac9b67dd5f2a921b0674e1568a870553b}{BXE\_LINK\_REPORT\_RX\_FC\_ON}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11848}11848                                      \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11849}11849                        \mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{bxe_8h_adc29c2ff13d900c2f185ee95427fb06caa950425eaae9910ce9952dcf302839be}{BXE\_LINK\_REPORT\_TX\_FC\_ON}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11850}11850                                     \&cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a8a60675e0eea700579b96d4e5e1b76bd}{link\_report\_flags}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11851}11851                 flow = \textcolor{stringliteral}{"{}ON -\/ transmit"{}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11852}11852             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11853}11853                 flow = \textcolor{stringliteral}{"{}none"{}}; \textcolor{comment}{/* possible? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11854}11854             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11855}11855         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11856}11856             flow = \textcolor{stringliteral}{"{}none"{}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11857}11857         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11858}11858 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11859}11859         if\_link\_state\_change(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, LINK\_STATE\_UP);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11860}11860         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}NIC Link is Up, \%d Mbps \%s duplex, Flow control: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11861}11861               cur\_data.\mbox{\hyperlink{structbxe__link__report__data_a52cfce0dbf9799512f98f3e578cbf3ef}{line\_speed}}, duplex, flow);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11862}11862     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11863}11863 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11864}11864 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11865}11865 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11866}\mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{11866}} \mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{bxe\_link\_report}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11867}11867 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11868}11868     \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11869}11869     \mbox{\hyperlink{bxe_8c_abcb5aa947ed64e7fe038dc31d304c608}{bxe\_link\_report\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11870}11870     \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11871}11871 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11872}11872 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11873}11873 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11874}\mbox{\hyperlink{bxe_8c_a9c029beb080ac600e1ae282c2710195b}{11874}} \mbox{\hyperlink{bxe_8c_a9c029beb080ac600e1ae282c2710195b}{bxe\_link\_status\_update}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11875}11875 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11876}11876     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11877}11877         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11878}11878     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11879}11879 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11880}11880     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc) \&\& !\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11881}11881         \mbox{\hyperlink{bxe__elink_8c_adf0d66069f115142669369c7931f07a6}{elink\_link\_status\_update}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11882}11882     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11883}11883         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0] |= (\mbox{\hyperlink{bxe__elink_8h_ae7a617f758193094bd0918ea933f2d45}{ELINK\_SUPPORTED\_10baseT\_Half}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11884}11884                                   \mbox{\hyperlink{bxe__elink_8h_aab6ab70f3fea71ecd1a304bad561b799}{ELINK\_SUPPORTED\_10baseT\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11885}11885                                   \mbox{\hyperlink{bxe__elink_8h_a4ec55dc9c7b8195185dcd8a903b5eaa0}{ELINK\_SUPPORTED\_100baseT\_Half}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11886}11886                                   \mbox{\hyperlink{bxe__elink_8h_a80ffbb74b42b873fdad3bf14a7530f91}{ELINK\_SUPPORTED\_100baseT\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11887}11887                                   \mbox{\hyperlink{bxe__elink_8h_a89d625ae13950d8d1e0d78940931f984}{ELINK\_SUPPORTED\_1000baseT\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11888}11888                                   \mbox{\hyperlink{bxe__elink_8h_a46a284e49b728bc5b286cfae34c535d8}{ELINK\_SUPPORTED\_2500baseX\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11889}11889                                   \mbox{\hyperlink{bxe__elink_8h_abf422afe89f78dc4914b358232e40322}{ELINK\_SUPPORTED\_10000baseT\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11890}11890                                   \mbox{\hyperlink{bxe__elink_8h_a9f4618aff8180f46ccdf461cb713b410}{ELINK\_SUPPORTED\_TP}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11891}11891                                   \mbox{\hyperlink{bxe__elink_8h_a15949ea3eb2d72e035a00abad8235ec9}{ELINK\_SUPPORTED\_FIBRE}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11892}11892                                   \mbox{\hyperlink{bxe__elink_8h_ae42317db6af361f4d4d3625a9d9d4608}{ELINK\_SUPPORTED\_Autoneg}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11893}11893                                   \mbox{\hyperlink{bxe__elink_8h_acf6e4271c0feb8516a915584b23a949b}{ELINK\_SUPPORTED\_Pause}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11894}11894                                   \mbox{\hyperlink{bxe__elink_8h_acd9d50092f57c55ae81d23db14f19169}{ELINK\_SUPPORTED\_Asym\_Pause}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11895}11895         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[0] = sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11896}11896 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11897}11897         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}                = sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11898}11898         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aaa656730bb4d0e8099078865874dafaa}{port}}              = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11899}11899         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aeb0128f9e72a41e4d9f013c5680d54cf}{req\_duplex}}[0]     = \mbox{\hyperlink{bxe__elink_8h_a6c8f66942aa4680d437e148526b7e65c}{DUPLEX\_FULL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11900}11900         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[0]  = \mbox{\hyperlink{bxe__elink_8h_ab87429402f404188dd849e860d22e660}{ELINK\_FLOW\_CTRL\_NONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11901}11901         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[0] = \mbox{\hyperlink{bxe_8h_a8faae1c4e8d606cc1edf9131252d9fbc}{SPEED\_10000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11902}11902         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[0] = 0x7f0000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11903}11903         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a55ac58047b60d66c4a43161d26c06043}{switch\_cfg}}        = \mbox{\hyperlink{bxe__elink_8h_a348c48c9ceebcdc9723900320f1c3187}{ELINK\_SWITCH\_CFG\_10G}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11904}11904 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11905}11905         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aa74010abe4e9d6f15f3425915a3f1e22}{CHIP\_REV\_IS\_FPGA}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11906}11906             sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a37e9ab50270d6d8bf09213396d9d700a}{mac\_type}}    = \mbox{\hyperlink{bxe__elink_8h_ac8ce335975a4d4d1e827a2370a45d911}{ELINK\_MAC\_TYPE\_EMAC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11907}11907             sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a324c3d820f392e712f071dde6a4aa6ca}{line\_speed}}  = \mbox{\hyperlink{bxe__elink_8h_a02e2b36159785838b3a52d4c42ba52df}{ELINK\_SPEED\_1000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11908}11908             sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a8194d63a63012387c952556975049a67}{link\_status}} = (\mbox{\hyperlink{ecore__hsi_8h_a99d0bcb9a6fa56c1552036a855b146ac}{LINK\_STATUS\_LINK\_UP}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11909}11909                                          \mbox{\hyperlink{ecore__hsi_8h_ae009c6757d971000afb60d91135ebe85}{LINK\_STATUS\_SPEED\_AND\_DUPLEX\_1000TFD}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11910}11910         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11911}11911             sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a37e9ab50270d6d8bf09213396d9d700a}{mac\_type}}    = \mbox{\hyperlink{bxe__elink_8h_a9ff8705f847e6a300aa665a85859598d}{ELINK\_MAC\_TYPE\_BMAC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11912}11912             sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a324c3d820f392e712f071dde6a4aa6ca}{line\_speed}}  = \mbox{\hyperlink{bxe__elink_8h_a48f10fe3bb3918f42d00f787a421780a}{ELINK\_SPEED\_10000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11913}11913             sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a8194d63a63012387c952556975049a67}{link\_status}} = (\mbox{\hyperlink{ecore__hsi_8h_a99d0bcb9a6fa56c1552036a855b146ac}{LINK\_STATUS\_LINK\_UP}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11914}11914                                          \mbox{\hyperlink{ecore__hsi_8h_ad7b02665ad4f79ea8b3d4d5350e00ec2}{LINK\_STATUS\_SPEED\_AND\_DUPLEX\_10GTFD}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11915}11915         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11916}11916 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11917}11917         sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11918}11918 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11919}11919         sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_aebc38ae85e8537694f2d303ba6e93117}{duplex}}    = \mbox{\hyperlink{bxe__elink_8h_a6c8f66942aa4680d437e148526b7e65c}{DUPLEX\_FULL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11920}11920         sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a42ebdfaebf1eef4cff6eb9520cf98409}{flow\_ctrl}} = \mbox{\hyperlink{bxe__elink_8h_ab87429402f404188dd849e860d22e660}{ELINK\_FLOW\_CTRL\_NONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11921}11921 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11922}11922         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11923}11923             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a28bd3b65cd9a2c4982efd02c7ef37f65}{NIG\_REG\_EGRESS\_DRAIN0\_MODE}} + sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aaa656730bb4d0e8099078865874dafaa}{port}}*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11924}11924             \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(sc, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026a43f1987b65b6bd73bd7cfecc97eab89a}{STATS\_EVENT\_LINK\_UP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11925}11925             \mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{bxe\_link\_report}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11926}11926         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11927}11927     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11928}11928 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11929}11929     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11930}11930         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11931}11931             \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(sc, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026a43f1987b65b6bd73bd7cfecc97eab89a}{STATS\_EVENT\_LINK\_UP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11932}11932         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11933}11933             \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(sc, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026ac9e9e0b6f7a6b265aca64124b6d1ff19}{STATS\_EVENT\_STOP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11934}11934         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11935}11935         \mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{bxe\_link\_report}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11936}11936     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11937}11937         \mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{bxe\_link\_report}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11938}11938         \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(sc, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026a43f1987b65b6bd73bd7cfecc97eab89a}{STATS\_EVENT\_LINK\_UP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11939}11939     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11940}11940 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11941}11941 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11942}11942 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11943}\mbox{\hyperlink{bxe_8c_a6e78c82beff1504c075c0e78d0086b58}{11943}} \mbox{\hyperlink{bxe_8c_a6e78c82beff1504c075c0e78d0086b58}{bxe\_initial\_phy\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11944}11944                      \textcolor{keywordtype}{int}              load\_mode)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11945}11945 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11946}11946     \textcolor{keywordtype}{int} rc, cfg\_idx = \mbox{\hyperlink{bxe_8c_a4076cc1317dc700e3906fa6a55950093}{bxe\_get\_link\_cfg\_idx}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11947}11947     uint16\_t req\_line\_speed = sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[cfg\_idx];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11948}11948     \textcolor{keyword}{struct }\mbox{\hyperlink{structelink__params}{elink\_params}} *lp = \&\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11949}11949 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11950}11950     \mbox{\hyperlink{bxe_8c_a04a48ef78afd7f4e17babaaffe56fd0c}{bxe\_set\_requested\_fc}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11951}11951 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11952}11952     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11953}11953         uint32\_t bond = \mbox{\hyperlink{bxe_8h_a3f0fb65babc3ac922a9f655a702ec9b0}{CHIP\_BOND\_ID}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11954}11954         uint32\_t feat = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11955}11955 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11956}11956         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}) \&\& \mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11957}11957             feat |= \mbox{\hyperlink{bxe__elink_8h_a8a9dba2a93e6eb4e05f324a3ae213fb5}{ELINK\_FEATURE\_CONFIG\_EMUL\_DISABLE\_BMAC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11958}11958         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (bond \& 0x4) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11959}11959             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11960}11960                 feat |= \mbox{\hyperlink{bxe__elink_8h_a8b36fa4d5220b6dabd3e16cbaa14906b}{ELINK\_FEATURE\_CONFIG\_EMUL\_DISABLE\_XMAC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11961}11961             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11962}11962                 feat |= \mbox{\hyperlink{bxe__elink_8h_a8a9dba2a93e6eb4e05f324a3ae213fb5}{ELINK\_FEATURE\_CONFIG\_EMUL\_DISABLE\_BMAC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11963}11963             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11964}11964         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (bond \& 0x8) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11965}11965             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11966}11966                 feat |= \mbox{\hyperlink{bxe__elink_8h_a5e117626698bfec53fc3b7f394fd0740}{ELINK\_FEATURE\_CONFIG\_EMUL\_DISABLE\_UMAC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11967}11967             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11968}11968                 feat |= \mbox{\hyperlink{bxe__elink_8h_a00beee3c0a246550841f885dcc9b76e6}{ELINK\_FEATURE\_CONFIG\_EMUL\_DISABLE\_EMAC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11969}11969             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11970}11970         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11971}11971 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11972}11972         \textcolor{comment}{/* disable EMAC for E3 and above */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11973}11973         \textcolor{keywordflow}{if} (bond \& 0x2) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11974}11974             feat |= \mbox{\hyperlink{bxe__elink_8h_a00beee3c0a246550841f885dcc9b76e6}{ELINK\_FEATURE\_CONFIG\_EMUL\_DISABLE\_EMAC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11975}11975         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11976}11976 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11977}11977         \mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_af7cb7b6dddd37658f1704060e58d6938}{feature\_config\_flags}} |= feat;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11978}11978     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11979}11979 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11980}11980     \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11981}11981 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11982}11982     \textcolor{keywordflow}{if} (load\_mode == \mbox{\hyperlink{bxe_8h_ac090f4524b18796ad01df4db3da96375}{LOAD\_DIAG}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11983}11983         lp-\/>\mbox{\hyperlink{structelink__params_aa61c25fbeeaed3c30d8a45f1e5b89afa}{loopback\_mode}} = \mbox{\hyperlink{bxe__elink_8h_a8a7e4fccb1ebf8f309fe99b28086efbe}{ELINK\_LOOPBACK\_XGXS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11984}11984         \textcolor{comment}{/* Prefer doing PHY loopback at 10G speed, if possible */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11985}11985         \textcolor{keywordflow}{if} (lp-\/>\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[cfg\_idx] < \mbox{\hyperlink{bxe__elink_8h_a48f10fe3bb3918f42d00f787a421780a}{ELINK\_SPEED\_10000}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11986}11986             \textcolor{keywordflow}{if} (lp-\/>\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[cfg\_idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11987}11987                 \mbox{\hyperlink{ecore__hsi_8h_ac70541abed2058e9d9625ba00c784267}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_10G}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11988}11988                 lp-\/>\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[cfg\_idx] = \mbox{\hyperlink{bxe__elink_8h_a48f10fe3bb3918f42d00f787a421780a}{ELINK\_SPEED\_10000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11989}11989             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11990}11990                 lp-\/>\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[cfg\_idx] = \mbox{\hyperlink{bxe__elink_8h_a02e2b36159785838b3a52d4c42ba52df}{ELINK\_SPEED\_1000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11991}11991             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11992}11992         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11993}11993     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11994}11994 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11995}11995     \textcolor{keywordflow}{if} (load\_mode == \mbox{\hyperlink{bxe_8h_aeaaa39b6ca7aeba4095372d3ef514523}{LOAD\_LOOPBACK\_EXT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11996}11996         lp-\/>\mbox{\hyperlink{structelink__params_aa61c25fbeeaed3c30d8a45f1e5b89afa}{loopback\_mode}} = \mbox{\hyperlink{bxe__elink_8h_ade21d6b3c80a6ae90f956ddbceefbc50}{ELINK\_LOOPBACK\_EXT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11997}11997     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11998}11998 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l11999}11999     rc = \mbox{\hyperlink{bxe__elink_8c_a1ac20cd84a25e28f62aa77b0fff0dab4}{elink\_phy\_init}}(\&\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}, \&\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12000}12000 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12001}12001     \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12002}12002 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12003}12003     \mbox{\hyperlink{bxe_8c_a180390e1dd79f09c6c8eccca01f135d8}{bxe\_calc\_fc\_adv}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12004}12004 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12005}12005     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12006}12006         \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026a43f1987b65b6bd73bd7cfecc97eab89a}{STATS\_EVENT\_LINK\_UP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12007}12007         \mbox{\hyperlink{bxe_8c_a5d1f42423504cd9cbe0a3654d3d41c4a}{bxe\_link\_report}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12008}12008     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12009}12009 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12010}12010     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12011}12011         \mbox{\hyperlink{bxe_8c_ab9b8e5c75cdb1fb0ed9732bbbb2fc415}{bxe\_periodic\_start}}(\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12012}12012     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12013}12013 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12014}12014     \mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[cfg\_idx] = \mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12015}12015     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12016}12016 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12017}12017 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12018}12018 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12019}\mbox{\hyperlink{bxe_8c_a0c0f0aefb6357ee4cc72ff34a0f9c04c}{12019}} \mbox{\hyperlink{bxe_8c_a0c0f0aefb6357ee4cc72ff34a0f9c04c}{bxe\_push\_maddr}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} sockaddr\_dl *sdl, u\_int cnt)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12020}12020 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12021}12021     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__mcast__list__elem}{ecore\_mcast\_list\_elem}} *mc\_mac = arg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12022}12022 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12023}12023     mc\_mac += cnt;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12024}12024     mc\_mac-\/>\mbox{\hyperlink{structecore__mcast__list__elem_ae72bccdcb52a33141fb0eddf0187e3d7}{mac}} = (uint8\_t *)LLADDR(sdl);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12025}12025 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12026}12026     \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12027}12027 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12028}12028 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12029}12029 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12030}\mbox{\hyperlink{bxe_8c_a0ebf1a8298ab94779a8be6eb6e219558}{12030}} \mbox{\hyperlink{bxe_8c_a0ebf1a8298ab94779a8be6eb6e219558}{bxe\_init\_mcast\_macs\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}                 *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12031}12031                          \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__mcast__ramrod__params}{ecore\_mcast\_ramrod\_params}} *p)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12032}12032 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12033}12033     if\_t ifp = sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12034}12034     \textcolor{keywordtype}{int} mc\_count;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12035}12035     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__mcast__list__elem}{ecore\_mcast\_list\_elem}} *mc\_mac;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12036}12036 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12037}12037     \mbox{\hyperlink{ecore__sp_8h_a09c80fd9dfa4542518331114cdf76cca}{ECORE\_LIST\_INIT}}(\&p-\/>\mbox{\hyperlink{structecore__mcast__ramrod__params_a548be99bcde4e050af4c41dcbe5f10cf}{mcast\_list}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12038}12038     p-\/>\mbox{\hyperlink{structecore__mcast__ramrod__params_aa2c13b32b2e629de411765a445db180e}{mcast\_list\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12039}12039 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12040}12040     \textcolor{comment}{/* XXXGL: multicast count may change later */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12041}12041     mc\_count = if\_llmaddr\_count(ifp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12042}12042 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12043}12043     \textcolor{keywordflow}{if} (!mc\_count) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12044}12044         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12045}12045     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12046}12046 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12047}12047     mc\_mac = malloc(\textcolor{keyword}{sizeof}(*mc\_mac) * mc\_count, M\_DEVBUF,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12048}12048                     (M\_NOWAIT | M\_ZERO));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12049}12049     \textcolor{keywordflow}{if} (!mc\_mac) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12050}12050         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to allocate temp mcast list\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12051}12051         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12052}12052     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12053}12053     bzero(mc\_mac, (\textcolor{keyword}{sizeof}(*mc\_mac) * mc\_count));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12054}12054     if\_foreach\_llmaddr(ifp, \mbox{\hyperlink{bxe_8c_a0c0f0aefb6357ee4cc72ff34a0f9c04c}{bxe\_push\_maddr}}, mc\_mac);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12055}12055 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12056}12056     \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < mc\_count; i ++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12057}12057         \mbox{\hyperlink{ecore__sp_8h_a92d791c4c796a999484254aaf859bcd0}{ECORE\_LIST\_PUSH\_TAIL}}(\&mc\_mac[i].\mbox{\hyperlink{structecore__mcast__list__elem_a043a2e390ae60dedfae6835e4c89b56e}{link}}, \&p-\/>\mbox{\hyperlink{structecore__mcast__ramrod__params_a548be99bcde4e050af4c41dcbe5f10cf}{mcast\_list}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12058}12058         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12059}12059               \textcolor{stringliteral}{"{}Setting MCAST \%02X:\%02X:\%02X:\%02X:\%02X:\%02X and mc\_count \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12060}12060               mc\_mac[i].\mbox{\hyperlink{structecore__mcast__list__elem_ae72bccdcb52a33141fb0eddf0187e3d7}{mac}}[0], mc\_mac[i].\mbox{\hyperlink{structecore__mcast__list__elem_ae72bccdcb52a33141fb0eddf0187e3d7}{mac}}[1], mc\_mac[i].\mbox{\hyperlink{structecore__mcast__list__elem_ae72bccdcb52a33141fb0eddf0187e3d7}{mac}}[2],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12061}12061               mc\_mac[i].\mbox{\hyperlink{structecore__mcast__list__elem_ae72bccdcb52a33141fb0eddf0187e3d7}{mac}}[3], mc\_mac[i].\mbox{\hyperlink{structecore__mcast__list__elem_ae72bccdcb52a33141fb0eddf0187e3d7}{mac}}[4], mc\_mac[i].\mbox{\hyperlink{structecore__mcast__list__elem_ae72bccdcb52a33141fb0eddf0187e3d7}{mac}}[5],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12062}12062               mc\_count);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12063}12063     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12064}12064 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12065}12065     p-\/>\mbox{\hyperlink{structecore__mcast__ramrod__params_aa2c13b32b2e629de411765a445db180e}{mcast\_list\_len}} = mc\_count;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12066}12066 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12067}12067     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12068}12068 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12069}12069 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12070}12070 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12071}\mbox{\hyperlink{bxe_8c_a6d6e701a9b1702987349d81e6527bf70}{12071}} \mbox{\hyperlink{bxe_8c_a6d6e701a9b1702987349d81e6527bf70}{bxe\_free\_mcast\_macs\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structecore__mcast__ramrod__params}{ecore\_mcast\_ramrod\_params}} *p)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12072}12072 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12073}12073     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__mcast__list__elem}{ecore\_mcast\_list\_elem}} *mc\_mac =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12074}12074         \mbox{\hyperlink{ecore__sp_8h_af3f15b0bb7ae8e3df67efedc8b928103}{ECORE\_LIST\_FIRST\_ENTRY}}(\&p-\/>\mbox{\hyperlink{structecore__mcast__ramrod__params_a548be99bcde4e050af4c41dcbe5f10cf}{mcast\_list}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12075}12075                                \textcolor{keyword}{struct} \mbox{\hyperlink{structecore__mcast__list__elem}{ecore\_mcast\_list\_elem}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12076}12076                                \mbox{\hyperlink{structecore__mcast__list__elem_a043a2e390ae60dedfae6835e4c89b56e}{link}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12077}12077 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12078}12078     \textcolor{keywordflow}{if} (mc\_mac) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12079}12079         \textcolor{comment}{/* only a single free as all mc\_macs are in the same heap array */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12080}12080         free(mc\_mac, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12081}12081     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12082}12082 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12083}12083 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12084}\mbox{\hyperlink{bxe_8c_a8a9e9cbc3e8892e87bf7b5b877128bd8}{12084}} \mbox{\hyperlink{bxe_8c_a8a9e9cbc3e8892e87bf7b5b877128bd8}{bxe\_set\_mc\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12085}12085 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12086}12086     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__mcast__ramrod__params}{ecore\_mcast\_ramrod\_params}} rparam = \{ NULL \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12087}12087     \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12088}12088 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12089}12089     rparam.\mbox{\hyperlink{structecore__mcast__ramrod__params_abc5cf4a8ad4c0247a4aeed544a262ac3}{mcast\_obj}} = \&sc-\/>\mbox{\hyperlink{structbxe__softc_acf38ab2113b4a1e6be65e8b77a4459de}{mcast\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12090}12090 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12091}12091     \mbox{\hyperlink{bxe_8h_a35850806b8136932806ab9a1f7f77327}{BXE\_MCAST\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12092}12092 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12093}12093     \textcolor{comment}{/* first, clear all configured multicast MACs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12094}12094     rc = \mbox{\hyperlink{ecore__sp_8c_afa16a6379ed01757caf80cbf7c9aa3f4}{ecore\_config\_mcast}}(sc, \&rparam, \mbox{\hyperlink{ecore__sp_8h_ac9e874ecf62c6b5d7ab51553b99d3958a7a32f4a530b25865b526e39ea48984c3}{ECORE\_MCAST\_CMD\_DEL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12095}12095     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12096}12096         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to clear multicast configuration: \%d\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12097}12097         \textcolor{comment}{/* Manual backport parts of FreeBSD upstream r284470. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12098}12098         \mbox{\hyperlink{bxe_8h_a1a12eebcf647954bdcc60198134bccbd}{BXE\_MCAST\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12099}12099         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12100}12100     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12101}12101 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12102}12102     \textcolor{comment}{/* configure a new MACs list */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12103}12103     rc = \mbox{\hyperlink{bxe_8c_a0ebf1a8298ab94779a8be6eb6e219558}{bxe\_init\_mcast\_macs\_list}}(sc, \&rparam);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12104}12104     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12105}12105         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create mcast MACs list (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12106}12106         \mbox{\hyperlink{bxe_8h_a1a12eebcf647954bdcc60198134bccbd}{BXE\_MCAST\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12107}12107         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12108}12108     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12109}12109 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12110}12110     \textcolor{comment}{/* Now add the new MACs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12111}12111     rc = \mbox{\hyperlink{ecore__sp_8c_afa16a6379ed01757caf80cbf7c9aa3f4}{ecore\_config\_mcast}}(sc, \&rparam, \mbox{\hyperlink{ecore__sp_8h_ac9e874ecf62c6b5d7ab51553b99d3958ac346da4ff49df5bdd09f5e3656f2b5df}{ECORE\_MCAST\_CMD\_ADD}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12112}12112     \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12113}12113         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to set new mcast config (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12114}12114     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12115}12115 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12116}12116     \mbox{\hyperlink{bxe_8c_a6d6e701a9b1702987349d81e6527bf70}{bxe\_free\_mcast\_macs\_list}}(\&rparam);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12117}12117 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12118}12118     \mbox{\hyperlink{bxe_8h_a1a12eebcf647954bdcc60198134bccbd}{BXE\_MCAST\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12119}12119 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12120}12120     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12121}12121 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12122}12122 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12123}\mbox{\hyperlink{structbxe__set__addr__ctx}{12123}} \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__set__addr__ctx}{bxe\_set\_addr\_ctx}} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12124}\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{12124}}    \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12125}\mbox{\hyperlink{structbxe__set__addr__ctx_af4c389775803c754e66da7a41abe98dc}{12125}}    \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} \mbox{\hyperlink{structbxe__set__addr__ctx_af4c389775803c754e66da7a41abe98dc}{ramrod\_flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12126}\mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{12126}}    \textcolor{keywordtype}{int} \mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12127}12127 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12128}12128 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12129}12129 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12130}\mbox{\hyperlink{bxe_8c_a17e1ca1b34b5c112cc28d68e6539d09b}{12130}} \mbox{\hyperlink{bxe_8c_a17e1ca1b34b5c112cc28d68e6539d09b}{bxe\_set\_addr}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} sockaddr\_dl *sdl, u\_int cnt)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12131}12131 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12132}12132     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__set__addr__ctx}{bxe\_set\_addr\_ctx}} *ctx = arg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12133}12133     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__vlan__mac__obj}{ecore\_vlan\_mac\_obj}} *mac\_obj = \&ctx-\/>\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}-\/>\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12134}12134     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12135}12135 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12136}12136     \textcolor{keywordflow}{if} (ctx-\/>\mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}} < 0)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12137}12137         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12138}12138 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12139}12139     rc = \mbox{\hyperlink{bxe_8c_af25e977e245c4791429826af005b60a9}{bxe\_set\_mac\_one}}(ctx-\/>\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, (uint8\_t *)LLADDR(sdl), mac\_obj, TRUE,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12140}12140                          \mbox{\hyperlink{ecore__sp_8h_a0ed680fdb405e7195d9f14032851eebba5303741586a07128b703a9b09f63a7aa}{ECORE\_UC\_LIST\_MAC}}, \&ctx-\/>\mbox{\hyperlink{structbxe__set__addr__ctx_af4c389775803c754e66da7a41abe98dc}{ramrod\_flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12141}12141 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12142}12142     \textcolor{comment}{/* do not treat adding same MAC as an error */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12143}12143     \textcolor{keywordflow}{if} (rc == -\/EEXIST)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12144}12144         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(ctx-\/>\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}Failed to schedule ADD operations (EEXIST)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12145}12145     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (rc < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12146}12146             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(ctx-\/>\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \textcolor{stringliteral}{"{}Failed to schedule ADD operations (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12147}12147             ctx-\/>\mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}} = rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12148}12148     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12149}12149 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12150}12150     \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12151}12151 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12152}12152 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12153}12153 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12154}\mbox{\hyperlink{bxe_8c_aeec96e2ad9afed2af122b6a1547c82cb}{12154}} \mbox{\hyperlink{bxe_8c_aeec96e2ad9afed2af122b6a1547c82cb}{bxe\_set\_uc\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12155}12155 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12156}12156     if\_t ifp = sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12157}12157     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__vlan__mac__obj}{ecore\_vlan\_mac\_obj}} *mac\_obj = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7e4ce237880bbe2cc5761f30abc9ea04}{sp\_objs}}-\/>\mbox{\hyperlink{structbxe__sp__objs_a4677e2889efb20e2aa344c47c3cdc15b}{mac\_obj}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12158}12158     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__set__addr__ctx}{bxe\_set\_addr\_ctx}} ctx = \{ \mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, 0, 0 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12159}12159     \textcolor{keywordtype}{int} \mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12160}12160 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12161}12161     \textcolor{comment}{/* first schedule a cleanup up of old configuration */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12162}12162     \mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}} = \mbox{\hyperlink{bxe_8c_a5b1249b7efe0dc2717660c88ce5aa590}{bxe\_del\_all\_macs}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, mac\_obj, \mbox{\hyperlink{ecore__sp_8h_a0ed680fdb405e7195d9f14032851eebba5303741586a07128b703a9b09f63a7aa}{ECORE\_UC\_LIST\_MAC}}, FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12163}12163     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}} < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12164}12164         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \textcolor{stringliteral}{"{}Failed to schedule delete of all ETH MACs (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12165}12165         \textcolor{keywordflow}{return} (\mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12166}12166     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12167}12167 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12168}12168     if\_foreach\_lladdr(ifp, \mbox{\hyperlink{bxe_8c_a17e1ca1b34b5c112cc28d68e6539d09b}{bxe\_set\_addr}}, \&ctx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12169}12169     \textcolor{keywordflow}{if} (ctx.\mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}} < 0)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12170}12170         \textcolor{keywordflow}{return} (ctx.\mbox{\hyperlink{structbxe__set__addr__ctx_a77247b2d0ed0603fe64633890d1b9d0e}{rc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12171}12171 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12172}12172     \textcolor{comment}{/* Execute the pending commands */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12173}12173     bit\_set(\&ctx.\mbox{\hyperlink{structbxe__set__addr__ctx_af4c389775803c754e66da7a41abe98dc}{ramrod\_flags}}, \mbox{\hyperlink{ecore__sp_8h_a5d76b81b0ad4c19007a781d4edb8181face3d408a9bc281e9b22b71144d4a00a2}{RAMROD\_CONT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12174}12174     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_af25e977e245c4791429826af005b60a9}{bxe\_set\_mac\_one}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, NULL, mac\_obj, FALSE \textcolor{comment}{/* don't care */},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12175}12175                             \mbox{\hyperlink{ecore__sp_8h_a0ed680fdb405e7195d9f14032851eebba5303741586a07128b703a9b09f63a7aa}{ECORE\_UC\_LIST\_MAC}}, \&ctx.\mbox{\hyperlink{structbxe__set__addr__ctx_af4c389775803c754e66da7a41abe98dc}{ramrod\_flags}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12176}12176 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12177}12177 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12178}12178 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12179}\mbox{\hyperlink{bxe_8c_af825a655512115af8f521c40de63426d}{12179}} \mbox{\hyperlink{bxe_8c_af825a655512115af8f521c40de63426d}{bxe\_set\_rx\_mode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12180}12180 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12181}12181     if\_t ifp = \mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12182}12182     uint32\_t rx\_mode = \mbox{\hyperlink{bxe_8h_a9e0d93dd1801d7a817ecb48581b79229}{BXE\_RX\_MODE\_NORMAL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12183}12183 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12184}12184     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12185}12185         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}state is \%x, returning\(\backslash\)n"{}}, \mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12186}12186         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12187}12187     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12188}12188 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12189}12189     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}}, \textcolor{stringliteral}{"{}if\_flags(ifp)=0x\%x\(\backslash\)n"{}}, if\_getflags(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12190}12190 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12191}12191     \textcolor{keywordflow}{if} (if\_getflags(ifp) \& IFF\_PROMISC) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12192}12192         rx\_mode = \mbox{\hyperlink{bxe_8h_a02f24f5b6a461a620bd6011f1b680377}{BXE\_RX\_MODE\_PROMISC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12193}12193     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((if\_getflags(ifp) \& IFF\_ALLMULTI) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12194}12194                ((if\_getamcount(ifp) > \mbox{\hyperlink{bxe_8h_a82ea22e4bd8dc54b73d677369412b8ca}{BXE\_MAX\_MULTICAST}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12195}12195                 \mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12196}12196         rx\_mode = \mbox{\hyperlink{bxe_8h_a4be23320422aac5c5cbf4ec188549c8b}{BXE\_RX\_MODE\_ALLMULTI}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12197}12197     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12198}12198         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12199}12199             \textcolor{comment}{/* some multicasts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12200}12200             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a8a9e9cbc3e8892e87bf7b5b877128bd8}{bxe\_set\_mc\_list}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}) < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12201}12201                 rx\_mode = \mbox{\hyperlink{bxe_8h_a4be23320422aac5c5cbf4ec188549c8b}{BXE\_RX\_MODE\_ALLMULTI}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12202}12202             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12203}12203             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_aeec96e2ad9afed2af122b6a1547c82cb}{bxe\_set\_uc\_list}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}) < 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12204}12204                 rx\_mode = \mbox{\hyperlink{bxe_8h_a02f24f5b6a461a620bd6011f1b680377}{BXE\_RX\_MODE\_PROMISC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12205}12205             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12206}12206         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12207}12207     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12208}12208 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12209}12209     \mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a17c36e629d93822d520fd49218c91f35}{rx\_mode}} = rx\_mode;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12210}12210 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12211}12211     \textcolor{comment}{/* schedule the rx\_mode command */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12212}12212     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a6f55b42545784b5c72c4bee025447246}{bxe\_test\_bit}}(\mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034aa41f7f61b38d8c20170c09ed945c1fca}{ECORE\_FILTER\_RX\_MODE\_PENDING}}, \&\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12213}12213         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Scheduled setting rx\_mode with ECORE...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12214}12214         \mbox{\hyperlink{bxe_8c_a8acb9dbd3fbc6da1e6100cb901d848f2}{bxe\_set\_bit}}(\mbox{\hyperlink{ecore__sp_8h_aac34dfe6c6b73b43a4656c9dce041034acd92a024777ec987a1581edb5ca0b67c}{ECORE\_FILTER\_RX\_MODE\_SCHED}}, \&\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aeb046f319413359ef2c7d1982b0e99cc}{sp\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12215}12215         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12216}12216     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12217}12217 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12218}12218     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12219}12219         \mbox{\hyperlink{bxe_8c_a106c35ed5d61fb78b510d88e71a748b2}{bxe\_set\_storm\_rx\_mode}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12220}12220     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12221}12221 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12222}12222 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12223}12223 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12224}12224 \textcolor{comment}{/* update flags in shmem */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12225}12225 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12226}\mbox{\hyperlink{bxe_8c_a3a05ee9866e52fb9c3b4b8441829f8b0}{12226}} \mbox{\hyperlink{bxe_8c_a3a05ee9866e52fb9c3b4b8441829f8b0}{bxe\_update\_drv\_flags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12227}12227                      uint32\_t         \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12228}12228                      uint32\_t         set)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12229}12229 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12230}12230     uint32\_t drv\_flags;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12231}12231 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12232}12232     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a9589edd1f6702afb76918ed934dd0fa6}{SHMEM2\_HAS}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, drv\_flags)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12233}12233         \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \mbox{\hyperlink{ecore__reg_8h_af79299f238b5ae686cd9b8135ac40d75}{HW\_LOCK\_RESOURCE\_DRV\_FLAGS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12234}12234         drv\_flags = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, drv\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12235}12235 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12236}12236         \textcolor{keywordflow}{if} (set) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12237}12237             \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(drv\_flags, \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12238}12238         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12239}12239             \mbox{\hyperlink{bxe__dcb_8h_ae7fd9d976433f82598b80f1b0537a70b}{RESET\_FLAGS}}(drv\_flags, \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12240}12240         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12241}12241 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12242}12242         \mbox{\hyperlink{bxe_8h_a4f67d23feca46834d51501224c0c22f9}{SHMEM2\_WR}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, drv\_flags, drv\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12243}12243         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}drv\_flags 0x\%08x\(\backslash\)n"{}}, drv\_flags);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12244}12244 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12245}12245         \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(\mbox{\hyperlink{structbxe__set__addr__ctx_ad916cc03c8838d63346488409b27ba81}{sc}}, \mbox{\hyperlink{ecore__reg_8h_af79299f238b5ae686cd9b8135ac40d75}{HW\_LOCK\_RESOURCE\_DRV\_FLAGS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12246}12246     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12247}12247 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12248}12248 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12249}12249 \textcolor{comment}{/* periodic timer callout routine, only runs when the interface is up */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12250}12250 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12251}12251 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12252}\mbox{\hyperlink{bxe_8c_ab2b27c8c258bce52a0ed9f0e6295b216}{12252}} \mbox{\hyperlink{bxe_8c_ab2b27c8c258bce52a0ed9f0e6295b216}{bxe\_periodic\_callout\_func}}(\textcolor{keywordtype}{void} *xsc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12253}12253 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12254}12254     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)xsc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12255}12255     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12256}12256 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12257}12257     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_acf502c2e3e7a12d6b631af300285d795}{BXE\_CORE\_TRYLOCK}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12258}12258         \textcolor{comment}{/* just bail and try again next time */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12259}12259 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12260}12260         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12261}12261             (atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad33c1bfb0ca2ea738bc997179f5835b2}{periodic\_flags}}) == \mbox{\hyperlink{bxe_8h_a9646082c9c0f3d92aab82a81ab2c20c4}{PERIODIC\_GO}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12262}12262             \textcolor{comment}{/* schedule the next periodic callout */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12263}12263             callout\_reset(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad880b723f6d87fdc08bc91b0ab157631}{periodic\_callout}}, hz,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12264}12264                           \mbox{\hyperlink{bxe_8c_ab2b27c8c258bce52a0ed9f0e6295b216}{bxe\_periodic\_callout\_func}}, sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12265}12265         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12266}12266 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12267}12267         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12268}12268     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12269}12269 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12270}12270     \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12271}12271         (atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad33c1bfb0ca2ea738bc997179f5835b2}{periodic\_flags}}) == \mbox{\hyperlink{bxe_8h_aa90215b457385b7c014ac9a58b57807a}{PERIODIC\_STOP}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12272}12272         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}periodic callout exit (state=0x\%x)\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12273}12273         \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12274}12274         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12275}12275         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12276}12276 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12277}12277 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12278}12278     \textcolor{comment}{/* Check for TX timeouts on any fastpath. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12279}12279     \mbox{\hyperlink{bxe_8h_a4dfa2e2603439d3cd962f31b741f3c0c}{FOR\_EACH\_QUEUE}}(sc, i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12280}12280         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a7471383acb03f009ca23431df93d4151}{bxe\_watchdog}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i]) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12281}12281             \textcolor{comment}{/* Ruh-\/Roh, chip was reset! */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12282}12282             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12283}12283         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12284}12284     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12285}12285 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12286}12286     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12287}12287         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12288}12288 \textcolor{comment}{         * This barrier is needed to ensure the ordering between the writing}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12289}12289 \textcolor{comment}{         * to the sc-\/>port.pmf in the bxe\_nic\_load() or bxe\_pmf\_update() and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12290}12290 \textcolor{comment}{         * the reading here.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12291}12291 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12292}12292         mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12293}12293         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12294}12294             \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12295}12295             \mbox{\hyperlink{bxe__elink_8c_a7f0315b100f9478b91b66a06a21238f2}{elink\_period\_func}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12296}12296             \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12297}12297         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12298}12298     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12299}12299 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12300}12300     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc) \&\& !(sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} \& \mbox{\hyperlink{bxe_8h_a270e4d05f677107de9f59e79707e1a29}{BXE\_NO\_PULSE}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12301}12301         \textcolor{keywordtype}{int} mb\_idx = \mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12302}12302         uint32\_t drv\_pulse;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12303}12303         uint32\_t mcp\_pulse;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12304}12304 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12305}12305         ++sc-\/>\mbox{\hyperlink{structbxe__softc_a3685352e604bc0843e4e32082cbc739e}{fw\_drv\_pulse\_wr\_seq}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12306}12306         sc-\/>\mbox{\hyperlink{structbxe__softc_a3685352e604bc0843e4e32082cbc739e}{fw\_drv\_pulse\_wr\_seq}} \&= \mbox{\hyperlink{ecore__hsi_8h_a864688d03b21f6e3e4986ef9f215db0d}{DRV\_PULSE\_SEQ\_MASK}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12307}12307 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12308}12308         drv\_pulse = sc-\/>\mbox{\hyperlink{structbxe__softc_a3685352e604bc0843e4e32082cbc739e}{fw\_drv\_pulse\_wr\_seq}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12309}12309         \mbox{\hyperlink{bxe_8c_a425ed51fb9bdf68f8dfe8c36a27374e5}{bxe\_drv\_pulse}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12310}12310 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12311}12311         mcp\_pulse = (\mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, func\_mb[mb\_idx].mcp\_pulse\_mb) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12312}12312                      \mbox{\hyperlink{ecore__hsi_8h_a29bc210c8c19c1577618589d1a3f6214}{MCP\_PULSE\_SEQ\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12313}12313 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12314}12314         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12315}12315 \textcolor{comment}{         * The delta between driver pulse and mcp response should}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12316}12316 \textcolor{comment}{         * be 1 (before mcp response) or 0 (after mcp response).}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12317}12317 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12318}12318         \textcolor{keywordflow}{if} ((drv\_pulse != mcp\_pulse) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12319}12319             (drv\_pulse != ((mcp\_pulse + 1) \& \mbox{\hyperlink{ecore__hsi_8h_a29bc210c8c19c1577618589d1a3f6214}{MCP\_PULSE\_SEQ\_MASK}}))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12320}12320             \textcolor{comment}{/* someone lost a heartbeat... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12321}12321             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}drv\_pulse (0x\%x) != mcp\_pulse (0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12322}12322                   drv\_pulse, mcp\_pulse);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12323}12323         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12324}12324     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12325}12325 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12326}12326     \textcolor{comment}{/* state is BXE\_STATE\_OPEN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12327}12327     \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(sc, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026a5bb88f979b9f53e7ad8d54f10123b5fc}{STATS\_EVENT\_UPDATE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12328}12328 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12329}12329     \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12330}12330 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12331}12331     \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12332}12332         (atomic\_load\_acq\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad33c1bfb0ca2ea738bc997179f5835b2}{periodic\_flags}}) == \mbox{\hyperlink{bxe_8h_a9646082c9c0f3d92aab82a81ab2c20c4}{PERIODIC\_GO}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12333}12333         \textcolor{comment}{/* schedule the next periodic callout */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12334}12334         callout\_reset(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad880b723f6d87fdc08bc91b0ab157631}{periodic\_callout}}, hz,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12335}12335                       \mbox{\hyperlink{bxe_8c_ab2b27c8c258bce52a0ed9f0e6295b216}{bxe\_periodic\_callout\_func}}, sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12336}12336     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12337}12337 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12338}12338 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12339}12339 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12340}\mbox{\hyperlink{bxe_8c_ab9b8e5c75cdb1fb0ed9732bbbb2fc415}{12340}} \mbox{\hyperlink{bxe_8c_ab9b8e5c75cdb1fb0ed9732bbbb2fc415}{bxe\_periodic\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12341}12341 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12342}12342     atomic\_store\_rel\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad33c1bfb0ca2ea738bc997179f5835b2}{periodic\_flags}}, \mbox{\hyperlink{bxe_8h_a9646082c9c0f3d92aab82a81ab2c20c4}{PERIODIC\_GO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12343}12343     callout\_reset(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad880b723f6d87fdc08bc91b0ab157631}{periodic\_callout}}, hz, \mbox{\hyperlink{bxe_8c_ab2b27c8c258bce52a0ed9f0e6295b216}{bxe\_periodic\_callout\_func}}, sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12344}12344 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12345}12345 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12346}12346 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12347}\mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{12347}} \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12348}12348 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12349}12349     atomic\_store\_rel\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad33c1bfb0ca2ea738bc997179f5835b2}{periodic\_flags}}, \mbox{\hyperlink{bxe_8h_aa90215b457385b7c014ac9a58b57807a}{PERIODIC\_STOP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12350}12350     callout\_drain(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad880b723f6d87fdc08bc91b0ab157631}{periodic\_callout}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12351}12351 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12352}12352 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12353}12353 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12354}\mbox{\hyperlink{bxe_8c_ad6e9a6bdbfa9da3b04c8b2bf09c61d34}{12354}} \mbox{\hyperlink{bxe_8c_ad6e9a6bdbfa9da3b04c8b2bf09c61d34}{bxe\_parity\_recover}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12355}12355 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12356}12356     uint8\_t global = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12357}12357     uint32\_t error\_recovered, error\_unrecovered;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12358}12358     \textcolor{keywordtype}{bool} is\_parity;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12359}12359 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12360}12360 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12361}12361     \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} == \mbox{\hyperlink{bxe_8h_a88bd3b46feb9d35c3dd74a03206c034b}{BXE\_RECOVERY\_FAILED}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12362}12362         (sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12363}12363         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}RECOVERY failed, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12364}12364             \textcolor{stringliteral}{"{}stack notified driver is NOT running! "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12365}12365             \textcolor{stringliteral}{"{}Please reboot/power cycle the system.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12366}12366         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12367}12367     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12368}12368 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12369}12369     \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12370}12370         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12371}12371            \textcolor{stringliteral}{"{}\%s sc=\%p state=0x\%x rec\_state=0x\%x error\_status=\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12372}12372             \_\_func\_\_, sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12373}12373 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12374}12374         \textcolor{keywordflow}{switch}(sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12375}12375 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12376}12376         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_aa5dc775bc3b20ee368ab01abeebc943b}{BXE\_RECOVERY\_INIT}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12377}12377             is\_parity = \mbox{\hyperlink{bxe_8c_a91656b2ffc7fe1c9ff94a04e05056801}{bxe\_chk\_parity\_attn}}(sc, \&global, FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12378}12378 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12379}12379             \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8h_a41dbd7d7b2c3e98bd56fa929b0bb9710}{CHIP\_PORT\_MODE}}(sc) == \mbox{\hyperlink{bxe_8h_a016d31fc3005f6b5e4018d33ac1fd028}{CHIP\_4\_PORT\_MODE}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12380}12380                 (sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}} \& \mbox{\hyperlink{bxe_8h_abd3b2aca516a25d2c703898cb9cf152e}{BXE\_ERR\_MCP\_ASSERT}}) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12381}12381                 (sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}} \& \mbox{\hyperlink{bxe_8h_a2627a44dbd6c4e828ab03c6d4502218e}{BXE\_ERR\_GLOBAL}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12382}12382 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12383}12383                 \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12384}12384                 \textcolor{keywordflow}{if} (if\_getdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12385}12385                     \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12386}12386                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12387}12387                 \mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{bxe\_nic\_unload}}(sc, \mbox{\hyperlink{bxe_8h_a773cb9796f3292c69b4036676617cbe5}{UNLOAD\_RECOVERY}}, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12388}12388                 sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12389}12389                 sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} = \mbox{\hyperlink{bxe_8h_a88bd3b46feb9d35c3dd74a03206c034b}{BXE\_RECOVERY\_FAILED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12390}12390                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{} No Recovery tried for error 0x\%x"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12391}12391                     \textcolor{stringliteral}{"{} stack notified driver is NOT running!"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12392}12392                     \textcolor{stringliteral}{"{} Please reboot/power cycle the system.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12393}12393                     sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12394}12394                 \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12395}12395                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12396}12396             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12397}12397 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12398}12398 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12399}12399            \textcolor{comment}{/* Try to get a LEADER\_LOCK HW lock */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12400}12400             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ad9cfd4a8a15df94a0a900aa15d658489}{bxe\_trylock\_leader\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12401}12401 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12402}12402                 \mbox{\hyperlink{bxe_8c_a07b21b9de3ef7ccde7111feae924a352}{bxe\_set\_reset\_in\_progress}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12403}12403                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12404}12404 \textcolor{comment}{                 * Check if there is a global attention and if}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12405}12405 \textcolor{comment}{                 * there was a global attention, set the global}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12406}12406 \textcolor{comment}{                 * reset bit.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12407}12407 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12408}12408                 \textcolor{keywordflow}{if} (global) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12409}12409                     \mbox{\hyperlink{bxe_8c_a7de36a383e6f8ea6b0d5b095d815875e}{bxe\_set\_reset\_global}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12410}12410                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12411}12411                 sc-\/>\mbox{\hyperlink{structbxe__softc_a58ff5b9b70ec4dba07f023959a63012b}{is\_leader}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12412}12412             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12413}12413 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12414}12414             \textcolor{comment}{/* If interface has been removed -\/ break */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12415}12415 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12416}12416             \textcolor{keywordflow}{if} (if\_getdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12417}12417                 \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12418}12418             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12419}12419 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12420}12420             \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12421}12421             \mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{bxe\_nic\_unload}}(sc,\mbox{\hyperlink{bxe_8h_a773cb9796f3292c69b4036676617cbe5}{UNLOAD\_RECOVERY}}, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12422}12422             sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} = \mbox{\hyperlink{bxe_8h_acc5b0ec35a44dd0457c9e756c9914244}{BXE\_RECOVERY\_WAIT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12423}12423             \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12424}12424 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12425}12425             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12426}12426 \textcolor{comment}{             * Ensure "{}is\_leader"{}, MCP command sequence and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12427}12427 \textcolor{comment}{             * "{}recovery\_state"{} update values are seen on other}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12428}12428 \textcolor{comment}{             * CPUs.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12429}12429 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12430}12430             mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12431}12431             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12432}12432         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_acc5b0ec35a44dd0457c9e756c9914244}{BXE\_RECOVERY\_WAIT}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12433}12433 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12434}12434             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a58ff5b9b70ec4dba07f023959a63012b}{is\_leader}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12435}12435                 \textcolor{keywordtype}{int} other\_engine = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? 0 : 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12436}12436                 \textcolor{keywordtype}{bool} other\_load\_status =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12437}12437                     \mbox{\hyperlink{bxe_8c_abf586202f0932ef109178a8b30f26505}{bxe\_get\_load\_status}}(sc, other\_engine);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12438}12438                 \textcolor{keywordtype}{bool} load\_status =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12439}12439                     \mbox{\hyperlink{bxe_8c_abf586202f0932ef109178a8b30f26505}{bxe\_get\_load\_status}}(sc, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12440}12440                 global = \mbox{\hyperlink{bxe_8c_ad688b2d4462c1d0051be7e1e0fc24eed}{bxe\_reset\_is\_global}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12441}12441 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12442}12442                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12443}12443 \textcolor{comment}{                 * In case of a parity in a global block, let}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12444}12444 \textcolor{comment}{                 * the first leader that performs a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12445}12445 \textcolor{comment}{                 * leader\_reset() reset the global blocks in}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12446}12446 \textcolor{comment}{                 * order to clear global attentions. Otherwise}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12447}12447 \textcolor{comment}{                 * the gates will remain closed for that}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12448}12448 \textcolor{comment}{                 * engine.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12449}12449 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12450}12450                 \textcolor{keywordflow}{if} (load\_status ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12451}12451                     (global \&\& other\_load\_status)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12452}12452                     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12453}12453 \textcolor{comment}{                     * Wait until all other functions get}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12454}12454 \textcolor{comment}{                     * down.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12455}12455 \textcolor{comment}{                     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12456}12456                     taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12457}12457                         \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12458}12458                     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12459}12459                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12460}12460                     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12461}12461 \textcolor{comment}{                     * If all other functions got down}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12462}12462 \textcolor{comment}{                     * try to bring the chip back to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12463}12463 \textcolor{comment}{                     * normal. In any case it's an exit}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12464}12464 \textcolor{comment}{                     * point for a leader.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12465}12465 \textcolor{comment}{                     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12466}12466                     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ab8b3a86c4bf8245e1dd5247efb2b6dd5}{bxe\_leader\_reset}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12467}12467                         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}RECOVERY failed, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12468}12468                             \textcolor{stringliteral}{"{}stack notified driver is NOT running!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12469}12469                         sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} = \mbox{\hyperlink{bxe_8h_a88bd3b46feb9d35c3dd74a03206c034b}{BXE\_RECOVERY\_FAILED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12470}12470                         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12471}12471                         mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12472}12472                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12473}12473                     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12474}12474 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12475}12475                     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12476}12476 \textcolor{comment}{                     * If we are here, means that the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12477}12477 \textcolor{comment}{                     * leader has succeeded and doesn't}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12478}12478 \textcolor{comment}{                     * want to be a leader any more. Try}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12479}12479 \textcolor{comment}{                     * to continue as a none-\/leader.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12480}12480 \textcolor{comment}{                     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12481}12481                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12482}12482                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12483}12483 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12484}12484             \} \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* non-\/leader */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12485}12485                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8c_aa8e60d884e752f4c51c8a313f973d00d}{bxe\_reset\_is\_done}}(sc, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12486}12486                     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12487}12487 \textcolor{comment}{                     * Try to get a LEADER\_LOCK HW lock as}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12488}12488 \textcolor{comment}{                     * long as a former leader may have}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12489}12489 \textcolor{comment}{                     * been unloaded by the user or}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12490}12490 \textcolor{comment}{                     * released a leadership by another}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12491}12491 \textcolor{comment}{                     * reason.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12492}12492 \textcolor{comment}{                     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12493}12493                     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ad9cfd4a8a15df94a0a900aa15d658489}{bxe\_trylock\_leader\_lock}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12494}12494                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12495}12495 \textcolor{comment}{                         * I'm a leader now! Restart a}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12496}12496 \textcolor{comment}{                         * switch case.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12497}12497 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12498}12498                         sc-\/>\mbox{\hyperlink{structbxe__softc_a58ff5b9b70ec4dba07f023959a63012b}{is\_leader}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12499}12499                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12500}12500                     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12501}12501 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12502}12502                     taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12503}12503                         \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12504}12504                     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12505}12505 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12506}12506                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12507}12507                     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12508}12508 \textcolor{comment}{                     * If there was a global attention, wait}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12509}12509 \textcolor{comment}{                     * for it to be cleared.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12510}12510 \textcolor{comment}{                     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12511}12511                     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ad688b2d4462c1d0051be7e1e0fc24eed}{bxe\_reset\_is\_global}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12512}12512                         taskqueue\_enqueue\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12513}12513                             \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, hz/10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12514}12514                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12515}12515                      \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12516}12516 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12517}12517                      error\_recovered =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12518}12518                          sc-\/>\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}}.\mbox{\hyperlink{structbxe__eth__stats_a72c0fdc798ff7d216f411a8287c4b30a}{recoverable\_error}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12519}12519                      error\_unrecovered =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12520}12520                          sc-\/>\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}}.\mbox{\hyperlink{structbxe__eth__stats_a7db0e947d4b77f682de192fe22832f9c}{unrecoverable\_error}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12521}12521                      \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12522}12522                      sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12523}12523                          \mbox{\hyperlink{bxe_8h_a1c66677c12a098e679be5964b7851834}{BXE\_RECOVERY\_NIC\_LOADING}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12524}12524                      \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_aa29198c57a0a0a54875358ed35334453}{bxe\_nic\_load}}(sc, \mbox{\hyperlink{bxe_8h_a4bf78676737804a9d70ffe31fc4f5f6d}{LOAD\_NORMAL}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12525}12525                          error\_unrecovered++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12526}12526                          sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} = \mbox{\hyperlink{bxe_8h_a88bd3b46feb9d35c3dd74a03206c034b}{BXE\_RECOVERY\_FAILED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12527}12527                          sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12528}12528                          \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Recovery is NOT successfull, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12529}12529                             \textcolor{stringliteral}{"{} state=0x\%x recovery\_state=0x\%x error=\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12530}12530                             sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12531}12531                          sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12532}12532                      \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12533}12533                          sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12534}12534                              \mbox{\hyperlink{bxe_8h_ae70e8a5625712b5a0f3c8c9af5107e5b}{BXE\_RECOVERY\_DONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12535}12535                          error\_recovered++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12536}12536                          \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Recovery is successfull from errors \%x,"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12537}12537                             \textcolor{stringliteral}{"{} state=0x\%x"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12538}12538                             \textcolor{stringliteral}{"{} recovery\_state=0x\%x \(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12539}12539                             sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12540}12540                          mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12541}12541                      \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12542}12542                      sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12543}12543                      \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12544}12544                      sc-\/>\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}}.\mbox{\hyperlink{structbxe__eth__stats_a72c0fdc798ff7d216f411a8287c4b30a}{recoverable\_error}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12545}12545                          error\_recovered;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12546}12546                      sc-\/>\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}}.\mbox{\hyperlink{structbxe__eth__stats_a7db0e947d4b77f682de192fe22832f9c}{unrecoverable\_error}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12547}12547                          error\_unrecovered;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12548}12548 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12549}12549                      \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12550}12550                  \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12551}12551              \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12552}12552          \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12553}12553              \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12554}12554          \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12555}12555     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12556}12556 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12557}12557 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12558}\mbox{\hyperlink{bxe_8c_ae754832809b084ce5e719c8059d929e9}{12558}} \mbox{\hyperlink{bxe_8c_ae754832809b084ce5e719c8059d929e9}{bxe\_handle\_error}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} * sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12559}12559 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12560}12560 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12561}12561     \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} == \mbox{\hyperlink{bxe_8h_acc5b0ec35a44dd0457c9e756c9914244}{BXE\_RECOVERY\_WAIT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12562}12562         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12563}12563     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12564}12564     \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12565}12565         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}})  \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12566}12566             \mbox{\hyperlink{bxe_8c_ac47171d7e9b0e9b346122f490afcbf5a}{bxe\_int\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12567}12567         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12568}12568         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12569}12569             if\_link\_state\_change(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, LINK\_STATE\_DOWN);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12570}12570         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12571}12571         sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} = \mbox{\hyperlink{bxe_8h_aa5dc775bc3b20ee368ab01abeebc943b}{BXE\_RECOVERY\_INIT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12572}12572         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}bxe\%d: Recovery started errors 0x\%x recovery state 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12573}12573             sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12574}12574         \mbox{\hyperlink{bxe_8c_ad6e9a6bdbfa9da3b04c8b2bf09c61d34}{bxe\_parity\_recover}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12575}12575    \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12576}12576 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12577}12577 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12578}12578 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12579}\mbox{\hyperlink{bxe_8c_a7509961acf73ddbd86105b2e911d8e41}{12579}} \mbox{\hyperlink{bxe_8c_a7509961acf73ddbd86105b2e911d8e41}{bxe\_sp\_err\_timeout\_task}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12580}12580 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12581}12581 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12582}12582     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)arg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12583}12583 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12584}12584     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_aa929740d36ccab52c47c9d1355d00101}{DBG\_SP}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12585}12585         \textcolor{stringliteral}{"{}\%s state = 0x\%x rec state=0x\%x error\_status=\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12586}12586         \_\_func\_\_, sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12587}12587 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12588}12588     \textcolor{keywordflow}{if}((sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} == \mbox{\hyperlink{bxe_8h_a88bd3b46feb9d35c3dd74a03206c034b}{BXE\_RECOVERY\_FAILED}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12589}12589        (sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12590}12590         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12591}12591     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12592}12592     \textcolor{comment}{/* if can be taken */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12593}12593     \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}}) \&\& (sc-\/>\mbox{\hyperlink{structbxe__softc_a4b1264f0563ea001f79c0a4db489b981}{trigger\_grcdump}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12594}12594         \mbox{\hyperlink{bxe_8c_a29af23f076c40ae19a6f213ce619d7e4}{bxe\_grc\_dump}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12595}12595     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12596}12596     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} != \mbox{\hyperlink{bxe_8h_ae70e8a5625712b5a0f3c8c9af5107e5b}{BXE\_RECOVERY\_DONE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12597}12597         \mbox{\hyperlink{bxe_8c_ae754832809b084ce5e719c8059d929e9}{bxe\_handle\_error}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12598}12598         \mbox{\hyperlink{bxe_8c_ad6e9a6bdbfa9da3b04c8b2bf09c61d34}{bxe\_parity\_recover}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12599}12599     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a925e566b348507a129771d6e4b652284}{error\_status}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12600}12600         \mbox{\hyperlink{bxe_8c_ae754832809b084ce5e719c8059d929e9}{bxe\_handle\_error}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12601}12601     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12602}12602 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12603}12603     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12604}12604 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12605}12605 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12606}12606 \textcolor{comment}{/* start the controller */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12607}12607 \textcolor{keyword}{static} \_\_noinline \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12608}\mbox{\hyperlink{bxe_8c_aa29198c57a0a0a54875358ed35334453}{12608}} \mbox{\hyperlink{bxe_8c_aa29198c57a0a0a54875358ed35334453}{bxe\_nic\_load}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12609}12609              \textcolor{keywordtype}{int}              load\_mode)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12610}12610 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12611}12611     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12612}12612     \textcolor{keywordtype}{int} load\_code = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12613}12613     \textcolor{keywordtype}{int} i, rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12614}12614 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12615}12615     \mbox{\hyperlink{bxe_8h_a9e59019dafc482034b9e64604ce070ee}{BXE\_CORE\_LOCK\_ASSERT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12616}12616 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12617}12617     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Starting NIC load...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12618}12618 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12619}12619     sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a68a4043d57bf5e4602cd74663b87dad4}{BXE\_STATE\_OPENING\_WAITING\_LOAD}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12620}12620 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12621}12621     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12622}12622         \textcolor{comment}{/* must be called before memory allocation and HW init */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12623}12623         \mbox{\hyperlink{bxe_8c_ab7bef1458ec582e009f96d1e5c4041b3}{bxe\_ilt\_set\_info}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12624}12624     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12625}12625 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12626}12626     sc-\/>\mbox{\hyperlink{structbxe__softc_a8cd8cb5fb59f664dcaa3d9d828a0a98e}{last\_reported\_link\_state}} = LINK\_STATE\_UNKNOWN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12627}12627 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12628}12628     \mbox{\hyperlink{bxe_8c_aed5b773b4dd9bc0c5c63c49e8e3a0a7d}{bxe\_set\_fp\_rx\_buf\_size}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12629}12629 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12630}12630     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a6abc6b008b38626a1a036c760b3351b7}{bxe\_alloc\_fp\_buffers}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12631}12631         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to allocate fastpath memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12632}12632         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12633}12633         rc = ENOMEM;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12634}12634         \textcolor{keywordflow}{goto} bxe\_nic\_load\_error0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12635}12635     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12636}12636 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12637}12637     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_abf72f72346c48bed2d9f9552510dcdbd}{bxe\_alloc\_mem}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12638}12638         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12639}12639         rc = ENOMEM;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12640}12640         \textcolor{keywordflow}{goto} bxe\_nic\_load\_error0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12641}12641     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12642}12642 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12643}12643     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a241e8ad9197e2f0d46a7e7b917333c65}{bxe\_alloc\_fw\_stats\_mem}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12644}12644         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12645}12645         rc = ENOMEM;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12646}12646         \textcolor{keywordflow}{goto} bxe\_nic\_load\_error0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12647}12647     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12648}12648 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12649}12649     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12650}12650         \textcolor{comment}{/* set pf load just before approaching the MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12651}12651         \mbox{\hyperlink{bxe_8c_ad8dd94cfc3f964499f2c22f369d74342}{bxe\_set\_pf\_load}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12652}12652 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12653}12653         \textcolor{comment}{/* if MCP exists send load request and analyze response */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12654}12654         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12655}12655             \textcolor{comment}{/* attempt to load pf */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12656}12656             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a0356368baf0b275984ef015d69e3452a}{bxe\_nic\_load\_request}}(sc, \&load\_code) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12657}12657                 sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12658}12658                 rc = ENXIO;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12659}12659                 \textcolor{keywordflow}{goto} bxe\_nic\_load\_error1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12660}12660             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12661}12661 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12662}12662             \textcolor{comment}{/* what did the MCP say? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12663}12663             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a8feaf375217687b6ec4f9e0f9956331c}{bxe\_nic\_load\_analyze\_req}}(sc, load\_code) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12664}12664                 \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a860eddf6065dcb5be14e9e21fcdfbda5}{DRV\_MSG\_CODE\_LOAD\_DONE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12665}12665                 sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12666}12666                 rc = ENXIO;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12667}12667                 \textcolor{keywordflow}{goto} bxe\_nic\_load\_error2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12668}12668             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12669}12669         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12670}12670             \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Device has no MCP!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12671}12671             load\_code = \mbox{\hyperlink{bxe_8c_aa539789564f84064c8ef23f74f3160aa}{bxe\_nic\_load\_no\_mcp}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12672}12672         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12673}12673 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12674}12674         \textcolor{comment}{/* mark PMF if applicable */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12675}12675         \mbox{\hyperlink{bxe_8c_ab0cd948eaed15a5cd1687a8a612a4166}{bxe\_nic\_load\_pmf}}(sc, load\_code);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12676}12676 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12677}12677         \textcolor{comment}{/* Init Function state controlling object */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12678}12678         \mbox{\hyperlink{bxe_8c_a0e08040da46336e029e34e30cf886f21}{bxe\_init\_func\_obj}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12679}12679 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12680}12680         \textcolor{comment}{/* Initialize HW */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12681}12681         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a93a0aeef1d6b322ca3db46c6516cd7c3}{bxe\_init\_hw}}(sc, load\_code) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12682}12682             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}HW init failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12683}12683             \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a860eddf6065dcb5be14e9e21fcdfbda5}{DRV\_MSG\_CODE\_LOAD\_DONE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12684}12684             sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12685}12685             rc = ENXIO;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12686}12686             \textcolor{keywordflow}{goto} bxe\_nic\_load\_error2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12687}12687         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12688}12688     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12689}12689 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12690}12690     \textcolor{comment}{/* set ALWAYS\_ALIVE bit in shmem */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12691}12691     sc-\/>\mbox{\hyperlink{structbxe__softc_a3685352e604bc0843e4e32082cbc739e}{fw\_drv\_pulse\_wr\_seq}} |= \mbox{\hyperlink{ecore__hsi_8h_a94d5dcf1a7e6e8e6055123b1e6eb34d6}{DRV\_PULSE\_ALWAYS\_ALIVE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12692}12692     \mbox{\hyperlink{bxe_8c_a425ed51fb9bdf68f8dfe8c36a27374e5}{bxe\_drv\_pulse}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12693}12693     sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} |= \mbox{\hyperlink{bxe_8h_a270e4d05f677107de9f59e79707e1a29}{BXE\_NO\_PULSE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12694}12694 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12695}12695     \textcolor{comment}{/* attach interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12696}12696     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_af4f1b847084fa10eb260873fa4e01504}{bxe\_interrupt\_attach}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12697}12697         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12698}12698         rc = ENXIO;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12699}12699         \textcolor{keywordflow}{goto} bxe\_nic\_load\_error2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12700}12700     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12701}12701 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12702}12702     \mbox{\hyperlink{bxe_8c_a266f8bdb764a5a75f8848a3b34daebae}{bxe\_nic\_init}}(sc, load\_code);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12703}12703 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12704}12704     \textcolor{comment}{/* Init per-\/function objects */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12705}12705     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12706}12706         \mbox{\hyperlink{bxe_8c_aabff41d42fa0415c38d163314c626c9c}{bxe\_init\_objs}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12707}12707         \textcolor{comment}{// XXX bxe\_iov\_nic\_init(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12708}12708 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12709}12709         \textcolor{comment}{/* set AFEX default VLAN tag to an invalid value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12710}12710         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a2a5283094b96d1e39834c8b86301804d}{afex\_def\_vlan\_tag}} = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12711}12711         \textcolor{comment}{// XXX bxe\_nic\_load\_afex\_dcc(sc, load\_code);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12712}12712 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12713}12713         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_afd212c243823aef9ce0df29dd125f422}{BXE\_STATE\_OPENING\_WAITING\_PORT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12714}12714         rc = \mbox{\hyperlink{bxe_8c_ac4848c1ebb01250940159cb9b4ad4315}{bxe\_func\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12715}12715         \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12716}12716             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Function start failed! rc = \%d\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12717}12717             \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a860eddf6065dcb5be14e9e21fcdfbda5}{DRV\_MSG\_CODE\_LOAD\_DONE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12718}12718             sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12719}12719             \textcolor{keywordflow}{goto} bxe\_nic\_load\_error3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12720}12720         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12721}12721 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12722}12722         \textcolor{comment}{/* send LOAD\_DONE command to MCP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12723}12723         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12724}12724             load\_code = \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a860eddf6065dcb5be14e9e21fcdfbda5}{DRV\_MSG\_CODE\_LOAD\_DONE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12725}12725             \textcolor{keywordflow}{if} (!load\_code) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12726}12726                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MCP response failure, aborting\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12727}12727                 sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12728}12728                 rc = ENXIO;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12729}12729                 \textcolor{keywordflow}{goto} bxe\_nic\_load\_error3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12730}12730             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12731}12731         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12732}12732 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12733}12733         rc = \mbox{\hyperlink{bxe_8c_ac128f4c10dd29648fb9a395dbdf54bec}{bxe\_setup\_leading}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12734}12734         \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12735}12735             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Setup leading failed! rc = \%d\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12736}12736             sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12737}12737             \textcolor{keywordflow}{goto} bxe\_nic\_load\_error3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12738}12738         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12739}12739 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12740}12740         \mbox{\hyperlink{bxe_8h_a63d467a7722007545032da93d088da22}{FOR\_EACH\_NONDEFAULT\_ETH\_QUEUE}}(sc, i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12741}12741             rc = \mbox{\hyperlink{bxe_8c_abb02a487428b152895667227b9325167}{bxe\_setup\_queue}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i], FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12742}12742             \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12743}12743                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Queue(\%d) setup failed rc = \%d\(\backslash\)n"{}}, i, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12744}12744                 sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12745}12745                 \textcolor{keywordflow}{goto} bxe\_nic\_load\_error3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12746}12746             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12747}12747         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12748}12748 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12749}12749         rc = \mbox{\hyperlink{bxe_8c_a13d3df2edda291805f4bf6b640a94f67}{bxe\_init\_rss\_pf}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12750}12750         \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12751}12751             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PF RSS init failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12752}12752             sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12753}12753             \textcolor{keywordflow}{goto} bxe\_nic\_load\_error3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12754}12754         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12755}12755     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12756}12756     \textcolor{comment}{/* XXX VF */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12757}12757 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12758}12758     \textcolor{comment}{/* now when Clients are configured we are ready to work */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12759}12759     sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12760}12760 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12761}12761     \textcolor{comment}{/* Configure a ucast MAC */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12762}12762     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12763}12763         rc = \mbox{\hyperlink{bxe_8c_a0bd6b369b8182071c382aca2d0288f3e}{bxe\_set\_eth\_mac}}(sc, TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12764}12764     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12765}12765     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12766}12766         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Setting Ethernet MAC failed rc = \%d\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12767}12767         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12768}12768         \textcolor{keywordflow}{goto} bxe\_nic\_load\_error3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12769}12769     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12770}12770 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12771}12771     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12772}12772         rc = \mbox{\hyperlink{bxe_8c_a6e78c82beff1504c075c0e78d0086b58}{bxe\_initial\_phy\_init}}(sc, \textcolor{comment}{/* XXX load\_mode */}\mbox{\hyperlink{bxe_8h_a8b77ff4c229579d4b80c359c7d3a4c76}{LOAD\_OPEN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12773}12773         \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12774}12774             sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12775}12775             \textcolor{keywordflow}{goto} bxe\_nic\_load\_error3;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12776}12776         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12777}12777     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12778}12778 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12779}12779     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_af7cb7b6dddd37658f1704060e58d6938}{feature\_config\_flags}} \&=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12780}12780         \string~ELINK\_FEATURE\_CONFIG\_BOOT\_FROM\_SAN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12781}12781 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12782}12782     \textcolor{comment}{/* start fast path */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12783}12783 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12784}12784     \textcolor{comment}{/* Initialize Rx filter */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12785}12785     \mbox{\hyperlink{bxe_8c_af825a655512115af8f521c40de63426d}{bxe\_set\_rx\_mode}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12786}12786 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12787}12787     \textcolor{comment}{/* start the Tx */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12788}12788     \textcolor{keywordflow}{switch} (\textcolor{comment}{/* XXX load\_mode */}\mbox{\hyperlink{bxe_8h_a8b77ff4c229579d4b80c359c7d3a4c76}{LOAD\_OPEN}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12789}12789     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a4bf78676737804a9d70ffe31fc4f5f6d}{LOAD\_NORMAL}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12790}12790     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_a8b77ff4c229579d4b80c359c7d3a4c76}{LOAD\_OPEN}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12791}12791         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12792}12792 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12793}12793     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_ac090f4524b18796ad01df4db3da96375}{LOAD\_DIAG}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12794}12794     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe_8h_aeaaa39b6ca7aeba4095372d3ef514523}{LOAD\_LOOPBACK\_EXT}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12795}12795         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a289a683aec0ccb4d099aca78ddcda0ff}{BXE\_STATE\_DIAG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12796}12796         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12797}12797 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12798}12798     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12799}12799         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12800}12800     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12801}12801 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12802}12802     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12803}12803         \mbox{\hyperlink{bxe_8c_a3a05ee9866e52fb9c3b4b8441829f8b0}{bxe\_update\_drv\_flags}}(sc, 1 << \mbox{\hyperlink{ecore__hsi_8h_a69d3cf7714506ed029da53777349511f}{DRV\_FLAGS\_PORT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12804}12804     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12805}12805         \mbox{\hyperlink{bxe_8c_a9c029beb080ac600e1ae282c2710195b}{bxe\_link\_status\_update}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12806}12806     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12807}12807 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12808}12808     \textcolor{comment}{/* start the periodic timer callout */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12809}12809     \mbox{\hyperlink{bxe_8c_ab9b8e5c75cdb1fb0ed9732bbbb2fc415}{bxe\_periodic\_start}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12810}12810 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12811}12811     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc) \&\& \mbox{\hyperlink{bxe_8h_a9589edd1f6702afb76918ed934dd0fa6}{SHMEM2\_HAS}}(sc, drv\_capabilities\_flag)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12812}12812         \textcolor{comment}{/* mark driver is loaded in shmem2 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12813}12813         val = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, drv\_capabilities\_flag[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc)]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12814}12814         \mbox{\hyperlink{bxe_8h_a4f67d23feca46834d51501224c0c22f9}{SHMEM2\_WR}}(sc, drv\_capabilities\_flag[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc)],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12815}12815                   (val |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12816}12816                    \mbox{\hyperlink{ecore__hsi_8h_ab92f600d902da188c64e7f3efc8d19ba}{DRV\_FLAGS\_CAPABILITIES\_LOADED\_SUPPORTED}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12817}12817                    \mbox{\hyperlink{ecore__hsi_8h_a3005a45096ff38b52071aacaa52531c9}{DRV\_FLAGS\_CAPABILITIES\_LOADED\_L2}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12818}12818     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12819}12819 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12820}12820     \textcolor{comment}{/* wait for all pending SP commands to complete */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12821}12821     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc) \&\& !\mbox{\hyperlink{bxe_8c_aa4635446f81e51e12fe8232520a55249}{bxe\_wait\_sp\_comp}}(sc, \string~0x0UL)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12822}12822         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Timeout waiting for all SPs to complete!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12823}12823         \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12824}12824         \mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{bxe\_nic\_unload}}(sc, \mbox{\hyperlink{bxe_8h_ad947b4ab2a42920771abc6b2853f1cec}{UNLOAD\_CLOSE}}, FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12825}12825         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12826}12826     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12827}12827 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12828}12828     \textcolor{comment}{/* Tell the stack the driver is running! */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12829}12829     if\_setdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, IFF\_DRV\_RUNNING);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12830}12830 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12831}12831     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}NIC successfully loaded\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12832}12832 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12833}12833     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12834}12834 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12835}12835 bxe\_nic\_load\_error3:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12836}12836 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12837}12837     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12838}12838         \mbox{\hyperlink{bxe_8c_a230ff44ea3aff5c5899ee8907f890f66}{bxe\_int\_disable\_sync}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12839}12839 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12840}12840         \textcolor{comment}{/* clean out queued objects */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12841}12841         \mbox{\hyperlink{bxe_8c_ae85a9f0c5f648920c50a860997039081}{bxe\_squeeze\_objects}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12842}12842     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12843}12843 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12844}12844     \mbox{\hyperlink{bxe_8c_afaf5ed29d000f45cc1191ed8e8e20c83}{bxe\_interrupt\_detach}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12845}12845 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12846}12846 bxe\_nic\_load\_error2:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12847}12847 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12848}12848     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc) \&\& !\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12849}12849         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a28699b151f0e016fdf0f3ab2a320e66f}{DRV\_MSG\_CODE\_UNLOAD\_REQ\_WOL\_MCP}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12850}12850         \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_afb079547add0c5714c954ea04b9659e7}{DRV\_MSG\_CODE\_UNLOAD\_DONE}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12851}12851     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12852}12852 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12853}12853     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a0110868de441f70e8143089225b87fe0}{pmf}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12854}12854 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12855}12855 bxe\_nic\_load\_error1:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12856}12856 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12857}12857     \textcolor{comment}{/* clear pf\_load status, as it was already set */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12858}12858     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12859}12859         \mbox{\hyperlink{bxe_8c_a3b974b2a5d6d0486240139fe74ec362d}{bxe\_clear\_pf\_load}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12860}12860     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12861}12861 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12862}12862 bxe\_nic\_load\_error0:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12863}12863 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12864}12864     \mbox{\hyperlink{bxe_8c_a5ed8b0cde61b05bee51f5a9925d30d55}{bxe\_free\_fw\_stats\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12865}12865     \mbox{\hyperlink{bxe_8c_a7a62f7cb289e73886ab83bef2ba23505}{bxe\_free\_fp\_buffers}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12866}12866     \mbox{\hyperlink{bxe_8c_aba6356efb089c0f887dea37803476f0a}{bxe\_free\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12867}12867 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12868}12868     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12869}12869 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12870}12870 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12871}12871 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12872}\mbox{\hyperlink{bxe_8c_a4d3093814fd53cc5033263719a5d0c02}{12872}} \mbox{\hyperlink{bxe_8c_a4d3093814fd53cc5033263719a5d0c02}{bxe\_init\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12873}12873 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12874}12874     \textcolor{keywordtype}{int} other\_engine = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? 0 : 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12875}12875     uint8\_t other\_load\_status, load\_status;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12876}12876     uint8\_t global = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12877}12877     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12878}12878 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12879}12879     \mbox{\hyperlink{bxe_8h_a9e59019dafc482034b9e64604ce070ee}{BXE\_CORE\_LOCK\_ASSERT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12880}12880 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12881}12881     \textcolor{comment}{/* check if the driver is already running */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12882}12882     \textcolor{keywordflow}{if} (if\_getdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12883}12883         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Init called while driver is running!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12884}12884         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12885}12885     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12886}12886 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12887}12887     \textcolor{keywordflow}{if}((sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a5a1e7f4ddce5905de492f6d833748bf0}{BXE\_STATE\_ERROR}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12888}12888         (sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} == \mbox{\hyperlink{bxe_8h_a88bd3b46feb9d35c3dd74a03206c034b}{BXE\_RECOVERY\_FAILED}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12889}12889         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Initialization not done, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12890}12890                   \textcolor{stringliteral}{"{}as previous recovery failed."{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12891}12891                   \textcolor{stringliteral}{"{}Reboot/Power-\/cycle the system\(\backslash\)n"{}} );}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12892}12892         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12893}12893     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12894}12894 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12895}12895 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12896}12896     \mbox{\hyperlink{bxe_8c_ac92bd4a821d19305e1e7810951283474}{bxe\_set\_power\_state}}(sc, \mbox{\hyperlink{bxe_8h_a0d294d030355eb0d4097dc557cac6b58}{PCI\_PM\_D0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12897}12897 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12898}12898     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12899}12899 \textcolor{comment}{     * If parity occurred during the unload, then attentions and/or}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12900}12900 \textcolor{comment}{     * RECOVERY\_IN\_PROGRES may still be set. If so we want the first function}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12901}12901 \textcolor{comment}{     * loaded on the current engine to complete the recovery. Parity recovery}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12902}12902 \textcolor{comment}{     * is only relevant for PF driver.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12903}12903 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12904}12904     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12905}12905         other\_load\_status = \mbox{\hyperlink{bxe_8c_abf586202f0932ef109178a8b30f26505}{bxe\_get\_load\_status}}(sc, other\_engine);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12906}12906         load\_status = \mbox{\hyperlink{bxe_8c_abf586202f0932ef109178a8b30f26505}{bxe\_get\_load\_status}}(sc, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12907}12907 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12908}12908         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8c_aa8e60d884e752f4c51c8a313f973d00d}{bxe\_reset\_is\_done}}(sc, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc)) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12909}12909             \mbox{\hyperlink{bxe_8c_a91656b2ffc7fe1c9ff94a04e05056801}{bxe\_chk\_parity\_attn}}(sc, \&global, TRUE)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12910}12910             \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12911}12911                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12912}12912 \textcolor{comment}{                 * If there are attentions and they are in global blocks, set}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12913}12913 \textcolor{comment}{                 * the GLOBAL\_RESET bit regardless whether it will be this}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12914}12914 \textcolor{comment}{                 * function that will complete the recovery or not.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12915}12915 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12916}12916                 \textcolor{keywordflow}{if} (global) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12917}12917                     \mbox{\hyperlink{bxe_8c_a7de36a383e6f8ea6b0d5b095d815875e}{bxe\_set\_reset\_global}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12918}12918                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12919}12919 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12920}12920                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12921}12921 \textcolor{comment}{                 * Only the first function on the current engine should try}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12922}12922 \textcolor{comment}{                 * to recover in open. In case of attentions in global blocks}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12923}12923 \textcolor{comment}{                 * only the first in the chip should try to recover.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12924}12924 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12925}12925                 \textcolor{keywordflow}{if} ((!load\_status \&\& (!global || !other\_load\_status)) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12926}12926                     \mbox{\hyperlink{bxe_8c_ad9cfd4a8a15df94a0a900aa15d658489}{bxe\_trylock\_leader\_lock}}(sc) \&\& !\mbox{\hyperlink{bxe_8c_ab8b3a86c4bf8245e1dd5247efb2b6dd5}{bxe\_leader\_reset}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12927}12927                     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Recovered during init\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12928}12928                     \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12929}12929                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12930}12930 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12931}12931                 \textcolor{comment}{/* recovery has failed... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12932}12932                 \mbox{\hyperlink{bxe_8c_ac92bd4a821d19305e1e7810951283474}{bxe\_set\_power\_state}}(sc, \mbox{\hyperlink{bxe_8h_ad277d1b54abecb64cd33b81db85bfe4a}{PCI\_PM\_D3hot}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12933}12933                 sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} = \mbox{\hyperlink{bxe_8h_a88bd3b46feb9d35c3dd74a03206c034b}{BXE\_RECOVERY\_FAILED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12934}12934 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12935}12935                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Recovery flow hasn't properly "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12936}12936                           \textcolor{stringliteral}{"{}completed yet, try again later. "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12937}12937                           \textcolor{stringliteral}{"{}If you still see this message after a "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12938}12938                           \textcolor{stringliteral}{"{}few retries then power cycle is required.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12939}12939 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12940}12940                 rc = ENXIO;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12941}12941                 \textcolor{keywordflow}{goto} bxe\_init\_locked\_done;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12942}12942             \} \textcolor{keywordflow}{while} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12943}12943         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12944}12944     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12945}12945 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12946}12946     sc-\/>\mbox{\hyperlink{structbxe__softc_a6b259373d1e71a9e0be3cfa43d7b79c1}{recovery\_state}} = \mbox{\hyperlink{bxe_8h_ae70e8a5625712b5a0f3c8c9af5107e5b}{BXE\_RECOVERY\_DONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12947}12947 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12948}12948     rc = \mbox{\hyperlink{bxe_8c_aa29198c57a0a0a54875358ed35334453}{bxe\_nic\_load}}(sc, \mbox{\hyperlink{bxe_8h_a8b77ff4c229579d4b80c359c7d3a4c76}{LOAD\_OPEN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12949}12949 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12950}12950 bxe\_init\_locked\_done:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12951}12951 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12952}12952     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12953}12953         \textcolor{comment}{/* Tell the stack the driver is NOT running! */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12954}12954         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Initialization failed, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12955}12955                   \textcolor{stringliteral}{"{}stack notified driver is NOT running!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12956}12956         if\_setdrvflagbits(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, 0, IFF\_DRV\_RUNNING);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12957}12957     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12958}12958 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12959}12959     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12960}12960 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12961}12961 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12962}12962 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12963}\mbox{\hyperlink{bxe_8c_af3af3c28c0e5d3f4eeea043b064421a0}{12963}} \mbox{\hyperlink{bxe_8c_af3af3c28c0e5d3f4eeea043b064421a0}{bxe\_stop\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12964}12964 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12965}12965     \mbox{\hyperlink{bxe_8h_a9e59019dafc482034b9e64604ce070ee}{BXE\_CORE\_LOCK\_ASSERT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12966}12966     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{bxe\_nic\_unload}}(sc, \mbox{\hyperlink{bxe_8h_ad4f9da781b53a5b5d5718a12732ccace}{UNLOAD\_NORMAL}}, TRUE));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12967}12967 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12968}12968 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12969}12969 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12970}12970 \textcolor{comment}{ * Handles controller initialization when called from an unlocked routine.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12971}12971 \textcolor{comment}{ * ifconfig calls this function.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12972}12972 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12973}12973 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12974}12974 \textcolor{comment}{ *   void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12975}12975 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12976}12976 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12977}\mbox{\hyperlink{bxe_8c_af926b4e684206feb0ed45c0a626d9d77}{12977}} \mbox{\hyperlink{bxe_8c_af926b4e684206feb0ed45c0a626d9d77}{bxe\_init}}(\textcolor{keywordtype}{void} *xsc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12978}12978 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12979}12979     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)xsc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12980}12980 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12981}12981     \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12982}12982     \mbox{\hyperlink{bxe_8c_a4d3093814fd53cc5033263719a5d0c02}{bxe\_init\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12983}12983     \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12984}12984 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12985}12985 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12986}12986 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12987}\mbox{\hyperlink{bxe_8c_ac6967857f724264368500dc3560bab01}{12987}} \mbox{\hyperlink{bxe_8c_ac6967857f724264368500dc3560bab01}{bxe\_init\_ifnet}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12988}12988 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12989}12989     if\_t \mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12990}12990     \textcolor{keywordtype}{int} capabilities;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12991}12991 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12992}12992     \textcolor{comment}{/* ifconfig entrypoint for media type/status reporting */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12993}12993     ifmedia\_init(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}}, IFM\_IMASK,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12994}12994                  \mbox{\hyperlink{bxe_8c_ae93a31210137480069624faaaa30aba0}{bxe\_ifmedia\_update}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12995}12995                  \mbox{\hyperlink{bxe_8c_a2cc3575690a7fd98d1bf3242bb15f456}{bxe\_ifmedia\_status}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12996}12996 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12997}12997     \textcolor{comment}{/* set the default interface values */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12998}12998     ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}}, (IFM\_ETHER | IFM\_FDX | sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}}), 0, NULL);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l12999}12999     ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}}, (IFM\_ETHER | IFM\_AUTO), 0, NULL);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13000}13000     ifmedia\_set(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}}, (IFM\_ETHER | IFM\_AUTO));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13001}13001 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13002}13002     sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}}.ifm\_media = sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}}.ifm\_cur-\/>ifm\_media; \textcolor{comment}{/* XXX ? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13003}13003         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}IFMEDIA flags : \%x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}}.ifm\_media);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13004}13004 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13005}13005     \textcolor{comment}{/* allocate the ifnet structure */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13006}13006     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} = if\_gethandle(IFT\_ETHER)) == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13007}13007         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Interface allocation failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13008}13008         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13009}13009     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13010}13010 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13011}13011     if\_setsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13012}13012     if\_initname(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, device\_get\_name(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}), device\_get\_unit(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13013}13013     if\_setflags(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, (IFF\_BROADCAST | IFF\_SIMPLEX | IFF\_MULTICAST));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13014}13014     if\_setioctlfn(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \mbox{\hyperlink{bxe_8c_aa1947455972f6d27958d07910f4c7827}{bxe\_ioctl}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13015}13015     if\_setstartfn(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \mbox{\hyperlink{bxe_8c_a30e940d2b3c369ba3a9017b19a40b11e}{bxe\_tx\_start}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13016}13016     if\_setgetcounterfn(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \mbox{\hyperlink{bxe__stats_8c_a3f760a100e53d5f95736a9cb35bf620d}{bxe\_get\_counter}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13017}13017     if\_settransmitfn(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \mbox{\hyperlink{bxe_8c_aeb41473f0e499df6f5116980e42795ef}{bxe\_tx\_mq\_start}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13018}13018     if\_setqflushfn(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \mbox{\hyperlink{bxe_8c_a8afddc02f1305a83bc03474445608fac}{bxe\_mq\_flush}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13019}13019     if\_setinitfn(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \mbox{\hyperlink{bxe_8c_af926b4e684206feb0ed45c0a626d9d77}{bxe\_init}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13020}13020     if\_setmtu(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13021}13021     if\_sethwassist(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, (CSUM\_IP      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13022}13022                         CSUM\_TCP      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13023}13023                         CSUM\_UDP      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13024}13024                         CSUM\_TSO      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13025}13025                         \mbox{\hyperlink{bxe_8c_a56b8481078a714eaa80d3021e9018375}{CSUM\_TCP\_IPV6}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13026}13026                         \mbox{\hyperlink{bxe_8c_a37bf64f3447600af0819e071353fdfc6}{CSUM\_UDP\_IPV6}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13027}13027 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13028}13028     capabilities =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13029}13029         (IFCAP\_VLAN\_MTU       |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13030}13030          IFCAP\_VLAN\_HWTAGGING |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13031}13031          IFCAP\_VLAN\_HWTSO     |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13032}13032          IFCAP\_VLAN\_HWFILTER  |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13033}13033          IFCAP\_VLAN\_HWCSUM    |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13034}13034          IFCAP\_HWCSUM         |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13035}13035          IFCAP\_JUMBO\_MTU      |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13036}13036          IFCAP\_LRO            |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13037}13037          IFCAP\_TSO4           |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13038}13038          IFCAP\_TSO6           |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13039}13039          IFCAP\_WOL\_MAGIC);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13040}13040     if\_setcapabilitiesbit(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, capabilities, 0); \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13041}13041     if\_setcapenable(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, if\_getcapabilities(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13042}13042     if\_setbaudrate(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, IF\_Gbps(10));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13043}13043 \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13044}13044     if\_setsendqlen(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ae54ae6772bbb2b9435620aac68777c5f}{tx\_ring\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13045}13045     if\_setsendqready(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13046}13046 \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13047}13047 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13048}13048     sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} = \mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13049}13049 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13050}13050     \textcolor{comment}{/* attach to the Ethernet interface list */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13051}13051     ether\_ifattach(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13052}13052 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13053}13053     \textcolor{comment}{/* Attach driver debugnet methods. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13054}13054     DEBUGNET\_SET(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, bxe);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13055}13055 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13056}13056     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13057}13057 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13058}13058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13059}13059 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13060}\mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{13060}} \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13061}13061 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13062}13062     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13063}13063 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13064}13064     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a11bdbeb0f844db1d203f2b8f6f29ca5c}{MAX\_BARS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13065}13065         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13066}13066             bus\_release\_resource(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13067}13067                                  SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13068}13068                                  sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a4499fc4ffb3f50249a402734f74473f9}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13069}13069                                  sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13070}13070             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Released PCI BAR\%d [\%02x] memory\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13071}13071                   i, PCIR\_BAR(i));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13072}13072         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13073}13073     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13074}13074 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13075}13075 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13076}13076 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13077}\mbox{\hyperlink{bxe_8c_ad0758168a7b5572e84dea0abc36733e5}{13077}} \mbox{\hyperlink{bxe_8c_ad0758168a7b5572e84dea0abc36733e5}{bxe\_allocate\_bars}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13078}13078 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13079}13079     u\_int \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13080}13080     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13081}13081 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13082}13082     memset(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}, 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13083}13083 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13084}13084     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a11bdbeb0f844db1d203f2b8f6f29ca5c}{MAX\_BARS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13085}13085 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13086}13086         \textcolor{comment}{/* memory resources reside at BARs 0, 2, 4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13087}13087         \textcolor{comment}{/* Run `pciconf -\/lb` to see mappings */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13088}13088         \textcolor{keywordflow}{if} ((i != 0) \&\& (i != 2) \&\& (i != 4)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13089}13089             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13090}13090         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13091}13091 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13092}13092         sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a4499fc4ffb3f50249a402734f74473f9}{rid}} = PCIR\_BAR(i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13093}13093 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13094}13094         \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} = RF\_ACTIVE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13095}13095         \textcolor{keywordflow}{if} (i == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13096}13096             \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} |= RF\_SHAREABLE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13097}13097         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13098}13098 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13099}13099         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13100}13100              bus\_alloc\_resource\_any(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13101}13101                                     SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13102}13102                                     \&sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a4499fc4ffb3f50249a402734f74473f9}{rid}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13103}13103                                     \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}})) == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13104}13104             \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13105}13105         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13106}13106 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13107}13107         sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_ac5332e395c57aaf5ebdca5ff35d96cd3}{tag}}    = rman\_get\_bustag(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13108}13108         sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a7de264b12dc05a944543a1f6817c17ec}{handle}} = rman\_get\_bushandle(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13109}13109         sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_aa73ed950488e7fdbd2a2a420520f8228}{kva}}    = (vm\_offset\_t)rman\_get\_virtual(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13110}13110 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13111}13111         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}PCI BAR\%d [\%02x] memory allocated: \%\#jx-\/\%\#jx (\%jd) -\/> \%\#jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13112}13112               i, PCIR\_BAR(i),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13113}13113               rman\_get\_start(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13114}13114               rman\_get\_end(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13115}13115               rman\_get\_size(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_a25652e113b579fe96d3c0608bff00663}{resource}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13116}13116               (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[i].\mbox{\hyperlink{structbxe__bar_aa73ed950488e7fdbd2a2a420520f8228}{kva}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13117}13117     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13118}13118 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13119}13119     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13120}13120 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13121}13121 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13122}13122 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13123}\mbox{\hyperlink{bxe_8c_aabb250d6fc49990b9a32e8b3a2e34ecd}{13123}} \mbox{\hyperlink{bxe_8c_aabb250d6fc49990b9a32e8b3a2e34ecd}{bxe\_get\_function\_num}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13124}13124 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13125}13125     uint32\_t val = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13126}13126 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13127}13127     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13128}13128 \textcolor{comment}{     * Read the ME register to get the function number. The ME register}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13129}13129 \textcolor{comment}{     * holds the relative-\/function number and absolute-\/function number. The}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13130}13130 \textcolor{comment}{     * absolute-\/function number appears only in E2 and above. Before that}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13131}13131 \textcolor{comment}{     * these bits always contained zero, therefore we cannot blindly use them.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13132}13132 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13133}13133 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13134}13134     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1f070acf69ea9a81a11b6b068fe6e4a1}{BAR\_ME\_REGISTER}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13135}13135 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13136}13136     sc-\/>\mbox{\hyperlink{structbxe__softc_ad5e234e0395f2dced1cbcb49879230fa}{pfunc\_rel}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13137}13137         (uint8\_t)((val \& \mbox{\hyperlink{ecore__reg_8h_acaa9188a2b71727aa2c6101fe3b18b0d}{ME\_REG\_PF\_NUM}}) >> \mbox{\hyperlink{ecore__reg_8h_aadf9c07cca8191f69096d55096d40d36}{ME\_REG\_PF\_NUM\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13138}13138     sc-\/>\mbox{\hyperlink{structbxe__softc_aa8792d0d34e782a776f9107eb249ad4d}{path\_id}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13139}13139         (uint8\_t)((val \& \mbox{\hyperlink{ecore__reg_8h_a79cf0fa20a455acf3382e18028701683}{ME\_REG\_ABS\_PF\_NUM}}) >> \mbox{\hyperlink{ecore__reg_8h_ab0e55d4a5be043330138515cf38a7a8a}{ME\_REG\_ABS\_PF\_NUM\_SHIFT}}) \& 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13140}13140 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13141}13141     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a41dbd7d7b2c3e98bd56fa929b0bb9710}{CHIP\_PORT\_MODE}}(sc) == \mbox{\hyperlink{bxe_8h_a016d31fc3005f6b5e4018d33ac1fd028}{CHIP\_4\_PORT\_MODE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13142}13142         sc-\/>\mbox{\hyperlink{structbxe__softc_a1a354b27a35ec8c48f7d02ab164949c6}{pfunc\_abs}} = ((sc-\/>\mbox{\hyperlink{structbxe__softc_ad5e234e0395f2dced1cbcb49879230fa}{pfunc\_rel}} << 1) | sc-\/>\mbox{\hyperlink{structbxe__softc_aa8792d0d34e782a776f9107eb249ad4d}{path\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13143}13143     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13144}13144         sc-\/>\mbox{\hyperlink{structbxe__softc_a1a354b27a35ec8c48f7d02ab164949c6}{pfunc\_abs}} = (sc-\/>\mbox{\hyperlink{structbxe__softc_ad5e234e0395f2dced1cbcb49879230fa}{pfunc\_rel}} | sc-\/>\mbox{\hyperlink{structbxe__softc_aa8792d0d34e782a776f9107eb249ad4d}{path\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13145}13145     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13146}13146 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13147}13147     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13148}13148           \textcolor{stringliteral}{"{}Relative function \%d, Absolute function \%d, Path \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13149}13149           sc-\/>\mbox{\hyperlink{structbxe__softc_ad5e234e0395f2dced1cbcb49879230fa}{pfunc\_rel}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a1a354b27a35ec8c48f7d02ab164949c6}{pfunc\_abs}}, sc-\/>\mbox{\hyperlink{structbxe__softc_aa8792d0d34e782a776f9107eb249ad4d}{path\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13150}13150 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13151}13151 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13152}13152 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13153}\mbox{\hyperlink{bxe_8c_a3a16f214808fe09dbeead42f7aa65945}{13153}} \mbox{\hyperlink{bxe_8c_a3a16f214808fe09dbeead42f7aa65945}{bxe\_get\_shmem\_mf\_cfg\_base}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13154}13154 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13155}13155     uint32\_t shmem2\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13156}13156     uint32\_t \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13157}13157     uint32\_t mf\_cfg\_offset\_value;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13158}13158 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13159}13159     \textcolor{comment}{/* Non 57712 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13160}13160     \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} = (\mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, func\_mb) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13161}13161               (\mbox{\hyperlink{bxe_8h_a4e01754bfb16e04132961c9211444463}{MAX\_FUNC\_NUM}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structdrv__func__mb}{drv\_func\_mb}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13162}13162 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13163}13163     \textcolor{comment}{/* 57712 plus */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13164}13164     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2ea341c2b43f033f56e70c9a5cd63e0d}{shmem2\_base}} != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13165}13165         shmem2\_size = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13166}13166         \textcolor{keywordflow}{if} (shmem2\_size > offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structshmem2__region}{shmem2\_region}}, mf\_cfg\_addr)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13167}13167             mf\_cfg\_offset\_value = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, mf\_cfg\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13168}13168             \textcolor{keywordflow}{if} (\mbox{\hyperlink{ecore__hsi_8h_adaa5e655af8071790b9877710c5dabf4}{SHMEM\_MF\_CFG\_ADDR\_NONE}} != mf\_cfg\_offset\_value) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13169}13169                 \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} = mf\_cfg\_offset\_value;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13170}13170             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13171}13171         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13172}13172     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13173}13173 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13174}13174     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13175}13175 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13176}13176 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13177}13177 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13178}\mbox{\hyperlink{bxe_8c_a6f37eb9b21c56131baddc85f18df5aa5}{13178}} \mbox{\hyperlink{bxe_8c_a6f37eb9b21c56131baddc85f18df5aa5}{bxe\_pcie\_capability\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13179}13179                          \textcolor{keywordtype}{int}    reg,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13180}13180                          \textcolor{keywordtype}{int}    width)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13181}13181 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13182}13182     \textcolor{keywordtype}{int} pcie\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13183}13183 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13184}13184     \textcolor{comment}{/* ensure PCIe capability is enabled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13185}13185     \textcolor{keywordflow}{if} (pci\_find\_cap(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, PCIY\_EXPRESS, \&pcie\_reg) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13186}13186         \textcolor{keywordflow}{if} (pcie\_reg != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13187}13187             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PCIe capability at 0x\%04x\(\backslash\)n"{}}, pcie\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13188}13188             \textcolor{keywordflow}{return} (pci\_read\_config(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, (pcie\_reg + reg), width));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13189}13189         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13190}13190     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13191}13191 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13192}13192     \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PCIe capability NOT FOUND!!!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13193}13193 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13194}13194     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13195}13195 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13196}13196 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13197}13197 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13198}\mbox{\hyperlink{bxe_8c_a75d25fa6159827fb2fbce7abd7f53068}{13198}} \mbox{\hyperlink{bxe_8c_a75d25fa6159827fb2fbce7abd7f53068}{bxe\_is\_pcie\_pending}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13199}13199 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13200}13200     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a6f37eb9b21c56131baddc85f18df5aa5}{bxe\_pcie\_capability\_read}}(sc, PCIER\_DEVICE\_STA, 2) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13201}13201             PCIEM\_STA\_TRANSACTION\_PND);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13202}13202 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13203}13203 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13204}13204 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13205}13205 \textcolor{comment}{ * Walk the PCI capabiites list for the device to find what features are}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13206}13206 \textcolor{comment}{ * supported. These capabilites may be enabled/disabled by firmware so it's}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13207}13207 \textcolor{comment}{ * best to walk the list rather than make assumptions.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13208}13208 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13209}13209 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13210}\mbox{\hyperlink{bxe_8c_ae3f69fe5ae4637d406d961b3fdeff167}{13210}} \mbox{\hyperlink{bxe_8c_ae3f69fe5ae4637d406d961b3fdeff167}{bxe\_probe\_pci\_caps}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13211}13211 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13212}13212     uint16\_t link\_status;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13213}13213     \textcolor{keywordtype}{int} reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13214}13214 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13215}13215     \textcolor{comment}{/* check if PCI Power Management is enabled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13216}13216     \textcolor{keywordflow}{if} (pci\_find\_cap(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, PCIY\_PMG, \&reg) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13217}13217         \textcolor{keywordflow}{if} (reg != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13218}13218             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Found PM capability at 0x\%04x\(\backslash\)n"{}}, reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13219}13219 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13220}13220             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} |= \mbox{\hyperlink{bxe_8h_a321e324c6872c79cea7cf48d589d6d72}{BXE\_PM\_CAPABLE\_FLAG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13221}13221             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a8840bb68978b0115bfc2bf86febad20d}{pcie\_pm\_cap\_reg}} = (uint16\_t)reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13222}13222         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13223}13223     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13224}13224 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13225}13225     link\_status = \mbox{\hyperlink{bxe_8c_a6f37eb9b21c56131baddc85f18df5aa5}{bxe\_pcie\_capability\_read}}(sc, PCIER\_LINK\_STA, 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13226}13226 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13227}13227     \textcolor{comment}{/* handle PCIe 2.0 workarounds for 57710 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13228}13228     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13229}13229         \textcolor{comment}{/* workaround for 57710 errata E4\_57710\_27462 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13230}13230         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a1a40a4489eeaa9324cc15ff53f2da3eb}{pcie\_link\_speed}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13231}13231             (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, 0x3d04) \& (1 << 24)) ? 2 : 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13232}13232 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13233}13233         \textcolor{comment}{/* workaround for 57710 errata E4\_57710\_27488 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13234}13234         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2819b7494b4b77f5a91f866e68b7b40f}{pcie\_link\_width}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13235}13235             ((link\_status \& PCIEM\_LINK\_STA\_WIDTH) >> 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13236}13236         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a1a40a4489eeaa9324cc15ff53f2da3eb}{pcie\_link\_speed}} > 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13237}13237             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2819b7494b4b77f5a91f866e68b7b40f}{pcie\_link\_width}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13238}13238                 ((link\_status \& PCIEM\_LINK\_STA\_WIDTH) >> 4) >> 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13239}13239         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13240}13240     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13241}13241         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a1a40a4489eeaa9324cc15ff53f2da3eb}{pcie\_link\_speed}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13242}13242             (link\_status \& PCIEM\_LINK\_STA\_SPEED);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13243}13243         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2819b7494b4b77f5a91f866e68b7b40f}{pcie\_link\_width}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13244}13244             ((link\_status \& PCIEM\_LINK\_STA\_WIDTH) >> 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13245}13245     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13246}13246 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13247}13247     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PCIe link speed=\%d width=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13248}13248           sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a1a40a4489eeaa9324cc15ff53f2da3eb}{pcie\_link\_speed}}, sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2819b7494b4b77f5a91f866e68b7b40f}{pcie\_link\_width}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13249}13249 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13250}13250     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} |= \mbox{\hyperlink{bxe_8h_aae9dee471bb3be81592d6fdf96f24b6e}{BXE\_PCIE\_CAPABLE\_FLAG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13251}13251     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ab69c9a8e2a928f4d252f8a76a0fb01f6}{pcie\_pcie\_cap\_reg}} = (uint16\_t)reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13252}13252 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13253}13253     \textcolor{comment}{/* check if MSI capability is enabled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13254}13254     \textcolor{keywordflow}{if} (pci\_find\_cap(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, PCIY\_MSI, \&reg) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13255}13255         \textcolor{keywordflow}{if} (reg != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13256}13256             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Found MSI capability at 0x\%04x\(\backslash\)n"{}}, reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13257}13257 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13258}13258             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} |= \mbox{\hyperlink{bxe_8h_a5a9a3bd22c6b1448c3a7927044be26eb}{BXE\_MSI\_CAPABLE\_FLAG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13259}13259             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2c5ec8ba2c163ad29bdb5ce8cde18cb}{pcie\_msi\_cap\_reg}} = (uint16\_t)reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13260}13260         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13261}13261     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13262}13262 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13263}13263     \textcolor{comment}{/* check if MSI-\/X capability is enabled */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13264}13264     \textcolor{keywordflow}{if} (pci\_find\_cap(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, PCIY\_MSIX, \&reg) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13265}13265         \textcolor{keywordflow}{if} (reg != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13266}13266             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Found MSI-\/X capability at 0x\%04x\(\backslash\)n"{}}, reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13267}13267 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13268}13268             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa0a5a2350ce481f076117ea31a6720b7}{pcie\_cap\_flags}} |= \mbox{\hyperlink{bxe_8h_a3e2c0aaf911e86628b74b189c0e1a3a8}{BXE\_MSIX\_CAPABLE\_FLAG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13269}13269             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa977fabc99ea64e50ad8726a7f9955fb}{pcie\_msix\_cap\_reg}} = (uint16\_t)reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13270}13270         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13271}13271     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13272}13272 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13273}13273 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13274}13274 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13275}\mbox{\hyperlink{bxe_8c_a2947323fa0523f94cb679c9f392e17f1}{13275}} \mbox{\hyperlink{bxe_8c_a2947323fa0523f94cb679c9f392e17f1}{bxe\_get\_shmem\_mf\_cfg\_info\_sd}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13276}13276 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13277}13277     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__mf__info}{bxe\_mf\_info}} *mf\_info = \&sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13278}13278     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13279}13279 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13280}13280     \textcolor{comment}{/* get the outer vlan if we're in switch-\/dependent mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13281}13281 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13282}13282     val = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].e1hov\_tag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13283}13283     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1a275cda38483fc75d7ee06128929d4f}{ext\_id}} = (uint16\_t)val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13284}13284 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13285}13285     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13286}13286 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13287}13287     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a128b93dba9a9c05b7d34cd133c92bbf1}{VALID\_OVLAN}}(mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1a275cda38483fc75d7ee06128929d4f}{ext\_id}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13288}13288         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid VLAN (\%d)\(\backslash\)n"{}}, mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1a275cda38483fc75d7ee06128929d4f}{ext\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13289}13289         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13290}13290     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13291}13291 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13292}13292     \textcolor{comment}{/* get the capabilities */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13293}13293     \textcolor{keywordflow}{if} ((mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)] \& \mbox{\hyperlink{ecore__hsi_8h_a505b7bd257fd47345a630afdc7203fbf}{FUNC\_MF\_CFG\_PROTOCOL\_MASK}}) ==}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13294}13294         \mbox{\hyperlink{ecore__hsi_8h_ac98ae6899054c30cb1fe974bb277184b}{FUNC\_MF\_CFG\_PROTOCOL\_ISCSI}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13295}13295         mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a23553bc641ca8bd9915fa23e82489192}{mf\_protos\_supported}} |= \mbox{\hyperlink{bxe_8h_ab22d46d764beb5d693ddfb1fe06c5a16}{MF\_PROTO\_SUPPORT\_ISCSI}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13296}13296     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)] \& \mbox{\hyperlink{ecore__hsi_8h_a505b7bd257fd47345a630afdc7203fbf}{FUNC\_MF\_CFG\_PROTOCOL\_MASK}}) ==}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13297}13297                \mbox{\hyperlink{ecore__hsi_8h_af7e1e24696a13fca2a23c7f43f2a7352}{FUNC\_MF\_CFG\_PROTOCOL\_FCOE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13298}13298         mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a23553bc641ca8bd9915fa23e82489192}{mf\_protos\_supported}} |= \mbox{\hyperlink{bxe_8h_ab04c423c7f4d24632acf02669dac8d26}{MF\_PROTO\_SUPPORT\_FCOE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13299}13299     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13300}13300         mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a23553bc641ca8bd9915fa23e82489192}{mf\_protos\_supported}} |= \mbox{\hyperlink{bxe_8h_ade87b1ef283939ac207b2bc96d45f015}{MF\_PROTO\_SUPPORT\_ETHERNET}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13301}13301     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13302}13302 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13303}13303     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a09c867df982d9d40989ab87e19e00510}{vnics\_per\_port}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13304}13304         (\mbox{\hyperlink{bxe_8h_a41dbd7d7b2c3e98bd56fa929b0bb9710}{CHIP\_PORT\_MODE}}(sc) == \mbox{\hyperlink{bxe_8h_a016d31fc3005f6b5e4018d33ac1fd028}{CHIP\_4\_PORT\_MODE}}) ? 2 : 4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13305}13305 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13306}13306     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13307}13307 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13308}13308 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13309}13309 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13310}\mbox{\hyperlink{bxe_8c_af4a99036ce99d651707db62b2632f007}{13310}} \mbox{\hyperlink{bxe_8c_af4a99036ce99d651707db62b2632f007}{bxe\_get\_shmem\_ext\_proto\_support\_flags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13311}13311 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13312}13312     uint32\_t retval = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13313}13313     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13314}13314 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13315}13315     val = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_ext\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].func\_cfg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13316}13316 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13317}13317     \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_acaec45da7e3a45df954a8f0952aabd14}{MACP\_FUNC\_CFG\_FLAGS\_ENABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13318}13318         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_ad4437477a5e9241ebd35ec66578a3c72}{MACP\_FUNC\_CFG\_FLAGS\_ETHERNET}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13319}13319             retval |= \mbox{\hyperlink{bxe_8h_ade87b1ef283939ac207b2bc96d45f015}{MF\_PROTO\_SUPPORT\_ETHERNET}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13320}13320         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13321}13321         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_a2bc7dcbf8445c3943cc363c660509743}{MACP\_FUNC\_CFG\_FLAGS\_ISCSI\_OFFLOAD}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13322}13322             retval |= \mbox{\hyperlink{bxe_8h_ab22d46d764beb5d693ddfb1fe06c5a16}{MF\_PROTO\_SUPPORT\_ISCSI}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13323}13323         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13324}13324         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_a81a5310e6f7a1b6d213e489e19797d52}{MACP\_FUNC\_CFG\_FLAGS\_FCOE\_OFFLOAD}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13325}13325             retval |= \mbox{\hyperlink{bxe_8h_ab04c423c7f4d24632acf02669dac8d26}{MF\_PROTO\_SUPPORT\_FCOE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13326}13326         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13327}13327     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13328}13328 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13329}13329     \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13330}13330 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13331}13331 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13332}13332 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13333}\mbox{\hyperlink{bxe_8c_a9080217467310285407d0c3cf6627df3}{13333}} \mbox{\hyperlink{bxe_8c_a9080217467310285407d0c3cf6627df3}{bxe\_get\_shmem\_mf\_cfg\_info\_si}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13334}13334 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13335}13335     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__mf__info}{bxe\_mf\_info}} *mf\_info = \&sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13336}13336     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13337}13337 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13338}13338     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13339}13339 \textcolor{comment}{     * There is no outer vlan if we're in switch-\/independent mode.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13340}13340 \textcolor{comment}{     * If the mac is valid then assume multi-\/function.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13341}13341 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13342}13342 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13343}13343     val = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_ext\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].func\_cfg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13344}13344 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13345}13345     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}} = ((val \& \mbox{\hyperlink{ecore__hsi_8h_ab603936ffc854b8a52f4ed7856017fa6}{MACP\_FUNC\_CFG\_FLAGS\_MASK}}) != 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13346}13346 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13347}13347     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a23553bc641ca8bd9915fa23e82489192}{mf\_protos\_supported}} = \mbox{\hyperlink{bxe_8c_af4a99036ce99d651707db62b2632f007}{bxe\_get\_shmem\_ext\_proto\_support\_flags}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13348}13348 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13349}13349     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a09c867df982d9d40989ab87e19e00510}{vnics\_per\_port}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13350}13350         (\mbox{\hyperlink{bxe_8h_a41dbd7d7b2c3e98bd56fa929b0bb9710}{CHIP\_PORT\_MODE}}(sc) == \mbox{\hyperlink{bxe_8h_a016d31fc3005f6b5e4018d33ac1fd028}{CHIP\_4\_PORT\_MODE}}) ? 2 : 4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13351}13351 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13352}13352     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13353}13353 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13354}13354 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13355}13355 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13356}\mbox{\hyperlink{bxe_8c_a721af08c7171c69b63cd922c93faaecc}{13356}} \mbox{\hyperlink{bxe_8c_a721af08c7171c69b63cd922c93faaecc}{bxe\_get\_shmem\_mf\_cfg\_info\_niv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13357}13357 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13358}13358     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__mf__info}{bxe\_mf\_info}} *mf\_info = \&sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13359}13359     uint32\_t e1hov\_tag;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13360}13360     uint32\_t func\_config;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13361}13361     uint32\_t niv\_config;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13362}13362 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13363}13363     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13364}13364 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13365}13365     e1hov\_tag   = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].e1hov\_tag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13366}13366     func\_config = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13367}13367     niv\_config  = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].afex\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13368}13368 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13369}13369     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1a275cda38483fc75d7ee06128929d4f}{ext\_id}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13370}13370         (uint16\_t)((e1hov\_tag \& \mbox{\hyperlink{ecore__hsi_8h_a9551be74439b51957097fa8216cb75c7}{FUNC\_MF\_CFG\_E1HOV\_TAG\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13371}13371                    \mbox{\hyperlink{ecore__hsi_8h_af4104839339767a6f5dcff9e790e506a}{FUNC\_MF\_CFG\_E1HOV\_TAG\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13372}13372 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13373}13373     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a59b5c566d0cc5f7b6fe741d2aaa04551}{default\_vlan}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13374}13374         (uint16\_t)((e1hov\_tag \& \mbox{\hyperlink{ecore__hsi_8h_a15cb8ea1fbc476aabb8057b4da18eb67}{FUNC\_MF\_CFG\_AFEX\_VLAN\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13375}13375                    \mbox{\hyperlink{ecore__hsi_8h_ab194fe5df09f3a436473232c21716390}{FUNC\_MF\_CFG\_AFEX\_VLAN\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13376}13376 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13377}13377     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_ad08ac8db28ab5c2112426fec4a33f0c9}{niv\_allowed\_priorities}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13378}13378         (uint8\_t)((niv\_config \& \mbox{\hyperlink{ecore__hsi_8h_a62e73491ff94380f15a3dc4bdba5862f}{FUNC\_MF\_CFG\_AFEX\_COS\_FILTER\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13379}13379                   \mbox{\hyperlink{ecore__hsi_8h_a30ae43fefb1122c5a7692a616fc19cdf}{FUNC\_MF\_CFG\_AFEX\_COS\_FILTER\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13380}13380 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13381}13381     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_af9e4f92efbc3c60bc5bb3cb765e6e918}{niv\_default\_cos}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13382}13382         (uint8\_t)((func\_config \& \mbox{\hyperlink{ecore__hsi_8h_abf5fb37fb577ed0f639a6421ac416965}{FUNC\_MF\_CFG\_TRANSMIT\_PRIORITY\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13383}13383                   \mbox{\hyperlink{ecore__hsi_8h_ab9e31f24e00efe7fbbe4ea0d5e73f87c}{FUNC\_MF\_CFG\_TRANSMIT\_PRIORITY\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13384}13384 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13385}13385     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_ade4582ba93373f0f9c4fc3067b09153a}{afex\_vlan\_mode}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13386}13386         ((niv\_config \& \mbox{\hyperlink{ecore__hsi_8h_a6fd443da8bf776d79aff95968eba5227}{FUNC\_MF\_CFG\_AFEX\_VLAN\_MODE\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13387}13387          \mbox{\hyperlink{ecore__hsi_8h_a14aa690aa1665eab504d8ffb09626401}{FUNC\_MF\_CFG\_AFEX\_VLAN\_MODE\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13388}13388 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13389}13389     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a8d713621c265c5612c190c5fe0d132d2}{niv\_mba\_enabled}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13390}13390         ((niv\_config \& \mbox{\hyperlink{ecore__hsi_8h_a0e2c70911cb16747d77c807c32472c7d}{FUNC\_MF\_CFG\_AFEX\_MBA\_ENABLED\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13391}13391          \mbox{\hyperlink{ecore__hsi_8h_a8c39bd6f8b0db3295e5d9b15c09f26f0}{FUNC\_MF\_CFG\_AFEX\_MBA\_ENABLED\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13392}13392 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13393}13393     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a23553bc641ca8bd9915fa23e82489192}{mf\_protos\_supported}} = \mbox{\hyperlink{bxe_8c_af4a99036ce99d651707db62b2632f007}{bxe\_get\_shmem\_ext\_proto\_support\_flags}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13394}13394 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13395}13395     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a09c867df982d9d40989ab87e19e00510}{vnics\_per\_port}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13396}13396         (\mbox{\hyperlink{bxe_8h_a41dbd7d7b2c3e98bd56fa929b0bb9710}{CHIP\_PORT\_MODE}}(sc) == \mbox{\hyperlink{bxe_8h_a016d31fc3005f6b5e4018d33ac1fd028}{CHIP\_4\_PORT\_MODE}}) ? 2 : 4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13397}13397 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13398}13398     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13399}13399 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13400}13400 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13401}13401 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13402}\mbox{\hyperlink{bxe_8c_ac60428cb6a15cdb25d32f81b91e3aec0}{13402}} \mbox{\hyperlink{bxe_8c_ac60428cb6a15cdb25d32f81b91e3aec0}{bxe\_check\_valid\_mf\_cfg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13403}13403 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13404}13404     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__mf__info}{bxe\_mf\_info}} *mf\_info = \&sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13405}13405     uint32\_t mf\_cfg1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13406}13406     uint32\_t mf\_cfg2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13407}13407     uint32\_t ovlan1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13408}13408     uint32\_t ovlan2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13409}13409     uint8\_t i, j;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13410}13410 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13411}13411     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}MF config parameters for function \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13412}13412           \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13413}13413     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\(\backslash\)tmf\_config=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13414}13414           mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13415}13415     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\(\backslash\)tmulti\_vnics\_mode=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13416}13416           mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13417}13417     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\(\backslash\)tvnics\_per\_port=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13418}13418           mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a09c867df982d9d40989ab87e19e00510}{vnics\_per\_port}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13419}13419     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\(\backslash\)tovlan/vifid=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13420}13420           mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1a275cda38483fc75d7ee06128929d4f}{ext\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13421}13421     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\(\backslash\)tmin\_bw=\%d/\%d/\%d/\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13422}13422           mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_aa2d22786b5ff46de4178385f74e53529}{min\_bw}}[0], mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_aa2d22786b5ff46de4178385f74e53529}{min\_bw}}[1],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13423}13423           mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_aa2d22786b5ff46de4178385f74e53529}{min\_bw}}[2], mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_aa2d22786b5ff46de4178385f74e53529}{min\_bw}}[3]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13424}13424     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\(\backslash\)tmax\_bw=\%d/\%d/\%d/\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13425}13425           mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a164aad98a11b7d3ea84938a174515736}{max\_bw}}[0], mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a164aad98a11b7d3ea84938a174515736}{max\_bw}}[1],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13426}13426           mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a164aad98a11b7d3ea84938a174515736}{max\_bw}}[2], mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a164aad98a11b7d3ea84938a174515736}{max\_bw}}[3]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13427}13427     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}\(\backslash\)tmac\_addr: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13428}13428           sc-\/>\mbox{\hyperlink{structbxe__softc_af4d559cc56bc16a9fa22ca72ab331cb7}{mac\_addr\_str}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13429}13429 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13430}13430     \textcolor{comment}{/* various MF mode sanity checks... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13431}13431 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13432}13432     \textcolor{keywordflow}{if} (mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)] \& \mbox{\hyperlink{ecore__hsi_8h_a3953fb2d49d89b0b8d76e54292f71b7f}{FUNC\_MF\_CFG\_FUNC\_HIDE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13433}13433         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Enumerated function \%d is marked as hidden\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13434}13434               \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13435}13435         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13436}13436     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13437}13437 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13438}13438     \textcolor{keywordflow}{if} ((mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a09c867df982d9d40989ab87e19e00510}{vnics\_per\_port}} > 1) \&\& !mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13439}13439         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}vnics\_per\_port=\%d multi\_vnics\_mode=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13440}13440               mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a09c867df982d9d40989ab87e19e00510}{vnics\_per\_port}}, mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13441}13441         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13442}13442     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13443}13443 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13444}13444     \textcolor{keywordflow}{if} (mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} == \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a06c32c448971dc058e4e66ab49852014}{MULTI\_FUNCTION\_SD}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13445}13445         \textcolor{comment}{/* vnic id > 0 must have valid ovlan in switch-\/dependent mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13446}13446         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc) > 0) \&\& !\mbox{\hyperlink{bxe_8h_a128b93dba9a9c05b7d34cd133c92bbf1}{VALID\_OVLAN}}(\mbox{\hyperlink{bxe_8h_a2bdf5604b397316681ae5b4ecfbdc553}{OVLAN}}(sc))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13447}13447             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}mf\_mode=SD vnic\_id=\%d ovlan=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13448}13448                   \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc), \mbox{\hyperlink{bxe_8h_a2bdf5604b397316681ae5b4ecfbdc553}{OVLAN}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13449}13449             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13450}13450         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13451}13451 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13452}13452         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a128b93dba9a9c05b7d34cd133c92bbf1}{VALID\_OVLAN}}(\mbox{\hyperlink{bxe_8h_a2bdf5604b397316681ae5b4ecfbdc553}{OVLAN}}(sc)) \&\& mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13453}13453             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}mf\_mode=SD multi\_vnics\_mode=\%d ovlan=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13454}13454                   mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}}, \mbox{\hyperlink{bxe_8h_a2bdf5604b397316681ae5b4ecfbdc553}{OVLAN}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13455}13455             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13456}13456         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13457}13457 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13458}13458         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13459}13459 \textcolor{comment}{         * Verify all functions are either MF or SF mode. If MF, make sure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13460}13460 \textcolor{comment}{         * sure that all non-\/hidden functions have a valid ovlan. If SF,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13461}13461 \textcolor{comment}{         * make sure that all non-\/hidden functions have an invalid ovlan.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13462}13462 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13463}13463         \mbox{\hyperlink{bxe_8h_a901bc3d3acc36c7deb632bde1de11c84}{FOREACH\_ABS\_FUNC\_IN\_PORT}}(sc, i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13464}13464             mf\_cfg1 = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[i].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13465}13465             ovlan1  = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[i].e1hov\_tag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13466}13466             \textcolor{keywordflow}{if} (!(mf\_cfg1 \& \mbox{\hyperlink{ecore__hsi_8h_a3953fb2d49d89b0b8d76e54292f71b7f}{FUNC\_MF\_CFG\_FUNC\_HIDE}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13467}13467                 (((mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}}) \&\& !\mbox{\hyperlink{bxe_8h_a128b93dba9a9c05b7d34cd133c92bbf1}{VALID\_OVLAN}}(ovlan1)) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13468}13468                  ((!mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}}) \&\& \mbox{\hyperlink{bxe_8h_a128b93dba9a9c05b7d34cd133c92bbf1}{VALID\_OVLAN}}(ovlan1)))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13469}13469                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}mf\_mode=SD function \%d MF config "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13470}13470                           \textcolor{stringliteral}{"{}mismatch, multi\_vnics\_mode=\%d ovlan=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13471}13471                       i, mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}}, ovlan1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13472}13472                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13473}13473             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13474}13474         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13475}13475 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13476}13476         \textcolor{comment}{/* Verify all funcs on the same port each have a different ovlan. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13477}13477         \mbox{\hyperlink{bxe_8h_a901bc3d3acc36c7deb632bde1de11c84}{FOREACH\_ABS\_FUNC\_IN\_PORT}}(sc, i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13478}13478             mf\_cfg1 = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[i].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13479}13479             ovlan1  = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[i].e1hov\_tag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13480}13480             \textcolor{comment}{/* iterate from the next function on the port to the max func */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13481}13481             \textcolor{keywordflow}{for} (j = i + 2; j < \mbox{\hyperlink{bxe_8h_a4e01754bfb16e04132961c9211444463}{MAX\_FUNC\_NUM}}; j += 2) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13482}13482                 mf\_cfg2 = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[j].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13483}13483                 ovlan2  = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[j].e1hov\_tag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13484}13484                 \textcolor{keywordflow}{if} (!(mf\_cfg1 \& \mbox{\hyperlink{ecore__hsi_8h_a3953fb2d49d89b0b8d76e54292f71b7f}{FUNC\_MF\_CFG\_FUNC\_HIDE}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13485}13485                     \mbox{\hyperlink{bxe_8h_a128b93dba9a9c05b7d34cd133c92bbf1}{VALID\_OVLAN}}(ovlan1) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13486}13486                     !(mf\_cfg2 \& \mbox{\hyperlink{ecore__hsi_8h_a3953fb2d49d89b0b8d76e54292f71b7f}{FUNC\_MF\_CFG\_FUNC\_HIDE}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13487}13487                     \mbox{\hyperlink{bxe_8h_a128b93dba9a9c05b7d34cd133c92bbf1}{VALID\_OVLAN}}(ovlan2) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13488}13488                     (ovlan1 == ovlan2)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13489}13489                     \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}mf\_mode=SD functions \%d and \%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13490}13490                               \textcolor{stringliteral}{"{}have the same ovlan (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13491}13491                           i, j, ovlan1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13492}13492                     \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13493}13493                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13494}13494             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13495}13495         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13496}13496     \} \textcolor{comment}{/* MULTI\_FUNCTION\_SD */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13497}13497 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13498}13498     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13499}13499 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13500}13500 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13501}13501 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13502}\mbox{\hyperlink{bxe_8c_a324e188b70ae7f370d23f9f657095a5a}{13502}} \mbox{\hyperlink{bxe_8c_a324e188b70ae7f370d23f9f657095a5a}{bxe\_get\_mf\_cfg\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13503}13503 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13504}13504     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__mf__info}{bxe\_mf\_info}} *mf\_info = \&sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13505}13505     uint32\_t val, mac\_upper;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13506}13506     uint8\_t i, vnic;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13507}13507 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13508}13508     \textcolor{comment}{/* initialize mf\_info defaults */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13509}13509     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a09c867df982d9d40989ab87e19e00510}{vnics\_per\_port}}   = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13510}13510     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a1dc7f9830b4cef5955325903ba475750}{multi\_vnics\_mode}} = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13511}13511     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_abb4551aa4dfc0ae82e0ef5a89ad2c0b2}{path\_has\_ovlan}}   = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13512}13512     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}}          = \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a7409d144f7e23576153fa2ebd4765056}{SINGLE\_FUNCTION}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13513}13513 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13514}13514     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a36268a8231d3138521710790c2519500}{CHIP\_IS\_MF\_CAP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13515}13515         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13516}13516     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13517}13517 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13518}13518     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a78809e8ffa280f28b1496a0c8a7bd25c}{mf\_cfg\_base}} == \mbox{\hyperlink{ecore__hsi_8h_adaa5e655af8071790b9877710c5dabf4}{SHMEM\_MF\_CFG\_ADDR\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13519}13519         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid mf\_cfg\_base!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13520}13520         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13521}13521     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13522}13522 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13523}13523     \textcolor{comment}{/* get the MF mode (switch dependent / independent / single-\/function) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13524}13524 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13525}13525     val = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.shared\_feature\_config.config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13526}13526 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13527}13527     \textcolor{keywordflow}{switch} (val \& \mbox{\hyperlink{ecore__hsi_8h_a4083b4dfa3533c6c7371d9efda36ff63}{SHARED\_FEAT\_CFG\_FORCE\_SF\_MODE\_MASK}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13528}13528     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13529}13529     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a5dbd06cd2d52ea2259cc8fcdaaaf02b5}{SHARED\_FEAT\_CFG\_FORCE\_SF\_MODE\_SWITCH\_INDEPT}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13530}13530 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13531}13531         mac\_upper = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].mac\_upper);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13532}13532 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13533}13533         \textcolor{comment}{/* check for legal upper mac bytes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13534}13534         \textcolor{keywordflow}{if} (mac\_upper != \mbox{\hyperlink{ecore__hsi_8h_a2c8f00bae981b1f3a5c541d7f1266a4c}{FUNC\_MF\_CFG\_UPPERMAC\_DEFAULT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13535}13535             mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} = \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a2f41465e78a44a916f834f175638c80a}{MULTI\_FUNCTION\_SI}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13536}13536         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13537}13537             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid config for Switch Independent mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13538}13538         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13539}13539 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13540}13540         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13541}13541 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13542}13542     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a80d77947324d84295316b4c6496a82a1}{SHARED\_FEAT\_CFG\_FORCE\_SF\_MODE\_MF\_ALLOWED}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13543}13543     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a5bbd8f57ceae116d164db2f0cde69c39}{SHARED\_FEAT\_CFG\_FORCE\_SF\_MODE\_SPIO4}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13544}13544 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13545}13545         \textcolor{comment}{/* get outer vlan configuration */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13546}13546         val = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].e1hov\_tag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13547}13547 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13548}13548         \textcolor{keywordflow}{if} ((val \& \mbox{\hyperlink{ecore__hsi_8h_a9551be74439b51957097fa8216cb75c7}{FUNC\_MF\_CFG\_E1HOV\_TAG\_MASK}}) !=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13549}13549             \mbox{\hyperlink{ecore__hsi_8h_a99e1d902799bd6c4a519231301a6bf44}{FUNC\_MF\_CFG\_E1HOV\_TAG\_DEFAULT}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13550}13550             mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} = \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a06c32c448971dc058e4e66ab49852014}{MULTI\_FUNCTION\_SD}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13551}13551         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13552}13552             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid config for Switch Dependent mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13553}13553         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13554}13554 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13555}13555         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13556}13556 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13557}13557     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_af62e31d48484209e28c30f4b91597c00}{SHARED\_FEAT\_CFG\_FORCE\_SF\_MODE\_FORCED\_SF}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13558}13558 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13559}13559         \textcolor{comment}{/* not in MF mode, vnics\_per\_port=1 and multi\_vnics\_mode=FALSE */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13560}13560         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13561}13561 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13562}13562     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_aa2a78f6b313955f3511b650f07f3ecd8}{SHARED\_FEAT\_CFG\_FORCE\_SF\_MODE\_AFEX\_MODE}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13563}13563 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13564}13564         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13565}13565 \textcolor{comment}{         * Mark MF mode as NIV if MCP version includes NPAR-\/SD support}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13566}13566 \textcolor{comment}{         * and the MAC address is valid.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13567}13567 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13568}13568         mac\_upper = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].mac\_upper);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13569}13569 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13570}13570         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8h_a9589edd1f6702afb76918ed934dd0fa6}{SHMEM2\_HAS}}(sc, afex\_driver\_support)) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13571}13571             (mac\_upper != \mbox{\hyperlink{ecore__hsi_8h_a2c8f00bae981b1f3a5c541d7f1266a4c}{FUNC\_MF\_CFG\_UPPERMAC\_DEFAULT}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13572}13572             mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} = \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316ab41d9d078d4ad15e3808cf22f3e05821}{MULTI\_FUNCTION\_AFEX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13573}13573         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13574}13574             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid config for AFEX mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13575}13575         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13576}13576 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13577}13577         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13578}13578 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13579}13579     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13580}13580 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13581}13581         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unknown MF mode (0x\%08x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13582}13582               (val \& \mbox{\hyperlink{ecore__hsi_8h_a4083b4dfa3533c6c7371d9efda36ff63}{SHARED\_FEAT\_CFG\_FORCE\_SF\_MODE\_MASK}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13583}13583 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13584}13584         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13585}13585     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13586}13586 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13587}13587     \textcolor{comment}{/* set path mf\_mode (which could be different than function mf\_mode) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13588}13588     \textcolor{keywordflow}{if} (mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} == \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a06c32c448971dc058e4e66ab49852014}{MULTI\_FUNCTION\_SD}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13589}13589         mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_abb4551aa4dfc0ae82e0ef5a89ad2c0b2}{path\_has\_ovlan}} = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13590}13590     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} == \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a7409d144f7e23576153fa2ebd4765056}{SINGLE\_FUNCTION}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13591}13591         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13592}13592 \textcolor{comment}{         * Decide on path multi vnics mode. If we're not in MF mode and in}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13593}13593 \textcolor{comment}{         * 4-\/port mode, this is good enough to check vnic-\/0 of the other port}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13594}13594 \textcolor{comment}{         * on the same path}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13595}13595 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13596}13596         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a41dbd7d7b2c3e98bd56fa929b0bb9710}{CHIP\_PORT\_MODE}}(sc) == \mbox{\hyperlink{bxe_8h_a016d31fc3005f6b5e4018d33ac1fd028}{CHIP\_4\_PORT\_MODE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13597}13597             uint8\_t other\_port = !(\mbox{\hyperlink{bxe_8h_a16399c26733f425eb948d3d5c6b80d3c}{PORT\_ID}}(sc) \& 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13598}13598             uint8\_t abs\_func\_other\_port = (\mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) + (2 * other\_port));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13599}13599 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13600}13600             val = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[abs\_func\_other\_port].e1hov\_tag);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13601}13601 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13602}13602             mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_abb4551aa4dfc0ae82e0ef5a89ad2c0b2}{path\_has\_ovlan}} = \mbox{\hyperlink{bxe_8h_a128b93dba9a9c05b7d34cd133c92bbf1}{VALID\_OVLAN}}((uint16\_t)val) ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13603}13603         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13604}13604     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13605}13605 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13606}13606     \textcolor{keywordflow}{if} (mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} == \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a7409d144f7e23576153fa2ebd4765056}{SINGLE\_FUNCTION}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13607}13607         \textcolor{comment}{/* invalid MF config */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13608}13608         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc) >= 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13609}13609             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}VNIC ID >= 1 in SF mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13610}13610             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13611}13611         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13612}13612 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13613}13613         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13614}13614     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13615}13615 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13616}13616     \textcolor{comment}{/* get the MF configuration */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13617}13617     mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a0a50dfcfd69666b49b88f8e95a78331d}{mf\_config}}[\mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc)] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13618}13618         \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13619}13619 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13620}13620     \textcolor{keywordflow}{switch}(mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13621}13621     \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13622}13622     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a06c32c448971dc058e4e66ab49852014}{MULTI\_FUNCTION\_SD}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13623}13623 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13624}13624         \mbox{\hyperlink{bxe_8c_a2947323fa0523f94cb679c9f392e17f1}{bxe\_get\_shmem\_mf\_cfg\_info\_sd}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13625}13625         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13626}13626 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13627}13627     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a2f41465e78a44a916f834f175638c80a}{MULTI\_FUNCTION\_SI}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13628}13628 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13629}13629         \mbox{\hyperlink{bxe_8c_a9080217467310285407d0c3cf6627df3}{bxe\_get\_shmem\_mf\_cfg\_info\_si}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13630}13630         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13631}13631 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13632}13632     \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316ab41d9d078d4ad15e3808cf22f3e05821}{MULTI\_FUNCTION\_AFEX}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13633}13633 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13634}13634         \mbox{\hyperlink{bxe_8c_a721af08c7171c69b63cd922c93faaecc}{bxe\_get\_shmem\_mf\_cfg\_info\_niv}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13635}13635         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13636}13636 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13637}13637     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13638}13638 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13639}13639         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Get MF config failed (mf\_mode=0x\%08x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13640}13640               mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13641}13641         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13642}13642     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13643}13643 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13644}13644     \textcolor{comment}{/* get the congestion management parameters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13645}13645 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13646}13646     vnic = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13647}13647     \mbox{\hyperlink{bxe_8h_a901bc3d3acc36c7deb632bde1de11c84}{FOREACH\_ABS\_FUNC\_IN\_PORT}}(sc, i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13648}13648         \textcolor{comment}{/* get min/max bw */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13649}13649         val = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[i].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13650}13650         mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_aa2d22786b5ff46de4178385f74e53529}{min\_bw}}[vnic] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13651}13651             ((val \& \mbox{\hyperlink{ecore__hsi_8h_ab70b343e6cf8a85542c9421b7da0f43b}{FUNC\_MF\_CFG\_MIN\_BW\_MASK}}) >> \mbox{\hyperlink{ecore__hsi_8h_ae4f43c3505853037e527490c48986051}{FUNC\_MF\_CFG\_MIN\_BW\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13652}13652         mf\_info-\/>\mbox{\hyperlink{structbxe__mf__info_a164aad98a11b7d3ea84938a174515736}{max\_bw}}[vnic] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13653}13653             ((val \& \mbox{\hyperlink{ecore__hsi_8h_aafe9b5da0d850d9ab973f3a2a570778a}{FUNC\_MF\_CFG\_MAX\_BW\_MASK}}) >> \mbox{\hyperlink{ecore__hsi_8h_af0ffbcf643d2fa7a7a9746219954ab53}{FUNC\_MF\_CFG\_MAX\_BW\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13654}13654         vnic++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13655}13655     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13656}13656 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13657}13657     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_ac60428cb6a15cdb25d32f81b91e3aec0}{bxe\_check\_valid\_mf\_cfg}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13658}13658 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13659}13659 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13660}13660 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13661}\mbox{\hyperlink{bxe_8c_ac60d190142b9d9fbec51a2f3a19e4dc9}{13661}} \mbox{\hyperlink{bxe_8c_ac60d190142b9d9fbec51a2f3a19e4dc9}{bxe\_get\_shmem\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13662}13662 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13663}13663     \textcolor{keywordtype}{int} port;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13664}13664     uint32\_t mac\_hi, mac\_lo, val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13665}13665 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13666}13666     port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13667}13667     mac\_hi = mac\_lo = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13668}13668 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13669}13669     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a467da74cb1022ed7d6d139210932c3d1}{sc}}   = sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13670}13670     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aaa656730bb4d0e8099078865874dafaa}{port}} = port;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13671}13671 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13672}13672     \textcolor{comment}{/* get the hardware config info */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13673}13673     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a322d4e4449e7170856966725d6193872}{hw\_config}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13674}13674         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.shared\_hw\_config.config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13675}13675     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a03c41a2ef6c49375297345545e644274}{hw\_config2}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13676}13676         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.shared\_hw\_config.config2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13677}13677 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13678}13678     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a84a73f3a012859f5675fe492fa9c89ae}{hw\_led\_mode}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13679}13679         ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a322d4e4449e7170856966725d6193872}{hw\_config}} \& \mbox{\hyperlink{ecore__hsi_8h_a74a1b4b40f6c46584892bf85043d345d}{SHARED\_HW\_CFG\_LED\_MODE\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13680}13680          \mbox{\hyperlink{ecore__hsi_8h_a7339fadfb733de06c255054af5ff5433}{SHARED\_HW\_CFG\_LED\_MODE\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13681}13681 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13682}13682     \textcolor{comment}{/* get the port feature config */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13683}13683     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_aaac9aba1205beafd664796df84eaa6c5}{config}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13684}13684         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_feature\_config[port].config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13685}13685 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13686}13686     \textcolor{comment}{/* get the link params */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13687}13687     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[0] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13688}13688         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_hw\_config[port].speed\_capability\_mask);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13689}13689     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[1] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13690}13690         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_hw\_config[port].speed\_capability\_mask2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13691}13691 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13692}13692     \textcolor{comment}{/* get the lane config */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13693}13693     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a2923f431589cf319f27c4ac33266a283}{lane\_config}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13694}13694         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_hw\_config[port].lane\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13695}13695 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13696}13696     \textcolor{comment}{/* get the link config */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13697}13697     val = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_feature\_config[port].link\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13698}13698     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ae679c0984152f655525475eb2895882f}{link\_config}}[\mbox{\hyperlink{bxe__elink_8h_a7e557a0c651677024943229f99724e0a}{ELINK\_INT\_PHY}}] = val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13699}13699     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a55ac58047b60d66c4a43161d26c06043}{switch\_cfg}} = (val \& \mbox{\hyperlink{ecore__hsi_8h_af5f3142a3a26de46a2838a122a729995}{PORT\_FEATURE\_CONNECTED\_SWITCH\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13700}13700     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ae679c0984152f655525475eb2895882f}{link\_config}}[\mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}}] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13701}13701         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_feature\_config[port].link\_config2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13702}13702 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13703}13703     \textcolor{comment}{/* get the override preemphasis flag and enable it or turn it off */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13704}13704     val = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.shared\_feature\_config.config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13705}13705     \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__hsi_8h_a034ca4eff4003f97e198c2e10ed83ffb}{SHARED\_FEAT\_CFG\_OVERRIDE\_PREEMPHASIS\_CFG\_ENABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13706}13706         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_af7cb7b6dddd37658f1704060e58d6938}{feature\_config\_flags}} |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13707}13707             \mbox{\hyperlink{bxe__elink_8h_a8fac649495402cbc426b4cc90bf1a199}{ELINK\_FEATURE\_CONFIG\_OVERRIDE\_PREEMPHASIS\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13708}13708     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13709}13709         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_af7cb7b6dddd37658f1704060e58d6938}{feature\_config\_flags}} \&=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13710}13710             \string~ELINK\_FEATURE\_CONFIG\_OVERRIDE\_PREEMPHASIS\_ENABLED;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13711}13711     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13712}13712 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13713}13713     \textcolor{comment}{/* get the initial value of the link params */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13714}13714     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_ae04ce6fa3fbb7a61fe181ca4d2598e56}{multi\_phy\_config}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13715}13715         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_hw\_config[port].multi\_phy\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13716}13716 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13717}13717     \textcolor{comment}{/* get external phy info */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13718}13718     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ad6cedc65ab2b75ec6a927d848e41defa}{ext\_phy\_config}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13719}13719         \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_hw\_config[port].external\_phy\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13720}13720 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13721}13721     \textcolor{comment}{/* get the multifunction configuration */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13722}13722     \mbox{\hyperlink{bxe_8c_a324e188b70ae7f370d23f9f657095a5a}{bxe\_get\_mf\_cfg\_info}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13723}13723 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13724}13724     \textcolor{comment}{/* get the mac address */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13725}13725     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13726}13726         mac\_hi = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].mac\_upper);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13727}13727         mac\_lo = \mbox{\hyperlink{bxe_8h_a31d8d7dc6a9a3da225d12d22dc2dfb31}{MFCFG\_RD}}(sc, func\_mf\_config[\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)].mac\_lower);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13728}13728     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13729}13729         mac\_hi = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_hw\_config[port].mac\_upper);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13730}13730         mac\_lo = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_hw\_config[port].mac\_lower);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13731}13731     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13732}13732 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13733}13733     \textcolor{keywordflow}{if} ((mac\_lo == 0) \&\& (mac\_hi == 0)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13734}13734         *sc-\/>\mbox{\hyperlink{structbxe__softc_af4d559cc56bc16a9fa22ca72ab331cb7}{mac\_addr\_str}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13735}13735         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}No Ethernet address programmed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13736}13736     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13737}13737         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[0] = (uint8\_t)(mac\_hi >> 8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13738}13738         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[1] = (uint8\_t)(mac\_hi);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13739}13739         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[2] = (uint8\_t)(mac\_lo >> 24);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13740}13740         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[3] = (uint8\_t)(mac\_lo >> 16);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13741}13741         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[4] = (uint8\_t)(mac\_lo >> 8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13742}13742         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[5] = (uint8\_t)(mac\_lo);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13743}13743         snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_af4d559cc56bc16a9fa22ca72ab331cb7}{mac\_addr\_str}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_af4d559cc56bc16a9fa22ca72ab331cb7}{mac\_addr\_str}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13744}13744                  \textcolor{stringliteral}{"{}\%02x:\%02x:\%02x:\%02x:\%02x:\%02x"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13745}13745                  sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[0], sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[1],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13746}13746                  sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[2], sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[3],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13747}13747                  sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[4], sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a235fe8bab97ae7ba3d6edf3a98ed3a9d}{mac\_addr}}[5]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13748}13748         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Ethernet address: \%s\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_af4d559cc56bc16a9fa22ca72ab331cb7}{mac\_addr\_str}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13749}13749     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13750}13750 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13751}13751     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13752}13752 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13753}13753 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13754}13754 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13755}\mbox{\hyperlink{bxe_8c_ab37d99f844d24612aeef5a05ebd098f9}{13755}} \mbox{\hyperlink{bxe_8c_ab37d99f844d24612aeef5a05ebd098f9}{bxe\_get\_tunable\_params}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13756}13756 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13757}13757     \textcolor{comment}{/* sanity checks */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13758}13758 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13759}13759     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}} != \mbox{\hyperlink{bxe_8h_a8751ecbe17c1e745b0042dc7d6daed26}{INTR\_MODE\_INTX}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13760}13760         (\mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}} != \mbox{\hyperlink{bxe_8h_af6724c546810afe6630df52715336406}{INTR\_MODE\_MSI}})  \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13761}13761         (\mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}} != \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13762}13762         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid interrupt\_mode value (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13763}13763         \mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}} = \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13764}13764     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13765}13765 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13766}13766     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{bxe\_queue\_count}} < 0) || (\mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{bxe\_queue\_count}} > \mbox{\hyperlink{bxe_8h_a81e4829e192f7f4861e7d4282aecca6b}{MAX\_RSS\_CHAINS}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13767}13767         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid queue\_count value (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{bxe\_queue\_count}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13768}13768         \mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{bxe\_queue\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13769}13769     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13770}13770 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13771}13771     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}} < 1) || (\mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}} > \mbox{\hyperlink{bxe_8h_a542fc7a39e64042f0b11c0238b5f9afd}{RX\_BD\_USABLE}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13772}13772         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}} == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13773}13773             \mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}} = \mbox{\hyperlink{bxe_8h_a542fc7a39e64042f0b11c0238b5f9afd}{RX\_BD\_USABLE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13774}13774         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13775}13775             \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid max\_rx\_bufs (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13776}13776             \mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}} = 2048;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13777}13777         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13778}13778     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13779}13779 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13780}13780     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_adb43340290236f122ccd829463845990}{bxe\_hc\_rx\_ticks}} < 1) || (\mbox{\hyperlink{bxe_8c_adb43340290236f122ccd829463845990}{bxe\_hc\_rx\_ticks}} > 100)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13781}13781         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid hc\_rx\_ticks (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8c_adb43340290236f122ccd829463845990}{bxe\_hc\_rx\_ticks}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13782}13782         \mbox{\hyperlink{bxe_8c_adb43340290236f122ccd829463845990}{bxe\_hc\_rx\_ticks}} = 25;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13783}13783     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13784}13784 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13785}13785     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a7ada9e3dadebfe1903c04ec189bcc022}{bxe\_hc\_tx\_ticks}} < 1) || (\mbox{\hyperlink{bxe_8c_a7ada9e3dadebfe1903c04ec189bcc022}{bxe\_hc\_tx\_ticks}} > 100)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13786}13786         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid hc\_tx\_ticks (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8c_a7ada9e3dadebfe1903c04ec189bcc022}{bxe\_hc\_tx\_ticks}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13787}13787         \mbox{\hyperlink{bxe_8c_a7ada9e3dadebfe1903c04ec189bcc022}{bxe\_hc\_tx\_ticks}} = 50;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13788}13788     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13789}13789 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13790}13790     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{bxe\_max\_aggregation\_size}} == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13791}13791         \mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{bxe\_max\_aggregation\_size}} = \mbox{\hyperlink{bxe_8h_aec634649a8287e675e926627d23dbbc8}{TPA\_AGG\_SIZE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13792}13792     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13793}13793 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13794}13794     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{bxe\_max\_aggregation\_size}} > 0xffff) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13795}13795         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid max\_aggregation\_size (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13796}13796               \mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{bxe\_max\_aggregation\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13797}13797         \mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{bxe\_max\_aggregation\_size}} = \mbox{\hyperlink{bxe_8h_aec634649a8287e675e926627d23dbbc8}{TPA\_AGG\_SIZE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13798}13798     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13799}13799 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13800}13800     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a485b70543a3fe746b68d3da8d90cd329}{bxe\_mrrs}} < -\/1) || (\mbox{\hyperlink{bxe_8c_a485b70543a3fe746b68d3da8d90cd329}{bxe\_mrrs}} > 3)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13801}13801         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid mrrs (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8c_a485b70543a3fe746b68d3da8d90cd329}{bxe\_mrrs}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13802}13802         \mbox{\hyperlink{bxe_8c_a485b70543a3fe746b68d3da8d90cd329}{bxe\_mrrs}} = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13803}13803     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13804}13804 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13805}13805     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_afb55eafaa052f7ef538e2b12e24bd6f0}{bxe\_autogreeen}} < 0) || (\mbox{\hyperlink{bxe_8c_afb55eafaa052f7ef538e2b12e24bd6f0}{bxe\_autogreeen}} > 2)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13806}13806         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid autogreeen (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8c_afb55eafaa052f7ef538e2b12e24bd6f0}{bxe\_autogreeen}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13807}13807         \mbox{\hyperlink{bxe_8c_afb55eafaa052f7ef538e2b12e24bd6f0}{bxe\_autogreeen}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13808}13808     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13809}13809 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13810}13810     \textcolor{keywordflow}{if} ((\mbox{\hyperlink{bxe_8c_a2c7f0d624ac9317a2e9b93a048cf5df5}{bxe\_udp\_rss}} < 0) || (\mbox{\hyperlink{bxe_8c_a2c7f0d624ac9317a2e9b93a048cf5df5}{bxe\_udp\_rss}} > 1)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13811}13811         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid udp\_rss (\%d)\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8c_a2c7f0d624ac9317a2e9b93a048cf5df5}{bxe\_udp\_rss}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13812}13812         \mbox{\hyperlink{bxe_8c_a2c7f0d624ac9317a2e9b93a048cf5df5}{bxe\_udp\_rss}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13813}13813     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13814}13814 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13815}13815     \textcolor{comment}{/* pull in user settings */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13816}13816 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13817}13817     sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}}       = \mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13818}13818     sc-\/>\mbox{\hyperlink{structbxe__softc_ac7d7c8445e3a1ea0072269753b635864}{max\_rx\_bufs}}          = \mbox{\hyperlink{bxe_8c_a7862b0284a14374b0621c8370ca74ee0}{bxe\_max\_rx\_bufs}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13819}13819     sc-\/>\mbox{\hyperlink{structbxe__softc_a32db16a6db7671ff174a455cbd77dc54}{hc\_rx\_ticks}}          = \mbox{\hyperlink{bxe_8c_adb43340290236f122ccd829463845990}{bxe\_hc\_rx\_ticks}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13820}13820     sc-\/>\mbox{\hyperlink{structbxe__softc_a52cb5c740f9b316f52e961000923be32}{hc\_tx\_ticks}}          = \mbox{\hyperlink{bxe_8c_a7ada9e3dadebfe1903c04ec189bcc022}{bxe\_hc\_tx\_ticks}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13821}13821     sc-\/>\mbox{\hyperlink{structbxe__softc_aec29cc5df9811c16bca52bdf435cc4a3}{max\_aggregation\_size}} = \mbox{\hyperlink{bxe_8c_abf9d13f1cfb92907a6a3869c776cf816}{bxe\_max\_aggregation\_size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13822}13822     sc-\/>\mbox{\hyperlink{structbxe__softc_afb49c73a7701139eef55d9c993007f6d}{mrrs}}                 = \mbox{\hyperlink{bxe_8c_a485b70543a3fe746b68d3da8d90cd329}{bxe\_mrrs}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13823}13823     sc-\/>\mbox{\hyperlink{structbxe__softc_a1868dc1d098a16c3c77553b907cb18fb}{autogreeen}}           = \mbox{\hyperlink{bxe_8c_afb55eafaa052f7ef538e2b12e24bd6f0}{bxe\_autogreeen}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13824}13824     sc-\/>\mbox{\hyperlink{structbxe__softc_abbf81097fe91a950d918fa9173cc850d}{udp\_rss}}              = \mbox{\hyperlink{bxe_8c_a2c7f0d624ac9317a2e9b93a048cf5df5}{bxe\_udp\_rss}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13825}13825 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13826}13826     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ade842ce8f78617fa8a13743d8438af94}{bxe\_interrupt\_mode}} == \mbox{\hyperlink{bxe_8h_a8751ecbe17c1e745b0042dc7d6daed26}{INTR\_MODE\_INTX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13827}13827         sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13828}13828     \} \textcolor{keywordflow}{else} \{ \textcolor{comment}{/* INTR\_MODE\_MSI or INTR\_MODE\_MSIX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13829}13829         sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13830}13830             min((\mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{bxe\_queue\_count}} ? \mbox{\hyperlink{bxe_8c_af9479e4336ef8e045f87787937953f53}{bxe\_queue\_count}} : mp\_ncpus),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13831}13831                 \mbox{\hyperlink{bxe_8h_a81e4829e192f7f4861e7d4282aecca6b}{MAX\_RSS\_CHAINS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13832}13832         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} > mp\_ncpus) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13833}13833             sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}} = mp\_ncpus;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13834}13834         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13835}13835     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13836}13836 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13837}13837     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13838}13838           \textcolor{stringliteral}{"{}User Config: "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13839}13839           \textcolor{stringliteral}{"{}debug=0x\%lx "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13840}13840           \textcolor{stringliteral}{"{}interrupt\_mode=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13841}13841           \textcolor{stringliteral}{"{}queue\_count=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13842}13842           \textcolor{stringliteral}{"{}hc\_rx\_ticks=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13843}13843           \textcolor{stringliteral}{"{}hc\_tx\_ticks=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13844}13844           \textcolor{stringliteral}{"{}rx\_budget=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13845}13845           \textcolor{stringliteral}{"{}max\_aggregation\_size=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13846}13846           \textcolor{stringliteral}{"{}mrrs=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13847}13847           \textcolor{stringliteral}{"{}autogreeen=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13848}13848           \textcolor{stringliteral}{"{}udp\_rss=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13849}13849           \mbox{\hyperlink{bxe_8c_aba8845f3e9ba1def9dfa26f69e334ffb}{bxe\_debug}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13850}13850           sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13851}13851           sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13852}13852           sc-\/>\mbox{\hyperlink{structbxe__softc_a32db16a6db7671ff174a455cbd77dc54}{hc\_rx\_ticks}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13853}13853           sc-\/>\mbox{\hyperlink{structbxe__softc_a52cb5c740f9b316f52e961000923be32}{hc\_tx\_ticks}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13854}13854           \mbox{\hyperlink{bxe_8c_a6d021e6ffe6010870c17c4aeca3e2ab5}{bxe\_rx\_budget}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13855}13855           sc-\/>\mbox{\hyperlink{structbxe__softc_aec29cc5df9811c16bca52bdf435cc4a3}{max\_aggregation\_size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13856}13856           sc-\/>\mbox{\hyperlink{structbxe__softc_afb49c73a7701139eef55d9c993007f6d}{mrrs}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13857}13857           sc-\/>\mbox{\hyperlink{structbxe__softc_a1868dc1d098a16c3c77553b907cb18fb}{autogreeen}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13858}13858           sc-\/>\mbox{\hyperlink{structbxe__softc_abbf81097fe91a950d918fa9173cc850d}{udp\_rss}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13859}13859 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13860}13860 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13861}13861 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13862}\mbox{\hyperlink{bxe_8c_a3619a0afe1a93594db30d43160cf032d}{13862}} \mbox{\hyperlink{bxe_8c_a3619a0afe1a93594db30d43160cf032d}{bxe\_media\_detect}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13863}13863 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13864}13864     \textcolor{keywordtype}{int} port\_type;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13865}13865     uint32\_t phy\_idx = \mbox{\hyperlink{bxe_8c_a5818dc1ef1981651afb43d64515b3d3a}{bxe\_get\_cur\_phy\_idx}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13866}13866 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13867}13867     \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[phy\_idx].\mbox{\hyperlink{structelink__phy_a50bc555771466493db9fd6a3b2410944}{media\_type}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13868}13868     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_aef059b886eb52ef4382fdea86717269e}{ELINK\_ETH\_PHY\_SFPP\_10G\_FIBER}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13869}13869     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_a7c9f967786d5c532f8d80fb73912c987}{ELINK\_ETH\_PHY\_XFP\_FIBER}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13870}13870         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Found 10Gb Fiber media.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13871}13871         sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}} = IFM\_10G\_SR;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13872}13872         port\_type = \mbox{\hyperlink{bxe_8h_a178cc6bce2de51c0ded4c1df18f4cc6f}{PORT\_FIBRE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13873}13873         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13874}13874     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_ad224c7083e192afa10d036059a1a8e1f}{ELINK\_ETH\_PHY\_SFP\_1G\_FIBER}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13875}13875         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Found 1Gb Fiber media.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13876}13876         sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}} = IFM\_1000\_SX;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13877}13877         port\_type = \mbox{\hyperlink{bxe_8h_a178cc6bce2de51c0ded4c1df18f4cc6f}{PORT\_FIBRE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13878}13878         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13879}13879     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_a2e376a219f0d73ce200e981259c61c9e}{ELINK\_ETH\_PHY\_KR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13880}13880     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_a7a347d0e50b19e8abc7de3c94ada9176}{ELINK\_ETH\_PHY\_CX4}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13881}13881         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Found 10GBase-\/CX4 media.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13882}13882         sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}} = IFM\_10G\_CX4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13883}13883         port\_type = \mbox{\hyperlink{bxe_8h_a178cc6bce2de51c0ded4c1df18f4cc6f}{PORT\_FIBRE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13884}13884         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13885}13885     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_a05067623db5b0487bdc9f856fbc0556c}{ELINK\_ETH\_PHY\_DA\_TWINAX}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13886}13886         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Found 10Gb Twinax media.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13887}13887         sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}} = IFM\_10G\_TWINAX;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13888}13888         port\_type = \mbox{\hyperlink{bxe_8h_a7fc877312fb50312d3b3f42c7130b52f}{PORT\_DA}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13889}13889         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13890}13890     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_a56377e90404d53ab8f40729cff6797be}{ELINK\_ETH\_PHY\_BASE\_T}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13891}13891         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[0] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13892}13892             \mbox{\hyperlink{ecore__hsi_8h_ac70541abed2058e9d9625ba00c784267}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_10G}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13893}13893             \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Found 10GBase-\/T media.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13894}13894             sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}} = IFM\_10G\_T;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13895}13895             port\_type = \mbox{\hyperlink{bxe_8h_afc397636ec25cb6c5985fca38cd01532}{PORT\_TP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13896}13896         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13897}13897             \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Found 1000Base-\/T media.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13898}13898             sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}} = IFM\_1000\_T;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13899}13899             port\_type = \mbox{\hyperlink{bxe_8h_afc397636ec25cb6c5985fca38cd01532}{PORT\_TP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13900}13900         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13901}13901         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13902}13902     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_a9ea1ce80818580c3ae2e637af38b11a0}{ELINK\_ETH\_PHY\_NOT\_PRESENT}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13903}13903         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Media not present.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13904}13904         sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13905}13905         port\_type = \mbox{\hyperlink{bxe_8h_abc8657f0aaf731541bc88d0cff3ae1e3}{PORT\_OTHER}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13906}13906         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13907}13907     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_afc8507456c7f4598472ba60febdb9d8c}{ELINK\_ETH\_PHY\_UNSPECIFIED}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13908}13908     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13909}13909         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Unknown media!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13910}13910         sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13911}13911         port\_type = \mbox{\hyperlink{bxe_8h_abc8657f0aaf731541bc88d0cff3ae1e3}{PORT\_OTHER}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13912}13912         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13913}13913     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13914}13914     \textcolor{keywordflow}{return} port\_type;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13915}13915 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13916}13916 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13917}\mbox{\hyperlink{bxe_8c_ad28eb28f731fa19f5fe0ebaca5471e91}{13917}} \textcolor{preprocessor}{\#define GET\_FIELD(value, fname)                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13918}13918 \textcolor{preprocessor}{    (((value) \& (fname\#\#\_MASK)) >> (fname\#\#\_SHIFT))}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13919}\mbox{\hyperlink{bxe_8c_a3799b2be0927a1d55ece2bf4b83bb95e}{13919}} \textcolor{preprocessor}{\#define IGU\_FID(val) GET\_FIELD((val), IGU\_REG\_MAPPING\_MEMORY\_FID)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13920}\mbox{\hyperlink{bxe_8c_a4ba0c14e65bd5ddb8cf5d0989e39d88c}{13920}} \textcolor{preprocessor}{\#define IGU\_VEC(val) GET\_FIELD((val), IGU\_REG\_MAPPING\_MEMORY\_VECTOR)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13921}13921 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13922}13922 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13923}\mbox{\hyperlink{bxe_8c_ab0debeaab47e7ce94fbaa8d97f2ad3a1}{13923}} \mbox{\hyperlink{bxe_8c_ab0debeaab47e7ce94fbaa8d97f2ad3a1}{bxe\_get\_igu\_cam\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13924}13924 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13925}13925     \textcolor{keywordtype}{int} pfid = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13926}13926     \textcolor{keywordtype}{int} igu\_sb\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13927}13927     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13928}13928     uint8\_t fid, igu\_sb\_cnt = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13929}13929 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13930}13930     sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} = 0xff;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13931}13931 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13932}13932     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13933}13933         \textcolor{keywordtype}{int} vn = \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13934}13934         igu\_sb\_cnt = sc-\/>\mbox{\hyperlink{structbxe__softc_a3bfc5946a9a75867b12280c74a86b7f2}{igu\_sb\_cnt}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13935}13935         sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} = ((\mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(sc) ? pfid : vn) *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13936}13936                            \mbox{\hyperlink{bxe_8h_a47525c15ef8f92193e60dcb18ef5e593}{FP\_SB\_MAX\_E1x}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13937}13937         sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}} = (\mbox{\hyperlink{ecore__hsi_8h_a670e229f40328f1307b95395c0acce99}{E1HVN\_MAX}} * \mbox{\hyperlink{bxe_8h_a47525c15ef8f92193e60dcb18ef5e593}{FP\_SB\_MAX\_E1x}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13938}13938                           (\mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(sc) ? pfid : vn));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13939}13939         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13940}13940     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13941}13941 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13942}13942     \textcolor{comment}{/* IGU in normal mode -\/ read CAM */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13943}13943     \textcolor{keywordflow}{for} (igu\_sb\_id = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13944}13944          igu\_sb\_id < \mbox{\hyperlink{ecore__reg_8h_a59fd8b87b8700af5d95efd24b0a0373e}{IGU\_REG\_MAPPING\_MEMORY\_SIZE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13945}13945          igu\_sb\_id++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13946}13946         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a216fa8c5e24a13657e2664de1475b403}{IGU\_REG\_MAPPING\_MEMORY}} + igu\_sb\_id * 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13947}13947         \textcolor{keywordflow}{if} (!(val \& \mbox{\hyperlink{ecore__reg_8h_a921f512a13a8e25019e955f96b314ff1}{IGU\_REG\_MAPPING\_MEMORY\_VALID}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13948}13948             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13949}13949         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13950}13950         fid = \mbox{\hyperlink{bxe_8c_a3799b2be0927a1d55ece2bf4b83bb95e}{IGU\_FID}}(val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13951}13951         \textcolor{keywordflow}{if} ((fid \& \mbox{\hyperlink{ecore__reg_8h_aa2ba8229c7f539dadf620356ac2c6ad1}{IGU\_FID\_ENCODE\_IS\_PF}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13952}13952             \textcolor{keywordflow}{if} ((fid \& \mbox{\hyperlink{ecore__reg_8h_a3f7c44b1e906380771785c3aabecdad4}{IGU\_FID\_PF\_NUM\_MASK}}) != pfid) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13953}13953                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13954}13954             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13955}13955             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a4ba0c14e65bd5ddb8cf5d0989e39d88c}{IGU\_VEC}}(val) == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13956}13956                 \textcolor{comment}{/* default status block */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13957}13957                 sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}} = igu\_sb\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13958}13958             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13959}13959                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} == 0xff) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13960}13960                     sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} = igu\_sb\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13961}13961                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13962}13962                 igu\_sb\_cnt++;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13963}13963             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13964}13964         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13965}13965     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13966}13966 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13967}13967     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13968}13968 \textcolor{comment}{     * Due to new PF resource allocation by MFW T7.4 and above, it's optional}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13969}13969 \textcolor{comment}{     * that number of CAM entries will not be equal to the value advertised in}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13970}13970 \textcolor{comment}{     * PCI. Driver should use the minimal value of both as the actual status}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13971}13971 \textcolor{comment}{     * block count}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13972}13972 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13973}13973     sc-\/>\mbox{\hyperlink{structbxe__softc_a3bfc5946a9a75867b12280c74a86b7f2}{igu\_sb\_cnt}} = min(sc-\/>\mbox{\hyperlink{structbxe__softc_a3bfc5946a9a75867b12280c74a86b7f2}{igu\_sb\_cnt}}, igu\_sb\_cnt);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13974}13974 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13975}13975     \textcolor{keywordflow}{if} (igu\_sb\_cnt == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13976}13976         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}CAM configuration error\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13977}13977         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13978}13978     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13979}13979 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13980}13980     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13981}13981 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13982}13982 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13983}13983 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13984}13984 \textcolor{comment}{ * Gather various information from the device config space, the device itself,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13985}13985 \textcolor{comment}{ * shmem, and the user input.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13986}13986 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13987}13987 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13988}\mbox{\hyperlink{bxe_8c_ac509a8b0b36d19da2060edc9b884d55f}{13988}} \mbox{\hyperlink{bxe_8c_ac509a8b0b36d19da2060edc9b884d55f}{bxe\_get\_device\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13989}13989 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13990}13990     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13991}13991     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13992}13992 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13993}13993     \textcolor{comment}{/* Get the data for the device */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13994}13994     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a8a86b73e2291a2bb00bfd401589b235c}{vendor\_id}}    = pci\_get\_vendor(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13995}13995     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ad6f73c10a4c11a54289d6964f5796315}{device\_id}}    = pci\_get\_device(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13996}13996     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_acd0d39316265f7e0bb8079bd3c375926}{subvendor\_id}} = pci\_get\_subvendor(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13997}13997     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a910d66d4b84c68c2a920b42cf5615b23}{subdevice\_id}} = pci\_get\_subdevice(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13998}13998 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l13999}13999     \textcolor{comment}{/* get the chip revision (chip metal comes from pci config space) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14000}14000     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}}     =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14001}14001     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_ad8893205819198c76a04ea2de0bef095}{chip\_id}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14002}14002         (((\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad80d5d8a3a9b52950caa66b16177429f}{MISC\_REG\_CHIP\_NUM}})                   \& 0xffff) << 16) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14003}14003          ((\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a13ba601dce5056cda180d7377dde98e5}{MISC\_REG\_CHIP\_REV}})                   \& 0xf)    << 12) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14004}14004          (((\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a443a4ffe202b7987909db72a80a86c65}{PCICFG\_OFFSET}} + \mbox{\hyperlink{ecore__reg_8h_a2c7a59909966c712fc2c86ae07d1c07e}{PCI\_ID\_VAL3}}) >> 24) \& 0xf)    << 4)  |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14005}14005          ((\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7b68d71cd532201b266ad7501c76f10c}{MISC\_REG\_BOND\_ID}})                    \& 0xf)    << 0));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14006}14006 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14007}14007     \textcolor{comment}{/* force 57811 according to MISC register */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14008}14008     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aec723ecdf945386ba04454bf47ef38d8}{MISC\_REG\_CHIP\_TYPE}}) \& \mbox{\hyperlink{ecore__reg_8h_a1e85d5455f586cb89e592d1c7c71bca0}{MISC\_REG\_CHIP\_TYPE\_57811\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14009}14009         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a05c9fb4d1783602bf79299bedfa07e82}{CHIP\_IS\_57810}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14010}14010             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} = ((\mbox{\hyperlink{bxe_8h_aaac6a9bc04cec8858a85bc319eba842a}{CHIP\_NUM\_57811}} << 16) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14011}14011                                    (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} \& 0x0000ffff));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14012}14012         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aeaa81d077caed93908a056d9aed76231}{CHIP\_IS\_57810\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14013}14013             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} = ((\mbox{\hyperlink{bxe_8h_a82e9d2dfc194a87c7995e94e3350443c}{CHIP\_NUM\_57811\_MF}} << 16) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14014}14014                                    (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} \& 0x0000ffff));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14015}14015         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14016}14016         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} |= 0x1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14017}14017     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14018}14018 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14019}14019     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14020}14020           \textcolor{stringliteral}{"{}chip\_id=0x\%08x (num=0x\%04x rev=0x\%01x metal=0x\%02x bond=0x\%01x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14021}14021           sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14022}14022           ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} >> 16) \& 0xffff),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14023}14023           ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} >> 12) \& 0xf),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14024}14024           ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} >>  4) \& 0xff),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14025}14025           ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} >>  0) \& 0xf));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14026}14026 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14027}14027     val = (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, 0x2874) \& 0x55);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14028}14028     \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}} \& 0x1) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14029}14029         (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc) \&\& val) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14030}14030         (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc) \&\& (val == 0x55))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14031}14031         sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} |= \mbox{\hyperlink{bxe_8h_a00474bf001bf745d00df128789e5b6a5}{BXE\_ONE\_PORT\_FLAG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14032}14032         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}single port device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14033}14033     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14034}14034 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14035}14035     \textcolor{comment}{/* set the doorbell size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14036}14036     sc-\/>\mbox{\hyperlink{structbxe__softc_a6b9064d0425c2f4d7e6427fed16dadb5}{doorbell\_size}} = (1 << \mbox{\hyperlink{bxe_8h_a1ba59ba640ac1b758c0a462287b059a6}{BXE\_DB\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14037}14037 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14038}14038     \textcolor{comment}{/* determine whether the device is in 2 port or 4 port mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14039}14039     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a5b1cf5ef239cdbcb18034ecb7799ce36}{chip\_port\_mode}} = \mbox{\hyperlink{bxe_8h_a0f89d506c78ab3910020d2f9aaf08fe5}{CHIP\_PORT\_MODE\_NONE}}; \textcolor{comment}{/* E1 \& E1h*/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14040}14040     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a28519a382bb766e19cc8882f2ed7d791}{CHIP\_IS\_E2E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14041}14041         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14042}14042 \textcolor{comment}{         * Read port4mode\_en\_ovwr[0]:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14043}14043 \textcolor{comment}{         *   If 1, four port mode is in port4mode\_en\_ovwr[1].}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14044}14044 \textcolor{comment}{         *   If 0, four port mode is in port4mode\_en[0].}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14045}14045 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14046}14046         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aeb611e1f2408b552f16384cf9fc5a4de}{MISC\_REG\_PORT4MODE\_EN\_OVWR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14047}14047         \textcolor{keywordflow}{if} (val \& 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14048}14048             val = ((val >> 1) \& 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14049}14049         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14050}14050             val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9cdf6e1dbcc6ad1e68ae12c0e93235a0}{MISC\_REG\_PORT4MODE\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14051}14051         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14052}14052 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14053}14053         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a5b1cf5ef239cdbcb18034ecb7799ce36}{chip\_port\_mode}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14054}14054             (val) ? \mbox{\hyperlink{bxe_8h_a016d31fc3005f6b5e4018d33ac1fd028}{CHIP\_4\_PORT\_MODE}} : \mbox{\hyperlink{bxe_8h_a1a941d85e7fde2b305cf3e2bee578d72}{CHIP\_2\_PORT\_MODE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14055}14055 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14056}14056         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Port mode = \%s\(\backslash\)n"{}}, (val) ? \textcolor{stringliteral}{"{}4"{}} : \textcolor{stringliteral}{"{}2"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14057}14057     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14058}14058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14059}14059     \textcolor{comment}{/* get the function and path info for the device */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14060}14060     \mbox{\hyperlink{bxe_8c_aabb250d6fc49990b9a32e8b3a2e34ecd}{bxe\_get\_function\_num}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14061}14061 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14062}14062     \textcolor{comment}{/* get the shared memory base address */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14063}14063     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a97c45ddd35325a82a07dba52c261cd30}{shmem\_base}}     =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14064}14064     sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcde09ff5cb957a4d0ac0bf7b778fac6}{shmem\_base}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14065}14065         \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac568628b825db5f7e7339932a19bcd2b}{MISC\_REG\_SHARED\_MEM\_ADDR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14066}14066     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2ea341c2b43f033f56e70c9a5cd63e0d}{shmem2\_base}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14067}14067         \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, (\mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) ? \mbox{\hyperlink{ecore__reg_8h_ac3859336f9c51ca5ab27e81b4440041b}{MISC\_REG\_GENERIC\_CR\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14068}14068                                   \mbox{\hyperlink{ecore__reg_8h_a414d2dd6c9f7d2dfca6cdbd47511e93b}{MISC\_REG\_GENERIC\_CR\_0}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14069}14069 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14070}14070     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}shmem\_base=0x\%08x, shmem2\_base=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14071}14071           sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a97c45ddd35325a82a07dba52c261cd30}{shmem\_base}}, sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2ea341c2b43f033f56e70c9a5cd63e0d}{shmem2\_base}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14072}14072 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14073}14073     \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a97c45ddd35325a82a07dba52c261cd30}{shmem\_base}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14074}14074         \textcolor{comment}{/* this should ONLY prevent upcoming shmem reads */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14075}14075         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}MCP not active\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14076}14076         sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} |= \mbox{\hyperlink{bxe_8h_ab4bbc72722ef13c5609281bd8f992bdf}{BXE\_NO\_MCP\_FLAG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14077}14077         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14078}14078     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14079}14079 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14080}14080     \textcolor{comment}{/* make sure the shared memory contents are valid */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14081}14081     val = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, validity\_map[\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14082}14082     \textcolor{keywordflow}{if} ((val \& (\mbox{\hyperlink{ecore__hsi_8h_aa78199451646b145643550b1a5801040}{SHR\_MEM\_VALIDITY\_DEV\_INFO}} | \mbox{\hyperlink{ecore__hsi_8h_a29dc5337a779da0326a7f64c2e4ce9a9}{SHR\_MEM\_VALIDITY\_MB}})) !=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14083}14083         (\mbox{\hyperlink{ecore__hsi_8h_aa78199451646b145643550b1a5801040}{SHR\_MEM\_VALIDITY\_DEV\_INFO}} | \mbox{\hyperlink{ecore__hsi_8h_a29dc5337a779da0326a7f64c2e4ce9a9}{SHR\_MEM\_VALIDITY\_MB}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14084}14084         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid SHMEM validity signature: 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14085}14085         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14086}14086     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14087}14087     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Valid SHMEM validity signature: 0x\%08x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14088}14088 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14089}14089     \textcolor{comment}{/* get the bootcode version */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14090}14090     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a50cd67f79939f984fd54c4b295c7d8bd}{bc\_ver}} = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.bc\_rev);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14091}14091     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ad79019752cbc53dd06c5b351504c55d5}{bc\_ver\_str}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14092}14092              \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ad79019752cbc53dd06c5b351504c55d5}{bc\_ver\_str}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14093}14093              \textcolor{stringliteral}{"{}\%d.\%d.\%d"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14094}14094              ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a50cd67f79939f984fd54c4b295c7d8bd}{bc\_ver}} >> 24) \& 0xff),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14095}14095              ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a50cd67f79939f984fd54c4b295c7d8bd}{bc\_ver}} >> 16) \& 0xff),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14096}14096              ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a50cd67f79939f984fd54c4b295c7d8bd}{bc\_ver}} >>  8) \& 0xff));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14097}14097     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Bootcode version: \%s\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ad79019752cbc53dd06c5b351504c55d5}{bc\_ver\_str}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14098}14098 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14099}14099     \textcolor{comment}{/* get the bootcode shmem address */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14100}14100     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a78809e8ffa280f28b1496a0c8a7bd25c}{mf\_cfg\_base}} = \mbox{\hyperlink{bxe_8c_a3a16f214808fe09dbeead42f7aa65945}{bxe\_get\_shmem\_mf\_cfg\_base}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14101}14101     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}mf\_cfg\_base=0x08\%x \(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a78809e8ffa280f28b1496a0c8a7bd25c}{mf\_cfg\_base}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14102}14102 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14103}14103     \textcolor{comment}{/* clean indirect addresses as they're not used */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14104}14104     pci\_write\_config(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, \mbox{\hyperlink{ecore__reg_8h_a04e130fe68fa35475c333a14e8479901}{PCICFG\_GRC\_ADDRESS}}, 0, 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14105}14105     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14106}14106         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a5a2bb4b4de0aa8e2b023511c49a3f6cc}{PXP2\_REG\_PGL\_ADDR\_88\_F0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14107}14107         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a78d688d65935eff1b75a0ee1e888839d}{PXP2\_REG\_PGL\_ADDR\_8C\_F0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14108}14108         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aba91572ad07133e93ce9b63f3fc890c9}{PXP2\_REG\_PGL\_ADDR\_90\_F0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14109}14109         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae542341be03df8a2ed2a70c6efde991d}{PXP2\_REG\_PGL\_ADDR\_94\_F0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14110}14110         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14111}14111             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a49316992a12e1ed4e754fb04139bac99}{PXP2\_REG\_PGL\_ADDR\_88\_F1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14112}14112             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a68fa4d71518fdda26073ed532ff4963b}{PXP2\_REG\_PGL\_ADDR\_8C\_F1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14113}14113             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a132249cc618174b70dff11221b564aea}{PXP2\_REG\_PGL\_ADDR\_90\_F1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14114}14114             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa2058dc371211ac97f620965527d94fa}{PXP2\_REG\_PGL\_ADDR\_94\_F1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14115}14115         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14116}14116 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14117}14117         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14118}14118 \textcolor{comment}{         * Enable internal target-\/read (in case we are probed after PF}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14119}14119 \textcolor{comment}{         * FLR). Must be done prior to any BAR read access. Only for}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14120}14120 \textcolor{comment}{         * 57712 and up}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14121}14121 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14122}14122         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14123}14123             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa3854feae081bd49ecaaf4a2213a58ad}{PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_TARGET\_READ}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14124}14124         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14125}14125     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14126}14126 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14127}14127     \textcolor{comment}{/* get the nvram size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14128}14128     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_acfce04f422ab41a864a4e713b20a7831}{MCP\_REG\_MCPR\_NVM\_CFG4}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14129}14129     sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14130}14130         (\mbox{\hyperlink{bxe_8h_a9f629e7105dc8af1fd7ea7d398388321}{NVRAM\_1MB\_SIZE}} << (val \& \mbox{\hyperlink{ecore__reg_8h_a30584bbefb2f7c0782a28c567662902d}{MCPR\_NVM\_CFG4\_FLASH\_SIZE}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14131}14131     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}nvram flash size: \%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14132}14132 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14133}14133     \textcolor{comment}{/* get PCI capabilites */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14134}14134     \mbox{\hyperlink{bxe_8c_ae3f69fe5ae4637d406d961b3fdeff167}{bxe\_probe\_pci\_caps}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14135}14135 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14136}14136     \mbox{\hyperlink{bxe_8c_ac92bd4a821d19305e1e7810951283474}{bxe\_set\_power\_state}}(sc, \mbox{\hyperlink{bxe_8h_a0d294d030355eb0d4097dc557cac6b58}{PCI\_PM\_D0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14137}14137 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14138}14138     \textcolor{comment}{/* get various configuration parameters from shmem */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14139}14139     \mbox{\hyperlink{bxe_8c_ac60d190142b9d9fbec51a2f3a19e4dc9}{bxe\_get\_shmem\_info}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14140}14140 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14141}14141     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa977fabc99ea64e50ad8726a7f9955fb}{pcie\_msix\_cap\_reg}} != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14142}14142         val = pci\_read\_config(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14143}14143                               (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_aa977fabc99ea64e50ad8726a7f9955fb}{pcie\_msix\_cap\_reg}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14144}14144                                PCIR\_MSIX\_CTRL),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14145}14145                               2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14146}14146         sc-\/>\mbox{\hyperlink{structbxe__softc_a3bfc5946a9a75867b12280c74a86b7f2}{igu\_sb\_cnt}} = (val \& PCIM\_MSIXCTRL\_TABLE\_SIZE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14147}14147     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14148}14148         sc-\/>\mbox{\hyperlink{structbxe__softc_a3bfc5946a9a75867b12280c74a86b7f2}{igu\_sb\_cnt}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14149}14149     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14150}14150 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14151}14151     sc-\/>\mbox{\hyperlink{structbxe__softc_af4d4b52cd56562c3650246c11ebe967d}{igu\_base\_addr}} = \mbox{\hyperlink{ecore__reg_8h_a2464666463aaf0d33403df59a27fa222}{BAR\_IGU\_INTMEM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14152}14152 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14153}14153     \textcolor{comment}{/* initialize IGU parameters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14154}14154     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14155}14155         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} = \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14156}14156         sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}} = \mbox{\hyperlink{bxe_8h_a3867a436cdc160b1ff10daf6a013d83b}{DEF\_SB\_IGU\_ID}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14157}14157         sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14158}14158     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14159}14159         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} = \mbox{\hyperlink{bxe_8h_a3ec1ab12dbb399abaf3866cd2d1ac9f0}{INT\_BLOCK\_IGU}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14160}14160 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14161}14161         \textcolor{comment}{/* do not allow device reset during IGU info preocessing */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14162}14162         \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0ff7f7aee690345f14d3fcd1d811f62a}{HW\_LOCK\_RESOURCE\_RESET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14163}14163 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14164}14164         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf596bf128396259972d33e65a19bc20}{IGU\_REG\_BLOCK\_CONFIGURATION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14165}14165 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14166}14166         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_afca43ffded626f8fee799c58b967be03}{IGU\_BLOCK\_CONFIGURATION\_REG\_BACKWARD\_COMP\_EN}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14167}14167             \textcolor{keywordtype}{int} tout = 5000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14168}14168 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14169}14169             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}FORCING IGU Normal Mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14170}14170 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14171}14171             val \&= \string~(\mbox{\hyperlink{ecore__reg_8h_afca43ffded626f8fee799c58b967be03}{IGU\_BLOCK\_CONFIGURATION\_REG\_BACKWARD\_COMP\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14172}14172             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_adf596bf128396259972d33e65a19bc20}{IGU\_REG\_BLOCK\_CONFIGURATION}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14173}14173             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa52281729f3a31db4f1095a4f27ce1bb}{IGU\_REG\_RESET\_MEMORIES}}, 0x7f);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14174}14174 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14175}14175             \textcolor{keywordflow}{while} (tout \&\& \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa52281729f3a31db4f1095a4f27ce1bb}{IGU\_REG\_RESET\_MEMORIES}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14176}14176                 tout-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14177}14177                 DELAY(1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14178}14178             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14179}14179 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14180}14180             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa52281729f3a31db4f1095a4f27ce1bb}{IGU\_REG\_RESET\_MEMORIES}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14181}14181                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}FORCING IGU Normal Mode failed!!!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14182}14182                 \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0ff7f7aee690345f14d3fcd1d811f62a}{HW\_LOCK\_RESOURCE\_RESET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14183}14183                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14184}14184             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14185}14185         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14186}14186 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14187}14187         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_afca43ffded626f8fee799c58b967be03}{IGU\_BLOCK\_CONFIGURATION\_REG\_BACKWARD\_COMP\_EN}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14188}14188             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}IGU Backward Compatible Mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14189}14189             sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} |= \mbox{\hyperlink{bxe_8h_aae143159a0a7f95ed1a90220fa867119}{INT\_BLOCK\_MODE\_BW\_COMP}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14190}14190         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14191}14191             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}IGU Normal Mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14192}14192         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14193}14193 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14194}14194         rc = \mbox{\hyperlink{bxe_8c_ab0debeaab47e7ce94fbaa8d97f2ad3a1}{bxe\_get\_igu\_cam\_info}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14195}14195 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14196}14196         \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0ff7f7aee690345f14d3fcd1d811f62a}{HW\_LOCK\_RESOURCE\_RESET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14197}14197 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14198}14198         \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14199}14199             \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14200}14200         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14201}14201     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14202}14202 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14203}14203     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14204}14204 \textcolor{comment}{     * Get base FW non-\/default (fast path) status block ID. This value is}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14205}14205 \textcolor{comment}{     * used to initialize the fw\_sb\_id saved on the fp/queue structure to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14206}14206 \textcolor{comment}{     * determine the id used by the FW.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14207}14207 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14208}14208     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14209}14209         sc-\/>\mbox{\hyperlink{structbxe__softc_af761cf987daa6f7b013049904f425f46}{base\_fw\_ndsb}} = ((\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) * \mbox{\hyperlink{bxe_8h_a47525c15ef8f92193e60dcb18ef5e593}{FP\_SB\_MAX\_E1x}}) + \mbox{\hyperlink{bxe_8h_a52a850350a7c66d069b79f8fdfe12ef4}{SC\_L\_ID}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14210}14210     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14211}14211         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14212}14212 \textcolor{comment}{         * 57712+ -\/ We currently use one FW SB per IGU SB (Rx and Tx of}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14213}14213 \textcolor{comment}{         * the same queue are indicated on the same IGU SB). So we prefer}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14214}14214 \textcolor{comment}{         * FW and IGU SBs to be the same value.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14215}14215 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14216}14216         sc-\/>\mbox{\hyperlink{structbxe__softc_af761cf987daa6f7b013049904f425f46}{base\_fw\_ndsb}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14217}14217     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14218}14218 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14219}14219     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14220}14220           \textcolor{stringliteral}{"{}igu\_dsb\_id=\%d igu\_base\_sb=\%d igu\_sb\_cnt=\%d base\_fw\_ndsb=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14221}14221           sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14222}14222           sc-\/>\mbox{\hyperlink{structbxe__softc_a3bfc5946a9a75867b12280c74a86b7f2}{igu\_sb\_cnt}}, sc-\/>\mbox{\hyperlink{structbxe__softc_af761cf987daa6f7b013049904f425f46}{base\_fw\_ndsb}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14223}14223 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14224}14224     \mbox{\hyperlink{bxe__elink_8c_a7d457113ec4f380dc0f966e30a86c426}{elink\_phy\_probe}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14225}14225 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14226}14226     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14227}14227 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14228}14228 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14229}14229 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14230}\mbox{\hyperlink{bxe_8c_a6dba9c3da7414b5f3e19834da52958a2}{14230}} \mbox{\hyperlink{bxe_8c_a6dba9c3da7414b5f3e19834da52958a2}{bxe\_link\_settings\_supported}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14231}14231                             uint32\_t         switch\_cfg)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14232}14232 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14233}14233     uint32\_t cfg\_size = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14234}14234     uint32\_t idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14235}14235     uint8\_t port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14236}14236 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14237}14237     \textcolor{comment}{/* aggregation of supported attributes of all external phys */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14238}14238     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14239}14239     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[1] = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14240}14240 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14241}14241     \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_ae3c76bd0fa4419d7051a35ae7fc6ce45}{num\_phys}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14242}14242     \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14243}14243         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0] = sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe__elink_8h_a7e557a0c651677024943229f99724e0a}{ELINK\_INT\_PHY}}].\mbox{\hyperlink{structelink__phy_af2d4ed8d545ee33335f3a8877ec52f53}{supported}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14244}14244         cfg\_size = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14245}14245         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14246}14246     \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14247}14247         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0] = sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}}].\mbox{\hyperlink{structelink__phy_af2d4ed8d545ee33335f3a8877ec52f53}{supported}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14248}14248         cfg\_size = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14249}14249         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14250}14250     \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14251}14251         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_ae04ce6fa3fbb7a61fe181ca4d2598e56}{multi\_phy\_config}} \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14252}14252             \mbox{\hyperlink{ecore__hsi_8h_ac702f36ff4a9993d8b7b20c9e10e68d3}{PORT\_HW\_CFG\_PHY\_SWAPPED\_ENABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14253}14253             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[1] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14254}14254                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}}].\mbox{\hyperlink{structelink__phy_af2d4ed8d545ee33335f3a8877ec52f53}{supported}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14255}14255             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14256}14256                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe__elink_8h_ab6a87ff0342c6fdaaeb86619998c9473}{ELINK\_EXT\_PHY2}}].\mbox{\hyperlink{structelink__phy_af2d4ed8d545ee33335f3a8877ec52f53}{supported}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14257}14257         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14258}14258             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14259}14259                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}}].\mbox{\hyperlink{structelink__phy_af2d4ed8d545ee33335f3a8877ec52f53}{supported}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14260}14260             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[1] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14261}14261                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe__elink_8h_ab6a87ff0342c6fdaaeb86619998c9473}{ELINK\_EXT\_PHY2}}].\mbox{\hyperlink{structelink__phy_af2d4ed8d545ee33335f3a8877ec52f53}{supported}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14262}14262         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14263}14263         cfg\_size = 2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14264}14264         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14265}14265     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14266}14266 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14267}14267     \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0] || sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[1])) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14268}14268         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid phy config in NVRAM (PHY1=0x\%08x PHY2=0x\%08x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14269}14269               \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14270}14270                        dev\_info.port\_hw\_config[port].external\_phy\_config),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14271}14271               \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14272}14272                        dev\_info.port\_hw\_config[port].external\_phy\_config2));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14273}14273         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14274}14274     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14275}14275 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14276}14276     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14277}14277         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a15920480b8858f3688cf555a0c992749}{phy\_addr}} = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1c02d14b443112467f14b498bd2e0e0a}{MISC\_REG\_WC0\_CTRL\_PHY\_ADDR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14278}14278     \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14279}14279         \textcolor{keywordflow}{switch} (switch\_cfg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14280}14280         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_a4d23f8854c07355779b77d86ccef084f}{ELINK\_SWITCH\_CFG\_1G}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14281}14281             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a15920480b8858f3688cf555a0c992749}{phy\_addr}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14282}14282                 \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_acf620ab18bf85daf49ad755f7f902e58}{NIG\_REG\_SERDES0\_CTRL\_PHY\_ADDR}} + port*0x10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14283}14283             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14284}14284         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__elink_8h_a348c48c9ceebcdc9723900320f1c3187}{ELINK\_SWITCH\_CFG\_10G}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14285}14285             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a15920480b8858f3688cf555a0c992749}{phy\_addr}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14286}14286                 \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a96668c66d893b88cb1decbb1f390f9d5}{NIG\_REG\_XGXS0\_CTRL\_PHY\_ADDR}} + port*0x18);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14287}14287             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14288}14288         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14289}14289             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid switch config in link\_config=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14290}14290                   sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ae679c0984152f655525475eb2895882f}{link\_config}}[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14291}14291             \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14292}14292         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14293}14293     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14294}14294 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14295}14295     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PHY addr 0x\%08x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a15920480b8858f3688cf555a0c992749}{phy\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14296}14296 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14297}14297     \textcolor{comment}{/* mask what we support according to speed\_cap\_mask per configuration */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14298}14298     \textcolor{keywordflow}{for} (idx = 0; idx < cfg\_size; idx++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14299}14299         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14300}14300               \mbox{\hyperlink{ecore__hsi_8h_a2230e3a2b88ccea7c20e7d48e2df9f01}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_10M\_HALF}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14301}14301             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \&= \string~ELINK\_SUPPORTED\_10baseT\_Half;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14302}14302         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14303}14303 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14304}14304         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14305}14305               \mbox{\hyperlink{ecore__hsi_8h_a24b793265d73d9e030467edfd9fb0c40}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_10M\_FULL}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14306}14306             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \&= \string~ELINK\_SUPPORTED\_10baseT\_Full;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14307}14307         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14308}14308 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14309}14309         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14310}14310               \mbox{\hyperlink{ecore__hsi_8h_a4925827d4b16d429bd51a1fa8a5f05d2}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_100M\_HALF}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14311}14311             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \&= \string~ELINK\_SUPPORTED\_100baseT\_Half;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14312}14312         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14313}14313 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14314}14314         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14315}14315               \mbox{\hyperlink{ecore__hsi_8h_a1ff503764dd9101539eb9e901f01a586}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_100M\_FULL}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14316}14316             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \&= \string~ELINK\_SUPPORTED\_100baseT\_Full;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14317}14317         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14318}14318 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14319}14319         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14320}14320               \mbox{\hyperlink{ecore__hsi_8h_a1846b3976dcc1bbd1b43259db0edf18f}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_1G}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14321}14321             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \&= \string~ELINK\_SUPPORTED\_1000baseT\_Full;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14322}14322         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14323}14323 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14324}14324         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14325}14325               \mbox{\hyperlink{ecore__hsi_8h_a64d4d68ecc4060e15bf48b75d6166e17}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_2\_5G}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14326}14326             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \&= \string~ELINK\_SUPPORTED\_2500baseX\_Full;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14327}14327         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14328}14328 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14329}14329         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14330}14330               \mbox{\hyperlink{ecore__hsi_8h_ac70541abed2058e9d9625ba00c784267}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_10G}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14331}14331             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \&= \string~ELINK\_SUPPORTED\_10000baseT\_Full;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14332}14332         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14333}14333 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14334}14334         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14335}14335               \mbox{\hyperlink{ecore__hsi_8h_a2345575a27291342f9210b0eee908229}{PORT\_HW\_CFG\_SPEED\_CAPABILITY\_D0\_20G}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14336}14336             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \&= \string~ELINK\_SUPPORTED\_20000baseKR2\_Full;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14337}14337         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14338}14338     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14339}14339 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14340}14340     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PHY supported 0=0x\%08x 1=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14341}14341           sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0], sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[1]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14342}14342         \mbox{\hyperlink{bxe__elink_8h_a045180b52edcdd9c7e91a62c2f0e8095}{ELINK\_DEBUG\_P2}}(sc, \textcolor{stringliteral}{"{}PHY supported 0=0x\%08x 1=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14343}14343                                         sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[0], sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[1]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14344}14344 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14345}14345 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14346}14346 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14347}\mbox{\hyperlink{bxe_8c_a10d0924fc222173e52e8b55c6c3b811c}{14347}} \mbox{\hyperlink{bxe_8c_a10d0924fc222173e52e8b55c6c3b811c}{bxe\_link\_settings\_requested}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14348}14348 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14349}14349     uint32\_t link\_config;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14350}14350     uint32\_t idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14351}14351     uint32\_t cfg\_size = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14352}14352 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14353}14353     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14354}14354     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[1] = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14355}14355 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14356}14356     \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_ae3c76bd0fa4419d7051a35ae7fc6ce45}{num\_phys}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14357}14357     \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14358}14358     \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14359}14359         cfg\_size = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14360}14360         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14361}14361     \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14362}14362         cfg\_size = 2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14363}14363         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14364}14364     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14365}14365 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14366}14366     \textcolor{keywordflow}{for} (idx = 0; idx < cfg\_size; idx++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14367}14367         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aeb0128f9e72a41e4d9f013c5680d54cf}{req\_duplex}}[idx] = \mbox{\hyperlink{bxe__elink_8h_a6c8f66942aa4680d437e148526b7e65c}{DUPLEX\_FULL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14368}14368         link\_config = sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ae679c0984152f655525475eb2895882f}{link\_config}}[idx];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14369}14369 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14370}14370         \textcolor{keywordflow}{switch} (link\_config \& \mbox{\hyperlink{ecore__hsi_8h_a74b67e6392c44fbbc7cba77fbc9ae6cc}{PORT\_FEATURE\_LINK\_SPEED\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14371}14371         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_ad1f812ccddc5af39d66932b3a6bbcaf9}{PORT\_FEATURE\_LINK\_SPEED\_AUTO}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14372}14372             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_ae42317db6af361f4d4d3625a9d9d4608}{ELINK\_SUPPORTED\_Autoneg}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14373}14373                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_afaf2d80469609a7f551ea532de2e6e8d}{ELINK\_SPEED\_AUTO\_NEG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14374}14374                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |= sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14375}14375                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe__elink_8h_ac40aab380635f1fcfc21350cd2bf9489}{ELINK\_EXT\_PHY1}}].\mbox{\hyperlink{structelink__phy_a4ad126801aa89f96c827f1aa18591620}{type}} ==}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14376}14376                     \mbox{\hyperlink{ecore__hsi_8h_a9f39ea322cd8e8a50ed5cb7fafd3ed11}{PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_BCM84833}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14377}14377                     sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14378}14378                         (\mbox{\hyperlink{bxe__elink_8h_a4ec55dc9c7b8195185dcd8a903b5eaa0}{ELINK\_SUPPORTED\_100baseT\_Half}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14379}14379                          \mbox{\hyperlink{bxe__elink_8h_a80ffbb74b42b873fdad3bf14a7530f91}{ELINK\_SUPPORTED\_100baseT\_Full}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14380}14380             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14381}14381                 \textcolor{comment}{/* force 10G, no AN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14382}14382                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_a48f10fe3bb3918f42d00f787a421780a}{ELINK\_SPEED\_10000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14383}14383                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14384}14384                     (\mbox{\hyperlink{bxe_8h_a1df98b8e1d48bbfb9b5f9cb7901de6e8}{ADVERTISED\_10000baseT\_Full}} | \mbox{\hyperlink{bxe_8h_a521db078bf5906ecf01b7ba3607b2f8b}{ADVERTISED\_FIBRE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14385}14385                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14386}14386             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14387}14387             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14388}14388 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14389}14389         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a2ad0ccb7e723384fe165132e4b921f75}{PORT\_FEATURE\_LINK\_SPEED\_10M\_FULL}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14390}14390             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_aab6ab70f3fea71ecd1a304bad561b799}{ELINK\_SUPPORTED\_10baseT\_Full}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14391}14391                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_a7e9e995d116e2b55daf82285a49c6672}{ELINK\_SPEED\_10}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14392}14392                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |= (\mbox{\hyperlink{bxe_8h_a978237ba1c31e64d4a83268ca8dd2175}{ADVERTISED\_10baseT\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14393}14393                                               \mbox{\hyperlink{bxe_8h_ae8443fa0af93dd87f6b4011f76514abc}{ADVERTISED\_TP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14394}14394             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14395}14395                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid NVRAM config link\_config=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14396}14396                           \textcolor{stringliteral}{"{}speed\_cap\_mask=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14397}14397                       link\_config, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14398}14398                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14399}14399             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14400}14400             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14401}14401 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14402}14402         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a3cdfe6ea7c4cd3cb4e01f19365ab7182}{PORT\_FEATURE\_LINK\_SPEED\_10M\_HALF}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14403}14403             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_ae7a617f758193094bd0918ea933f2d45}{ELINK\_SUPPORTED\_10baseT\_Half}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14404}14404                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_a7e9e995d116e2b55daf82285a49c6672}{ELINK\_SPEED\_10}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14405}14405                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aeb0128f9e72a41e4d9f013c5680d54cf}{req\_duplex}}[idx] = \mbox{\hyperlink{bxe__elink_8h_aa2975313d10f8114370435d1bf11e879}{DUPLEX\_HALF}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14406}14406                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |= (\mbox{\hyperlink{bxe_8h_ac84f67e4f8e5edd15733479d20eb287d}{ADVERTISED\_10baseT\_Half}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14407}14407                                               \mbox{\hyperlink{bxe_8h_ae8443fa0af93dd87f6b4011f76514abc}{ADVERTISED\_TP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14408}14408                                 \mbox{\hyperlink{bxe__elink_8h_a357d30c7517cc9c0238f5ead3ef7e232}{ELINK\_DEBUG\_P1}}(sc, \textcolor{stringliteral}{"{}driver requesting DUPLEX\_HALF req\_duplex = \%x!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14409}14409                                                                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aeb0128f9e72a41e4d9f013c5680d54cf}{req\_duplex}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14410}14410             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14411}14411                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid NVRAM config link\_config=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14412}14412                           \textcolor{stringliteral}{"{}speed\_cap\_mask=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14413}14413                       link\_config, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14414}14414                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14415}14415             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14416}14416             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14417}14417 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14418}14418         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a92da426070298a031e0c8e8bf5ee8c62}{PORT\_FEATURE\_LINK\_SPEED\_100M\_FULL}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14419}14419             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_a80ffbb74b42b873fdad3bf14a7530f91}{ELINK\_SUPPORTED\_100baseT\_Full}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14420}14420                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_aa196ecc283202797b37d5a438e7a9228}{ELINK\_SPEED\_100}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14421}14421                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |= (\mbox{\hyperlink{bxe_8h_a76d7b7691ea4ed4f54af7f09a05e2ed5}{ADVERTISED\_100baseT\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14422}14422                                               \mbox{\hyperlink{bxe_8h_ae8443fa0af93dd87f6b4011f76514abc}{ADVERTISED\_TP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14423}14423             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14424}14424                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid NVRAM config link\_config=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14425}14425                           \textcolor{stringliteral}{"{}speed\_cap\_mask=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14426}14426                       link\_config, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14427}14427                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14428}14428             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14429}14429             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14430}14430 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14431}14431         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a3e8b3b5dce75d29d0461ce92bba32224}{PORT\_FEATURE\_LINK\_SPEED\_100M\_HALF}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14432}14432             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_a4ec55dc9c7b8195185dcd8a903b5eaa0}{ELINK\_SUPPORTED\_100baseT\_Half}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14433}14433                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_aa196ecc283202797b37d5a438e7a9228}{ELINK\_SPEED\_100}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14434}14434                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aeb0128f9e72a41e4d9f013c5680d54cf}{req\_duplex}}[idx] = \mbox{\hyperlink{bxe__elink_8h_aa2975313d10f8114370435d1bf11e879}{DUPLEX\_HALF}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14435}14435                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |= (\mbox{\hyperlink{bxe_8h_a6e1bbf7e882217db59719ff32b005956}{ADVERTISED\_100baseT\_Half}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14436}14436                                               \mbox{\hyperlink{bxe_8h_ae8443fa0af93dd87f6b4011f76514abc}{ADVERTISED\_TP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14437}14437             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14438}14438                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid NVRAM config link\_config=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14439}14439                           \textcolor{stringliteral}{"{}speed\_cap\_mask=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14440}14440                       link\_config, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14441}14441                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14442}14442             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14443}14443             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14444}14444 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14445}14445         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a436eb3a6a6ab97fa1f5372c15b542b39}{PORT\_FEATURE\_LINK\_SPEED\_1G}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14446}14446             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_a89d625ae13950d8d1e0d78940931f984}{ELINK\_SUPPORTED\_1000baseT\_Full}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14447}14447                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_a02e2b36159785838b3a52d4c42ba52df}{ELINK\_SPEED\_1000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14448}14448                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |= (\mbox{\hyperlink{bxe_8h_a0fb7f52668e94490d1d5e785de51d8ea}{ADVERTISED\_1000baseT\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14449}14449                                               \mbox{\hyperlink{bxe_8h_ae8443fa0af93dd87f6b4011f76514abc}{ADVERTISED\_TP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14450}14450             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14451}14451                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid NVRAM config link\_config=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14452}14452                           \textcolor{stringliteral}{"{}speed\_cap\_mask=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14453}14453                       link\_config, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14454}14454                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14455}14455             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14456}14456             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14457}14457 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14458}14458         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a825e29f714a266525ca970fd7be081e2}{PORT\_FEATURE\_LINK\_SPEED\_2\_5G}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14459}14459             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_a46a284e49b728bc5b286cfae34c535d8}{ELINK\_SUPPORTED\_2500baseX\_Full}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14460}14460                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_ab7ec8c261974754b6cc6b9df89cea453}{ELINK\_SPEED\_2500}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14461}14461                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |= (\mbox{\hyperlink{bxe_8h_acfaba0496d25a7aa1c36ae350d65165e}{ADVERTISED\_2500baseX\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14462}14462                                               \mbox{\hyperlink{bxe_8h_ae8443fa0af93dd87f6b4011f76514abc}{ADVERTISED\_TP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14463}14463             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14464}14464                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid NVRAM config link\_config=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14465}14465                           \textcolor{stringliteral}{"{}speed\_cap\_mask=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14466}14466                       link\_config, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14467}14467                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14468}14468             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14469}14469             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14470}14470 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14471}14471         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_af2d52f5b1ac8d2e185207c46ba4853fb}{PORT\_FEATURE\_LINK\_SPEED\_10G\_CX4}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14472}14472             \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_abf422afe89f78dc4914b358232e40322}{ELINK\_SUPPORTED\_10000baseT\_Full}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14473}14473                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_a48f10fe3bb3918f42d00f787a421780a}{ELINK\_SPEED\_10000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14474}14474                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] |= (\mbox{\hyperlink{bxe_8h_a1df98b8e1d48bbfb9b5f9cb7901de6e8}{ADVERTISED\_10000baseT\_Full}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14475}14475                                               \mbox{\hyperlink{bxe_8h_a521db078bf5906ecf01b7ba3607b2f8b}{ADVERTISED\_FIBRE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14476}14476             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14477}14477                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid NVRAM config link\_config=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14478}14478                           \textcolor{stringliteral}{"{}speed\_cap\_mask=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14479}14479                       link\_config, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14480}14480                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14481}14481             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14482}14482             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14483}14483 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14484}14484         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a6bf2d62ef9751fa233f1136cb528c5b6}{PORT\_FEATURE\_LINK\_SPEED\_20G}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14485}14485             sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_a3ea01c4145898826e3130f9038fefde6}{ELINK\_SPEED\_20000}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14486}14486             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14487}14487 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14488}14488         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14489}14489             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid NVRAM config link\_config=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14490}14490                       \textcolor{stringliteral}{"{}speed\_cap\_mask=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14491}14491                   link\_config, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14492}14492             sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx] = \mbox{\hyperlink{bxe__elink_8h_afaf2d80469609a7f551ea532de2e6e8d}{ELINK\_SPEED\_AUTO\_NEG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14493}14493             sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx] = sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14494}14494             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14495}14495         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14496}14496 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14497}14497         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[idx] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14498}14498             (link\_config \& \mbox{\hyperlink{ecore__hsi_8h_af457e20fe2c0d7b04de84d0eab38508c}{PORT\_FEATURE\_FLOW\_CONTROL\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14499}14499 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14500}14500         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[idx] == \mbox{\hyperlink{bxe__elink_8h_a7eb64bbf81145a789b73a471b2bff7ab}{ELINK\_FLOW\_CTRL\_AUTO}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14501}14501             \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[idx] \& \mbox{\hyperlink{bxe__elink_8h_ae42317db6af361f4d4d3625a9d9d4608}{ELINK\_SUPPORTED\_Autoneg}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14502}14502                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[idx] = \mbox{\hyperlink{bxe__elink_8h_ab87429402f404188dd849e860d22e660}{ELINK\_FLOW\_CTRL\_NONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14503}14503             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14504}14504                 \mbox{\hyperlink{bxe_8c_a04a48ef78afd7f4e17babaaffe56fd0c}{bxe\_set\_requested\_fc}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14505}14505             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14506}14506         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14507}14507 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14508}14508         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}req\_line\_speed=\%d req\_duplex=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14509}14509                             \textcolor{stringliteral}{"{}req\_flow\_ctrl=0x\%x advertising=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14510}14510               sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14511}14511               sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aeb0128f9e72a41e4d9f013c5680d54cf}{req\_duplex}}[idx],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14512}14512               sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[idx],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14513}14513               sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14514}14514                 \mbox{\hyperlink{bxe__elink_8h_ae37ee037fc4dc20207ea672377b21911}{ELINK\_DEBUG\_P3}}(sc, \textcolor{stringliteral}{"{}req\_line\_speed=\%d req\_duplex=\%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14515}14515                                                 \textcolor{stringliteral}{"{}advertising=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14516}14516                                                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[idx],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14517}14517                                                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_aeb0128f9e72a41e4d9f013c5680d54cf}{req\_duplex}}[idx],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14518}14518                                                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[idx]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14519}14519     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14520}14520 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14521}14521 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14522}14522 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14523}\mbox{\hyperlink{bxe_8c_a12171283ffd69802dfcf9670a29c289b}{14523}} \mbox{\hyperlink{bxe_8c_a12171283ffd69802dfcf9670a29c289b}{bxe\_get\_phy\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14524}14524 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14525}14525     uint8\_t port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14526}14526     uint32\_t config = sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_aaac9aba1205beafd664796df84eaa6c5}{config}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14527}14527     uint32\_t eee\_mode;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14528}14528 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14529}14529     \textcolor{comment}{/* shmem data already read in bxe\_get\_shmem\_info() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14530}14530 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14531}14531     \mbox{\hyperlink{bxe__elink_8h_ae37ee037fc4dc20207ea672377b21911}{ELINK\_DEBUG\_P3}}(sc, \textcolor{stringliteral}{"{}lane\_config=0x\%08x speed\_cap\_mask0=0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14532}14532                         \textcolor{stringliteral}{"{}link\_config0=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14533}14533                sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a2923f431589cf319f27c4ac33266a283}{lane\_config}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14534}14534                sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a8ffdc65731740c0ef0c6eb4b2bea75db}{speed\_cap\_mask}}[0],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14535}14535                sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_ae679c0984152f655525475eb2895882f}{link\_config}}[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14536}14536      }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14537}14537 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14538}14538     \mbox{\hyperlink{bxe_8c_a6dba9c3da7414b5f3e19834da52958a2}{bxe\_link\_settings\_supported}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a55ac58047b60d66c4a43161d26c06043}{switch\_cfg}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14539}14539     \mbox{\hyperlink{bxe_8c_a10d0924fc222173e52e8b55c6c3b811c}{bxe\_link\_settings\_requested}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14540}14540 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14541}14541     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a1868dc1d098a16c3c77553b907cb18fb}{autogreeen}} == \mbox{\hyperlink{bxe_8h_ac163109b3cfcb72ab4a590139175ce87}{AUTO\_GREEN\_FORCE\_ON}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14542}14542         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_af7cb7b6dddd37658f1704060e58d6938}{feature\_config\_flags}} |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14543}14543             \mbox{\hyperlink{bxe__elink_8h_af8d643e56afdad2b6f51d26c0926799f}{ELINK\_FEATURE\_CONFIG\_AUTOGREEEN\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14544}14544     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a1868dc1d098a16c3c77553b907cb18fb}{autogreeen}} == \mbox{\hyperlink{bxe_8h_a82f1f114dd99d6f8ca6ea6031d0c0dde}{AUTO\_GREEN\_FORCE\_OFF}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14545}14545         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_af7cb7b6dddd37658f1704060e58d6938}{feature\_config\_flags}} \&=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14546}14546             \string~ELINK\_FEATURE\_CONFIG\_AUTOGREEEN\_ENABLED;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14547}14547     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (config \& \mbox{\hyperlink{ecore__hsi_8h_a62e2a3edab6ba97709501268cd8fc4b6}{PORT\_FEAT\_CFG\_AUTOGREEEN\_ENABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14548}14548         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_af7cb7b6dddd37658f1704060e58d6938}{feature\_config\_flags}} |=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14549}14549             \mbox{\hyperlink{bxe__elink_8h_af8d643e56afdad2b6f51d26c0926799f}{ELINK\_FEATURE\_CONFIG\_AUTOGREEEN\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14550}14550     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14551}14551 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14552}14552     \textcolor{comment}{/* configure link feature according to nvram value */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14553}14553     eee\_mode =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14554}14554         (((\mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.port\_feature\_config[port].eee\_power\_mode)) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14555}14555           \mbox{\hyperlink{ecore__hsi_8h_a41b4538abcb5fa9b0bfdda207bbb6bf8}{PORT\_FEAT\_CFG\_EEE\_POWER\_MODE\_MASK}}) >>}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14556}14556          \mbox{\hyperlink{ecore__hsi_8h_a6bbeb5c88167afe043d71c4d1c3a1fb6}{PORT\_FEAT\_CFG\_EEE\_POWER\_MODE\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14557}14557     \textcolor{keywordflow}{if} (eee\_mode != \mbox{\hyperlink{ecore__hsi_8h_aa30792fc8f31bacf0468833d24f23a6b}{PORT\_FEAT\_CFG\_EEE\_POWER\_MODE\_DISABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14558}14558         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a5f7abf7927abdac432c0d7ba3a93dc16}{eee\_mode}} = (\mbox{\hyperlink{bxe__elink_8h_a6af8bd4526b5d5ca7df94d45f29089a4}{ELINK\_EEE\_MODE\_ADV\_LPI}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14559}14559                                     \mbox{\hyperlink{bxe__elink_8h_a0d76615ea3e1b12facf885b9eb1153a8}{ELINK\_EEE\_MODE\_ENABLE\_LPI}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14560}14560                                     \mbox{\hyperlink{bxe__elink_8h_a9eb587ddf86cbef23cad307a7cb8f469}{ELINK\_EEE\_MODE\_OUTPUT\_TIME}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14561}14561     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14562}14562         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a5f7abf7927abdac432c0d7ba3a93dc16}{eee\_mode}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14563}14563     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14564}14564 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14565}14565     \textcolor{comment}{/* get the media type */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14566}14566     \mbox{\hyperlink{bxe_8c_a3619a0afe1a93594db30d43160cf032d}{bxe\_media\_detect}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14567}14567         \mbox{\hyperlink{bxe__elink_8h_a357d30c7517cc9c0238f5ead3ef7e232}{ELINK\_DEBUG\_P1}}(sc, \textcolor{stringliteral}{"{}detected media type\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a177eb7af2eed09f48968adf55ea3d06f}{media}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14568}14568 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14569}14569 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14570}14570 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14571}\mbox{\hyperlink{bxe_8c_a316ffb5981eb70bc6c84cdf7359bfba5}{14571}} \mbox{\hyperlink{bxe_8c_a316ffb5981eb70bc6c84cdf7359bfba5}{bxe\_get\_params}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14572}14572 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14573}14573     \textcolor{comment}{/* get user tunable params */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14574}14574     \mbox{\hyperlink{bxe_8c_ab37d99f844d24612aeef5a05ebd098f9}{bxe\_get\_tunable\_params}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14575}14575 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14576}14576     \textcolor{comment}{/* select the RX and TX ring sizes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14577}14577     sc-\/>\mbox{\hyperlink{structbxe__softc_ae54ae6772bbb2b9435620aac68777c5f}{tx\_ring\_size}} = \mbox{\hyperlink{bxe_8h_aef1089a2712840f8b334801074918e0c}{TX\_BD\_USABLE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14578}14578     sc-\/>\mbox{\hyperlink{structbxe__softc_a1195901be35258ea09cc1795762d875d}{rx\_ring\_size}} = \mbox{\hyperlink{bxe_8h_a542fc7a39e64042f0b11c0238b5f9afd}{RX\_BD\_USABLE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14579}14579 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14580}14580     \textcolor{comment}{/* XXX disable WoL */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14581}14581     sc-\/>\mbox{\hyperlink{structbxe__softc_aab430e328aa13c5c191e14430177c25e}{wol}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14582}14582 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14583}14583 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14584}14584 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14585}\mbox{\hyperlink{bxe_8c_ad48614bf5ffb8eff6c3775bcb42de385}{14585}} \mbox{\hyperlink{bxe_8c_ad48614bf5ffb8eff6c3775bcb42de385}{bxe\_set\_modes\_bitmap}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14586}14586 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14587}14587     uint32\_t \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14588}14588 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14589}14589     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aa74010abe4e9d6f15f3425915a3f1e22}{CHIP\_REV\_IS\_FPGA}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14590}14590         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9ae5a18896bb822db1c1b61866a5f3180f}{MODE\_FPGA}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14591}14591     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a1b2ebcb5e39c8833b57e1d70aa728757}{CHIP\_REV\_IS\_EMUL}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14592}14592         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a8d58cfe937cc4900647c64d55176e58e}{MODE\_EMUL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14593}14593     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14594}14594         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a8f3f772623ed11e6eaec2b9372832664}{MODE\_ASIC}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14595}14595     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14596}14596 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14597}14597     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14598}14598         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9aa8d89d5ced944967075defd2aaad4f7f}{MODE\_PORT4}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14599}14599     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14600}14600         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a7a37b97272b5f038b2fa6d3b92d04230}{MODE\_PORT2}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14601}14601     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14602}14602 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14603}14603     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14604}14604         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a5161524c6f9a4099ab254d470911bb0b}{MODE\_E2}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14605}14605     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14606}14606         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a95542c12f572b1ab3c3fc487004f4abd}{MODE\_E3}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14607}14607         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a8fe71527ae2cd5c2aa26686056639310}{CHIP\_REV}}(sc) == \mbox{\hyperlink{bxe_8h_a51505dee5d11f052d9f0ebef20cbe1a9}{CHIP\_REV\_Ax}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14608}14608             \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a90739360202b88e063531788e907421c}{MODE\_E3\_A0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14609}14609         \} \textcolor{keywordflow}{else} \textcolor{comment}{/*if (CHIP\_REV(sc) == CHIP\_REV\_Bx)*/} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14610}14610             \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a4e0c130dbb5ae7447d8c2c13d8f96da1}{MODE\_E3\_B0}} | \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a135e60d9b1777f73941d32213c55fa11}{MODE\_COS3}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14611}14611         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14612}14612     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14613}14613 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14614}14614     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14615}14615         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a755e7f97e91cb7abdb94176b235df5a9}{MODE\_MF}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14616}14616         \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14617}14617         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a06c32c448971dc058e4e66ab49852014}{MULTI\_FUNCTION\_SD}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14618}14618             \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a9e4e4c9812eb261f2e9a1d47467c07b0}{MODE\_MF\_SD}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14619}14619             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14620}14620         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a2f41465e78a44a916f834f175638c80a}{MULTI\_FUNCTION\_SI}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14621}14621             \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9acec592ac76a59bd7f5156632282eb2c5}{MODE\_MF\_SI}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14622}14622             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14623}14623         \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316ab41d9d078d4ad15e3808cf22f3e05821}{MULTI\_FUNCTION\_AFEX}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14624}14624             \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a97746b21a97ae6be899df5e4e3bd8b0f}{MODE\_MF\_AFEX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14625}14625             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14626}14626         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14627}14627     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14628}14628         \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9ae9d17731defe005312c35a2a57c2f2b2}{MODE\_SF}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14629}14629     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14630}14630 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14631}14631 \textcolor{preprocessor}{\#if defined(\_\_LITTLE\_ENDIAN)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14632}14632     \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9a1bfe9188b8b93e84b7d66a9e683a0867}{MODE\_LITTLE\_ENDIAN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14633}14633 \textcolor{preprocessor}{\#else }\textcolor{comment}{/* \_\_BIG\_ENDIAN */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14634}14634     \mbox{\hyperlink{bxe__dcb_8h_ab30f634b7c7b91edaae02d8ac407086c}{SET\_FLAGS}}(\mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}}, \mbox{\hyperlink{ecore__init_8h_aae05225933a42f81e7c4a9fb286596f9ac2408cd3afdbc3b5eda49e598a248ee5}{MODE\_BIG\_ENDIAN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14635}14635 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14636}14636 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14637}14637     \mbox{\hyperlink{bxe_8h_a508f7bd7362af6ae9f66d68b78516dc3}{INIT\_MODE\_FLAGS}}(sc) = \mbox{\hyperlink{bxe_8c_a773b39d480759f67926cb18ae2219281}{flags}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14638}14638 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14639}14639 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14640}14640 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14641}\mbox{\hyperlink{bxe_8c_a6838a1740b07191f75cf2ec8d7b6708b}{14641}} \mbox{\hyperlink{bxe_8c_a6838a1740b07191f75cf2ec8d7b6708b}{bxe\_alloc\_hsi\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14642}14642 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14643}14643     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14644}14644     bus\_addr\_t busaddr;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14645}14645     \textcolor{keywordtype}{int} max\_agg\_queues;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14646}14646     \textcolor{keywordtype}{int} max\_segments;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14647}14647     bus\_size\_t max\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14648}14648     bus\_size\_t max\_seg\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14649}14649     \textcolor{keywordtype}{char} buf[32];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14650}14650     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14651}14651     \textcolor{keywordtype}{int} i, j;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14652}14652 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14653}14653     \textcolor{comment}{/* XXX zero out all vars here and call bxe\_alloc\_hsi\_mem on error */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14654}14654 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14655}14655     \textcolor{comment}{/* allocate the parent bus DMA tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14656}14656     rc = bus\_dma\_tag\_create(bus\_get\_dma\_tag(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}), \textcolor{comment}{/* parent tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14657}14657                             1,                        \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14658}14658                             0,                        \textcolor{comment}{/* boundary limit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14659}14659                             BUS\_SPACE\_MAXADDR,        \textcolor{comment}{/* restricted low */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14660}14660                             BUS\_SPACE\_MAXADDR,        \textcolor{comment}{/* restricted hi */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14661}14661                             NULL,                     \textcolor{comment}{/* addr filter() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14662}14662                             NULL,                     \textcolor{comment}{/* addr filter() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14663}14663                             BUS\_SPACE\_MAXSIZE\_32BIT,  \textcolor{comment}{/* max map size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14664}14664                             BUS\_SPACE\_UNRESTRICTED,   \textcolor{comment}{/* num discontinuous */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14665}14665                             BUS\_SPACE\_MAXSIZE\_32BIT,  \textcolor{comment}{/* max seg size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14666}14666                             0,                        \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14667}14667                             NULL,                     \textcolor{comment}{/* lock() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14668}14668                             NULL,                     \textcolor{comment}{/* lock() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14669}14669                             \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}});     \textcolor{comment}{/* returned dma tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14670}14670     \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14671}14671         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}Failed to alloc parent DMA tag (\%d)!\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14672}14672         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14673}14673     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14674}14674 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14675}14675 \textcolor{comment}{    /************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14676}14676     \textcolor{comment}{/* DEFAULT STATUS BLOCK */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14677}14677 \textcolor{comment}{    /************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14678}14678 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14679}14679     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhost__sp__status__block}{host\_sp\_status\_block}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14680}14680                       \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}}, \textcolor{stringliteral}{"{}default status block"{}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14681}14681         \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14682}14682         bus\_dma\_tag\_destroy(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14683}14683         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14684}14684     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14685}14685 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14686}14686     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhost__sp__status__block}{host\_sp\_status\_block}} *)sc-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14687}14687 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14688}14688 \textcolor{comment}{    /***************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14689}14689     \textcolor{comment}{/* EVENT QUEUE */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14690}14690 \textcolor{comment}{    /***************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14691}14691 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14692}14692     if (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14693}14693                       \&sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}, \textcolor{stringliteral}{"{}event queue"{}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14694}14694         \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14695}14695         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14696}14696         sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14697}14697         bus\_dma\_tag\_destroy(sc-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14698}14698         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14699}14699     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14700}14700 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14701}14701     sc-\/>\mbox{\hyperlink{structbxe__softc_a20e83974ee742b9647a11a5d8d696b44}{eq}} = (\textcolor{keyword}{union }\mbox{\hyperlink{unionevent__ring__elem}{event\_ring\_elem}} * )sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14702}14702 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14703}14703 \textcolor{comment}{    /*************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14704}14704     \textcolor{comment}{/* SLOW PATH */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14705}14705 \textcolor{comment}{    /*************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14706}14706 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14707}14707     if (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__slowpath}{bxe\_slowpath}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14708}14708                       \&sc-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}}, \textcolor{stringliteral}{"{}slow path"{}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14709}14709         \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14710}14710         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14711}14711         sc-\/>\mbox{\hyperlink{structbxe__softc_a20e83974ee742b9647a11a5d8d696b44}{eq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14712}14712         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14713}14713         sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14714}14714         bus\_dma\_tag\_destroy(sc-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14715}14715         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14716}14716     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14717}14717 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14718}14718     sc-\/>\mbox{\hyperlink{structbxe__softc_a74f9cdf0652b5f8cf3b2c78bbb4ba1e9}{sp}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__slowpath}{bxe\_slowpath}} *)sc-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14719}14719 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14720}14720 \textcolor{comment}{    /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14721}14721     \textcolor{comment}{/* SLOW PATH QUEUE */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14722}14722 \textcolor{comment}{    /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14723}14723 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14724}14724     if (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14725}14725                       \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}, \textcolor{stringliteral}{"{}slow path queue"{}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14726}14726         \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14727}14727         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14728}14728         sc-\/>\mbox{\hyperlink{structbxe__softc_a74f9cdf0652b5f8cf3b2c78bbb4ba1e9}{sp}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14729}14729         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14730}14730         sc-\/>\mbox{\hyperlink{structbxe__softc_a20e83974ee742b9647a11a5d8d696b44}{eq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14731}14731         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14732}14732         sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14733}14733         bus\_dma\_tag\_destroy(sc-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14734}14734         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14735}14735     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14736}14736 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14737}14737     sc-\/>\mbox{\hyperlink{structbxe__softc_a118b7ddd116d503983abc8bb596b4778}{spq}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structeth__spe}{eth\_spe}} *)sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14738}14738 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14739}14739 \textcolor{comment}{    /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14740}14740     \textcolor{comment}{/* FW DECOMPRESSION BUFFER */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14741}14741 \textcolor{comment}{    /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14742}14742 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14743}14743     if (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, \mbox{\hyperlink{bxe_8h_a17032543d2db5002df52fd08f2825357}{FW\_BUF\_SIZE}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_af588b548b6b822a34c3ad7b281ec0487}{gz\_buf\_dma}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14744}14744                       \textcolor{stringliteral}{"{}fw decompression buffer"{}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14745}14745         \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14746}14746         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14747}14747         sc-\/>\mbox{\hyperlink{structbxe__softc_a118b7ddd116d503983abc8bb596b4778}{spq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14748}14748         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14749}14749         sc-\/>\mbox{\hyperlink{structbxe__softc_a74f9cdf0652b5f8cf3b2c78bbb4ba1e9}{sp}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14750}14750         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14751}14751         sc-\/>\mbox{\hyperlink{structbxe__softc_a20e83974ee742b9647a11a5d8d696b44}{eq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14752}14752         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14753}14753         sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14754}14754         bus\_dma\_tag\_destroy(sc-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14755}14755         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14756}14756     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14757}14757 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14758}14758     sc-\/>\mbox{\hyperlink{structbxe__softc_ace68c7cb2d65424a20ddece2b32ce665}{gz\_buf}} = (\textcolor{keywordtype}{void} *)sc-\/>\mbox{\hyperlink{structbxe__softc_af588b548b6b822a34c3ad7b281ec0487}{gz\_buf\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14759}14759 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14760}14760     if ((sc-\/>\mbox{\hyperlink{structbxe__softc_a328c9710b9799e3060fa4daa4bf375dd}{gz\_strm}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14761}14761          malloc(\textcolor{keyword}{sizeof}(*sc-\/>\mbox{\hyperlink{structbxe__softc_a328c9710b9799e3060fa4daa4bf375dd}{gz\_strm}}), M\_DEVBUF, M\_NOWAIT)) == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14762}14762         \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14763}14763         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_af588b548b6b822a34c3ad7b281ec0487}{gz\_buf\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14764}14764         sc-\/>\mbox{\hyperlink{structbxe__softc_ace68c7cb2d65424a20ddece2b32ce665}{gz\_buf}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14765}14765         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14766}14766         sc-\/>\mbox{\hyperlink{structbxe__softc_a118b7ddd116d503983abc8bb596b4778}{spq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14767}14767         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14768}14768         sc-\/>\mbox{\hyperlink{structbxe__softc_a74f9cdf0652b5f8cf3b2c78bbb4ba1e9}{sp}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14769}14769         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14770}14770         sc-\/>\mbox{\hyperlink{structbxe__softc_a20e83974ee742b9647a11a5d8d696b44}{eq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14771}14771         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14772}14772         sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14773}14773         bus\_dma\_tag\_destroy(sc-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14774}14774         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14775}14775     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14776}14776 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14777}14777 \textcolor{comment}{    /*************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14778}14778     \textcolor{comment}{/* FASTPATHS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14779}14779 \textcolor{comment}{    /*************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14780}14780 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14781}14781     \textcolor{comment}{/* allocate DMA memory for each fastpath structure */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14782}14782     \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14783}14783         fp = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14784}14784         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}    = sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14785}14785         fp-\/>\mbox{\hyperlink{structbxe__fastpath_aaad171be357d31f0947f0f0c9c7d67e8}{index}} = i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14786}14786 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14787}14787 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14788}14788         \textcolor{comment}{/* FP STATUS BLOCK */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14789}14789 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14790}14790 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14791}14791         snprintf(buf, \textcolor{keyword}{sizeof}(buf), \textcolor{stringliteral}{"{}fp \%d status block"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14792}14792         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, \textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{unionbxe__host__hc__status__block}{bxe\_host\_hc\_status\_block}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14793}14793                           \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a018a5dd30470e1e6a4d70e907d82ef65}{sb\_dma}}, buf) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14794}14794             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14795}14795             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to alloc \%s\(\backslash\)n"{}}, buf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14796}14796             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14797}14797         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14798}14798             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a28519a382bb766e19cc8882f2ed7d791}{CHIP\_IS\_E2E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14799}14799                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}.\mbox{\hyperlink{unionbxe__host__hc__status__block_a01245574fb45b11a6cfa2823a3fd550f}{e2\_sb}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14800}14800                     (\textcolor{keyword}{struct }\mbox{\hyperlink{structhost__hc__status__block__e2}{host\_hc\_status\_block\_e2}} *)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a018a5dd30470e1e6a4d70e907d82ef65}{sb\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14801}14801             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14802}14802                 fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}.\mbox{\hyperlink{unionbxe__host__hc__status__block_a65c697eb8d691f344079abea7e013542}{e1x\_sb}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14803}14803                     (\textcolor{keyword}{struct }\mbox{\hyperlink{structhost__hc__status__block__e1x}{host\_hc\_status\_block\_e1x}} *)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a018a5dd30470e1e6a4d70e907d82ef65}{sb\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14804}14804             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14805}14805         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14806}14806 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14807}14807 \textcolor{comment}{        /******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14808}14808         \textcolor{comment}{/* FP TX BD CHAIN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14809}14809 \textcolor{comment}{        /******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14810}14810 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14811}14811         snprintf(buf, \textcolor{keyword}{sizeof}(buf), \textcolor{stringliteral}{"{}fp \%d tx bd chain"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14812}14812         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * \mbox{\hyperlink{bxe_8h_a5b78f26ceb1ad036c2ce8a8dee493691}{TX\_BD\_NUM\_PAGES}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14813}14813                           \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a036a081fcc7076714f6a4926be8ae354}{tx\_dma}}, buf) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14814}14814             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14815}14815             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to alloc \%s\(\backslash\)n"{}}, buf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14816}14816             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14817}14817         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14818}14818             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}} = (\textcolor{keyword}{union }\mbox{\hyperlink{unioneth__tx__bd__types}{eth\_tx\_bd\_types}} *)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a036a081fcc7076714f6a4926be8ae354}{tx\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14819}14819         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14820}14820 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14821}14821         \textcolor{comment}{/* link together the tx bd chain pages */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14822}14822         \textcolor{keywordflow}{for} (j = 1; j <= \mbox{\hyperlink{bxe_8h_a5b78f26ceb1ad036c2ce8a8dee493691}{TX\_BD\_NUM\_PAGES}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14823}14823             \textcolor{comment}{/* index into the tx bd chain array to last entry per page */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14824}14824             \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__tx__next__bd}{eth\_tx\_next\_bd}} *tx\_next\_bd =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14825}14825                 \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}}[\mbox{\hyperlink{bxe_8h_ab2b820649c005f1974fc6c3decbd7e97}{TX\_BD\_TOTAL\_PER\_PAGE}} * j -\/ 1].\mbox{\hyperlink{unioneth__tx__bd__types_a0848e9190619082144299b7b5647a753}{next\_bd}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14826}14826             \textcolor{comment}{/* point to the next page and wrap from last page */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14827}14827             busaddr = (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a036a081fcc7076714f6a4926be8ae354}{tx\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14828}14828                        (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * (j \% \mbox{\hyperlink{bxe_8h_a5b78f26ceb1ad036c2ce8a8dee493691}{TX\_BD\_NUM\_PAGES}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14829}14829             tx\_next\_bd-\/>\mbox{\hyperlink{structeth__tx__next__bd_a220d4b093f03f2db22e9ee31ee29556e}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(busaddr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14830}14830             tx\_next\_bd-\/>\mbox{\hyperlink{structeth__tx__next__bd_a0d5b3e3a4bf0051e84fa952566c15bfb}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(busaddr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14831}14831         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14832}14832 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14833}14833 \textcolor{comment}{        /******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14834}14834         \textcolor{comment}{/* FP RX BD CHAIN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14835}14835 \textcolor{comment}{        /******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14836}14836 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14837}14837         snprintf(buf, \textcolor{keyword}{sizeof}(buf), \textcolor{stringliteral}{"{}fp \%d rx bd chain"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14838}14838         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * \mbox{\hyperlink{bxe_8h_ad01c7d2ab724866dcb46c514431fa4a3}{RX\_BD\_NUM\_PAGES}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14839}14839                           \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4987c39d05c289f627935f0b1661bec6}{rx\_dma}}, buf) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14840}14840             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14841}14841             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to alloc \%s\(\backslash\)n"{}}, buf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14842}14842             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14843}14843         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14844}14844             fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb66bb2f7c9693cb39c166a9d032cb8e}{rx\_chain}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__bd}{eth\_rx\_bd}} *)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4987c39d05c289f627935f0b1661bec6}{rx\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14845}14845         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14846}14846 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14847}14847         \textcolor{comment}{/* link together the rx bd chain pages */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14848}14848         \textcolor{keywordflow}{for} (j = 1; j <= \mbox{\hyperlink{bxe_8h_ad01c7d2ab724866dcb46c514431fa4a3}{RX\_BD\_NUM\_PAGES}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14849}14849             \textcolor{comment}{/* index into the rx bd chain array to last entry per page */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14850}14850             \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__bd}{eth\_rx\_bd}} *rx\_bd =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14851}14851                 \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb66bb2f7c9693cb39c166a9d032cb8e}{rx\_chain}}[\mbox{\hyperlink{bxe_8h_ac346dfbfe271b24d5885024035ca0e0d}{RX\_BD\_TOTAL\_PER\_PAGE}} * j -\/ 2];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14852}14852             \textcolor{comment}{/* point to the next page and wrap from last page */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14853}14853             busaddr = (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4987c39d05c289f627935f0b1661bec6}{rx\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14854}14854                        (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * (j \% \mbox{\hyperlink{bxe_8h_ad01c7d2ab724866dcb46c514431fa4a3}{RX\_BD\_NUM\_PAGES}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14855}14855             rx\_bd-\/>\mbox{\hyperlink{structeth__rx__bd_a6e57abf13f85b64d3112934b9381ebb1}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(busaddr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14856}14856             rx\_bd-\/>\mbox{\hyperlink{structeth__rx__bd_a3eeb582177d310625e629c2e85528f8e}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(busaddr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14857}14857         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14858}14858 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14859}14859 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14860}14860         \textcolor{comment}{/* FP RX RCQ CHAIN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14861}14861 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14862}14862 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14863}14863         snprintf(buf, \textcolor{keyword}{sizeof}(buf), \textcolor{stringliteral}{"{}fp \%d rcq chain"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14864}14864         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * \mbox{\hyperlink{bxe_8h_a17518816b5fca4f643cf28daa7acc55b}{RCQ\_NUM\_PAGES}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14865}14865                           \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}, buf) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14866}14866             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14867}14867             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to alloc \%s\(\backslash\)n"{}}, buf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14868}14868             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14869}14869         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14870}14870             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1a2b72fa0b868a8f030725885ab2cb2a}{rcq\_chain}} = (\textcolor{keyword}{union }\mbox{\hyperlink{unioneth__rx__cqe}{eth\_rx\_cqe}} *)fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14871}14871         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14872}14872 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14873}14873         \textcolor{comment}{/* link together the rcq chain pages */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14874}14874         \textcolor{keywordflow}{for} (j = 1; j <= \mbox{\hyperlink{bxe_8h_a17518816b5fca4f643cf28daa7acc55b}{RCQ\_NUM\_PAGES}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14875}14875             \textcolor{comment}{/* index into the rcq chain array to last entry per page */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14876}14876             \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__cqe__next__page}{eth\_rx\_cqe\_next\_page}} *rx\_cqe\_next =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14877}14877                 (\textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__cqe__next__page}{eth\_rx\_cqe\_next\_page}} *)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14878}14878                 \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1a2b72fa0b868a8f030725885ab2cb2a}{rcq\_chain}}[\mbox{\hyperlink{bxe_8h_a167351e5505873daa9f199176dc4adaa}{RCQ\_TOTAL\_PER\_PAGE}} * j -\/ 1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14879}14879             \textcolor{comment}{/* point to the next page and wrap from last page */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14880}14880             busaddr = (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14881}14881                        (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * (j \% \mbox{\hyperlink{bxe_8h_a17518816b5fca4f643cf28daa7acc55b}{RCQ\_NUM\_PAGES}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14882}14882             rx\_cqe\_next-\/>\mbox{\hyperlink{structeth__rx__cqe__next__page_aec7d04db588624158f07f18bbdbc89a4}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(busaddr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14883}14883             rx\_cqe\_next-\/>\mbox{\hyperlink{structeth__rx__cqe__next__page_a9c021a799096aed484ced678bb887a3d}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(busaddr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14884}14884         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14885}14885 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14886}14886 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14887}14887         \textcolor{comment}{/* FP RX SGE CHAIN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14888}14888 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14889}14889 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14890}14890         snprintf(buf, \textcolor{keyword}{sizeof}(buf), \textcolor{stringliteral}{"{}fp \%d sge chain"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14891}14891         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a37cd1ad8425b95931e6db0b73c7d6b9f}{bxe\_dma\_alloc}}(sc, (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * \mbox{\hyperlink{bxe_8h_ae9875871c72b8147f3bc813b2368db08}{RX\_SGE\_NUM\_PAGES}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14892}14892                           \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a25b66543dacbc0212e674f98ff70eca3}{rx\_sge\_dma}}, buf) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14893}14893             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14894}14894             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to alloc \%s\(\backslash\)n"{}}, buf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14895}14895             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14896}14896         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14897}14897             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a5ce946c204a06742f088b9e56e17139b}{rx\_sge\_chain}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__sge}{eth\_rx\_sge}} *)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a25b66543dacbc0212e674f98ff70eca3}{rx\_sge\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14898}14898         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14899}14899 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14900}14900         \textcolor{comment}{/* link together the sge chain pages */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14901}14901         \textcolor{keywordflow}{for} (j = 1; j <= \mbox{\hyperlink{bxe_8h_ae9875871c72b8147f3bc813b2368db08}{RX\_SGE\_NUM\_PAGES}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14902}14902             \textcolor{comment}{/* index into the rcq chain array to last entry per page */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14903}14903             \textcolor{keyword}{struct }\mbox{\hyperlink{structeth__rx__sge}{eth\_rx\_sge}} *rx\_sge =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14904}14904                 \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a5ce946c204a06742f088b9e56e17139b}{rx\_sge\_chain}}[\mbox{\hyperlink{bxe_8h_a20f417d9e85ef77ceaaf6b4f3d286fae}{RX\_SGE\_TOTAL\_PER\_PAGE}} * j -\/ 2];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14905}14905             \textcolor{comment}{/* point to the next page and wrap from last page */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14906}14906             busaddr = (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a25b66543dacbc0212e674f98ff70eca3}{rx\_sge\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14907}14907                        (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * (j \% \mbox{\hyperlink{bxe_8h_ae9875871c72b8147f3bc813b2368db08}{RX\_SGE\_NUM\_PAGES}})));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14908}14908             rx\_sge-\/>\mbox{\hyperlink{structeth__rx__sge_a1eada037af28958f747d9d85a55e5e9a}{addr\_hi}} = htole32(\mbox{\hyperlink{bxe_8h_ab108a2b01895fac51c0bd0fe820478b7}{U64\_HI}}(busaddr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14909}14909             rx\_sge-\/>\mbox{\hyperlink{structeth__rx__sge_af9aaee15368f0c47d9e416f95f855a89}{addr\_lo}} = htole32(\mbox{\hyperlink{bxe_8h_a2537b002be1b5ccf547ab0dc7defc86b}{U64\_LO}}(busaddr));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14910}14910         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14911}14911 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14912}14912 \textcolor{comment}{        /***********************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14913}14913         \textcolor{comment}{/* FP TX MBUF DMA MAPS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14914}14914 \textcolor{comment}{        /***********************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14915}14915 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14916}14916         \textcolor{comment}{/* set required sizes before mapping to conserve resources */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14917}14917         \textcolor{keywordflow}{if} (if\_getcapenable(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& (IFCAP\_TSO4 | IFCAP\_TSO6)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14918}14918             max\_size     = \mbox{\hyperlink{bxe_8h_acd1659e5d54cccabb44ccd02d2465dba}{BXE\_TSO\_MAX\_SIZE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14919}14919             max\_segments = \mbox{\hyperlink{bxe_8h_a149090a58df685dfe042c45eeb204d56}{BXE\_TSO\_MAX\_SEGMENTS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14920}14920             max\_seg\_size = \mbox{\hyperlink{bxe_8h_a4f73424ce4f25a822246e7624606acac}{BXE\_TSO\_MAX\_SEG\_SIZE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14921}14921         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14922}14922             max\_size     = (MCLBYTES * \mbox{\hyperlink{bxe_8h_a4f216c608e1ea1a8f35a0925700ff254}{BXE\_MAX\_SEGMENTS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14923}14923             max\_segments = \mbox{\hyperlink{bxe_8h_a4f216c608e1ea1a8f35a0925700ff254}{BXE\_MAX\_SEGMENTS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14924}14924             max\_seg\_size = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14925}14925         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14926}14926 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14927}14927         \textcolor{comment}{/* create a dma tag for the tx mbufs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14928}14928         rc = bus\_dma\_tag\_create(sc-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}}, \textcolor{comment}{/* parent tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14929}14929                                 1,                  \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14930}14930                                 0,                  \textcolor{comment}{/* boundary limit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14931}14931                                 BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* restricted low */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14932}14932                                 BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* restricted hi */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14933}14933                                 NULL,               \textcolor{comment}{/* addr filter() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14934}14934                                 NULL,               \textcolor{comment}{/* addr filter() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14935}14935                                 max\_size,           \textcolor{comment}{/* max map size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14936}14936                                 max\_segments,       \textcolor{comment}{/* num discontinuous */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14937}14937                                 max\_seg\_size,       \textcolor{comment}{/* max seg size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14938}14938                                 0,                  \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14939}14939                                 NULL,               \textcolor{comment}{/* lock() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14940}14940                                 NULL,               \textcolor{comment}{/* lock() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14941}14941                                 \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}});  \textcolor{comment}{/* returned dma tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14942}14942         \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14943}14943             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14944}14944             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma tag for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14945}14945                       \textcolor{stringliteral}{"{}'fp \%d tx mbufs' (\%d)\(\backslash\)n"{}}, i, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14946}14946             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14947}14947         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14948}14948 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14949}14949         \textcolor{comment}{/* create dma maps for each of the tx mbuf clusters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14950}14950         \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe_8h_a0798f079887421cbec292f8e27d62a5e}{TX\_BD\_TOTAL}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14951}14951             \textcolor{keywordflow}{if} (bus\_dmamap\_create(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14952}14952                                   BUS\_DMA\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14953}14953                                   \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aed432b0de2d59b0c022ada4a493ae787}{tx\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14954}14954                 \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14955}14955                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma map for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14956}14956                           \textcolor{stringliteral}{"{}'fp \%d tx mbuf \%d' (\%d)\(\backslash\)n"{}}, i, j, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14957}14957                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14958}14958             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14959}14959         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14960}14960 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14961}14961 \textcolor{comment}{        /***********************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14962}14962         \textcolor{comment}{/* FP RX MBUF DMA MAPS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14963}14963 \textcolor{comment}{        /***********************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14964}14964 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14965}14965         \textcolor{comment}{/* create a dma tag for the rx mbufs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14966}14966         rc = bus\_dma\_tag\_create(sc-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}}, \textcolor{comment}{/* parent tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14967}14967                                 1,                  \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14968}14968                                 0,                  \textcolor{comment}{/* boundary limit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14969}14969                                 BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* restricted low */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14970}14970                                 BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* restricted hi */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14971}14971                                 NULL,               \textcolor{comment}{/* addr filter() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14972}14972                                 NULL,               \textcolor{comment}{/* addr filter() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14973}14973                                 MJUM9BYTES,         \textcolor{comment}{/* max map size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14974}14974                                 1,                  \textcolor{comment}{/* num discontinuous */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14975}14975                                 MJUM9BYTES,         \textcolor{comment}{/* max seg size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14976}14976                                 0,                  \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14977}14977                                 NULL,               \textcolor{comment}{/* lock() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14978}14978                                 NULL,               \textcolor{comment}{/* lock() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14979}14979                                 \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}});  \textcolor{comment}{/* returned dma tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14980}14980         \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14981}14981             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14982}14982             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma tag for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14983}14983                       \textcolor{stringliteral}{"{}'fp \%d rx mbufs' (\%d)\(\backslash\)n"{}}, i, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14984}14984             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14985}14985         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14986}14986 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14987}14987         \textcolor{comment}{/* create dma maps for each of the rx mbuf clusters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14988}14988         \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe_8h_a1b91b1ae9468100c39d54b9e03c35bf3}{RX\_BD\_TOTAL}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14989}14989             \textcolor{keywordflow}{if} (bus\_dmamap\_create(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14990}14990                                   BUS\_DMA\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14991}14991                                   \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14992}14992                 \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14993}14993                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma map for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14994}14994                           \textcolor{stringliteral}{"{}'fp \%d rx mbuf \%d' (\%d)\(\backslash\)n"{}}, i, j, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14995}14995                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14996}14996             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14997}14997         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14998}14998 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l14999}14999         \textcolor{comment}{/* create dma map for the spare rx mbuf cluster */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15000}15000         \textcolor{keywordflow}{if} (bus\_dmamap\_create(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15001}15001                               BUS\_DMA\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15002}15002                               \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a71f583af56a39c62de065f818908fb18}{rx\_mbuf\_spare\_map}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15003}15003             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15004}15004             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma map for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15005}15005                       \textcolor{stringliteral}{"{}'fp \%d spare rx mbuf' (\%d)\(\backslash\)n"{}}, i, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15006}15006             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15007}15007         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15008}15008 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15009}15009 \textcolor{comment}{        /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15010}15010         \textcolor{comment}{/* FP RX SGE MBUF DMA MAPS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15011}15011 \textcolor{comment}{        /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15012}15012 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15013}15013         \textcolor{comment}{/* create a dma tag for the rx sge mbufs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15014}15014         rc = bus\_dma\_tag\_create(sc-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}}, \textcolor{comment}{/* parent tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15015}15015                                 1,                  \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15016}15016                                 0,                  \textcolor{comment}{/* boundary limit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15017}15017                                 BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* restricted low */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15018}15018                                 BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* restricted hi */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15019}15019                                 NULL,               \textcolor{comment}{/* addr filter() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15020}15020                                 NULL,               \textcolor{comment}{/* addr filter() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15021}15021                                 \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}},      \textcolor{comment}{/* max map size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15022}15022                                 1,                  \textcolor{comment}{/* num discontinuous */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15023}15023                                 \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}},      \textcolor{comment}{/* max seg size */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15024}15024                                 0,                  \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15025}15025                                 NULL,               \textcolor{comment}{/* lock() */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15026}15026                                 NULL,               \textcolor{comment}{/* lock() arg */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15027}15027                                 \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}}); \textcolor{comment}{/* returned dma tag */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15028}15028         \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15029}15029             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15030}15030             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma tag for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15031}15031                       \textcolor{stringliteral}{"{}'fp \%d rx sge mbufs' (\%d)\(\backslash\)n"{}}, i, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15032}15032             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15033}15033         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15034}15034 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15035}15035         \textcolor{comment}{/* create dma maps for the rx sge mbuf clusters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15036}15036         \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe_8h_ac88980fb49e9b3cf1d621acfe33b44b7}{RX\_SGE\_TOTAL}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15037}15037             \textcolor{keywordflow}{if} (bus\_dmamap\_create(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15038}15038                                   BUS\_DMA\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15039}15039                                   \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15040}15040                 \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15041}15041                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma map for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15042}15042                           \textcolor{stringliteral}{"{}'fp \%d rx sge mbuf \%d' (\%d)\(\backslash\)n"{}}, i, j, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15043}15043                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15044}15044             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15045}15045         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15046}15046 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15047}15047         \textcolor{comment}{/* create dma map for the spare rx sge mbuf cluster */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15048}15048         \textcolor{keywordflow}{if} (bus\_dmamap\_create(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15049}15049                               BUS\_DMA\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15050}15050                               \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1337c790695c865d9bc782d86848519f}{rx\_sge\_mbuf\_spare\_map}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15051}15051             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15052}15052             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma map for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15053}15053                       \textcolor{stringliteral}{"{}'fp \%d spare rx sge mbuf' (\%d)\(\backslash\)n"{}}, i, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15054}15054             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15055}15055         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15056}15056 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15057}15057 \textcolor{comment}{        /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15058}15058         \textcolor{comment}{/* FP RX TPA MBUF DMA MAPS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15059}15059 \textcolor{comment}{        /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15060}15060 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15061}15061         \textcolor{comment}{/* create dma maps for the rx tpa mbuf clusters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15062}15062         max\_agg\_queues = \mbox{\hyperlink{bxe_8h_a17145ba166c4c2e66d36460bbc2e2992}{MAX\_AGG\_QS}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15063}15063 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15064}15064         \textcolor{keywordflow}{for} (j = 0; j < max\_agg\_queues; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15065}15065             \textcolor{keywordflow}{if} (bus\_dmamap\_create(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15066}15066                                   BUS\_DMA\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15067}15067                                   \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[j].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15068}15068                 \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15069}15069                 \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma map for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15070}15070                           \textcolor{stringliteral}{"{}'fp \%d rx tpa mbuf \%d' (\%d)\(\backslash\)n"{}}, i, j, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15071}15071                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15072}15072             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15073}15073         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15074}15074 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15075}15075         \textcolor{comment}{/* create dma map for the spare rx tpa mbuf cluster */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15076}15076         \textcolor{keywordflow}{if} (bus\_dmamap\_create(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15077}15077                               BUS\_DMA\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15078}15078                               \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7456c3e1d6adca60e06b2b33b5bdfcfa}{rx\_tpa\_info\_mbuf\_spare\_map}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15079}15079             \textcolor{comment}{/* XXX unwind and free previous fastpath allocations */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15080}15080             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to create dma map for "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15081}15081                       \textcolor{stringliteral}{"{}'fp \%d spare rx tpa mbuf' (\%d)\(\backslash\)n"{}}, i, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15082}15082             \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15083}15083         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15084}15084 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15085}15085         \mbox{\hyperlink{bxe_8c_ad4c8ebfd9442c6248ba2601f4b64319f}{bxe\_init\_sge\_ring\_bit\_mask}}(fp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15086}15086     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15087}15087 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15088}15088     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15089}15089 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15090}15090 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15091}15091 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15092}\mbox{\hyperlink{bxe_8c_a6c0421dbad20e89fd97432c1eeb708dc}{15092}} \mbox{\hyperlink{bxe_8c_a6c0421dbad20e89fd97432c1eeb708dc}{bxe\_free\_hsi\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15093}15093 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15094}15094     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15095}15095     \textcolor{keywordtype}{int} max\_agg\_queues;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15096}15096     \textcolor{keywordtype}{int} i, j;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15097}15097 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15098}15098     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15099}15099         \textcolor{keywordflow}{return}; \textcolor{comment}{/* assume nothing was allocated */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15100}15100     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15101}15101 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15102}15102     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15103}15103         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15104}15104 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15105}15105 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15106}15106         \textcolor{comment}{/* FP STATUS BLOCK */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15107}15107 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15108}15108 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15109}15109         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a018a5dd30470e1e6a4d70e907d82ef65}{sb\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15110}15110         memset(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}, 0, \textcolor{keyword}{sizeof}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a24c51b2ea591fa517bf9badd16695fde}{status\_block}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15111}15111 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15112}15112 \textcolor{comment}{        /******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15113}15113         \textcolor{comment}{/* FP TX BD CHAIN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15114}15114 \textcolor{comment}{        /******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15115}15115 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15116}15116         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a036a081fcc7076714f6a4926be8ae354}{tx\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15117}15117         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7c6520f1d39d00d05ff3d8bf4eb10b8e}{tx\_chain}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15118}15118 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15119}15119 \textcolor{comment}{        /******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15120}15120         \textcolor{comment}{/* FP RX BD CHAIN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15121}15121 \textcolor{comment}{        /******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15122}15122 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15123}15123         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4987c39d05c289f627935f0b1661bec6}{rx\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15124}15124         fp-\/>\mbox{\hyperlink{structbxe__fastpath_abb66bb2f7c9693cb39c166a9d032cb8e}{rx\_chain}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15125}15125 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15126}15126 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15127}15127         \textcolor{comment}{/* FP RX RCQ CHAIN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15128}15128 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15129}15129 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15130}15130         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15131}15131         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1a2b72fa0b868a8f030725885ab2cb2a}{rcq\_chain}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15132}15132 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15133}15133 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15134}15134         \textcolor{comment}{/* FP RX SGE CHAIN */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15135}15135 \textcolor{comment}{        /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15136}15136 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15137}15137         \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a25b66543dacbc0212e674f98ff70eca3}{rx\_sge\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15138}15138         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a5ce946c204a06742f088b9e56e17139b}{rx\_sge\_chain}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15139}15139 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15140}15140 \textcolor{comment}{        /***********************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15141}15141         \textcolor{comment}{/* FP TX MBUF DMA MAPS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15142}15142 \textcolor{comment}{        /***********************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15143}15143 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15144}15144         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15145}15145             \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe_8h_a0798f079887421cbec292f8e27d62a5e}{TX\_BD\_TOTAL}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15146}15146                 \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_aed432b0de2d59b0c022ada4a493ae787}{tx\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15147}15147                     bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15148}15148                                       fp-\/>\mbox{\hyperlink{structbxe__fastpath_aed432b0de2d59b0c022ada4a493ae787}{tx\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15149}15149                     bus\_dmamap\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15150}15150                                        fp-\/>\mbox{\hyperlink{structbxe__fastpath_aed432b0de2d59b0c022ada4a493ae787}{tx\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__tx__bd_a0fe934e245b4e4f0b199afb14e6c0684}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15151}15151                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15152}15152             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15153}15153 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15154}15154             bus\_dma\_tag\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15155}15155             fp-\/>\mbox{\hyperlink{structbxe__fastpath_a2d7f07c8f028613e10a4fa6d0ffcec8f}{tx\_mbuf\_tag}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15156}15156         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15157}15157 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15158}15158 \textcolor{comment}{        /***********************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15159}15159         \textcolor{comment}{/* FP RX MBUF DMA MAPS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15160}15160 \textcolor{comment}{        /***********************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15161}15161 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15162}15162         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15163}15163             \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe_8h_a1b91b1ae9468100c39d54b9e03c35bf3}{RX\_BD\_TOTAL}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15164}15164                 \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15165}15165                     bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15166}15166                                       fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15167}15167                     bus\_dmamap\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15168}15168                                        fp-\/>\mbox{\hyperlink{structbxe__fastpath_aa241d8af579e510cb34af0ad313b2f9d}{rx\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15169}15169                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15170}15170             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15171}15171 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15172}15172             \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a71f583af56a39c62de065f818908fb18}{rx\_mbuf\_spare\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15173}15173                 bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a71f583af56a39c62de065f818908fb18}{rx\_mbuf\_spare\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15174}15174                 bus\_dmamap\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a71f583af56a39c62de065f818908fb18}{rx\_mbuf\_spare\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15175}15175             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15176}15176 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15177}15177 \textcolor{comment}{            /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15178}15178             \textcolor{comment}{/* FP RX TPA MBUF DMA MAPS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15179}15179 \textcolor{comment}{            /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15180}15180 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15181}15181             max\_agg\_queues = \mbox{\hyperlink{bxe_8h_a17145ba166c4c2e66d36460bbc2e2992}{MAX\_AGG\_QS}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15182}15182 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15183}15183             \textcolor{keywordflow}{for} (j = 0; j < max\_agg\_queues; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15184}15184                 \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[j].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15185}15185                     bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15186}15186                                       fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[j].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15187}15187                     bus\_dmamap\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15188}15188                                        fp-\/>\mbox{\hyperlink{structbxe__fastpath_abd9cae220a24d69254099004390aa965}{rx\_tpa\_info}}[j].\mbox{\hyperlink{structbxe__sw__tpa__info_ae8c24a7c339635e02e208638e4e078da}{bd}}.\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15189}15189                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15190}15190             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15191}15191 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15192}15192             \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7456c3e1d6adca60e06b2b33b5bdfcfa}{rx\_tpa\_info\_mbuf\_spare\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15193}15193                 bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15194}15194                                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7456c3e1d6adca60e06b2b33b5bdfcfa}{rx\_tpa\_info\_mbuf\_spare\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15195}15195                 bus\_dmamap\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15196}15196                                    fp-\/>\mbox{\hyperlink{structbxe__fastpath_a7456c3e1d6adca60e06b2b33b5bdfcfa}{rx\_tpa\_info\_mbuf\_spare\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15197}15197             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15198}15198 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15199}15199             bus\_dma\_tag\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15200}15200             fp-\/>\mbox{\hyperlink{structbxe__fastpath_ac5375dfee7ce4a4161dfb3406fad5842}{rx\_mbuf\_tag}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15201}15201         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15202}15202 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15203}15203 \textcolor{comment}{        /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15204}15204         \textcolor{comment}{/* FP RX SGE MBUF DMA MAPS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15205}15205 \textcolor{comment}{        /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15206}15206 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15207}15207         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15208}15208             \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe_8h_ac88980fb49e9b3cf1d621acfe33b44b7}{RX\_SGE\_TOTAL}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15209}15209                 \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15210}15210                     bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15211}15211                                       fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15212}15212                     bus\_dmamap\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15213}15213                                        fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2fab0e7de69a119a5ff171fc758bd71}{rx\_sge\_mbuf\_chain}}[j].\mbox{\hyperlink{structbxe__sw__rx__bd_acfa7bdae7af29ca3ad0af130fe090f89}{m\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15214}15214                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15215}15215             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15216}15216 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15217}15217             \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1337c790695c865d9bc782d86848519f}{rx\_sge\_mbuf\_spare\_map}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15218}15218                 bus\_dmamap\_unload(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15219}15219                                   fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1337c790695c865d9bc782d86848519f}{rx\_sge\_mbuf\_spare\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15220}15220                 bus\_dmamap\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15221}15221                                    fp-\/>\mbox{\hyperlink{structbxe__fastpath_a1337c790695c865d9bc782d86848519f}{rx\_sge\_mbuf\_spare\_map}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15222}15222             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15223}15223 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15224}15224             bus\_dma\_tag\_destroy(fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15225}15225             fp-\/>\mbox{\hyperlink{structbxe__fastpath_aefd4e6163e1866ff18d54d8c40eb7bca}{rx\_sge\_mbuf\_tag}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15226}15226         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15227}15227     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15228}15228 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15229}15229 \textcolor{comment}{    /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15230}15230     \textcolor{comment}{/* FW DECOMPRESSION BUFFER */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15231}15231 \textcolor{comment}{    /***************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15232}15232 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15233}15233     \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_af588b548b6b822a34c3ad7b281ec0487}{gz\_buf\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15234}15234     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ace68c7cb2d65424a20ddece2b32ce665}{gz\_buf}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15235}15235     free(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a328c9710b9799e3060fa4daa4bf375dd}{gz\_strm}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15236}15236     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a328c9710b9799e3060fa4daa4bf375dd}{gz\_strm}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15237}15237 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15238}15238 \textcolor{comment}{    /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15239}15239     \textcolor{comment}{/* SLOW PATH QUEUE */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15240}15240 \textcolor{comment}{    /*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15241}15241 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15242}15242     \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15243}15243     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a118b7ddd116d503983abc8bb596b4778}{spq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15244}15244 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15245}15245 \textcolor{comment}{    /*************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15246}15246     \textcolor{comment}{/* SLOW PATH */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15247}15247 \textcolor{comment}{    /*************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15248}15248 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15249}15249     \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15250}15250     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a74f9cdf0652b5f8cf3b2c78bbb4ba1e9}{sp}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15251}15251 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15252}15252 \textcolor{comment}{    /***************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15253}15253     \textcolor{comment}{/* EVENT QUEUE */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15254}15254 \textcolor{comment}{    /***************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15255}15255 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15256}15256     \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15257}15257     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a20e83974ee742b9647a11a5d8d696b44}{eq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15258}15258 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15259}15259 \textcolor{comment}{    /************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15260}15260     \textcolor{comment}{/* DEFAULT STATUS BLOCK */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15261}15261 \textcolor{comment}{    /************************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15262}15262 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15263}15263     \mbox{\hyperlink{bxe_8c_aa01184beef877b9439204e6918052d2a}{bxe\_dma\_free}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15264}15264     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15265}15265 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15266}15266     bus\_dma\_tag\_destroy(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15267}15267     \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a7c8ec81d31c58366bf2bbd32b597190c}{parent\_dma\_tag}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15268}15268 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15269}15269 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15270}15270 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15271}15271 \textcolor{comment}{ * Previous driver DMAE transaction may have occurred when pre-\/boot stage}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15272}15272 \textcolor{comment}{ * ended and boot began. This would invalidate the addresses of the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15273}15273 \textcolor{comment}{ * transaction, resulting in was-\/error bit set in the PCI causing all}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15274}15274 \textcolor{comment}{ * hw-\/to-\/host PCIe transactions to timeout. If this happened we want to clear}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15275}15275 \textcolor{comment}{ * the interrupt which detected this from the pglueb and the was-\/done bit}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15276}15276 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15277}15277 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15278}\mbox{\hyperlink{bxe_8c_a0fe8a1bbf9c8a1a96f25190cc1a850be}{15278}} \mbox{\hyperlink{bxe_8c_a0fe8a1bbf9c8a1a96f25190cc1a850be}{bxe\_prev\_interrupted\_dmae}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15279}15279 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15280}15280     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15281}15281 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15282}15282     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15283}15283         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a13f48e4bd2532f5da0af88230d1afdb5}{PGLUE\_B\_REG\_PGLUE\_B\_INT\_STS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15284}15284         \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_ab4beb57e24bfc96863eef1f1d264d6c5}{PGLUE\_B\_PGLUE\_B\_INT\_STS\_REG\_WAS\_ERROR\_ATTN}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15285}15285             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15286}15286                   \textcolor{stringliteral}{"{}Clearing 'was-\/error' bit that was set in pglueb"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15287}15287             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a92cc3d44294b453bfe04bab94aec83a5}{PGLUE\_B\_REG\_WAS\_ERROR\_PF\_7\_0\_CLR}}, 1 << \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15288}15288         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15289}15289     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15290}15290 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15291}15291 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15292}15292 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15293}\mbox{\hyperlink{bxe_8c_acc0a0fa6e02bb3bd8f7f729f8cef6371}{15293}} \mbox{\hyperlink{bxe_8c_acc0a0fa6e02bb3bd8f7f729f8cef6371}{bxe\_prev\_mcp\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15294}15294 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15295}15295     uint32\_t rc = \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__hsi_8h_afb079547add0c5714c954ea04b9659e7}{DRV\_MSG\_CODE\_UNLOAD\_DONE}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15296}15296                                  \mbox{\hyperlink{ecore__hsi_8h_a0a477b7d5969e0cdce3cdbb13a361d5a}{DRV\_MSG\_CODE\_UNLOAD\_SKIP\_LINK\_RESET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15297}15297     \textcolor{keywordflow}{if} (!rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15298}15298         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \textcolor{stringliteral}{"{}MCP response failure, aborting\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15299}15299         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15300}15300     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15301}15301 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15302}15302     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15303}15303 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15304}15304 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15305}15305 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__prev__list__node}{bxe\_prev\_list\_node}} *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15306}\mbox{\hyperlink{bxe_8c_a34eb6adb10bb6cfbaeba2067209bb453}{15306}} \mbox{\hyperlink{bxe_8c_a34eb6adb10bb6cfbaeba2067209bb453}{bxe\_prev\_path\_get\_entry}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15307}15307 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15308}15308     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__prev__list__node}{bxe\_prev\_list\_node}} *tmp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15309}15309 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15310}15310     LIST\_FOREACH(tmp, \&bxe\_prev\_list, node) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15311}15311         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}} == tmp-\/>bus) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15312}15312             (sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}} == tmp-\/>slot) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15313}15313             (\mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) == tmp-\/>path)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15314}15314             \textcolor{keywordflow}{return} (tmp);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15315}15315         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15316}15316     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15317}15317 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15318}15318     \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15319}15319 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15320}15320 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15321}15321 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15322}\mbox{\hyperlink{bxe_8c_af6850859af588112d570434b902b58ee}{15322}} \mbox{\hyperlink{bxe_8c_af6850859af588112d570434b902b58ee}{bxe\_prev\_is\_path\_marked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15323}15323 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15324}15324     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__prev__list__node}{bxe\_prev\_list\_node}} *tmp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15325}15325     \textcolor{keywordtype}{int} rc = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15326}15326 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15327}15327     mtx\_lock(\&\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15328}15328 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15329}15329     tmp = \mbox{\hyperlink{bxe_8c_a34eb6adb10bb6cfbaeba2067209bb453}{bxe\_prev\_path\_get\_entry}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15330}15330     \textcolor{keywordflow}{if} (tmp) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15331}15331         \textcolor{keywordflow}{if} (tmp-\/>aer) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15332}15332             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15333}15333                   \textcolor{stringliteral}{"{}Path \%d/\%d/\%d was marked by AER\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15334}15334                   sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}}, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15335}15335         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15336}15336             rc = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15337}15337             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15338}15338                   \textcolor{stringliteral}{"{}Path \%d/\%d/\%d was already cleaned from previous drivers\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15339}15339                   sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}}, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15340}15340         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15341}15341     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15342}15342 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15343}15343     mtx\_unlock(\&\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15344}15344 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15345}15345     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15346}15346 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15347}15347 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15348}15348 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15349}\mbox{\hyperlink{bxe_8c_a68de80a24637bed847040664d0085240}{15349}} \mbox{\hyperlink{bxe_8c_a68de80a24637bed847040664d0085240}{bxe\_prev\_mark\_path}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15350}15350                    uint8\_t          after\_undi)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15351}15351 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15352}15352     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__prev__list__node}{bxe\_prev\_list\_node}} *tmp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15353}15353 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15354}15354     mtx\_lock(\&\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15355}15355 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15356}15356     \textcolor{comment}{/* Check whether the entry for this path already exists */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15357}15357     tmp = \mbox{\hyperlink{bxe_8c_a34eb6adb10bb6cfbaeba2067209bb453}{bxe\_prev\_path\_get\_entry}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15358}15358     \textcolor{keywordflow}{if} (tmp) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15359}15359         \textcolor{keywordflow}{if} (!tmp-\/>aer) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15360}15360             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15361}15361                   \textcolor{stringliteral}{"{}Re-\/marking AER in path \%d/\%d/\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15362}15362                   sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}}, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15363}15363         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15364}15364             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15365}15365                   \textcolor{stringliteral}{"{}Removing AER indication from path \%d/\%d/\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15366}15366                   sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}}, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15367}15367             tmp-\/>aer = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15368}15368         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15369}15369 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15370}15370         mtx\_unlock(\&\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15371}15371         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15372}15372     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15373}15373 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15374}15374     mtx\_unlock(\&\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15375}15375 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15376}15376     \textcolor{comment}{/* Create an entry for this path and add it */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15377}15377     tmp = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__prev__list__node}{bxe\_prev\_list\_node}}), M\_DEVBUF,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15378}15378                  (M\_NOWAIT | M\_ZERO));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15379}15379     \textcolor{keywordflow}{if} (!tmp) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15380}15380         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to allocate 'bxe\_prev\_list\_node'\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15381}15381         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15382}15382     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15383}15383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15384}15384     tmp-\/>bus  = sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15385}15385     tmp-\/>slot = sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15386}15386     tmp-\/>path = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15387}15387     tmp-\/>aer  = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15388}15388     tmp-\/>undi = after\_undi ? (1 << \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)) : 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15389}15389 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15390}15390     mtx\_lock(\&\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15391}15391 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15392}15392     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15393}15393           \textcolor{stringliteral}{"{}Marked path \%d/\%d/\%d -\/ finished previous unload\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15394}15394           sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}}, \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15395}15395     LIST\_INSERT\_HEAD(\&bxe\_prev\_list, tmp, node);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15396}15396 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15397}15397     mtx\_unlock(\&\mbox{\hyperlink{bxe_8c_ab41ec573ac0474b35a62af953e5ce0e6}{bxe\_prev\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15398}15398 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15399}15399     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15400}15400 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15401}15401 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15402}15402 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15403}\mbox{\hyperlink{bxe_8c_aa2b72667d26f5f583e6cbe0f2288f075}{15403}} \mbox{\hyperlink{bxe_8c_aa2b72667d26f5f583e6cbe0f2288f075}{bxe\_do\_flr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15404}15404 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15405}15405     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15406}15406 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15407}15407     \textcolor{comment}{/* only E2 and onwards support FLR */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15408}15408     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15409}15409         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}FLR not supported in E1/E1H\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15410}15410         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15411}15411     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15412}15412 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15413}15413     \textcolor{comment}{/* only bootcode REQ\_BC\_VER\_4\_INITIATE\_FLR and onwards support flr */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15414}15414     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a50cd67f79939f984fd54c4b295c7d8bd}{bc\_ver}} < \mbox{\hyperlink{ecore__hsi_8h_a4e138d2a72718f93ab213b103ff2de7e}{REQ\_BC\_VER\_4\_INITIATE\_FLR}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15415}15415         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}FLR not supported by BC\_VER: 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15416}15416               sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a50cd67f79939f984fd54c4b295c7d8bd}{bc\_ver}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15417}15417         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15418}15418     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15419}15419 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15420}15420     \textcolor{comment}{/* Wait for Transaction Pending bit clean */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15421}15421     \textcolor{keywordflow}{for} (i = 0; i < 4; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15422}15422         \textcolor{keywordflow}{if} (i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15423}15423             DELAY(((1 << (i -\/ 1)) * 100) * 1000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15424}15424         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15425}15425 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15426}15426         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8c_a75d25fa6159827fb2fbce7abd7f53068}{bxe\_is\_pcie\_pending}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15427}15427             \textcolor{keywordflow}{goto} clear;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15428}15428         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15429}15429     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15430}15430 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15431}15431     \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PCIE transaction is not cleared, "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15432}15432               \textcolor{stringliteral}{"{}proceeding with reset anyway\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15433}15433 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15434}15434 clear:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15435}15435 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15436}15436     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Initiating FLR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15437}15437     \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_aa55f32b3a37d2ed0d2aa04f0ca8ab132}{DRV\_MSG\_CODE\_INITIATE\_FLR}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15438}15438 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15439}15439     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15440}15440 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15441}15441 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15442}\mbox{\hyperlink{structbxe__mac__vals}{15442}} \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__mac__vals}{bxe\_mac\_vals}} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15443}\mbox{\hyperlink{structbxe__mac__vals_af52f318a1c3b9b9246937627df2dea8f}{15443}}     uint32\_t \mbox{\hyperlink{structbxe__mac__vals_af52f318a1c3b9b9246937627df2dea8f}{xmac\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15444}\mbox{\hyperlink{structbxe__mac__vals_a4e5553463087fb03313f4a59548da588}{15444}}     uint32\_t \mbox{\hyperlink{structbxe__mac__vals_a4e5553463087fb03313f4a59548da588}{xmac\_val}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15445}\mbox{\hyperlink{structbxe__mac__vals_ad73f576c607ee7b7c5bb6ba7332f697c}{15445}}     uint32\_t \mbox{\hyperlink{structbxe__mac__vals_ad73f576c607ee7b7c5bb6ba7332f697c}{emac\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15446}\mbox{\hyperlink{structbxe__mac__vals_ac753b31f386573afc856b6350a09dff3}{15446}}     uint32\_t \mbox{\hyperlink{structbxe__mac__vals_ac753b31f386573afc856b6350a09dff3}{emac\_val}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15447}\mbox{\hyperlink{structbxe__mac__vals_a099fd311fd88c659084bdce003466336}{15447}}     uint32\_t \mbox{\hyperlink{structbxe__mac__vals_a099fd311fd88c659084bdce003466336}{umac\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15448}\mbox{\hyperlink{structbxe__mac__vals_a0bf19299ef2aaab12425bbebc6dddd24}{15448}}     uint32\_t \mbox{\hyperlink{structbxe__mac__vals_a0bf19299ef2aaab12425bbebc6dddd24}{umac\_val}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15449}\mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{15449}}     uint32\_t \mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{bmac\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15450}\mbox{\hyperlink{structbxe__mac__vals_a8a0d946c80ee46d5745fb305ecafe2b8}{15450}}     uint32\_t \mbox{\hyperlink{structbxe__mac__vals_a8a0d946c80ee46d5745fb305ecafe2b8}{bmac\_val}}[2];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15451}15451 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15452}15452 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15453}15453 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15454}\mbox{\hyperlink{bxe_8c_a18bc28e3d21d6456047150eda6c47fba}{15454}} \mbox{\hyperlink{bxe_8c_a18bc28e3d21d6456047150eda6c47fba}{bxe\_prev\_unload\_close\_mac}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15455}15455                           \textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__mac__vals}{bxe\_mac\_vals}} *vals)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15456}15456 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15457}15457     uint32\_t val, base\_addr, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, mask, reset\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15458}15458     uint8\_t mac\_stopped = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15459}15459     uint8\_t port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15460}15460     uint32\_t wb\_data[2];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15461}15461 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15462}15462     \textcolor{comment}{/* reset addresses as they also mark which values were changed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15463}15463     vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{bmac\_addr}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15464}15464     vals-\/>\mbox{\hyperlink{structbxe__mac__vals_a099fd311fd88c659084bdce003466336}{umac\_addr}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15465}15465     vals-\/>\mbox{\hyperlink{structbxe__mac__vals_af52f318a1c3b9b9246937627df2dea8f}{xmac\_addr}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15466}15466     vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ad73f576c607ee7b7c5bb6ba7332f697c}{emac\_addr}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15467}15467 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15468}15468     reset\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab93942a567bc1687e9b7b84ab4c328f4}{MISC\_REG\_RESET\_REG\_2}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15469}15469 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15470}15470     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15471}15471         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a23a3650d02c6977e8e476e398fb5a281}{NIG\_REG\_BMAC0\_REGS\_OUT\_EN}} + port * 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15472}15472         mask = \mbox{\hyperlink{ecore__reg_8h_a464ea5755233ad3735879850ac0d7b0f}{MISC\_REGISTERS\_RESET\_REG\_2\_RST\_BMAC0}} << port;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15473}15473         \textcolor{keywordflow}{if} ((mask \& reset\_reg) \&\& val) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15474}15474             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Disable BMAC Rx\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15475}15475             base\_addr = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ? \mbox{\hyperlink{ecore__reg_8h_af680d7d9bdb49c7014664b432093d010}{NIG\_REG\_INGRESS\_BMAC1\_MEM}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15476}15476                                     : \mbox{\hyperlink{ecore__reg_8h_a879938c780867220573a7170d5499429}{NIG\_REG\_INGRESS\_BMAC0\_MEM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15477}15477             \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} = \mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc) ? \mbox{\hyperlink{ecore__reg_8h_a3e3a37365cdd1452c2c42399221a9bce}{BIGMAC2\_REGISTER\_BMAC\_CONTROL}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15478}15478                                     : \mbox{\hyperlink{ecore__reg_8h_a2e3a77d39237fa1b23e8f32f1f0fa48a}{BIGMAC\_REGISTER\_BMAC\_CONTROL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15479}15479 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15480}15480             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15481}15481 \textcolor{comment}{             * use rd/wr since we cannot use dmae. This is safe}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15482}15482 \textcolor{comment}{             * since MCP won't access the bus due to the request}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15483}15483 \textcolor{comment}{             * to unload, and no function on the path can be}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15484}15484 \textcolor{comment}{             * loaded at this time.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15485}15485 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15486}15486             wb\_data[0] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, base\_addr + \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15487}15487             wb\_data[1] = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, base\_addr + \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} + 0x4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15488}15488             vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{bmac\_addr}} = base\_addr + \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15489}15489             vals-\/>\mbox{\hyperlink{structbxe__mac__vals_a8a0d946c80ee46d5745fb305ecafe2b8}{bmac\_val}}[0] = wb\_data[0];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15490}15490             vals-\/>\mbox{\hyperlink{structbxe__mac__vals_a8a0d946c80ee46d5745fb305ecafe2b8}{bmac\_val}}[1] = wb\_data[1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15491}15491             wb\_data[0] \&= \string~ELINK\_BMAC\_CONTROL\_RX\_ENABLE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15492}15492             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{bmac\_addr}}, wb\_data[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15493}15493             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{bmac\_addr}} + 0x4, wb\_data[1]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15494}15494         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15495}15495 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15496}15496         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Disable EMAC Rx\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15497}15497         vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ad73f576c607ee7b7c5bb6ba7332f697c}{emac\_addr}} = \mbox{\hyperlink{ecore__reg_8h_a4ee74a75ab0a100d0232fb7d3064bb60}{NIG\_REG\_NIG\_EMAC0\_EN}} + \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)*4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15498}15498         vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ac753b31f386573afc856b6350a09dff3}{emac\_val}} = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ad73f576c607ee7b7c5bb6ba7332f697c}{emac\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15499}15499         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, vals-\/>\mbox{\hyperlink{structbxe__mac__vals_ad73f576c607ee7b7c5bb6ba7332f697c}{emac\_addr}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15500}15500         mac\_stopped = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15501}15501     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15502}15502         \textcolor{keywordflow}{if} (reset\_reg \& \mbox{\hyperlink{ecore__reg_8h_a4d00f634e657d14df6c7c3e1a70139a4}{MISC\_REGISTERS\_RESET\_REG\_2\_XMAC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15503}15503             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Disable XMAC Rx\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15504}15504             base\_addr = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ? \mbox{\hyperlink{ecore__reg_8h_af088bf17e6d784d1b28e98d86b6327cd}{GRCBASE\_XMAC1}} : \mbox{\hyperlink{ecore__reg_8h_a21c56d3435066b6a717460515422a5f8}{GRCBASE\_XMAC0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15505}15505             val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, base\_addr + \mbox{\hyperlink{ecore__reg_8h_ab609af6b7d5a316306d12eb1030e9bf8}{XMAC\_REG\_PFC\_CTRL\_HI}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15506}15506             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, base\_addr + \mbox{\hyperlink{ecore__reg_8h_ab609af6b7d5a316306d12eb1030e9bf8}{XMAC\_REG\_PFC\_CTRL\_HI}}, val \& \string~(1 << 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15507}15507             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, base\_addr + \mbox{\hyperlink{ecore__reg_8h_ab609af6b7d5a316306d12eb1030e9bf8}{XMAC\_REG\_PFC\_CTRL\_HI}}, val | (1 << 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15508}15508             vals-\/>\mbox{\hyperlink{structbxe__mac__vals_af52f318a1c3b9b9246937627df2dea8f}{xmac\_addr}} = base\_addr + \mbox{\hyperlink{ecore__reg_8h_aafc57292267e60c4da58e6c00e2d4e43}{XMAC\_REG\_CTRL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15509}15509             vals-\/>\mbox{\hyperlink{structbxe__mac__vals_a4e5553463087fb03313f4a59548da588}{xmac\_val}} = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, vals-\/>\mbox{\hyperlink{structbxe__mac__vals_af52f318a1c3b9b9246937627df2dea8f}{xmac\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15510}15510             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, vals-\/>\mbox{\hyperlink{structbxe__mac__vals_af52f318a1c3b9b9246937627df2dea8f}{xmac\_addr}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15511}15511             mac\_stopped = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15512}15512         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15513}15513 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15514}15514         mask = \mbox{\hyperlink{ecore__reg_8h_ae631fc3eec23f165899c0b29c5cc397e}{MISC\_REGISTERS\_RESET\_REG\_2\_UMAC0}} << port;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15515}15515         \textcolor{keywordflow}{if} (mask \& reset\_reg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15516}15516             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Disable UMAC Rx\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15517}15517             base\_addr = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ? \mbox{\hyperlink{ecore__reg_8h_a85bb49aa7eed62048a1973dbeb62c943}{GRCBASE\_UMAC1}} : \mbox{\hyperlink{ecore__reg_8h_acdc509a7fd907dcc4e124a922c4d9db8}{GRCBASE\_UMAC0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15518}15518             vals-\/>\mbox{\hyperlink{structbxe__mac__vals_a099fd311fd88c659084bdce003466336}{umac\_addr}} = base\_addr + \mbox{\hyperlink{ecore__reg_8h_a332eec15775be8bca13871402a2b4ae7}{UMAC\_REG\_COMMAND\_CONFIG}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15519}15519             vals-\/>\mbox{\hyperlink{structbxe__mac__vals_a0bf19299ef2aaab12425bbebc6dddd24}{umac\_val}} = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, vals-\/>\mbox{\hyperlink{structbxe__mac__vals_a099fd311fd88c659084bdce003466336}{umac\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15520}15520             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, vals-\/>\mbox{\hyperlink{structbxe__mac__vals_a099fd311fd88c659084bdce003466336}{umac\_addr}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15521}15521             mac\_stopped = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15522}15522         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15523}15523     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15524}15524 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15525}15525     \textcolor{keywordflow}{if} (mac\_stopped) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15526}15526         DELAY(20000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15527}15527     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15528}15528 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15529}15529 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15530}\mbox{\hyperlink{bxe_8c_a1a0c8511e07ef0f1347738c0a3af4358}{15530}} \textcolor{preprocessor}{\#define BXE\_PREV\_UNDI\_PROD\_ADDR(p)  (BAR\_TSTRORM\_INTMEM + 0x1508 + ((p) << 4))}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15531}\mbox{\hyperlink{bxe_8c_ac88edbed6b269351da9363c3cfcbfe15}{15531}} \textcolor{preprocessor}{\#define BXE\_PREV\_UNDI\_RCQ(val)      ((val) \& 0xffff)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15532}\mbox{\hyperlink{bxe_8c_a434c937e67f937da4d5accb1ff639827}{15532}} \textcolor{preprocessor}{\#define BXE\_PREV\_UNDI\_BD(val)       ((val) >> 16 \& 0xffff)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15533}\mbox{\hyperlink{bxe_8c_a146189c25cc90e4d59472b8282a70a26}{15533}} \textcolor{preprocessor}{\#define BXE\_PREV\_UNDI\_PROD(rcq, bd) ((bd) << 16 | (rcq))}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15534}15534 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15535}15535 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15536}\mbox{\hyperlink{bxe_8c_a6667916b73ce4efe4147b3b9524626c6}{15536}} \mbox{\hyperlink{bxe_8c_a6667916b73ce4efe4147b3b9524626c6}{bxe\_prev\_unload\_undi\_inc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15537}15537                          uint8\_t          port,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15538}15538                          uint8\_t          inc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15539}15539 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15540}15540     uint16\_t rcq, bd;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15541}15541     uint32\_t tmp\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe_8c_a1a0c8511e07ef0f1347738c0a3af4358}{BXE\_PREV\_UNDI\_PROD\_ADDR}}(port));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15542}15542 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15543}15543     rcq = \mbox{\hyperlink{bxe_8c_ac88edbed6b269351da9363c3cfcbfe15}{BXE\_PREV\_UNDI\_RCQ}}(tmp\_reg) + inc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15544}15544     bd = \mbox{\hyperlink{bxe_8c_a434c937e67f937da4d5accb1ff639827}{BXE\_PREV\_UNDI\_BD}}(tmp\_reg) + inc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15545}15545 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15546}15546     tmp\_reg = \mbox{\hyperlink{bxe_8c_a146189c25cc90e4d59472b8282a70a26}{BXE\_PREV\_UNDI\_PROD}}(rcq, bd);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15547}15547     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8c_a1a0c8511e07ef0f1347738c0a3af4358}{BXE\_PREV\_UNDI\_PROD\_ADDR}}(port), tmp\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15548}15548 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15549}15549     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15550}15550           \textcolor{stringliteral}{"{}UNDI producer [\%d] rings bd -\/> 0x\%04x, rcq -\/> 0x\%04x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15551}15551           port, bd, rcq);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15552}15552 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15553}15553 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15554}15554 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15555}\mbox{\hyperlink{bxe_8c_a1aa842d2fe43a7b3f0e6b6cc6539b308}{15555}} \mbox{\hyperlink{bxe_8c_a1aa842d2fe43a7b3f0e6b6cc6539b308}{bxe\_prev\_unload\_common}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15556}15556 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15557}15557     uint32\_t reset\_reg, tmp\_reg = 0, rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15558}15558     uint8\_t prev\_undi = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15559}15559     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__mac__vals}{bxe\_mac\_vals}} mac\_vals;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15560}15560     uint32\_t timer\_count = 1000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15561}15561     uint32\_t prev\_brb;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15562}15562 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15563}15563     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15564}15564 \textcolor{comment}{     * It is possible a previous function received 'common' answer,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15565}15565 \textcolor{comment}{     * but hasn't loaded yet, therefore creating a scenario of}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15566}15566 \textcolor{comment}{     * multiple functions receiving 'common' on the same path.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15567}15567 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15568}15568     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Common unload Flow\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15569}15569 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15570}15570     memset(\&mac\_vals, 0, \textcolor{keyword}{sizeof}(mac\_vals));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15571}15571 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15572}15572     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_af6850859af588112d570434b902b58ee}{bxe\_prev\_is\_path\_marked}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15573}15573         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_acc0a0fa6e02bb3bd8f7f729f8cef6371}{bxe\_prev\_mcp\_done}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15574}15574     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15575}15575 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15576}15576     reset\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_abb53f8ae2c9eb20d3bc301707c7c7ba5}{MISC\_REG\_RESET\_REG\_1}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15577}15577 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15578}15578     \textcolor{comment}{/* Reset should be performed after BRB is emptied */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15579}15579     \textcolor{keywordflow}{if} (reset\_reg \& \mbox{\hyperlink{ecore__reg_8h_a2cdcf4a7050ef8e402a7054f58cfcc8e}{MISC\_REGISTERS\_RESET\_REG\_1\_RST\_BRB1}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15580}15580         \textcolor{comment}{/* Close the MAC Rx to prevent BRB from filling up */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15581}15581         \mbox{\hyperlink{bxe_8c_a18bc28e3d21d6456047150eda6c47fba}{bxe\_prev\_unload\_close\_mac}}(sc, \&mac\_vals);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15582}15582 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15583}15583         \textcolor{comment}{/* close LLH filters towards the BRB */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15584}15584         \mbox{\hyperlink{bxe__elink_8c_a1a25ac808add3a1aafebc6e38436cff9}{elink\_set\_rx\_filter}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15585}15585 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15586}15586         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15587}15587 \textcolor{comment}{         * Check if the UNDI driver was previously loaded.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15588}15588 \textcolor{comment}{         * UNDI driver initializes CID offset for normal bell to 0x7}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15589}15589 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15590}15590         \textcolor{keywordflow}{if} (reset\_reg \& \mbox{\hyperlink{ecore__reg_8h_aa392c008ea2e4df65e74ede06f002f4a}{MISC\_REGISTERS\_RESET\_REG\_1\_RST\_DORQ}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15591}15591             tmp\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a106ca2e4d963db4e369430c4f8eb304e}{DORQ\_REG\_NORM\_CID\_OFST}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15592}15592             \textcolor{keywordflow}{if} (tmp\_reg == 0x7) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15593}15593                 \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}UNDI previously loaded\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15594}15594                 prev\_undi = TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15595}15595                 \textcolor{comment}{/* clear the UNDI indication */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15596}15596                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a106ca2e4d963db4e369430c4f8eb304e}{DORQ\_REG\_NORM\_CID\_OFST}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15597}15597                 \textcolor{comment}{/* clear possible idle check errors */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15598}15598                 \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0700340b5c2644817ce2f52377f265ae}{NIG\_REG\_NIG\_INT\_STS\_CLR\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15599}15599             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15600}15600         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15601}15601 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15602}15602         \textcolor{comment}{/* wait until BRB is empty */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15603}15603         tmp\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a13ea321bda19c4aecffd577952a61ca8}{BRB1\_REG\_NUM\_OF\_FULL\_BLOCKS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15604}15604         \textcolor{keywordflow}{while} (timer\_count) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15605}15605             prev\_brb = tmp\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15606}15606 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15607}15607             tmp\_reg = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a13ea321bda19c4aecffd577952a61ca8}{BRB1\_REG\_NUM\_OF\_FULL\_BLOCKS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15608}15608             \textcolor{keywordflow}{if} (!tmp\_reg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15609}15609                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15610}15610             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15611}15611 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15612}15612             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}BRB still has 0x\%08x\(\backslash\)n"{}}, tmp\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15613}15613 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15614}15614             \textcolor{comment}{/* reset timer as long as BRB actually gets emptied */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15615}15615             \textcolor{keywordflow}{if} (prev\_brb > tmp\_reg) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15616}15616                 timer\_count = 1000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15617}15617             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15618}15618                 timer\_count-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15619}15619             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15620}15620 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15621}15621             \textcolor{comment}{/* If UNDI resides in memory, manually increment it */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15622}15622             \textcolor{keywordflow}{if} (prev\_undi) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15623}15623                 \mbox{\hyperlink{bxe_8c_a6667916b73ce4efe4147b3b9524626c6}{bxe\_prev\_unload\_undi\_inc}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc), 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15624}15624             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15625}15625 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15626}15626             DELAY(10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15627}15627         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15628}15628 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15629}15629         \textcolor{keywordflow}{if} (!timer\_count) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15630}15630             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to empty BRB\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15631}15631         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15632}15632     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15633}15633 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15634}15634     \textcolor{comment}{/* No packets are in the pipeline, path is ready for reset */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15635}15635     \mbox{\hyperlink{bxe_8c_a7f7aade2e4006d9f59fa8dac2cd181e3}{bxe\_reset\_common}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15636}15636 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15637}15637     \textcolor{keywordflow}{if} (mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_af52f318a1c3b9b9246937627df2dea8f}{xmac\_addr}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15638}15638         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_af52f318a1c3b9b9246937627df2dea8f}{xmac\_addr}}, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_a4e5553463087fb03313f4a59548da588}{xmac\_val}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15639}15639     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15640}15640     \textcolor{keywordflow}{if} (mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_a099fd311fd88c659084bdce003466336}{umac\_addr}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15641}15641         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_a099fd311fd88c659084bdce003466336}{umac\_addr}}, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_a0bf19299ef2aaab12425bbebc6dddd24}{umac\_val}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15642}15642     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15643}15643     \textcolor{keywordflow}{if} (mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_ad73f576c607ee7b7c5bb6ba7332f697c}{emac\_addr}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15644}15644         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_ad73f576c607ee7b7c5bb6ba7332f697c}{emac\_addr}}, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_ac753b31f386573afc856b6350a09dff3}{emac\_val}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15645}15645     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15646}15646     \textcolor{keywordflow}{if} (mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{bmac\_addr}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15647}15647         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{bmac\_addr}}, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_a8a0d946c80ee46d5745fb305ecafe2b8}{bmac\_val}}[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15648}15648         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_ac89d1d55b1ed3f94c01b211c61c873f3}{bmac\_addr}} + 4, mac\_vals.\mbox{\hyperlink{structbxe__mac__vals_a8a0d946c80ee46d5745fb305ecafe2b8}{bmac\_val}}[1]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15649}15649     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15650}15650 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15651}15651     rc = \mbox{\hyperlink{bxe_8c_a68de80a24637bed847040664d0085240}{bxe\_prev\_mark\_path}}(sc, prev\_undi);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15652}15652     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15653}15653         \mbox{\hyperlink{bxe_8c_acc0a0fa6e02bb3bd8f7f729f8cef6371}{bxe\_prev\_mcp\_done}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15654}15654         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15655}15655     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15656}15656 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15657}15657     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_acc0a0fa6e02bb3bd8f7f729f8cef6371}{bxe\_prev\_mcp\_done}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15658}15658 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15659}15659 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15660}15660 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15661}\mbox{\hyperlink{bxe_8c_a201358a56d6a23d6e94f842db97c2ded}{15661}} \mbox{\hyperlink{bxe_8c_a201358a56d6a23d6e94f842db97c2ded}{bxe\_prev\_unload\_uncommon}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15662}15662 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15663}15663     \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15664}15664 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15665}15665     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Uncommon unload Flow\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15666}15666 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15667}15667     \textcolor{comment}{/* Test if previous unload process was already finished for this path */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15668}15668     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_af6850859af588112d570434b902b58ee}{bxe\_prev\_is\_path\_marked}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15669}15669         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_acc0a0fa6e02bb3bd8f7f729f8cef6371}{bxe\_prev\_mcp\_done}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15670}15670     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15671}15671 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15672}15672     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Path is unmarked\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15673}15673 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15674}15674     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15675}15675 \textcolor{comment}{     * If function has FLR capabilities, and existing FW version matches}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15676}15676 \textcolor{comment}{     * the one required, then FLR will be sufficient to clean any residue}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15677}15677 \textcolor{comment}{     * left by previous driver}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15678}15678 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15679}15679     rc = \mbox{\hyperlink{bxe_8c_a8feaf375217687b6ec4f9e0f9956331c}{bxe\_nic\_load\_analyze\_req}}(sc, \mbox{\hyperlink{ecore__hsi_8h_ae351e81091525dc547b47825e91ac914}{FW\_MSG\_CODE\_DRV\_LOAD\_FUNCTION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15680}15680     \textcolor{keywordflow}{if} (!rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15681}15681         \textcolor{comment}{/* fw version is good */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15682}15682         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}FW version matches our own, attempting FLR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15683}15683         rc = \mbox{\hyperlink{bxe_8c_aa2b72667d26f5f583e6cbe0f2288f075}{bxe\_do\_flr}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15684}15684     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15685}15685 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15686}15686     \textcolor{keywordflow}{if} (!rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15687}15687         \textcolor{comment}{/* FLR was performed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15688}15688         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}FLR successful\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15689}15689         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15690}15690     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15691}15691 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15692}15692     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Could not FLR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15693}15693 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15694}15694     \textcolor{comment}{/* Close the MCP request, return failure*/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15695}15695     rc = \mbox{\hyperlink{bxe_8c_acc0a0fa6e02bb3bd8f7f729f8cef6371}{bxe\_prev\_mcp\_done}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15696}15696     \textcolor{keywordflow}{if} (!rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15697}15697         rc = \mbox{\hyperlink{bxe_8c_ac7692c23460caf3b24a69d5e1a1841e9}{BXE\_PREV\_WAIT\_NEEDED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15698}15698     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15699}15699 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15700}15700     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15701}15701 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15702}15702 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15703}15703 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15704}\mbox{\hyperlink{bxe_8c_af84733b960a57df01eabe00eec9205ca}{15704}} \mbox{\hyperlink{bxe_8c_af84733b960a57df01eabe00eec9205ca}{bxe\_prev\_unload}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15705}15705 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15706}15706     \textcolor{keywordtype}{int} time\_counter = 10;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15707}15707     uint32\_t fw, hw\_lock\_reg, hw\_lock\_val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15708}15708     uint32\_t rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15709}15709 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15710}15710     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15711}15711 \textcolor{comment}{     * Clear HW from errors which may have resulted from an interrupted}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15712}15712 \textcolor{comment}{     * DMAE transaction.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15713}15713 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15714}15714     \mbox{\hyperlink{bxe_8c_a0fe8a1bbf9c8a1a96f25190cc1a850be}{bxe\_prev\_interrupted\_dmae}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15715}15715 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15716}15716     \textcolor{comment}{/* Release previously held locks */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15717}15717     hw\_lock\_reg =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15718}15718         (\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc) <= 5) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15719}15719             (\mbox{\hyperlink{ecore__reg_8h_af27e5ee55b5ebe5d7684e8a5e1dc5c22}{MISC\_REG\_DRIVER\_CONTROL\_1}} + \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc) * 8) :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15720}15720             (\mbox{\hyperlink{ecore__reg_8h_a65a694d0ee5eff4429fb120b44cae68a}{MISC\_REG\_DRIVER\_CONTROL\_7}} + (\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc) -\/ 6) * 8);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15721}15721 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15722}15722     hw\_lock\_val = (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, hw\_lock\_reg));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15723}15723     \textcolor{keywordflow}{if} (hw\_lock\_val) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15724}15724         \textcolor{keywordflow}{if} (hw\_lock\_val \& \mbox{\hyperlink{ecore__reg_8h_a5573d7a9f2bb74cfd30c16dfae96783a}{HW\_LOCK\_RESOURCE\_NVRAM}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15725}15725             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Releasing previously held NVRAM lock\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15726}15726             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af278d260fae03bc6fb6c3eb545bd7668}{MCP\_REG\_MCPR\_NVM\_SW\_ARB}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15727}15727                    (\mbox{\hyperlink{ecore__reg_8h_ad8a5636ab3f0dfbec9291754406ae2c2}{MCPR\_NVM\_SW\_ARB\_ARB\_REQ\_CLR1}} << \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15728}15728         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15729}15729         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Releasing previously held HW lock\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15730}15730         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, hw\_lock\_reg, 0xffffffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15731}15731     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15732}15732         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}No need to release HW/NVRAM locks\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15733}15733     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15734}15734 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15735}15735     \textcolor{keywordflow}{if} (\mbox{\hyperlink{ecore__reg_8h_ab45f43d128087ca7b6554fd1646db37d}{MCPR\_ACCESS\_LOCK\_LOCK}} \& \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a49668f80e536172985caf4ca6a248d2f}{MCP\_REG\_MCPR\_ACCESS\_LOCK}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15736}15736         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Releasing previously held ALR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15737}15737         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a49668f80e536172985caf4ca6a248d2f}{MCP\_REG\_MCPR\_ACCESS\_LOCK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15738}15738     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15739}15739 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15740}15740     \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15741}15741         \textcolor{comment}{/* Lock MCP using an unload request */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15742}15742         fw = \mbox{\hyperlink{bxe_8c_a0f367b0ed976c15fa24589fe03099889}{bxe\_fw\_command}}(sc, \mbox{\hyperlink{ecore__hsi_8h_a3f83ef39d58042aaf1d89c973476c766}{DRV\_MSG\_CODE\_UNLOAD\_REQ\_WOL\_DIS}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15743}15743         \textcolor{keywordflow}{if} (!fw) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15744}15744             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}MCP response failure, aborting\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15745}15745             rc = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15746}15746             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15747}15747         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15748}15748 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15749}15749         \textcolor{keywordflow}{if} (fw == \mbox{\hyperlink{ecore__hsi_8h_a9b1319ff6f47a5ed548e28b9535baf62}{FW\_MSG\_CODE\_DRV\_UNLOAD\_COMMON}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15750}15750             rc = \mbox{\hyperlink{bxe_8c_a1aa842d2fe43a7b3f0e6b6cc6539b308}{bxe\_prev\_unload\_common}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15751}15751             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15752}15752         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15753}15753 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15754}15754         \textcolor{comment}{/* non-\/common reply from MCP night require looping */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15755}15755         rc = \mbox{\hyperlink{bxe_8c_a201358a56d6a23d6e94f842db97c2ded}{bxe\_prev\_unload\_uncommon}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15756}15756         \textcolor{keywordflow}{if} (rc != \mbox{\hyperlink{bxe_8c_ac7692c23460caf3b24a69d5e1a1841e9}{BXE\_PREV\_WAIT\_NEEDED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15757}15757             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15758}15758         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15759}15759 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15760}15760         DELAY(20000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15761}15761     \} \textcolor{keywordflow}{while} (-\/-\/time\_counter);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15762}15762 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15763}15763     \textcolor{keywordflow}{if} (!time\_counter || rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15764}15764         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Failed to unload previous driver!"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15765}15765             \textcolor{stringliteral}{"{} time\_counter \%d rc \%d\(\backslash\)n"{}}, time\_counter, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15766}15766         rc = -\/1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15767}15767     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15768}15768 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15769}15769     \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15770}15770 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15771}15771 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15772}15772 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15773}\mbox{\hyperlink{bxe_8c_adbbf7ffcefe48cdaa56946b4b5ae2a69}{15773}} \mbox{\hyperlink{bxe_8c_adbbf7ffcefe48cdaa56946b4b5ae2a69}{bxe\_dcbx\_set\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15774}15774                    uint8\_t          dcb\_on,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15775}15775                    uint32\_t         dcbx\_enabled)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15776}15776 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15777}15777     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15778}15778         sc-\/>\mbox{\hyperlink{structbxe__softc_aa959fad5c3e150aa188f95c4c38ae219}{dcb\_state}} = dcb\_on;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15779}15779         sc-\/>\mbox{\hyperlink{structbxe__softc_ad38df8e610b9c29642f9cefc28fe2712}{dcbx\_enabled}} = dcbx\_enabled;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15780}15780     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15781}15781         sc-\/>\mbox{\hyperlink{structbxe__softc_aa959fad5c3e150aa188f95c4c38ae219}{dcb\_state}} = FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15782}15782         sc-\/>\mbox{\hyperlink{structbxe__softc_ad38df8e610b9c29642f9cefc28fe2712}{dcbx\_enabled}} = \mbox{\hyperlink{bxe_8h_ac9b960b6cbfaaa10c90223f5384defbd}{BXE\_DCBX\_ENABLED\_INVALID}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15783}15783     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15784}15784     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15785}15785           \textcolor{stringliteral}{"{}DCB state [\%s:\%s]\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15786}15786           dcb\_on ? \textcolor{stringliteral}{"{}ON"{}} : \textcolor{stringliteral}{"{}OFF"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15787}15787           (dcbx\_enabled == \mbox{\hyperlink{bxe_8h_a86dc12e2c26be5ea6a938dea03b9206e}{BXE\_DCBX\_ENABLED\_OFF}}) ? \textcolor{stringliteral}{"{}user-\/mode"{}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15788}15788           (dcbx\_enabled == \mbox{\hyperlink{bxe_8h_a836444de501deea319767530a9ca2612}{BXE\_DCBX\_ENABLED\_ON\_NEG\_OFF}}) ? \textcolor{stringliteral}{"{}on-\/chip static"{}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15789}15789           (dcbx\_enabled == \mbox{\hyperlink{bxe_8h_a8e7f634f45cf6f9aa396a005abb5b61b}{BXE\_DCBX\_ENABLED\_ON\_NEG\_ON}}) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15790}15790           \textcolor{stringliteral}{"{}on-\/chip with negotiation"{}} : \textcolor{stringliteral}{"{}invalid"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15791}15791 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15792}15792 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15793}15793 \textcolor{comment}{/* must be called after sriov-\/enable */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15794}15794 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15795}\mbox{\hyperlink{bxe_8c_ab8efaa6675214287afcdf767fa880a4e}{15795}} \mbox{\hyperlink{bxe_8c_ab8efaa6675214287afcdf767fa880a4e}{bxe\_set\_qm\_cid\_count}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15796}15796 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15797}15797     \textcolor{keywordtype}{int} cid\_count = \mbox{\hyperlink{bxe_8h_a7c9c2a4586d5099c91429338a3ba2335}{BXE\_L2\_MAX\_CID}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15798}15798 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15799}15799     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a591919023cb79063136fe9af3bd7851a}{IS\_SRIOV}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15800}15800         cid\_count += \mbox{\hyperlink{bxe_8h_abc8162380d650420f77add6652a2893e}{BXE\_VF\_CIDS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15801}15801     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15802}15802 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15803}15803     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15804}15804         cid\_count += \mbox{\hyperlink{bxe_8h_ab21f2fca5d179fb8dc6092777ebf8366}{CNIC\_CID\_MAX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15805}15805     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15806}15806 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15807}15807     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8h_aeb47018f732c79a339c5617ef0cbab65}{roundup}}(cid\_count, \mbox{\hyperlink{bxe_8h_ac7d97ca3e99fe6a1a69dff67832feb5a}{QM\_CID\_ROUND}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15808}15808 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15809}15809 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15810}15810 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15811}\mbox{\hyperlink{bxe_8c_a888cc367c09af94de3fe4e2714eb751f}{15811}} \mbox{\hyperlink{bxe_8c_a888cc367c09af94de3fe4e2714eb751f}{bxe\_init\_multi\_cos}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15812}15812 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15813}15813     \textcolor{keywordtype}{int} pri, cos;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15814}15814 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15815}15815     uint32\_t pri\_map = 0; \textcolor{comment}{/* XXX change to user config */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15816}15816 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15817}15817     \textcolor{keywordflow}{for} (pri = 0; pri < \mbox{\hyperlink{bxe_8h_a172cd97a36a00f94ecc17e25327ca7dc}{BXE\_MAX\_PRIORITY}}; pri++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15818}15818         cos = ((pri\_map \& (0xf << (pri * 4))) >> (pri * 4));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15819}15819         \textcolor{keywordflow}{if} (cos < sc-\/>max\_cos) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15820}15820             sc-\/>\mbox{\hyperlink{structbxe__softc_a7cc2bfb18e3702df0d6b3e87a617ac8b}{prio\_to\_cos}}[pri] = cos;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15821}15821         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15822}15822             \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}Invalid COS \%d for priority \%d "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15823}15823                       \textcolor{stringliteral}{"{}(max COS is \%d), setting to 0\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15824}15824                   cos, pri, (sc-\/>\mbox{\hyperlink{structbxe__softc_acd82fee11a36e84b5e3ed957dd47cd79}{max\_cos}} -\/ 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15825}15825             sc-\/>\mbox{\hyperlink{structbxe__softc_a7cc2bfb18e3702df0d6b3e87a617ac8b}{prio\_to\_cos}}[pri] = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15826}15826         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15827}15827     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15828}15828 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15829}15829 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15830}15830 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15831}\mbox{\hyperlink{bxe_8c_a857a41ec42cb4b5390f534c6d2c0c2d9}{15831}} \mbox{\hyperlink{bxe_8c_a857a41ec42cb4b5390f534c6d2c0c2d9}{bxe\_sysctl\_state}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15832}15832 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15833}15833     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15834}15834     \textcolor{keywordtype}{int} error, result;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15835}15835 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15836}15836     result = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15837}15837     error = sysctl\_handle\_int(oidp, \&result, 0, req);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15838}15838 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15839}15839     \textcolor{keywordflow}{if} (error || !req-\/>newptr) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15840}15840         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15841}15841     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15842}15842 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15843}15843     \textcolor{keywordflow}{if} (result == 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15844}15844         uint32\_t  temp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15845}15845         sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)arg1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15846}15846 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15847}15847         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}... dumping driver state ...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15848}15848         temp = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, temperature\_in\_half\_celsius);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15849}15849         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}\(\backslash\)t Device Temperature = \%d Celsius\(\backslash\)n"{}}, (temp/2));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15850}15850     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15851}15851 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15852}15852     \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15853}15853 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15854}15854 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15855}15855 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15856}\mbox{\hyperlink{bxe_8c_a8388b021267931d10f9b939899fbe5cb}{15856}} \mbox{\hyperlink{bxe_8c_a8388b021267931d10f9b939899fbe5cb}{bxe\_sysctl\_eth\_stat}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15857}15857 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15858}15858     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)arg1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15859}15859     uint32\_t *\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}} = (uint32\_t *)\&sc-\/>\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15860}15860     uint32\_t *\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15861}15861     uint64\_t value = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15862}15862     \textcolor{keywordtype}{int} index = (\textcolor{keywordtype}{int})arg2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15863}15863 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15864}15864     \textcolor{keywordflow}{if} (index >= \mbox{\hyperlink{bxe_8c_acdedd8f2fc9fa1853da95066c18c3760}{BXE\_NUM\_ETH\_STATS}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15865}15865         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}bxe\_eth\_stats index out of range (\%d)\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15866}15866         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15867}15867     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15868}15868 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15869}15869     \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} = (\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}} + \mbox{\hyperlink{bxe_8c_aab446e1b2b58c382a04e6a890d328b09}{bxe\_eth\_stats\_arr}}[index].offset);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15870}15870 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15871}15871     \textcolor{keywordflow}{switch} (\mbox{\hyperlink{bxe_8c_aab446e1b2b58c382a04e6a890d328b09}{bxe\_eth\_stats\_arr}}[index].\mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15872}15872     \textcolor{keywordflow}{case} 4:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15873}15873         value = (uint64\_t)*\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15874}15874         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15875}15875     \textcolor{keywordflow}{case} 8:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15876}15876         value = \mbox{\hyperlink{bxe_8h_aa8f1ad0f3cbda870423bb85e69e6d8dc}{HILO\_U64}}(*\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, *(\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} + 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15877}15877         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15878}15878     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15879}15879         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid bxe\_eth\_stats size (index=\%d size=\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15880}15880               index, \mbox{\hyperlink{bxe_8c_aab446e1b2b58c382a04e6a890d328b09}{bxe\_eth\_stats\_arr}}[index].\mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15881}15881         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15882}15882     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15883}15883 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15884}15884     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a77015e81478b2b862f6e8c30ac901fa9}{sysctl\_handle\_64}}(oidp, \&value, 0, req));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15885}15885 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15886}15886 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15887}15887 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15888}\mbox{\hyperlink{bxe_8c_af49010e155834dd95f12fed6bfae610e}{15888}} \mbox{\hyperlink{bxe_8c_af49010e155834dd95f12fed6bfae610e}{bxe\_sysctl\_eth\_q\_stat}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15889}15889 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15890}15890     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)arg1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15891}15891     uint32\_t *\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15892}15892     uint32\_t *\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15893}15893     uint64\_t value = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15894}15894     uint32\_t q\_stat = (uint32\_t)arg2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15895}15895     uint32\_t fp\_index = ((q\_stat >> 16) \& 0xffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15896}15896     uint32\_t index = (q\_stat \& 0xffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15897}15897 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15898}15898     \mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}} = (uint32\_t *)\&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[fp\_index].\mbox{\hyperlink{structbxe__fastpath_a433ea9643948137a3fe9f3609d6ea38f}{eth\_q\_stats}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15899}15899 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15900}15900     if (index >= \mbox{\hyperlink{bxe_8c_a0df1a288e637b67580fc02576d11b7ae}{BXE\_NUM\_ETH\_Q\_STATS}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15901}15901         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}bxe\_eth\_q\_stats index out of range (\%d)\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15902}15902         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15903}15903     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15904}15904 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15905}15905     \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} = (\mbox{\hyperlink{structbxe__softc_aae5173d04ba2f52a4d3770ec98b4e865}{eth\_stats}} + \mbox{\hyperlink{bxe_8c_a9f622b6d2c60d9a626e27c784659dbf1}{bxe\_eth\_q\_stats\_arr}}[index].offset);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15906}15906 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15907}15907     \textcolor{keywordflow}{switch} (\mbox{\hyperlink{bxe_8c_a9f622b6d2c60d9a626e27c784659dbf1}{bxe\_eth\_q\_stats\_arr}}[index].\mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15908}15908     \textcolor{keywordflow}{case} 4:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15909}15909         value = (uint64\_t)*\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15910}15910         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15911}15911     \textcolor{keywordflow}{case} 8:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15912}15912         value = \mbox{\hyperlink{bxe_8h_aa8f1ad0f3cbda870423bb85e69e6d8dc}{HILO\_U64}}(*\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, *(\mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}} + 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15913}15913         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15914}15914     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15915}15915         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Invalid bxe\_eth\_q\_stats size (index=\%d size=\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15916}15916               index, \mbox{\hyperlink{bxe_8c_a9f622b6d2c60d9a626e27c784659dbf1}{bxe\_eth\_q\_stats\_arr}}[index].\mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15917}15917         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15918}15918     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15919}15919 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15920}15920     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_a77015e81478b2b862f6e8c30ac901fa9}{sysctl\_handle\_64}}(oidp, \&value, 0, req));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15921}15921 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15922}15922 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15923}\mbox{\hyperlink{bxe_8c_a562e0da59f4b5f75c6c920a6172dfa0e}{15923}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{bxe_8c_a562e0da59f4b5f75c6c920a6172dfa0e}{bxe\_force\_link\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15924}15924 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15925}15925 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15926}15926         \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15927}15927         \mbox{\hyperlink{bxe__elink_8c_ad65df1d7fc0b8a4b6c8432659b7834ef}{elink\_link\_reset}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15928}15928         \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15929}15929 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15930}15930 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15931}15931 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15932}\mbox{\hyperlink{bxe_8c_a414cc1797945e4debef08fe142b4d4ca}{15932}} \mbox{\hyperlink{bxe_8c_a414cc1797945e4debef08fe142b4d4ca}{bxe\_sysctl\_pauseparam}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15933}15933 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15934}15934         \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)arg1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15935}15935         uint32\_t cfg\_idx = \mbox{\hyperlink{bxe_8c_a4076cc1317dc700e3906fa6a55950093}{bxe\_get\_link\_cfg\_idx}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15936}15936         \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15937}15937         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15938}15938         \textcolor{keywordtype}{int} result;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15939}15939 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15940}15940 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15941}15941         error = sysctl\_handle\_int(oidp, \&sc-\/>\mbox{\hyperlink{structbxe__softc_ae0d003fcc3280759a0229759946ba586}{bxe\_pause\_param}}, 0, req);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15942}15942 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15943}15943         \textcolor{keywordflow}{if} (error || !req-\/>newptr) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15944}15944                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15945}15945         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15946}15946         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_ae0d003fcc3280759a0229759946ba586}{bxe\_pause\_param}} < 0) ||  (sc-\/>\mbox{\hyperlink{structbxe__softc_ae0d003fcc3280759a0229759946ba586}{bxe\_pause\_param}} > 8)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15947}15947                 \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}invalid pause param (\%d) -\/ use intergers between 1 \& 8\(\backslash\)n"{}},sc-\/>\mbox{\hyperlink{structbxe__softc_ae0d003fcc3280759a0229759946ba586}{bxe\_pause\_param}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15948}15948                 sc-\/>\mbox{\hyperlink{structbxe__softc_ae0d003fcc3280759a0229759946ba586}{bxe\_pause\_param}} = 8;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15949}15949         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15950}15950 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15951}15951         result = (sc-\/>\mbox{\hyperlink{structbxe__softc_ae0d003fcc3280759a0229759946ba586}{bxe\_pause\_param}} << \mbox{\hyperlink{ecore__hsi_8h_a3563d3a43b30fe43ec0dca16420e008b}{PORT\_FEATURE\_FLOW\_CONTROL\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15952}15952 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15953}15953 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15954}15954         \textcolor{keywordflow}{if}((result \& 0x400) \&\& !(sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[cfg\_idx] \& \mbox{\hyperlink{bxe__elink_8h_ae42317db6af361f4d4d3625a9d9d4608}{ELINK\_SUPPORTED\_Autoneg}}))  \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15955}15955                         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}Does not support Autoneg pause\_param \%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ae0d003fcc3280759a0229759946ba586}{bxe\_pause\_param}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15956}15956                         \textcolor{keywordflow}{return} -\/EINVAL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15957}15957         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15958}15958 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15959}15959         \textcolor{keywordflow}{if}(\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15960}15960                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15961}15961        sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[cfg\_idx] = \mbox{\hyperlink{bxe__elink_8h_a7eb64bbf81145a789b73a471b2bff7ab}{ELINK\_FLOW\_CTRL\_AUTO}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15962}15962         \textcolor{keywordflow}{if}(result \& \mbox{\hyperlink{bxe__elink_8h_ae94806d4c6b0ceb03127d793093020dd}{ELINK\_FLOW\_CTRL\_RX}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15963}15963                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[cfg\_idx] |= \mbox{\hyperlink{bxe__elink_8h_ae94806d4c6b0ceb03127d793093020dd}{ELINK\_FLOW\_CTRL\_RX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15964}15964 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15965}15965         \textcolor{keywordflow}{if}(result \& \mbox{\hyperlink{bxe__elink_8h_a7d5ad046cd81f291a31adb0a58a7e5b9}{ELINK\_FLOW\_CTRL\_TX}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15966}15966                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[cfg\_idx] |= \mbox{\hyperlink{bxe__elink_8h_a7d5ad046cd81f291a31adb0a58a7e5b9}{ELINK\_FLOW\_CTRL\_TX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15967}15967         \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[cfg\_idx] == \mbox{\hyperlink{bxe__elink_8h_a7eb64bbf81145a789b73a471b2bff7ab}{ELINK\_FLOW\_CTRL\_AUTO}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15968}15968                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[cfg\_idx] = \mbox{\hyperlink{bxe__elink_8h_ab87429402f404188dd849e860d22e660}{ELINK\_FLOW\_CTRL\_NONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15969}15969 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15970}15970         \textcolor{keywordflow}{if}(result \& 0x400) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15971}15971                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[cfg\_idx] == \mbox{\hyperlink{bxe__elink_8h_afaf2d80469609a7f551ea532de2e6e8d}{ELINK\_SPEED\_AUTO\_NEG}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15972}15972                         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a0671ebfb0ed0c8c7b89728d898e7edad}{req\_flow\_ctrl}}[cfg\_idx] =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15973}15973                                 \mbox{\hyperlink{bxe__elink_8h_a7eb64bbf81145a789b73a471b2bff7ab}{ELINK\_FLOW\_CTRL\_AUTO}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15974}15974                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15975}15975                 sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_adf3c1dc1c092467f11023ba7e196ca59}{req\_fc\_auto\_adv}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15976}15976                 \textcolor{keywordflow}{if} (result \& \mbox{\hyperlink{bxe__elink_8h_ae94806d4c6b0ceb03127d793093020dd}{ELINK\_FLOW\_CTRL\_RX}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15977}15977                         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_adf3c1dc1c092467f11023ba7e196ca59}{req\_fc\_auto\_adv}} |= \mbox{\hyperlink{bxe__elink_8h_ae94806d4c6b0ceb03127d793093020dd}{ELINK\_FLOW\_CTRL\_RX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15978}15978 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15979}15979                 \textcolor{keywordflow}{if} (result \& \mbox{\hyperlink{bxe__elink_8h_a7d5ad046cd81f291a31adb0a58a7e5b9}{ELINK\_FLOW\_CTRL\_TX}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15980}15980                         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_adf3c1dc1c092467f11023ba7e196ca59}{req\_fc\_auto\_adv}} |= \mbox{\hyperlink{bxe__elink_8h_a7d5ad046cd81f291a31adb0a58a7e5b9}{ELINK\_FLOW\_CTRL\_TX}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15981}15981                 \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_adf3c1dc1c092467f11023ba7e196ca59}{req\_fc\_auto\_adv}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15982}15982                         sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_adf3c1dc1c092467f11023ba7e196ca59}{req\_fc\_auto\_adv}} |= \mbox{\hyperlink{bxe__elink_8h_ab87429402f404188dd849e860d22e660}{ELINK\_FLOW\_CTRL\_NONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15983}15983         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15984}15984          \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15985}15985                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15986}15986                                 \mbox{\hyperlink{bxe__stats_8c_a9cb80a0b63fd51862a1b01770b2f9a81}{bxe\_stats\_handle}}(sc, \mbox{\hyperlink{bxe__stats_8h_a0e2b9ff24b217e153283587ce0092026ac9e9e0b6f7a6b265aca64124b6d1ff19}{STATS\_EVENT\_STOP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15987}15987                         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15988}15988                         \textcolor{keywordflow}{if} (if\_getdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15989}15989                         \mbox{\hyperlink{bxe_8c_a562e0da59f4b5f75c6c920a6172dfa0e}{bxe\_force\_link\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15990}15990                         \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15991}15991 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15992}15992                         rc = \mbox{\hyperlink{bxe__elink_8c_a1ac20cd84a25e28f62aa77b0fff0dab4}{elink\_phy\_init}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15993}15993 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15994}15994                         \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15995}15995 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15996}15996                         \mbox{\hyperlink{bxe_8c_a180390e1dd79f09c6c8eccca01f135d8}{bxe\_calc\_fc\_adv}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15997}15997                         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15998}15998         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l15999}15999         \textcolor{keywordflow}{return} rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16000}16000 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16001}16001 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16002}16002 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16003}16003 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16004}\mbox{\hyperlink{bxe_8c_ac223e1e2104bcbd730e9ca738c00bd8a}{16004}} \mbox{\hyperlink{bxe_8c_ac223e1e2104bcbd730e9ca738c00bd8a}{bxe\_add\_sysctls}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16005}16005 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16006}16006     \textcolor{keyword}{struct }sysctl\_ctx\_list *ctx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16007}16007     \textcolor{keyword}{struct }sysctl\_oid\_list *children;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16008}16008     \textcolor{keyword}{struct }sysctl\_oid *queue\_top, *queue;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16009}16009     \textcolor{keyword}{struct }sysctl\_oid\_list *queue\_top\_children, *queue\_children;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16010}16010     \textcolor{keywordtype}{char} queue\_num\_buf[32];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16011}16011     uint32\_t q\_stat;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16012}16012     \textcolor{keywordtype}{int} i, j;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16013}16013 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16014}16014     ctx = device\_get\_sysctl\_ctx(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16015}16015     children = SYSCTL\_CHILDREN(device\_get\_sysctl\_tree(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16016}16016 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16017}16017     SYSCTL\_ADD\_STRING(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}version"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16018}16018                       CTLFLAG\_RD, \mbox{\hyperlink{bxe_8c_a976c2e4222c6339043f2145097755339}{BXE\_DRIVER\_VERSION}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16019}16019                       \textcolor{stringliteral}{"{}version"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16020}16020 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16021}16021     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_aef7e0756f6d39df15a9a19d34f11b5e0}{fw\_ver\_str}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_aef7e0756f6d39df15a9a19d34f11b5e0}{fw\_ver\_str}}), \textcolor{stringliteral}{"{}\%d.\%d.\%d.\%d"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16022}16022              \mbox{\hyperlink{ecore__hsi_8h_ad3a9e153f38e4824308245620738b7f4}{BCM\_5710\_FW\_MAJOR\_VERSION}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16023}16023              \mbox{\hyperlink{ecore__hsi_8h_a22c2c67f8a123bba33bc3bf769082067}{BCM\_5710\_FW\_MINOR\_VERSION}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16024}16024              \mbox{\hyperlink{ecore__hsi_8h_a064c82e8d8d4cb713d513a2381a493b7}{BCM\_5710\_FW\_REVISION\_VERSION}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16025}16025              \mbox{\hyperlink{ecore__hsi_8h_abb796d03f79c6c6033ae6106ee1e57fb}{BCM\_5710\_FW\_ENGINEERING\_VERSION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16026}16026 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16027}16027     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_a96ef71e55377d1e07920f0a4f958e4a1}{mf\_mode\_str}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_a96ef71e55377d1e07920f0a4f958e4a1}{mf\_mode\_str}}), \textcolor{stringliteral}{"{}\%s"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16028}16028         ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} == \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a7409d144f7e23576153fa2ebd4765056}{SINGLE\_FUNCTION}})     ? \textcolor{stringliteral}{"{}Single"{}}  :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16029}16029          (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} == \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a06c32c448971dc058e4e66ab49852014}{MULTI\_FUNCTION\_SD}})   ? \textcolor{stringliteral}{"{}MF-\/SD"{}}   :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16030}16030          (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} == \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a2f41465e78a44a916f834f175638c80a}{MULTI\_FUNCTION\_SI}})   ? \textcolor{stringliteral}{"{}MF-\/SI"{}}   :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16031}16031          (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}} == \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316ab41d9d078d4ad15e3808cf22f3e05821}{MULTI\_FUNCTION\_AFEX}}) ? \textcolor{stringliteral}{"{}MF-\/AFEX"{}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16032}16032                                                                 \textcolor{stringliteral}{"{}Unknown"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16033}16033     SYSCTL\_ADD\_UINT(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}mf\_vnics"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16034}16034                     CTLFLAG\_RD, \&sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a09c867df982d9d40989ab87e19e00510}{vnics\_per\_port}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16035}16035                     \textcolor{stringliteral}{"{}multifunction vnics per port"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16036}16036 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16037}16037     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_a03268fd91f4db966966e95f33468106a}{pci\_link\_str}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_a03268fd91f4db966966e95f33468106a}{pci\_link\_str}}), \textcolor{stringliteral}{"{}\%s x\%d"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16038}16038         ((sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a1a40a4489eeaa9324cc15ff53f2da3eb}{pcie\_link\_speed}} == 1) ? \textcolor{stringliteral}{"{}2.5GT/s"{}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16039}16039          (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a1a40a4489eeaa9324cc15ff53f2da3eb}{pcie\_link\_speed}} == 2) ? \textcolor{stringliteral}{"{}5.0GT/s"{}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16040}16040          (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a1a40a4489eeaa9324cc15ff53f2da3eb}{pcie\_link\_speed}} == 4) ? \textcolor{stringliteral}{"{}8.0GT/s"{}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16041}16041                                               \textcolor{stringliteral}{"{}???GT/s"{}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16042}16042         sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2819b7494b4b77f5a91f866e68b7b40f}{pcie\_link\_width}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16043}16043 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16044}16044     sc-\/>\mbox{\hyperlink{structbxe__softc_a5f4eec668b4a624c50d20ac0da6d34cf}{debug}} = \mbox{\hyperlink{bxe_8c_aba8845f3e9ba1def9dfa26f69e334ffb}{bxe\_debug}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16045}16045 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16046}16046     SYSCTL\_ADD\_STRING(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}bc\_version"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16047}16047                       CTLFLAG\_RD, sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ad79019752cbc53dd06c5b351504c55d5}{bc\_ver\_str}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16048}16048                       \textcolor{stringliteral}{"{}bootcode version"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16049}16049     SYSCTL\_ADD\_STRING(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}fw\_version"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16050}16050                       CTLFLAG\_RD, sc-\/>\mbox{\hyperlink{structbxe__softc_aef7e0756f6d39df15a9a19d34f11b5e0}{fw\_ver\_str}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16051}16051                       \textcolor{stringliteral}{"{}firmware version"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16052}16052     SYSCTL\_ADD\_STRING(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}mf\_mode"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16053}16053                       CTLFLAG\_RD, sc-\/>\mbox{\hyperlink{structbxe__softc_a96ef71e55377d1e07920f0a4f958e4a1}{mf\_mode\_str}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16054}16054                       \textcolor{stringliteral}{"{}multifunction mode"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16055}16055     SYSCTL\_ADD\_STRING(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}mac\_addr"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16056}16056                       CTLFLAG\_RD, sc-\/>\mbox{\hyperlink{structbxe__softc_af4d559cc56bc16a9fa22ca72ab331cb7}{mac\_addr\_str}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16057}16057                       \textcolor{stringliteral}{"{}mac address"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16058}16058     SYSCTL\_ADD\_STRING(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}pci\_link"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16059}16059                       CTLFLAG\_RD, sc-\/>\mbox{\hyperlink{structbxe__softc_a03268fd91f4db966966e95f33468106a}{pci\_link\_str}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16060}16060                       \textcolor{stringliteral}{"{}pci link status"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16061}16061     SYSCTL\_ADD\_ULONG(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}debug"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16062}16062                     CTLFLAG\_RW, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a5f4eec668b4a624c50d20ac0da6d34cf}{debug}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16063}16063                     \textcolor{stringliteral}{"{}debug logging mode"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16064}16064 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16065}16065     sc-\/>\mbox{\hyperlink{structbxe__softc_a4b1264f0563ea001f79c0a4db489b981}{trigger\_grcdump}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16066}16066     SYSCTL\_ADD\_UINT(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}trigger\_grcdump"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16067}16067                    CTLFLAG\_RW, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a4b1264f0563ea001f79c0a4db489b981}{trigger\_grcdump}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16068}16068                    \textcolor{stringliteral}{"{}trigger grcdump should be invoked"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16069}16069                    \textcolor{stringliteral}{"{}  before collecting grcdump"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16070}16070 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16071}16071     sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16072}16072     sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16073}16073     SYSCTL\_ADD\_UINT(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}grcdump\_done"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16074}16074                    CTLFLAG\_RD, \&sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16075}16075                    \textcolor{stringliteral}{"{}set by driver when grcdump is done"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16076}16076 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16077}16077     sc-\/>\mbox{\hyperlink{structbxe__softc_adc3f4269881e426d8f9efcf20a9da2c6}{rx\_budget}} = \mbox{\hyperlink{bxe_8c_a6d021e6ffe6010870c17c4aeca3e2ab5}{bxe\_rx\_budget}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16078}16078     SYSCTL\_ADD\_UINT(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}rx\_budget"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16079}16079                     CTLFLAG\_RW, \&sc-\/>\mbox{\hyperlink{structbxe__softc_adc3f4269881e426d8f9efcf20a9da2c6}{rx\_budget}}, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16080}16080                     \textcolor{stringliteral}{"{}rx processing budget"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16081}16081 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16082}16082     SYSCTL\_ADD\_PROC(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}pause\_param"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16083}16083         CTLTYPE\_UINT | CTLFLAG\_RW | CTLFLAG\_MPSAFE, sc, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16084}16084         \mbox{\hyperlink{bxe_8c_a414cc1797945e4debef08fe142b4d4ca}{bxe\_sysctl\_pauseparam}}, \textcolor{stringliteral}{"{}IU"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16085}16085         \textcolor{stringliteral}{"{}need pause frames-\/ DEF:0/TX:1/RX:2/BOTH:3/AUTO:4/AUTOTX:5/AUTORX:6/AUTORXTX:7/NONE:8"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16086}16086 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16087}16087 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16088}16088     SYSCTL\_ADD\_PROC(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}state"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16089}16089         CTLTYPE\_UINT | CTLFLAG\_RW | CTLFLAG\_MPSAFE, sc, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16090}16090         \mbox{\hyperlink{bxe_8c_a857a41ec42cb4b5390f534c6d2c0c2d9}{bxe\_sysctl\_state}}, \textcolor{stringliteral}{"{}IU"{}}, \textcolor{stringliteral}{"{}dump driver state"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16091}16091 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16092}16092     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8c_acdedd8f2fc9fa1853da95066c18c3760}{BXE\_NUM\_ETH\_STATS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16093}16093         SYSCTL\_ADD\_PROC(ctx, children, OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16094}16094             \mbox{\hyperlink{bxe_8c_aab446e1b2b58c382a04e6a890d328b09}{bxe\_eth\_stats\_arr}}[i].\textcolor{keywordtype}{string},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16095}16095             \mbox{\hyperlink{bxe_8c_a9e3bde6a466f862a0e246ed98f50b54a}{CTLTYPE\_U64}} | CTLFLAG\_RD | CTLFLAG\_MPSAFE, sc, i,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16096}16096             \mbox{\hyperlink{bxe_8c_a8388b021267931d10f9b939899fbe5cb}{bxe\_sysctl\_eth\_stat}}, \textcolor{stringliteral}{"{}LU"{}}, \mbox{\hyperlink{bxe_8c_aab446e1b2b58c382a04e6a890d328b09}{bxe\_eth\_stats\_arr}}[i].\textcolor{keywordtype}{string});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16097}16097     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16098}16098 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16099}16099     \textcolor{comment}{/* add a new parent node for all queues "{}dev.bxe.\#.queue"{} */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16100}16100     queue\_top = SYSCTL\_ADD\_NODE(ctx, children, OID\_AUTO, \textcolor{stringliteral}{"{}queue"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16101}16101         CTLFLAG\_RD | CTLFLAG\_MPSAFE, NULL, \textcolor{stringliteral}{"{}queue"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16102}16102     queue\_top\_children = SYSCTL\_CHILDREN(queue\_top);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16103}16103 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16104}16104     \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16105}16105         \textcolor{comment}{/* add a new parent node for a single queue "{}dev.bxe.\#.queue.\#"{} */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16106}16106         snprintf(queue\_num\_buf, \textcolor{keyword}{sizeof}(queue\_num\_buf), \textcolor{stringliteral}{"{}\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16107}16107         queue = SYSCTL\_ADD\_NODE(ctx, queue\_top\_children, OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16108}16108             queue\_num\_buf, CTLFLAG\_RD | CTLFLAG\_MPSAFE, NULL, \textcolor{stringliteral}{"{}single queue"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16109}16109         queue\_children = SYSCTL\_CHILDREN(queue);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16110}16110 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16111}16111         \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe_8c_a0df1a288e637b67580fc02576d11b7ae}{BXE\_NUM\_ETH\_Q\_STATS}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16112}16112             q\_stat = ((i << 16) | j);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16113}16113             SYSCTL\_ADD\_PROC(ctx, queue\_children, OID\_AUTO,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16114}16114                  \mbox{\hyperlink{bxe_8c_a9f622b6d2c60d9a626e27c784659dbf1}{bxe\_eth\_q\_stats\_arr}}[j].\textcolor{keywordtype}{string},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16115}16115                  \mbox{\hyperlink{bxe_8c_a9e3bde6a466f862a0e246ed98f50b54a}{CTLTYPE\_U64}} | CTLFLAG\_RD | CTLFLAG\_MPSAFE, sc, q\_stat,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16116}16116                  \mbox{\hyperlink{bxe_8c_af49010e155834dd95f12fed6bfae610e}{bxe\_sysctl\_eth\_q\_stat}}, \textcolor{stringliteral}{"{}LU"{}}, \mbox{\hyperlink{bxe_8c_a9f622b6d2c60d9a626e27c784659dbf1}{bxe\_eth\_q\_stats\_arr}}[j].\textcolor{keywordtype}{string});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16117}16117         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16118}16118     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16119}16119 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16120}16120 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16121}16121 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16122}\mbox{\hyperlink{bxe_8c_a1e2b43ab8e5a9eba72b1d66ea02ce65d}{16122}} \mbox{\hyperlink{bxe_8c_a1e2b43ab8e5a9eba72b1d66ea02ce65d}{bxe\_alloc\_buf\_rings}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16123}16123 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16124}16124     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16125}16125     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16126}16126 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16127}16127     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16128}16128 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16129}16129         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16130}16130 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16131}16131         fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}} = buf\_ring\_alloc(\mbox{\hyperlink{bxe_8h_a49c766708c49db16df4bfe661ecee52d}{BXE\_BR\_SIZE}}, M\_DEVBUF,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16132}16132                                    M\_NOWAIT, \&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad088e8f37154c5703ca22582d90f4888}{tx\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16133}16133         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}} == NULL)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16134}16134             \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16135}16135     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16136}16136 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16137}16137     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16138}16138 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16139}16139 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16140}16140 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16141}\mbox{\hyperlink{bxe_8c_ac83cb9e279ddf7d9e215c14f724405c8}{16141}} \mbox{\hyperlink{bxe_8c_ac83cb9e279ddf7d9e215c14f724405c8}{bxe\_free\_buf\_rings}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16142}16142 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16143}16143     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16144}16144     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16145}16145 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16146}16146     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16147}16147 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16148}16148         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16149}16149 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16150}16150         \textcolor{keywordflow}{if} (fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16151}16151             buf\_ring\_free(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16152}16152             fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae6a38e58418588b238672e0496abbc0f}{tx\_br}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16153}16153         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16154}16154     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16155}16155 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16156}16156 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16157}16157 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16158}\mbox{\hyperlink{bxe_8c_a88c60a87365b8761f287df0ebd702a4b}{16158}} \mbox{\hyperlink{bxe_8c_a88c60a87365b8761f287df0ebd702a4b}{bxe\_init\_fp\_mutexs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16159}16159 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16160}16160     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16161}16161     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16162}16162 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16163}16163     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16164}16164 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16165}16165         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16166}16166 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16167}16167         snprintf(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a0e37cc11e90634517d70716863bb767b}{tx\_mtx\_name}}, \textcolor{keyword}{sizeof}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a0e37cc11e90634517d70716863bb767b}{tx\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16168}16168             \textcolor{stringliteral}{"{}bxe\%d\_fp\%d\_tx\_lock"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16169}16169         mtx\_init(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad088e8f37154c5703ca22582d90f4888}{tx\_mtx}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a0e37cc11e90634517d70716863bb767b}{tx\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16170}16170 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16171}16171         snprintf(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2497144c236cf9f8b71d8a273f2e78d}{rx\_mtx\_name}}, \textcolor{keyword}{sizeof}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2497144c236cf9f8b71d8a273f2e78d}{rx\_mtx\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16172}16172             \textcolor{stringliteral}{"{}bxe\%d\_fp\%d\_rx\_lock"{}}, \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}}, i);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16173}16173         mtx\_init(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6a47366b3348ccbb7186244743327fc5}{rx\_mtx}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_ae2497144c236cf9f8b71d8a273f2e78d}{rx\_mtx\_name}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16174}16174     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16175}16175 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16176}16176 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16177}16177 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16178}\mbox{\hyperlink{bxe_8c_ae94d91467ade6ac972ae4ae9df24439f}{16178}} \mbox{\hyperlink{bxe_8c_ae94d91467ade6ac972ae4ae9df24439f}{bxe\_destroy\_fp\_mutexs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16179}16179 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16180}16180     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16181}16181     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16182}16182 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16183}16183     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16184}16184 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16185}16185         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16186}16186 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16187}16187         \textcolor{keywordflow}{if} (mtx\_initialized(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad088e8f37154c5703ca22582d90f4888}{tx\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16188}16188             mtx\_destroy(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_ad088e8f37154c5703ca22582d90f4888}{tx\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16189}16189         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16190}16190 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16191}16191         \textcolor{keywordflow}{if} (mtx\_initialized(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6a47366b3348ccbb7186244743327fc5}{rx\_mtx}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16192}16192             mtx\_destroy(\&fp-\/>\mbox{\hyperlink{structbxe__fastpath_a6a47366b3348ccbb7186244743327fc5}{rx\_mtx}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16193}16193         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16194}16194     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16195}16195 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16196}16196 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16197}16197 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16198}16198 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16199}16199 \textcolor{comment}{ * Device attach function.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16200}16200 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16201}16201 \textcolor{comment}{ * Allocates device resources, performs secondary chip identification, and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16202}16202 \textcolor{comment}{ * initializes driver instance variables. This function is called from driver}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16203}16203 \textcolor{comment}{ * load after a successful probe.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16204}16204 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16205}16205 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16206}16206 \textcolor{comment}{ *   0 = Success, >0 = Failure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16207}16207 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16208}16208 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16209}\mbox{\hyperlink{bxe_8c_a3a4c1b80a1fc2e28e0aa40b670ab04a5}{16209}} \mbox{\hyperlink{bxe_8c_a3a4c1b80a1fc2e28e0aa40b670ab04a5}{bxe\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16210}16210 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16211}16211     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16212}16212 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16213}16213     sc = device\_get\_softc(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16214}16214 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16215}16215     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Starting attach...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16216}16216 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16217}16217     sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16218}16218 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16219}16219     sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}  = \mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16220}16220     sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}} = device\_get\_unit(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16221}16221 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16222}16222     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}softc = \%p\(\backslash\)n"{}}, sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16223}16223 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16224}16224     sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}}    = pci\_get\_bus(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16225}16225     sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}} = pci\_get\_slot(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16226}16226     sc-\/>\mbox{\hyperlink{structbxe__softc_ab6ce08d188ec8461f82c0d2e69ffb8ca}{pcie\_func}}   = pci\_get\_function(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16227}16227 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16228}16228     \textcolor{comment}{/* enable bus master capability */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16229}16229     pci\_enable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16230}16230 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16231}16231     \textcolor{comment}{/* get the BARs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16232}16232     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ad0758168a7b5572e84dea0abc36733e5}{bxe\_allocate\_bars}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16233}16233         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16234}16234     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16235}16235 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16236}16236     \textcolor{comment}{/* initialize the mutexes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16237}16237     \mbox{\hyperlink{bxe_8c_a58d6ea6d31deee3642fc85620758904f}{bxe\_init\_mutexes}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16238}16238 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16239}16239     \textcolor{comment}{/* prepare the periodic callout */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16240}16240     callout\_init(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ad880b723f6d87fdc08bc91b0ab157631}{periodic\_callout}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16241}16241 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16242}16242     \textcolor{comment}{/* prepare the chip taskqueue */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16243}16243     sc-\/>\mbox{\hyperlink{structbxe__softc_a7db11a1c0519f177e82a03478047579a}{chip\_tq\_flags}} = \mbox{\hyperlink{bxe_8h_a559a62b5fced1e8c96cc65be7f69c969}{CHIP\_TQ\_NONE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16244}16244     snprintf(sc-\/>\mbox{\hyperlink{structbxe__softc_a09c755cc457de72b204ecf8fd5d5790f}{chip\_tq\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_a09c755cc457de72b204ecf8fd5d5790f}{chip\_tq\_name}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16245}16245              \textcolor{stringliteral}{"{}bxe\%d\_chip\_tq"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a802ea29ba5bdad3b56239f17ba57abf3}{unit}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16246}16246     TASK\_INIT(\&sc-\/>\mbox{\hyperlink{structbxe__softc_aeea0ec348dac6b659eabc31cfbfacfbe}{chip\_tq\_task}}, 0, \mbox{\hyperlink{bxe_8c_af50380fbbd87214f52cbac7b9c6568b9}{bxe\_handle\_chip\_tq}}, sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16247}16247     sc-\/>\mbox{\hyperlink{structbxe__softc_a44413dfa9e5f8ff9b883905f2bc09e06}{chip\_tq}} = taskqueue\_create(sc-\/>\mbox{\hyperlink{structbxe__softc_a09c755cc457de72b204ecf8fd5d5790f}{chip\_tq\_name}}, M\_NOWAIT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16248}16248                                    taskqueue\_thread\_enqueue,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16249}16249                                    \&sc-\/>\mbox{\hyperlink{structbxe__softc_a44413dfa9e5f8ff9b883905f2bc09e06}{chip\_tq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16250}16250     taskqueue\_start\_threads(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a44413dfa9e5f8ff9b883905f2bc09e06}{chip\_tq}}, 1, PWAIT, \textcolor{comment}{/* lower priority */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16251}16251                             \textcolor{stringliteral}{"{}\%s"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a09c755cc457de72b204ecf8fd5d5790f}{chip\_tq\_name}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16252}16252 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16253}16253     TIMEOUT\_TASK\_INIT(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16254}16254         \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}}, 0, \mbox{\hyperlink{bxe_8c_a7509961acf73ddbd86105b2e911d8e41}{bxe\_sp\_err\_timeout\_task}},  sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16255}16255 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16256}16256 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16257}16257     \textcolor{comment}{/* get device info and set params */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16258}16258     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ac509a8b0b36d19da2060edc9b884d55f}{bxe\_get\_device\_info}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16259}16259         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}getting device info\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16260}16260         \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16261}16261         pci\_disable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16262}16262         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16263}16263     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16264}16264 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16265}16265     \textcolor{comment}{/* get final misc params */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16266}16266     \mbox{\hyperlink{bxe_8c_a316ffb5981eb70bc6c84cdf7359bfba5}{bxe\_get\_params}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16267}16267 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16268}16268     \textcolor{comment}{/* set the default MTU (changed via ifconfig) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16269}16269     sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}} = ETHERMTU;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16270}16270 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16271}16271     \mbox{\hyperlink{bxe_8c_ad48614bf5ffb8eff6c3775bcb42de385}{bxe\_set\_modes\_bitmap}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16272}16272 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16273}16273     \textcolor{comment}{/* XXX}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16274}16274 \textcolor{comment}{     * If in AFEX mode and the function is configured for FCoE}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16275}16275 \textcolor{comment}{     * then bail... no L2 allowed.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16276}16276 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16277}16277 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16278}16278     \textcolor{comment}{/* get phy settings from shmem and 'and' against admin settings */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16279}16279     \mbox{\hyperlink{bxe_8c_a12171283ffd69802dfcf9670a29c289b}{bxe\_get\_phy\_info}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16280}16280 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16281}16281     \textcolor{comment}{/* initialize the FreeBSD ifnet interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16282}16282     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ac6967857f724264368500dc3560bab01}{bxe\_init\_ifnet}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16283}16283         \mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{bxe\_release\_mutexes}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16284}16284         \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16285}16285         pci\_disable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16286}16286         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16287}16287     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16288}16288 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16289}16289     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ac76a2390458e70291dd5bfd2109c62db}{bxe\_add\_cdev}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16290}16290         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16291}16291             ether\_ifdetach(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16292}16292         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16293}16293         ifmedia\_removeall(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16294}16294         \mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{bxe\_release\_mutexes}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16295}16295         \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16296}16296         pci\_disable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16297}16297         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16298}16298     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16299}16299 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16300}16300     \textcolor{comment}{/* allocate device interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16301}16301     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a7ee987166661b7359d806a8c03662893}{bxe\_interrupt\_alloc}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16302}16302         \mbox{\hyperlink{bxe_8c_a47a7891fb4cd1503371e2731bc8fec42}{bxe\_del\_cdev}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16303}16303         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16304}16304             ether\_ifdetach(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16305}16305         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16306}16306         ifmedia\_removeall(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16307}16307         \mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{bxe\_release\_mutexes}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16308}16308         \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16309}16309         pci\_disable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16310}16310         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16311}16311     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16312}16312 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16313}16313     \mbox{\hyperlink{bxe_8c_a88c60a87365b8761f287df0ebd702a4b}{bxe\_init\_fp\_mutexs}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16314}16314 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16315}16315     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a1e2b43ab8e5a9eba72b1d66ea02ce65d}{bxe\_alloc\_buf\_rings}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16316}16316         \mbox{\hyperlink{bxe_8c_ac83cb9e279ddf7d9e215c14f724405c8}{bxe\_free\_buf\_rings}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16317}16317         \mbox{\hyperlink{bxe_8c_aa91fd1c1831cf7d6a8d01f13592565b5}{bxe\_interrupt\_free}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16318}16318         \mbox{\hyperlink{bxe_8c_a47a7891fb4cd1503371e2731bc8fec42}{bxe\_del\_cdev}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16319}16319         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16320}16320             ether\_ifdetach(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16321}16321         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16322}16322         ifmedia\_removeall(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16323}16323         \mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{bxe\_release\_mutexes}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16324}16324         \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16325}16325         pci\_disable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16326}16326         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16327}16327     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16328}16328 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16329}16329     \textcolor{comment}{/* allocate ilt */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16330}16330     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a64e3b157952684fc9002cc23600a73d3}{bxe\_alloc\_ilt\_mem}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16331}16331         \mbox{\hyperlink{bxe_8c_ac83cb9e279ddf7d9e215c14f724405c8}{bxe\_free\_buf\_rings}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16332}16332         \mbox{\hyperlink{bxe_8c_aa91fd1c1831cf7d6a8d01f13592565b5}{bxe\_interrupt\_free}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16333}16333         \mbox{\hyperlink{bxe_8c_a47a7891fb4cd1503371e2731bc8fec42}{bxe\_del\_cdev}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16334}16334         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16335}16335             ether\_ifdetach(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16336}16336         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16337}16337         ifmedia\_removeall(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16338}16338         \mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{bxe\_release\_mutexes}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16339}16339         \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16340}16340         pci\_disable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16341}16341         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16342}16342     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16343}16343 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16344}16344     \textcolor{comment}{/* allocate the host hardware/software hsi structures */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16345}16345     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a6838a1740b07191f75cf2ec8d7b6708b}{bxe\_alloc\_hsi\_mem}}(sc) != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16346}16346         \mbox{\hyperlink{bxe_8c_a98a24e7f0dd5566ed2eb97e67cdc23d2}{bxe\_free\_ilt\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16347}16347         \mbox{\hyperlink{bxe_8c_ac83cb9e279ddf7d9e215c14f724405c8}{bxe\_free\_buf\_rings}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16348}16348         \mbox{\hyperlink{bxe_8c_aa91fd1c1831cf7d6a8d01f13592565b5}{bxe\_interrupt\_free}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16349}16349         \mbox{\hyperlink{bxe_8c_a47a7891fb4cd1503371e2731bc8fec42}{bxe\_del\_cdev}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16350}16350         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16351}16351             ether\_ifdetach(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16352}16352         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16353}16353         ifmedia\_removeall(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16354}16354         \mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{bxe\_release\_mutexes}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16355}16355         \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16356}16356         pci\_disable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16357}16357         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16358}16358     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16359}16359 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16360}16360     \textcolor{comment}{/* need to reset chip if UNDI was active */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16361}16361     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aaae17cf47814ae8584438cb9fcff8a00}{IS\_PF}}(sc) \&\& !\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16362}16362         \textcolor{comment}{/* init fw\_seq */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16363}16363         sc-\/>\mbox{\hyperlink{structbxe__softc_a4b58dae5cf487d519e80adf337151e7f}{fw\_seq}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16364}16364             (\mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, func\_mb[\mbox{\hyperlink{bxe_8h_a4f5d329be88eb92e8467a7d44964289e}{SC\_FW\_MB\_IDX}}(sc)].drv\_mb\_header) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16365}16365              \mbox{\hyperlink{ecore__hsi_8h_acad2d8569447c67283979c2706c2b421}{DRV\_MSG\_SEQ\_NUMBER\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16366}16366         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}prev unload fw\_seq 0x\%04x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a4b58dae5cf487d519e80adf337151e7f}{fw\_seq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16367}16367         \mbox{\hyperlink{bxe_8c_af84733b960a57df01eabe00eec9205ca}{bxe\_prev\_unload}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16368}16368     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16369}16369 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16370}16370 \textcolor{preprocessor}{\#if 1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16371}16371     \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16372}16372     \mbox{\hyperlink{bxe_8c_adbbf7ffcefe48cdaa56946b4b5ae2a69}{bxe\_dcbx\_set\_state}}(sc, FALSE, \mbox{\hyperlink{bxe_8h_a86dc12e2c26be5ea6a938dea03b9206e}{BXE\_DCBX\_ENABLED\_OFF}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16373}16373 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16374}16374     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a9589edd1f6702afb76918ed934dd0fa6}{SHMEM2\_HAS}}(sc, dcbx\_lldp\_params\_offset) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16375}16375         \mbox{\hyperlink{bxe_8h_a9589edd1f6702afb76918ed934dd0fa6}{SHMEM2\_HAS}}(sc, dcbx\_lldp\_dcbx\_stat\_offset) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16376}16376         \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, dcbx\_lldp\_params\_offset) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16377}16377         \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, dcbx\_lldp\_dcbx\_stat\_offset)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16378}16378         \mbox{\hyperlink{bxe_8c_adbbf7ffcefe48cdaa56946b4b5ae2a69}{bxe\_dcbx\_set\_state}}(sc, TRUE, \mbox{\hyperlink{bxe_8h_a8e7f634f45cf6f9aa396a005abb5b61b}{BXE\_DCBX\_ENABLED\_ON\_NEG\_ON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16379}16379         \mbox{\hyperlink{bxe__dcb_8h_aa412a294506ac89a12d0c48572b131fa}{bxe\_dcbx\_init\_params}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16380}16380     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16381}16381         \mbox{\hyperlink{bxe_8c_adbbf7ffcefe48cdaa56946b4b5ae2a69}{bxe\_dcbx\_set\_state}}(sc, FALSE, \mbox{\hyperlink{bxe_8h_a86dc12e2c26be5ea6a938dea03b9206e}{BXE\_DCBX\_ENABLED\_OFF}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16382}16382     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16383}16383 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16384}16384 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16385}16385     \textcolor{comment}{/* calculate qm\_cid\_count */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16386}16386     sc-\/>\mbox{\hyperlink{structbxe__softc_a95756baba748982379d79c2a5cdb0518}{qm\_cid\_count}} = \mbox{\hyperlink{bxe_8c_ab8efaa6675214287afcdf767fa880a4e}{bxe\_set\_qm\_cid\_count}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16387}16387     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}qm\_cid\_count=\%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a95756baba748982379d79c2a5cdb0518}{qm\_cid\_count}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16388}16388 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16389}16389     sc-\/>\mbox{\hyperlink{structbxe__softc_acd82fee11a36e84b5e3ed957dd47cd79}{max\_cos}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16390}16390     \mbox{\hyperlink{bxe_8c_a888cc367c09af94de3fe4e2714eb751f}{bxe\_init\_multi\_cos}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16391}16391 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16392}16392     \mbox{\hyperlink{bxe_8c_ac223e1e2104bcbd730e9ca738c00bd8a}{bxe\_add\_sysctls}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16393}16393 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16394}16394     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16395}16395 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16396}16396 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16397}16397 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16398}16398 \textcolor{comment}{ * Device detach function.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16399}16399 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16400}16400 \textcolor{comment}{ * Stops the controller, resets the controller, and releases resources.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16401}16401 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16402}16402 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16403}16403 \textcolor{comment}{ *   0 = Success, >0 = Failure}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16404}16404 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16405}16405 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16406}\mbox{\hyperlink{bxe_8c_a2315da3b037414bdb87c7358d74d7253}{16406}} \mbox{\hyperlink{bxe_8c_a2315da3b037414bdb87c7358d74d7253}{bxe\_detach}}(device\_t \mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16407}16407 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16408}16408     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16409}16409     if\_t \mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16410}16410 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16411}16411     sc = device\_get\_softc(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16412}16412 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16413}16413     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Starting detach...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16414}16414 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16415}16415     \mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} = sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16416}16416     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} != NULL \&\& if\_vlantrunkinuse(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16417}16417         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Cannot detach while VLANs are in use.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16418}16418         \textcolor{keywordflow}{return}(EBUSY);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16419}16419     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16420}16420 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16421}16421     \mbox{\hyperlink{bxe_8c_a47a7891fb4cd1503371e2731bc8fec42}{bxe\_del\_cdev}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16422}16422 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16423}16423     \textcolor{comment}{/* stop the periodic callout */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16424}16424     \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16425}16425 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16426}16426     \textcolor{comment}{/* stop the chip taskqueue */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16427}16427     atomic\_store\_rel\_long(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a7db11a1c0519f177e82a03478047579a}{chip\_tq\_flags}}, \mbox{\hyperlink{bxe_8h_a559a62b5fced1e8c96cc65be7f69c969}{CHIP\_TQ\_NONE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16428}16428     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a44413dfa9e5f8ff9b883905f2bc09e06}{chip\_tq}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16429}16429         taskqueue\_drain(sc-\/>\mbox{\hyperlink{structbxe__softc_a44413dfa9e5f8ff9b883905f2bc09e06}{chip\_tq}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_aeea0ec348dac6b659eabc31cfbfacfbe}{chip\_tq\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16430}16430         taskqueue\_free(sc-\/>\mbox{\hyperlink{structbxe__softc_a44413dfa9e5f8ff9b883905f2bc09e06}{chip\_tq}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16431}16431         sc-\/>\mbox{\hyperlink{structbxe__softc_a44413dfa9e5f8ff9b883905f2bc09e06}{chip\_tq}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16432}16432         taskqueue\_drain\_timeout(taskqueue\_thread,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16433}16433             \&sc-\/>\mbox{\hyperlink{structbxe__softc_ad81bc6503cb8adce3448f299d7a93dd4}{sp\_err\_timeout\_task}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16434}16434     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16435}16435 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16436}16436     \textcolor{comment}{/* stop and reset the controller if it was open */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16437}16437     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16438}16438         \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16439}16439         \mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{bxe\_nic\_unload}}(sc, \mbox{\hyperlink{bxe_8h_ad947b4ab2a42920771abc6b2853f1cec}{UNLOAD\_CLOSE}}, TRUE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16440}16440         sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} = \mbox{\hyperlink{bxe_8h_a4adbb737cab9288b4815aae574d0614a}{BXE\_STATE\_DISABLED}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16441}16441         \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16442}16442     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16443}16443 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16444}16444     \textcolor{comment}{/* release the network interface */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16445}16445     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16446}16446         ether\_ifdetach(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16447}16447     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16448}16448     ifmedia\_removeall(\&sc-\/>\mbox{\hyperlink{structbxe__softc_af1f1d46268816825ca6e225ab65f88b0}{ifmedia}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16449}16449 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16450}16450     \textcolor{comment}{/* XXX do the following based on driver state... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16451}16451 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16452}16452     \textcolor{comment}{/* free the host hardware/software hsi structures */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16453}16453     \mbox{\hyperlink{bxe_8c_a6c0421dbad20e89fd97432c1eeb708dc}{bxe\_free\_hsi\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16454}16454 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16455}16455     \textcolor{comment}{/* free ilt */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16456}16456     \mbox{\hyperlink{bxe_8c_a98a24e7f0dd5566ed2eb97e67cdc23d2}{bxe\_free\_ilt\_mem}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16457}16457 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16458}16458     \mbox{\hyperlink{bxe_8c_ac83cb9e279ddf7d9e215c14f724405c8}{bxe\_free\_buf\_rings}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16459}16459 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16460}16460     \textcolor{comment}{/* release the interrupts */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16461}16461     \mbox{\hyperlink{bxe_8c_aa91fd1c1831cf7d6a8d01f13592565b5}{bxe\_interrupt\_free}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16462}16462 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16463}16463     \textcolor{comment}{/* Release the mutexes*/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16464}16464     \mbox{\hyperlink{bxe_8c_ae94d91467ade6ac972ae4ae9df24439f}{bxe\_destroy\_fp\_mutexs}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16465}16465     \mbox{\hyperlink{bxe_8c_a19aee1ceaf0cae4a31d4491a93b42e3e}{bxe\_release\_mutexes}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16466}16466 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16467}16467 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16468}16468     \textcolor{comment}{/* Release the PCIe BAR mapped memory */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16469}16469     \mbox{\hyperlink{bxe_8c_ac896bb35d02bd54c5f597b926cb7f376}{bxe\_deallocate\_bars}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16470}16470 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16471}16471     \textcolor{comment}{/* Release the FreeBSD interface. */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16472}16472     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16473}16473         if\_free(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16474}16474     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16475}16475 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16476}16476     pci\_disable\_busmaster(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16477}16477 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16478}16478     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16479}16479 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16480}16480 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16481}16481 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16482}16482 \textcolor{comment}{ * Device shutdown function.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16483}16483 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16484}16484 \textcolor{comment}{ * Stops and resets the controller.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16485}16485 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16486}16486 \textcolor{comment}{ * Returns:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16487}16487 \textcolor{comment}{ *   Nothing}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16488}16488 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16489}16489 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16490}\mbox{\hyperlink{bxe_8c_aa35cd261d6769c18724d6893b017663e}{16490}} \mbox{\hyperlink{bxe_8c_aa35cd261d6769c18724d6893b017663e}{bxe\_shutdown}}(device\_t \mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16491}16491 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16492}16492     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16493}16493 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16494}16494     sc = device\_get\_softc(\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16495}16495 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16496}16496     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Starting shutdown...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16497}16497 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16498}16498     \textcolor{comment}{/* stop the periodic callout */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16499}16499     \mbox{\hyperlink{bxe_8c_ae304efe1d8bedfd6bdc737bac5da5501}{bxe\_periodic\_stop}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16500}16500 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16501}16501     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} != \mbox{\hyperlink{bxe_8h_a6e46955faf74e16df53f385984345974}{BXE\_STATE\_CLOSED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16502}16502         \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16503}16503         \mbox{\hyperlink{bxe_8c_ad2700f6952eb2ca0ba7e9aef648bd42c}{bxe\_nic\_unload}}(sc, \mbox{\hyperlink{bxe_8h_ad4f9da781b53a5b5d5718a12732ccace}{UNLOAD\_NORMAL}}, FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16504}16504         \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16505}16505     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16506}16506 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16507}16507     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16508}16508 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16509}16509 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16510}16510 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16511}\mbox{\hyperlink{bxe_8c_af0bfdd546c497ec68c199bb5ee2c8f13}{16511}} \mbox{\hyperlink{bxe_8c_af0bfdd546c497ec68c199bb5ee2c8f13}{bxe\_igu\_ack\_sb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16512}16512                uint8\_t          igu\_sb\_id,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16513}16513                uint8\_t          segment,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16514}16514                uint16\_t         index,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16515}16515                uint8\_t          op,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16516}16516                uint8\_t          update)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16517}16517 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16518}16518     uint32\_t igu\_addr = sc-\/>\mbox{\hyperlink{structbxe__softc_af4d4b52cd56562c3650246c11ebe967d}{igu\_base\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16519}16519     igu\_addr += (\mbox{\hyperlink{ecore__reg_8h_a9f81072d9974daae533c8bb2fb82d76b}{IGU\_CMD\_INT\_ACK\_BASE}} + igu\_sb\_id)*8;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16520}16520     \mbox{\hyperlink{bxe_8h_a4c76114c9362685ced2d72194da76824}{bxe\_igu\_ack\_sb\_gen}}(sc, igu\_sb\_id, segment, index, op, update, igu\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16521}16521 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16522}16522 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16523}16523 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16524}\mbox{\hyperlink{bxe_8c_aa92cfbea6ef16115d4361925944055f7}{16524}} \mbox{\hyperlink{bxe_8c_aa92cfbea6ef16115d4361925944055f7}{bxe\_igu\_clear\_sb\_gen}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16525}16525                      uint8\_t          func,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16526}16526                      uint8\_t          idu\_sb\_id,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16527}16527                      uint8\_t          is\_pf)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16528}16528 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16529}16529     uint32\_t data, ctl, cnt = 100;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16530}16530     uint32\_t igu\_addr\_data = \mbox{\hyperlink{ecore__reg_8h_a8aaf0df3a12b915eac56739c40b91a83}{IGU\_REG\_COMMAND\_REG\_32LSB\_DATA}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16531}16531     uint32\_t igu\_addr\_ctl = \mbox{\hyperlink{ecore__reg_8h_ac5051c67e05b888afa317b104f1ae2be}{IGU\_REG\_COMMAND\_REG\_CTRL}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16532}16532     uint32\_t igu\_addr\_ack = \mbox{\hyperlink{ecore__reg_8h_a676d62efd8c34ff5a670c5f7c6f011be}{IGU\_REG\_CSTORM\_TYPE\_0\_SB\_CLEANUP}} + (idu\_sb\_id/32)*4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16533}16533     uint32\_t sb\_bit =  1 << (idu\_sb\_id\%32);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16534}16534     uint32\_t func\_encode = func | (is\_pf ? 1 : 0) << \mbox{\hyperlink{ecore__reg_8h_ae6bcb4b79bf89f58b6a99cb7b7c030d9}{IGU\_FID\_ENCODE\_IS\_PF\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16535}16535     uint32\_t addr\_encode = \mbox{\hyperlink{ecore__reg_8h_ae80a902935cc4fd40bedbebc5f068271}{IGU\_CMD\_E2\_PROD\_UPD\_BASE}} + idu\_sb\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16536}16536 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16537}16537     \textcolor{comment}{/* Not supported in BC mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16538}16538     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16539}16539         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16540}16540     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16541}16541 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16542}16542     data = ((\mbox{\hyperlink{ecore__reg_8h_afd8ead4c1c04d3481d1fc923b5604dbb}{IGU\_USE\_REGISTER\_cstorm\_type\_0\_sb\_cleanup}} <<}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16543}16543              \mbox{\hyperlink{ecore__hsi_8h_a60afd1d34c0fa5f8877672f0b0bbf873}{IGU\_REGULAR\_CLEANUP\_TYPE\_SHIFT}}) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16544}16544             \mbox{\hyperlink{ecore__hsi_8h_abcd3916ea5276a91fc17ee5d3cc8514f}{IGU\_REGULAR\_CLEANUP\_SET}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16545}16545             \mbox{\hyperlink{ecore__hsi_8h_a521656de074a9c7e869fe94a1460c371}{IGU\_REGULAR\_BCLEANUP}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16546}16546 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16547}16547     ctl = ((addr\_encode << \mbox{\hyperlink{ecore__hsi_8h_a0ffcfadd4914f1510f186ab0734308ff}{IGU\_CTRL\_REG\_ADDRESS\_SHIFT}}) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16548}16548            (func\_encode << \mbox{\hyperlink{ecore__hsi_8h_a3e023a1d535362a7ec698babe94b570f}{IGU\_CTRL\_REG\_FID\_SHIFT}}) |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16549}16549            (\mbox{\hyperlink{ecore__hsi_8h_ad3d6497d59c30496978aa250ee19e186a5d3232bdf0975b496ce2260d6f364979}{IGU\_CTRL\_CMD\_TYPE\_WR}} << \mbox{\hyperlink{ecore__hsi_8h_ab0e381bd5bfaddce4fb3e3a20fa7a07d}{IGU\_CTRL\_REG\_TYPE\_SHIFT}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16550}16550 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16551}16551     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}write 0x\%08x to IGU(via GRC) addr 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16552}16552             data, igu\_addr\_data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16553}16553     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, igu\_addr\_data, data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16554}16554 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16555}16555     bus\_space\_barrier(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a1fce441aaa962f572d643140658a6e4c}{BAR0}}].\mbox{\hyperlink{structbxe__bar_ac5332e395c57aaf5ebdca5ff35d96cd3}{tag}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a1fce441aaa962f572d643140658a6e4c}{BAR0}}].\mbox{\hyperlink{structbxe__bar_a7de264b12dc05a944543a1f6817c17ec}{handle}}, 0, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16556}16556                       BUS\_SPACE\_BARRIER\_WRITE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16557}16557     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16558}16558 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16559}16559     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}write 0x\%08x to IGU(via GRC) addr 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16560}16560             ctl, igu\_addr\_ctl);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16561}16561     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, igu\_addr\_ctl, ctl);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16562}16562 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16563}16563     bus\_space\_barrier(sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a1fce441aaa962f572d643140658a6e4c}{BAR0}}].\mbox{\hyperlink{structbxe__bar_ac5332e395c57aaf5ebdca5ff35d96cd3}{tag}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a225b7940a2c0ff5fd49248a576577b65}{bar}}[\mbox{\hyperlink{bxe_8h_a1fce441aaa962f572d643140658a6e4c}{BAR0}}].\mbox{\hyperlink{structbxe__bar_a7de264b12dc05a944543a1f6817c17ec}{handle}}, 0, 0,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16564}16564                       BUS\_SPACE\_BARRIER\_WRITE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16565}16565     mb();}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16566}16566 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16567}16567     \textcolor{comment}{/* wait for clean up to finish */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16568}16568     \textcolor{keywordflow}{while} (!(\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, igu\_addr\_ack) \& sb\_bit) \&\& -\/-\/cnt) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16569}16569         DELAY(20000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16570}16570     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16571}16571 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16572}16572     \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, igu\_addr\_ack) \& sb\_bit)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16573}16573         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16574}16574               \textcolor{stringliteral}{"{}Unable to finish IGU cleanup: "{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16575}16575               \textcolor{stringliteral}{"{}idu\_sb\_id \%d offset \%d bit \%d (cnt \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16576}16576               idu\_sb\_id, idu\_sb\_id/32, idu\_sb\_id\%32, cnt);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16577}16577     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16578}16578 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16579}16579 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16580}16580 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16581}\mbox{\hyperlink{bxe_8c_af44e9e6f0e3b558a7564245ff1e99228}{16581}} \mbox{\hyperlink{bxe_8c_af44e9e6f0e3b558a7564245ff1e99228}{bxe\_igu\_clear\_sb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16582}16582                  uint8\_t          idu\_sb\_id)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16583}16583 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16584}16584     \mbox{\hyperlink{bxe_8c_aa92cfbea6ef16115d4361925944055f7}{bxe\_igu\_clear\_sb\_gen}}(sc, \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc), idu\_sb\_id, TRUE \textcolor{comment}{/*PF*/});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16585}16585 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16586}16586 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16587}16587 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16588}16588 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16589}16589 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16590}16590 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16591}16591 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16592}16592 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16593}16593 \textcolor{comment}{/*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16594}16594 \textcolor{comment}{/* ECORE CALLBACKS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16595}16595 \textcolor{comment}{/*******************/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16596}16596 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16597}16597 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16598}\mbox{\hyperlink{bxe_8c_a7f7aade2e4006d9f59fa8dac2cd181e3}{16598}} \mbox{\hyperlink{bxe_8c_a7f7aade2e4006d9f59fa8dac2cd181e3}{bxe\_reset\_common}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16599}16599 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16600}16600     uint32\_t val = 0x1400;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16601}16601 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16602}16602     \textcolor{comment}{/* reset\_common */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16603}16603     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_ae418017ed656db86eb2d5143fb42c181}{MISC\_REGISTERS\_RESET\_REG\_1\_CLEAR}}), 0xd3ffff7f);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16604}16604 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16605}16605     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16606}16606         val |= \mbox{\hyperlink{ecore__reg_8h_aee7c7806fa5fc146a7b62ccd814d9bc0}{MISC\_REGISTERS\_RESET\_REG\_2\_MSTAT0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16607}16607         val |= \mbox{\hyperlink{ecore__reg_8h_aa2dc14647be0281dbe8be1cc7f458803}{MISC\_REGISTERS\_RESET\_REG\_2\_MSTAT1}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16608}16608     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16609}16609 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16610}16610     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a4c4ad2259916df7a5b006055c3083926}{MISC\_REGISTERS\_RESET\_REG\_2\_CLEAR}}), val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16611}16611 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16612}16612 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16613}16613 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16614}\mbox{\hyperlink{bxe_8c_a4df6abcf398e80938acca55680086781}{16614}} \mbox{\hyperlink{bxe_8c_a4df6abcf398e80938acca55680086781}{bxe\_common\_init\_phy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16615}16615 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16616}16616     uint32\_t shmem\_base[2];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16617}16617     uint32\_t shmem2\_base[2];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16618}16618 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16619}16619     \textcolor{comment}{/* Avoid common init in case MFW supports LFA */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16620}16620     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}}) >}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16621}16621         (uint32\_t)offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structshmem2__region}{shmem2\_region}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16622}16622                            lfa\_host\_addr[\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc)])) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16623}16623         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16624}16624     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16625}16625 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16626}16626     shmem\_base[0]  = sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a97c45ddd35325a82a07dba52c261cd30}{shmem\_base}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16627}16627     shmem2\_base[0] = sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2ea341c2b43f033f56e70c9a5cd63e0d}{shmem2\_base}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16628}16628 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16629}16629     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16630}16630         shmem\_base[1]  = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, other\_shmem\_base\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16631}16631         shmem2\_base[1] = \mbox{\hyperlink{bxe_8h_a0f1d56a67532ae6f08962bd0a338f84f}{SHMEM2\_RD}}(sc, other\_shmem2\_base\_addr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16632}16632     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16633}16633 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16634}16634     \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16635}16635     \mbox{\hyperlink{bxe__elink_8c_aa63461d40026971d43f9bf4571f15ef4}{elink\_common\_init\_phy}}(sc, shmem\_base, shmem2\_base,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16636}16636                           sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ac2873506699496cc094b86365530365b}{chip\_id}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16637}16637     \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16638}16638 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16639}16639 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16640}16640 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16641}\mbox{\hyperlink{bxe_8c_a2d96110aed3521282cc163243d1d0d2b}{16641}} \mbox{\hyperlink{bxe_8c_a2d96110aed3521282cc163243d1d0d2b}{bxe\_pf\_disable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16642}16642 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16643}16643     uint32\_t val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16644}16644 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16645}16645     val \&= \string~IGU\_PF\_CONF\_FUNC\_EN;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16646}16646 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16647}16647     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16648}16648     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a477901a830dcfaa0d3891614100a568d}{PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16649}16649     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a377123462898876b3db2cf18bd958f30}{CFC\_REG\_WEAK\_ENABLE\_PF}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16650}16650 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16651}16651 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16652}16652 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16653}\mbox{\hyperlink{bxe_8c_a070a26d3157058d4f4b7139fbaf36856}{16653}} \mbox{\hyperlink{bxe_8c_a070a26d3157058d4f4b7139fbaf36856}{bxe\_init\_pxp}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16654}16654 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16655}16655     uint16\_t devctl;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16656}16656     \textcolor{keywordtype}{int} r\_order, w\_order;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16657}16657 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16658}16658     devctl = \mbox{\hyperlink{bxe_8c_a6f37eb9b21c56131baddc85f18df5aa5}{bxe\_pcie\_capability\_read}}(sc, PCIER\_DEVICE\_CTL, 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16659}16659 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16660}16660     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}read 0x\%08x from devctl\(\backslash\)n"{}}, devctl);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16661}16661 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16662}16662     w\_order = ((devctl \& PCIEM\_CTL\_MAX\_PAYLOAD) >> 5);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16663}16663 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16664}16664     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_afb49c73a7701139eef55d9c993007f6d}{mrrs}} == -\/1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16665}16665         r\_order = ((devctl \& PCIEM\_CTL\_MAX\_READ\_REQUEST) >> 12);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16666}16666     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16667}16667         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}forcing read order to \%d\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_afb49c73a7701139eef55d9c993007f6d}{mrrs}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16668}16668         r\_order = sc-\/>\mbox{\hyperlink{structbxe__softc_afb49c73a7701139eef55d9c993007f6d}{mrrs}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16669}16669     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16670}16670 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16671}16671     \mbox{\hyperlink{ecore__init__ops_8h_acbbc27523816f7cea9d0be8f0a2b5741}{ecore\_init\_pxp\_arb}}(sc, r\_order, w\_order);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16672}16672 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16673}16673 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16674}16674 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16675}\mbox{\hyperlink{bxe_8c_a745a2c0101323e9c17835dcaa58b8002}{16675}} \mbox{\hyperlink{bxe_8c_a745a2c0101323e9c17835dcaa58b8002}{bxe\_get\_pretend\_reg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16676}16676 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16677}16677     uint32\_t base = \mbox{\hyperlink{ecore__reg_8h_a166e8ddd524233e9c2200c94f7a002aa}{PXP2\_REG\_PGL\_PRETEND\_FUNC\_F0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16678}16678     uint32\_t stride = (\mbox{\hyperlink{ecore__reg_8h_abe90514933b38acf3fe6bef454b71572}{PXP2\_REG\_PGL\_PRETEND\_FUNC\_F1}} -\/ base);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16679}16679     \textcolor{keywordflow}{return} (base + (\mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)) * stride);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16680}16680 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16681}16681 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16682}16682 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16683}16683 \textcolor{comment}{ * Called only on E1H or E2.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16684}16684 \textcolor{comment}{ * When pretending to be PF, the pretend value is the function number 0..7.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16685}16685 \textcolor{comment}{ * When pretending to be VF, the pretend val is the PF-\/num:VF-\/valid:ABS-\/VFID}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16686}16686 \textcolor{comment}{ * combination.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16687}16687 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16688}16688 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16689}\mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{16689}} \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16690}16690                  uint16\_t         pretend\_func\_val)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16691}16691 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16692}16692     uint32\_t pretend\_reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16693}16693 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16694}16694     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc) \&\& (pretend\_func\_val > \mbox{\hyperlink{ecore__hsi_8h_a5a82630770a01822c17d98d01fea1c35}{E1H\_FUNC\_MAX}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16695}16695         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16696}16696     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16697}16697 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16698}16698     \textcolor{comment}{/* get my own pretend register */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16699}16699     pretend\_reg = \mbox{\hyperlink{bxe_8c_a745a2c0101323e9c17835dcaa58b8002}{bxe\_get\_pretend\_reg}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16700}16700     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, pretend\_reg, pretend\_func\_val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16701}16701     \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, pretend\_reg);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16702}16702     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16703}16703 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16704}16704 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16705}16705 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16706}\mbox{\hyperlink{bxe_8c_ab1aef29ef9a4e26025ae82bbcbe6bd89}{16706}} \mbox{\hyperlink{bxe_8c_ab1aef29ef9a4e26025ae82bbcbe6bd89}{bxe\_iov\_init\_dmae}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16707}16707 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16708}16708     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16709}16709 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16710}16710 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16711}16711 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16712}\mbox{\hyperlink{bxe_8c_a99aa5275ad93cd8b45c995c871c68c67}{16712}} \mbox{\hyperlink{bxe_8c_a99aa5275ad93cd8b45c995c871c68c67}{bxe\_iov\_init\_dq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16713}16713 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16714}16714     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16715}16715 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16716}16716 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16717}16717 \textcolor{comment}{/* send a NIG loopback debug packet */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16718}16718 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16719}\mbox{\hyperlink{bxe_8c_a6ecc8634fbe2654ea16f14d71a4b8814}{16719}} \mbox{\hyperlink{bxe_8c_a6ecc8634fbe2654ea16f14d71a4b8814}{bxe\_lb\_pckt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16720}16720 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16721}16721     uint32\_t wb\_write[3];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16722}16722 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16723}16723     \textcolor{comment}{/* Ethernet source and destination addresses */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16724}16724     wb\_write[0] = 0x55555555;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16725}16725     wb\_write[1] = 0x55555555;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16726}16726     wb\_write[2] = 0x20;     \textcolor{comment}{/* SOP */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16727}16727     \mbox{\hyperlink{bxe_8h_af679576d81b65be7ee9caf88dfff6b53}{REG\_WR\_DMAE}}(sc, \mbox{\hyperlink{ecore__reg_8h_a06947f12f543cd2a953e229165dee470}{NIG\_REG\_DEBUG\_PACKET\_LB}}, wb\_write, 3);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16728}16728 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16729}16729     \textcolor{comment}{/* NON-\/IP protocol */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16730}16730     wb\_write[0] = 0x09000000;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16731}16731     wb\_write[1] = 0x55555555;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16732}16732     wb\_write[2] = 0x10;     \textcolor{comment}{/* EOP, eop\_bvalid = 0 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16733}16733     \mbox{\hyperlink{bxe_8h_af679576d81b65be7ee9caf88dfff6b53}{REG\_WR\_DMAE}}(sc, \mbox{\hyperlink{ecore__reg_8h_a06947f12f543cd2a953e229165dee470}{NIG\_REG\_DEBUG\_PACKET\_LB}}, wb\_write, 3);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16734}16734 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16735}16735 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16736}16736 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16737}16737 \textcolor{comment}{ * Some of the internal memories are not directly readable from the driver.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16738}16738 \textcolor{comment}{ * To test them we send debug packets.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16739}16739 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16740}16740 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16741}\mbox{\hyperlink{bxe_8c_af181e7c0cc2d066d64e7462f577386b3}{16741}} \mbox{\hyperlink{bxe_8c_af181e7c0cc2d066d64e7462f577386b3}{bxe\_int\_mem\_test}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16742}16742 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16743}16743     \textcolor{keywordtype}{int} factor;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16744}16744     \textcolor{keywordtype}{int} count, i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16745}16745     uint32\_t val = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16746}16746 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16747}16747     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aa74010abe4e9d6f15f3425915a3f1e22}{CHIP\_REV\_IS\_FPGA}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16748}16748         factor = 120;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16749}16749     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a1b2ebcb5e39c8833b57e1d70aa728757}{CHIP\_REV\_IS\_EMUL}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16750}16750         factor = 200;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16751}16751     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16752}16752         factor = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16753}16753     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16754}16754 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16755}16755     \textcolor{comment}{/* disable inputs of parser neighbor blocks */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16756}16756     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a78672999148d9091f15c0377e4b13ef9}{TSDM\_REG\_ENABLE\_IN1}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16757}16757     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a48c4ec8b2324f9b83449979581ac737f}{TCM\_REG\_PRS\_IFEN}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16758}16758     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7d0bb43f8e153c4a045f92cfe12d689}{CFC\_REG\_DEBUG0}}, 0x1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16759}16759     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac141d7bf8a9ca4121e3ee6927ba45ae1}{NIG\_REG\_PRS\_REQ\_IN\_EN}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16760}16760 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16761}16761     \textcolor{comment}{/*  write 0 to parser credits for CFC search request */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16762}16762     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6a26237b84785f3ffcc1ea322e952ef3}{PRS\_REG\_CFC\_SEARCH\_INITIAL\_CREDIT}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16763}16763 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16764}16764     \textcolor{comment}{/* send Ethernet packet */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16765}16765     \mbox{\hyperlink{bxe_8c_a6ecc8634fbe2654ea16f14d71a4b8814}{bxe\_lb\_pckt}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16766}16766 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16767}16767     \textcolor{comment}{/* TODO do i reset NIG statistic? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16768}16768     \textcolor{comment}{/* Wait until NIG register shows 1 packet of size 0x10 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16769}16769     count = 1000 * factor;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16770}16770     \textcolor{keywordflow}{while} (count) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16771}16771         \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8419324d0e4909ffa675dca9d6c18c9d}{NIG\_REG\_STAT2\_BRB\_OCTET}}, 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16772}16772         val = *\mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, wb\_data[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16773}16773         \textcolor{keywordflow}{if} (val == 0x10) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16774}16774             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16775}16775         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16776}16776 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16777}16777         DELAY(10000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16778}16778         count-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16779}16779     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16780}16780 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16781}16781     \textcolor{keywordflow}{if} (val != 0x10) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16782}16782         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}NIG timeout val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16783}16783         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16784}16784     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16785}16785 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16786}16786     \textcolor{comment}{/* wait until PRS register shows 1 packet */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16787}16787     count = (1000 * factor);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16788}16788     \textcolor{keywordflow}{while} (count) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16789}16789         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad9e4ae57cfc56cc7f5e8a2fe2cfae85a}{PRS\_REG\_NUM\_OF\_PACKETS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16790}16790         \textcolor{keywordflow}{if} (val == 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16791}16791             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16792}16792         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16793}16793 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16794}16794         DELAY(10000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16795}16795         count-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16796}16796     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16797}16797 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16798}16798     \textcolor{keywordflow}{if} (val != 0x1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16799}16799         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PRS timeout val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16800}16800         \textcolor{keywordflow}{return} (-\/2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16801}16801     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16802}16802 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16803}16803     \textcolor{comment}{/* Reset and init BRB, PRS */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16804}16804     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_ae418017ed656db86eb2d5143fb42c181}{MISC\_REGISTERS\_RESET\_REG\_1\_CLEAR}}, 0x03);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16805}16805     DELAY(50000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16806}16806     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a0c2f3bf148b2daccef768b3f892a7746}{MISC\_REGISTERS\_RESET\_REG\_1\_SET}}, 0x03);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16807}16807     DELAY(50000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16808}16808     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a4f06af99f86b23872fcbbc7cad0daf0a}{BLOCK\_BRB1}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16809}16809     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13af78f6eccbbe0f7ba23cfb8ce3338bb72}{BLOCK\_PRS}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16810}16810 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16811}16811     \textcolor{comment}{/* Disable inputs of parser neighbor blocks */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16812}16812     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a78672999148d9091f15c0377e4b13ef9}{TSDM\_REG\_ENABLE\_IN1}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16813}16813     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a48c4ec8b2324f9b83449979581ac737f}{TCM\_REG\_PRS\_IFEN}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16814}16814     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7d0bb43f8e153c4a045f92cfe12d689}{CFC\_REG\_DEBUG0}}, 0x1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16815}16815     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac141d7bf8a9ca4121e3ee6927ba45ae1}{NIG\_REG\_PRS\_REQ\_IN\_EN}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16816}16816 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16817}16817     \textcolor{comment}{/* Write 0 to parser credits for CFC search request */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16818}16818     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6a26237b84785f3ffcc1ea322e952ef3}{PRS\_REG\_CFC\_SEARCH\_INITIAL\_CREDIT}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16819}16819 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16820}16820     \textcolor{comment}{/* send 10 Ethernet packets */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16821}16821     \textcolor{keywordflow}{for} (i = 0; i < 10; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16822}16822         \mbox{\hyperlink{bxe_8c_a6ecc8634fbe2654ea16f14d71a4b8814}{bxe\_lb\_pckt}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16823}16823     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16824}16824 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16825}16825     \textcolor{comment}{/* Wait until NIG register shows 10+1 packets of size 11*0x10 = 0xb0 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16826}16826     count = (1000 * factor);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16827}16827     \textcolor{keywordflow}{while} (count) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16828}16828         \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8419324d0e4909ffa675dca9d6c18c9d}{NIG\_REG\_STAT2\_BRB\_OCTET}}, 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16829}16829         val = *\mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, wb\_data[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16830}16830         \textcolor{keywordflow}{if} (val == 0xb0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16831}16831             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16832}16832         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16833}16833 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16834}16834         DELAY(10000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16835}16835         count-\/-\/;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16836}16836     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16837}16837 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16838}16838     \textcolor{keywordflow}{if} (val != 0xb0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16839}16839         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}NIG timeout val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16840}16840         \textcolor{keywordflow}{return} (-\/3);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16841}16841     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16842}16842 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16843}16843     \textcolor{comment}{/* Wait until PRS register shows 2 packets */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16844}16844     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad9e4ae57cfc56cc7f5e8a2fe2cfae85a}{PRS\_REG\_NUM\_OF\_PACKETS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16845}16845     \textcolor{keywordflow}{if} (val != 2) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16846}16846         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PRS timeout val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16847}16847     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16848}16848 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16849}16849     \textcolor{comment}{/* Write 1 to parser credits for CFC search request */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16850}16850     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6a26237b84785f3ffcc1ea322e952ef3}{PRS\_REG\_CFC\_SEARCH\_INITIAL\_CREDIT}}, 0x1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16851}16851 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16852}16852     \textcolor{comment}{/* Wait until PRS register shows 3 packets */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16853}16853     DELAY(10000 * factor);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16854}16854 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16855}16855     \textcolor{comment}{/* Wait until NIG register shows 1 packet of size 0x10 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16856}16856     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad9e4ae57cfc56cc7f5e8a2fe2cfae85a}{PRS\_REG\_NUM\_OF\_PACKETS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16857}16857     \textcolor{keywordflow}{if} (val != 3) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16858}16858         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PRS timeout val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16859}16859     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16860}16860 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16861}16861     \textcolor{comment}{/* clear NIG EOP FIFO */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16862}16862     \textcolor{keywordflow}{for} (i = 0; i < 11; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16863}16863         \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aed3c19292efab1b3c98ac01de1584100}{NIG\_REG\_INGRESS\_EOP\_LB\_FIFO}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16864}16864     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16865}16865 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16866}16866     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_afdac534f460f1719f206600f07fa3b7f}{NIG\_REG\_INGRESS\_EOP\_LB\_EMPTY}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16867}16867     \textcolor{keywordflow}{if} (val != 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16868}16868         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}clear of NIG failed val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16869}16869         \textcolor{keywordflow}{return} (-\/4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16870}16870     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16871}16871 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16872}16872     \textcolor{comment}{/* Reset and init BRB, PRS, NIG */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16873}16873     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_ae418017ed656db86eb2d5143fb42c181}{MISC\_REGISTERS\_RESET\_REG\_1\_CLEAR}}, 0x03);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16874}16874     DELAY(50000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16875}16875     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a0c2f3bf148b2daccef768b3f892a7746}{MISC\_REGISTERS\_RESET\_REG\_1\_SET}}, 0x03);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16876}16876     DELAY(50000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16877}16877     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a4f06af99f86b23872fcbbc7cad0daf0a}{BLOCK\_BRB1}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16878}16878     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13af78f6eccbbe0f7ba23cfb8ce3338bb72}{BLOCK\_PRS}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16879}16879     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16880}16880         \textcolor{comment}{/* set NIC mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16881}16881         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a68276bf6aacb8e1bf96ce43218b4581a}{PRS\_REG\_NIC\_MODE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16882}16882     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16883}16883 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16884}16884     \textcolor{comment}{/* Enable inputs of parser neighbor blocks */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16885}16885     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a78672999148d9091f15c0377e4b13ef9}{TSDM\_REG\_ENABLE\_IN1}}, 0x7fffffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16886}16886     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a48c4ec8b2324f9b83449979581ac737f}{TCM\_REG\_PRS\_IFEN}}, 0x1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16887}16887     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7d0bb43f8e153c4a045f92cfe12d689}{CFC\_REG\_DEBUG0}}, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16888}16888     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac141d7bf8a9ca4121e3ee6927ba45ae1}{NIG\_REG\_PRS\_REQ\_IN\_EN}}, 0x1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16889}16889 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16890}16890     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16891}16891 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16892}16892 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16893}16893 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16894}\mbox{\hyperlink{bxe_8c_a522e54e13119d99fbd2192b03d78fb79}{16894}} \mbox{\hyperlink{bxe_8c_a522e54e13119d99fbd2192b03d78fb79}{bxe\_setup\_fan\_failure\_detection}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16895}16895 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16896}16896     \textcolor{keywordtype}{int} is\_required;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16897}16897     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16898}16898     \textcolor{keywordtype}{int} \mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16899}16899 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16900}16900     is\_required = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16901}16901     val = (\mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc, dev\_info.shared\_hw\_config.config2) \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16902}16902            \mbox{\hyperlink{ecore__hsi_8h_aaa999ccf541289da70db5f5416158a08}{SHARED\_HW\_CFG\_FAN\_FAILURE\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16903}16903 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16904}16904     \textcolor{keywordflow}{if} (val == \mbox{\hyperlink{ecore__hsi_8h_a561b95600617eb972b6e07b01acaccb7}{SHARED\_HW\_CFG\_FAN\_FAILURE\_ENABLED}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16905}16905         is\_required = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16906}16906     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16907}16907     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16908}16908 \textcolor{comment}{     * The fan failure mechanism is usually related to the PHY type since}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16909}16909 \textcolor{comment}{     * the power consumption of the board is affected by the PHY. Currently,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16910}16910 \textcolor{comment}{     * fan is required for most designs with SFX7101, BCM8727 and BCM8481.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16911}16911 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16912}16912     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (val == \mbox{\hyperlink{ecore__hsi_8h_a6c2bdc316b6bcbefc3fe888445d07bd5}{SHARED\_HW\_CFG\_FAN\_FAILURE\_PHY\_TYPE}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16913}16913         \textcolor{keywordflow}{for} (\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}} = \mbox{\hyperlink{ecore__mfw__req_8h_a1b31e5097dbbd92abbdd0b9e48ca9018}{PORT\_0}}; \mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}} < \mbox{\hyperlink{ecore__mfw__req_8h_a1a22c8aea5fa6c6834bc64756d239ae4}{PORT\_MAX}}; \mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16914}16914             is\_required |= \mbox{\hyperlink{bxe__elink_8c_a9a10fe045ebf82f158279e4a9353bc34}{elink\_fan\_failure\_det\_req}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16915}16915                                                      sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a97c45ddd35325a82a07dba52c261cd30}{shmem\_base}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16916}16916                                                      sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a2ea341c2b43f033f56e70c9a5cd63e0d}{shmem2\_base}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16917}16917                                                      \mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16918}16918         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16919}16919     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16920}16920 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16921}16921     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}fan detection setting: \%d\(\backslash\)n"{}}, is\_required);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16922}16922 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16923}16923     \textcolor{keywordflow}{if} (is\_required == 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16924}16924         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16925}16925     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16926}16926 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16927}16927     \textcolor{comment}{/* Fan failure is indicated by SPIO 5 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16928}16928     \mbox{\hyperlink{bxe_8c_a3172c150da38f101b310560f1503c31c}{bxe\_set\_spio}}(sc, \mbox{\hyperlink{ecore__reg_8h_abf9d38c632a5d495f68da837ad0b12bd}{MISC\_SPIO\_SPIO5}}, \mbox{\hyperlink{ecore__reg_8h_acd4226ce627fbd1113ec2e0e36f735c0}{MISC\_SPIO\_INPUT\_HI\_Z}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16929}16929 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16930}16930     \textcolor{comment}{/* set to active low mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16931}16931     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1e16662c093d68e024305ae28d2d1e05}{MISC\_REG\_SPIO\_INT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16932}16932     val |= (\mbox{\hyperlink{ecore__reg_8h_abf9d38c632a5d495f68da837ad0b12bd}{MISC\_SPIO\_SPIO5}} << \mbox{\hyperlink{ecore__reg_8h_a688d4d873dfe13702cf2d9fe6bf7a3b6}{MISC\_SPIO\_INT\_OLD\_SET\_POS}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16933}16933     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1e16662c093d68e024305ae28d2d1e05}{MISC\_REG\_SPIO\_INT}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16934}16934 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16935}16935     \textcolor{comment}{/* enable interrupt to signal the IGU */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16936}16936     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aea6a81518722b188f6dee5ba6b90d9f7}{MISC\_REG\_SPIO\_EVENT\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16937}16937     val |= \mbox{\hyperlink{ecore__reg_8h_abf9d38c632a5d495f68da837ad0b12bd}{MISC\_SPIO\_SPIO5}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16938}16938     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aea6a81518722b188f6dee5ba6b90d9f7}{MISC\_REG\_SPIO\_EVENT\_EN}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16939}16939 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16940}16940 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16941}16941 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16942}\mbox{\hyperlink{bxe_8c_aaa8b1c1e612be4d848378cdbd93666f9}{16942}} \mbox{\hyperlink{bxe_8c_aaa8b1c1e612be4d848378cdbd93666f9}{bxe\_enable\_blocks\_attention}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16943}16943 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16944}16944     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16945}16945 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16946}16946     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa81356ed731c31204dcdc4943968c5ef}{PXP\_REG\_PXP\_INT\_MASK\_0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16947}16947     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16948}16948         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad74906f48be7571ed38068298cbf5b3b}{PXP\_REG\_PXP\_INT\_MASK\_1}}, 0x40);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16949}16949     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16950}16950         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad74906f48be7571ed38068298cbf5b3b}{PXP\_REG\_PXP\_INT\_MASK\_1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16951}16951     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16952}16952     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3a4f3fa476f3f638e619beb21a6bb769}{DORQ\_REG\_DORQ\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16953}16953     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a84f5c0c38b2279d87bb0afc90bba6f71}{CFC\_REG\_CFC\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16954}16954     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16955}16955 \textcolor{comment}{     * mask read length error interrupts in brb for parser}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16956}16956 \textcolor{comment}{     * (parsing unit and 'checksum and crc' unit)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16957}16957 \textcolor{comment}{     * these errors are legal (PU reads fixed length and CAC can cause}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16958}16958 \textcolor{comment}{     * read length error on truncated packets)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16959}16959 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16960}16960     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a05a14d457b7478b3e3c8815c69992947}{BRB1\_REG\_BRB1\_INT\_MASK}}, 0xFC00);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16961}16961     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3a7275fce8e5c56c2ff5019b80488c9f}{QM\_REG\_QM\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16962}16962     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa18e330ffdf2402611094ecebaa63549}{TM\_REG\_TM\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16963}16963     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac24e63a9b3c3882e8d78dc7d8604f7ad}{XSDM\_REG\_XSDM\_INT\_MASK\_0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16964}16964     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af162b0d009dc74f6b9738785d439e308}{XSDM\_REG\_XSDM\_INT\_MASK\_1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16965}16965     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad6fe02652fe983df07508354990e7f40}{XCM\_REG\_XCM\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16966}16966 \textcolor{comment}{/*      REG\_WR(sc, XSEM\_REG\_XSEM\_INT\_MASK\_0, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16967}16967 \textcolor{comment}{/*      REG\_WR(sc, XSEM\_REG\_XSEM\_INT\_MASK\_1, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16968}16968     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab36d35b18d381b8b86ec07c6daf2bda9}{USDM\_REG\_USDM\_INT\_MASK\_0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16969}16969     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a365e40b30a2ea1d48fdf484e85fc25ef}{USDM\_REG\_USDM\_INT\_MASK\_1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16970}16970     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_add475c7e9cffea547803fa796f207689}{UCM\_REG\_UCM\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16971}16971 \textcolor{comment}{/*      REG\_WR(sc, USEM\_REG\_USEM\_INT\_MASK\_0, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16972}16972 \textcolor{comment}{/*      REG\_WR(sc, USEM\_REG\_USEM\_INT\_MASK\_1, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16973}16973     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ada52980e7054404d01f44d83d727da18}{GRCBASE\_UPB}} + \mbox{\hyperlink{ecore__reg_8h_a5ce2c3afc41b83eeaaa8a845d8f040ef}{PB\_REG\_PB\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16974}16974     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_afa36b6d617d093452e5ced4aef374be6}{CSDM\_REG\_CSDM\_INT\_MASK\_0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16975}16975     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a95476ed00bc4a86e245d5ac0d4a49f20}{CSDM\_REG\_CSDM\_INT\_MASK\_1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16976}16976     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a012297f265f94f3566cba3f8f6b85e69}{CCM\_REG\_CCM\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16977}16977 \textcolor{comment}{/*      REG\_WR(sc, CSEM\_REG\_CSEM\_INT\_MASK\_0, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16978}16978 \textcolor{comment}{/*      REG\_WR(sc, CSEM\_REG\_CSEM\_INT\_MASK\_1, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16979}16979 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16980}16980     val = (\mbox{\hyperlink{ecore__reg_8h_a485b3f756ba2c9a9e71c9e064bef6efb}{PXP2\_PXP2\_INT\_MASK\_0\_REG\_PGL\_CPL\_AFT}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16981}16981            \mbox{\hyperlink{ecore__reg_8h_a0ed2b2a3f049106268ee46f1f6205503}{PXP2\_PXP2\_INT\_MASK\_0\_REG\_PGL\_CPL\_OF}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16982}16982            \mbox{\hyperlink{ecore__reg_8h_a99de85be4a19965614b7ffb6c8d26af1}{PXP2\_PXP2\_INT\_MASK\_0\_REG\_PGL\_PCIE\_ATTN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16983}16983     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16984}16984         val |= (\mbox{\hyperlink{ecore__reg_8h_acc3dcf762e08d4cc94c48e47d992fcc3}{PXP2\_PXP2\_INT\_MASK\_0\_REG\_PGL\_READ\_BLOCKED}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16985}16985                 \mbox{\hyperlink{ecore__reg_8h_ab4db00bc519f22215bdf95a9055f8e98}{PXP2\_PXP2\_INT\_MASK\_0\_REG\_PGL\_WRITE\_BLOCKED}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16986}16986     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16987}16987     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_abbaf846b043a1de56d7608564e75b4d8}{PXP2\_REG\_PXP2\_INT\_MASK\_0}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16988}16988 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16989}16989     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae51e87fc93d5e63ba563b0357069509a}{TSDM\_REG\_TSDM\_INT\_MASK\_0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16990}16990     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a854060a3834492b8554dfc222de9c805}{TSDM\_REG\_TSDM\_INT\_MASK\_1}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16991}16991     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0f97b1430e138281a2e745f9b37290b3}{TCM\_REG\_TCM\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16992}16992 \textcolor{comment}{/*      REG\_WR(sc, TSEM\_REG\_TSEM\_INT\_MASK\_0, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16993}16993 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16994}16994     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16995}16995         \textcolor{comment}{/* enable VFC attentions: bits 11 and 12, bits 31:13 reserved */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16996}16996         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_acd540ac916a5c996690a50e1694f357c}{TSEM\_REG\_TSEM\_INT\_MASK\_1}}, 0x07ff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16997}16997     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16998}16998 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l16999}16999     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_abd638eface160e03705f47310aed1ede}{CDU\_REG\_CDU\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17000}17000     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0d5f8b8ce9e59a944567c08575ba8b5e}{DMAE\_REG\_DMAE\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17001}17001 \textcolor{comment}{/*      REG\_WR(sc, MISC\_REG\_MISC\_INT\_MASK, 0); */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17002}17002     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a761ade380d40d02867f3e7306d6ffa0b}{PBF\_REG\_PBF\_INT\_MASK}}, 0x18);     \textcolor{comment}{/* bit 3,4 masked */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17003}17003 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17004}17004 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17010}17010 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17011}\mbox{\hyperlink{bxe_8c_a150bbbcff688497647bd566b92f52772}{17011}} \mbox{\hyperlink{bxe_8c_a150bbbcff688497647bd566b92f52772}{bxe\_init\_hw\_common}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17012}17012 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17013}17013     uint8\_t abs\_func\_id;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17014}17014     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17015}17015 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17016}17016     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}starting common init for func \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17017}17017           \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17018}17018 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17019}17019     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17020}17020 \textcolor{comment}{     * take the RESET lock to protect undi\_unload flow from accessing}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17021}17021 \textcolor{comment}{     * registers while we are resetting the chip}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17022}17022 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17023}17023     \mbox{\hyperlink{bxe_8c_ae5bcfab8dfc3cf25b11a29f6535cd3f2}{bxe\_acquire\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0ff7f7aee690345f14d3fcd1d811f62a}{HW\_LOCK\_RESOURCE\_RESET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17024}17024 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17025}17025     \mbox{\hyperlink{bxe_8c_a7f7aade2e4006d9f59fa8dac2cd181e3}{bxe\_reset\_common}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17026}17026 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17027}17027     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a0c2f3bf148b2daccef768b3f892a7746}{MISC\_REGISTERS\_RESET\_REG\_1\_SET}}), 0xffffffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17028}17028 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17029}17029     val = 0xfffc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17030}17030     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17031}17031         val |= \mbox{\hyperlink{ecore__reg_8h_aee7c7806fa5fc146a7b62ccd814d9bc0}{MISC\_REGISTERS\_RESET\_REG\_2\_MSTAT0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17032}17032         val |= \mbox{\hyperlink{ecore__reg_8h_aa2dc14647be0281dbe8be1cc7f458803}{MISC\_REGISTERS\_RESET\_REG\_2\_MSTAT1}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17033}17033     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17034}17034 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17035}17035     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a70170138a30f2fa16502ffd2972e9850}{MISC\_REGISTERS\_RESET\_REG\_2\_SET}}), val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17036}17036 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17037}17037     \mbox{\hyperlink{bxe_8c_af35e13ea3e9f0206c3f0f61ce268207f}{bxe\_release\_hw\_lock}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0ff7f7aee690345f14d3fcd1d811f62a}{HW\_LOCK\_RESOURCE\_RESET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17038}17038 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17039}17039     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a24c81c958913c17de919c3189ab47a04}{BLOCK\_MISC}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17040}17040     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}after misc block init\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17041}17041 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17042}17042     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17043}17043         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17044}17044 \textcolor{comment}{         * 4-\/port mode or 2-\/port mode we need to turn off master-\/enable for}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17045}17045 \textcolor{comment}{         * everyone. After that we turn it back on for self. So, we disregard}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17046}17046 \textcolor{comment}{         * multi-\/function, and always disable all functions on the given path,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17047}17047 \textcolor{comment}{         * this means 0,2,4,6 for path 0 and 1,3,5,7 for path 1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17048}17048 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17049}17049         \textcolor{keywordflow}{for} (abs\_func\_id = \mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17050}17050              abs\_func\_id < (\mbox{\hyperlink{ecore__hsi_8h_a96978266f7061cd729f6b3f07c7bf148}{E2\_FUNC\_MAX}} * 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17051}17051              abs\_func\_id += 2) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17052}17052             \textcolor{keywordflow}{if} (abs\_func\_id == \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17053}17053                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a477901a830dcfaa0d3891614100a568d}{PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17054}17054                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17055}17055             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17056}17056 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17057}17057             \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, abs\_func\_id);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17058}17058 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17059}17059             \textcolor{comment}{/* clear pf enable */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17060}17060             \mbox{\hyperlink{bxe_8c_a2d96110aed3521282cc163243d1d0d2b}{bxe\_pf\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17061}17061 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17062}17062             \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17063}17063         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17064}17064     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17065}17065 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17066}17066     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}after pf disable\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17067}17067 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17068}17068     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a0d349428ab298b8ce72419f2249e36a4}{BLOCK\_PXP}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17069}17069 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17070}17070     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17071}17071         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17072}17072 \textcolor{comment}{         * enable HW interrupt from PXP on USDM overflow}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17073}17073 \textcolor{comment}{         * bit 16 on INT\_MASK\_0}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17074}17074 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17075}17075         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa81356ed731c31204dcdc4943968c5ef}{PXP\_REG\_PXP\_INT\_MASK\_0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17076}17076     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17077}17077 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17078}17078     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a11aae77dd00a239ff5db0a32d19aa33b}{BLOCK\_PXP2}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17079}17079     \mbox{\hyperlink{bxe_8c_a070a26d3157058d4f4b7139fbaf36856}{bxe\_init\_pxp}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17080}17080 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17081}17081 \textcolor{preprocessor}{\#ifdef \_\_BIG\_ENDIAN}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17082}17082     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9205b59c29b1cc06ee353295be3d9122}{PXP2\_REG\_RQ\_QM\_ENDIAN\_M}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17083}17083     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3957377a82c0634fa9c3eea536f23f62}{PXP2\_REG\_RQ\_TM\_ENDIAN\_M}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17084}17084     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a652430abf9228626abaab78fc38ed394}{PXP2\_REG\_RQ\_SRC\_ENDIAN\_M}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17085}17085     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab3b774d177bccc9db80e0a7e01929cef}{PXP2\_REG\_RQ\_CDU\_ENDIAN\_M}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17086}17086     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9d9620dc6e5bdc4fb57624959be12685}{PXP2\_REG\_RQ\_DBG\_ENDIAN\_M}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17087}17087     \textcolor{comment}{/* make sure this value is 0 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17088}17088     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a698637cb1f08b55c123401c057530770}{PXP2\_REG\_RQ\_HC\_ENDIAN\_M}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17089}17089 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17090}17090     \textcolor{comment}{//REG\_WR(sc, PXP2\_REG\_RD\_PBF\_SWAP\_MODE, 1);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17091}17091     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a32e4bc509637b16af6e3489aad77d764}{PXP2\_REG\_RD\_QM\_SWAP\_MODE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17092}17092     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac18c9cb63e9acf37611dd7e55a23f5e0}{PXP2\_REG\_RD\_TM\_SWAP\_MODE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17093}17093     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a2f74f4002e3e2ea1165a5101df61bb28}{PXP2\_REG\_RD\_SRC\_SWAP\_MODE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17094}17094     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a93168e9d5fca966d773dca24683e1fdd}{PXP2\_REG\_RD\_CDURD\_SWAP\_MODE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17095}17095 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17096}17096 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17097}17097     \mbox{\hyperlink{ecore__init__ops_8h_ade0050e907ee302f98af9edff2183a08}{ecore\_ilt\_init\_page\_size}}(sc, \mbox{\hyperlink{ecore__init_8h_a5c63c1522f886037d84058d441dd449f}{INITOP\_SET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17098}17098 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17099}17099     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aa74010abe4e9d6f15f3425915a3f1e22}{CHIP\_REV\_IS\_FPGA}}(sc) \&\& \mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17100}17100         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad87cb117608b1e8478394ca228dfdfd7}{PXP2\_REG\_PGL\_TAGS\_LIMIT}}, 0x1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17101}17101     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17102}17102 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17103}17103     \textcolor{comment}{/* let the HW do it's magic... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17104}17104     DELAY(100000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17105}17105 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17106}17106     \textcolor{comment}{/* finish PXP init */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17107}17107     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1787f585662e0f07eaf053091b2189d3}{PXP2\_REG\_RQ\_CFG\_DONE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17108}17108     \textcolor{keywordflow}{if} (val != 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17109}17109         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PXP2 CFG failed PXP2\_REG\_RQ\_CFG\_DONE val = 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17110}17110             val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17111}17111         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17112}17112     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17113}17113     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a73ff6e72e1281162450cf2a053abe7eb}{PXP2\_REG\_RD\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17114}17114     \textcolor{keywordflow}{if} (val != 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17115}17115         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PXP2 RD\_INIT failed val = 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17116}17116         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17117}17117     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17118}17118 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17119}17119     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}after pxp init\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17120}17120 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17121}17121     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17122}17122 \textcolor{comment}{     * Timer bug workaround for E2 only. We need to set the entire ILT to have}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17123}17123 \textcolor{comment}{     * entries with value "{}0"{} and valid bit on. This needs to be done by the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17124}17124 \textcolor{comment}{     * first PF that is loaded in a path (i.e. common phase)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17125}17125 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17126}17126     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17127}17127 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17128}17128 \textcolor{comment}{ * In E2 there is a bug in the timers block that can cause function 6 / 7}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17129}17129 \textcolor{comment}{ * (i.e. vnic3) to start even if it is marked as "{}scan-\/off"{}.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17130}17130 \textcolor{comment}{ * This occurs when a different function (func2,3) is being marked}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17131}17131 \textcolor{comment}{ * as "{}scan-\/off"{}. Real-\/life scenario for example: if a driver is being}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17132}17132 \textcolor{comment}{ * load-\/unloaded while func6,7 are down. This will cause the timer to access}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17133}17133 \textcolor{comment}{ * the ilt, translate to a logical address and send a request to read/write.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17134}17134 \textcolor{comment}{ * Since the ilt for the function that is down is not valid, this will cause}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17135}17135 \textcolor{comment}{ * a translation error which is unrecoverable.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17136}17136 \textcolor{comment}{ * The Workaround is intended to make sure that when this happens nothing}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17137}17137 \textcolor{comment}{ * fatal will occur. The workaround:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17138}17138 \textcolor{comment}{ *  1.  First PF driver which loads on a path will:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17139}17139 \textcolor{comment}{ *      a.  After taking the chip out of reset, by using pretend,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17140}17140 \textcolor{comment}{ *          it will write "{}0"{} to the following registers of}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17141}17141 \textcolor{comment}{ *          the other vnics.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17142}17142 \textcolor{comment}{ *          REG\_WR(pdev, PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER, 0);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17143}17143 \textcolor{comment}{ *          REG\_WR(pdev, CFC\_REG\_WEAK\_ENABLE\_PF,0);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17144}17144 \textcolor{comment}{ *          REG\_WR(pdev, CFC\_REG\_STRONG\_ENABLE\_PF,0);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17145}17145 \textcolor{comment}{ *          And for itself it will write '1' to}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17146}17146 \textcolor{comment}{ *          PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER to enable}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17147}17147 \textcolor{comment}{ *          dmae-\/operations (writing to pram for example.)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17148}17148 \textcolor{comment}{ *          note: can be done for only function 6,7 but cleaner this}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17149}17149 \textcolor{comment}{ *            way.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17150}17150 \textcolor{comment}{ *      b.  Write zero+valid to the entire ILT.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17151}17151 \textcolor{comment}{ *      c.  Init the first\_timers\_ilt\_entry, last\_timers\_ilt\_entry of}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17152}17152 \textcolor{comment}{ *          VNIC3 (of that port). The range allocated will be the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17153}17153 \textcolor{comment}{ *          entire ILT. This is needed to prevent  ILT range error.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17154}17154 \textcolor{comment}{ *  2.  Any PF driver load flow:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17155}17155 \textcolor{comment}{ *      a.  ILT update with the physical addresses of the allocated}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17156}17156 \textcolor{comment}{ *          logical pages.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17157}17157 \textcolor{comment}{ *      b.  Wait 20msec. -\/ note that this timeout is needed to make}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17158}17158 \textcolor{comment}{ *          sure there are no requests in one of the PXP internal}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17159}17159 \textcolor{comment}{ *          queues with "{}old"{} ILT addresses.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17160}17160 \textcolor{comment}{ *      c.  PF enable in the PGLC.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17161}17161 \textcolor{comment}{ *      d.  Clear the was\_error of the PF in the PGLC. (could have}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17162}17162 \textcolor{comment}{ *          occurred while driver was down)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17163}17163 \textcolor{comment}{ *      e.  PF enable in the CFC (WEAK + STRONG)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17164}17164 \textcolor{comment}{ *      f.  Timers scan enable}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17165}17165 \textcolor{comment}{ *  3.  PF driver unload flow:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17166}17166 \textcolor{comment}{ *      a.  Clear the Timers scan\_en.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17167}17167 \textcolor{comment}{ *      b.  Polling for scan\_on=0 for that PF.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17168}17168 \textcolor{comment}{ *      c.  Clear the PF enable bit in the PXP.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17169}17169 \textcolor{comment}{ *      d.  Clear the PF enable in the CFC (WEAK + STRONG)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17170}17170 \textcolor{comment}{ *      e.  Write zero+valid to all ILT entries (The valid bit must}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17171}17171 \textcolor{comment}{ *          stay set)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17172}17172 \textcolor{comment}{ *      f.  If this is VNIC 3 of a port then also init}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17173}17173 \textcolor{comment}{ *          first\_timers\_ilt\_entry to zero and last\_timers\_ilt\_entry}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17174}17174 \textcolor{comment}{ *          to the last entry in the ILT.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17175}17175 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17176}17176 \textcolor{comment}{ *      Notes:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17177}17177 \textcolor{comment}{ *      Currently the PF error in the PGLC is non recoverable.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17178}17178 \textcolor{comment}{ *      In the future the there will be a recovery routine for this error.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17179}17179 \textcolor{comment}{ *      Currently attention is masked.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17180}17180 \textcolor{comment}{ *      Having an MCP lock on the load/unload process does not guarantee that}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17181}17181 \textcolor{comment}{ *      there is no Timer disable during Func6/7 enable. This is because the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17182}17182 \textcolor{comment}{ *      Timers scan is currently being cleared by the MCP on FLR.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17183}17183 \textcolor{comment}{ *      Step 2.d can be done only for PF6/7 and the driver can also check if}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17184}17184 \textcolor{comment}{ *      there is error before clearing it. But the flow above is simpler and}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17185}17185 \textcolor{comment}{ *      more general.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17186}17186 \textcolor{comment}{ *      All ILT entries are written by zero+valid and not just PF6/7}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17187}17187 \textcolor{comment}{ *      ILT entries since in the future the ILT entries allocation for}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17188}17188 \textcolor{comment}{ *      PF-\/s might be dynamic.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17189}17189 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17190}17190         \textcolor{keyword}{struct }\mbox{\hyperlink{structilt__client__info}{ilt\_client\_info}} ilt\_cli;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17191}17191         \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__ilt}{ecore\_ilt}} ilt;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17192}17192 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17193}17193         memset(\&ilt\_cli, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structilt__client__info}{ilt\_client\_info}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17194}17194         memset(\&ilt, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structecore__ilt}{ecore\_ilt}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17195}17195 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17196}17196         \textcolor{comment}{/* initialize dummy TM client */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17197}17197         ilt\_cli.\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}}      = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17198}17198         ilt\_cli.\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}}        = \mbox{\hyperlink{bxe_8h_a1b4c05c9443029a26855da3290c964ce}{ILT\_NUM\_PAGE\_ENTRIES}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17199}17199         ilt\_cli.\mbox{\hyperlink{structilt__client__info_ad04dd6692ca86708fc92df3ef580acbe}{client\_num}} = \mbox{\hyperlink{ecore__init_8h_a816e0c661a8523d460c2419dead0fc15}{ILT\_CLIENT\_TM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17200}17200 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17201}17201         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17202}17202 \textcolor{comment}{         * Step 1: set zeroes to all ilt page entries with valid bit on}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17203}17203 \textcolor{comment}{         * Step 2: set the timers first/last ilt entry to point}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17204}17204 \textcolor{comment}{         * to the entire range to prevent ILT range error for 3rd/4th}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17205}17205 \textcolor{comment}{         * vnic (this code assumes existence of the vnic)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17206}17206 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17207}17207 \textcolor{comment}{         * both steps performed by call to ecore\_ilt\_client\_init\_op()}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17208}17208 \textcolor{comment}{         * with dummy TM client}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17209}17209 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17210}17210 \textcolor{comment}{         * we must use pretend since PXP2\_REG\_RQ\_\#\#blk\#\#\_FIRST\_ILT}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17211}17211 \textcolor{comment}{         * and his brother are split registers}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17212}17212 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17213}17213 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17214}17214         \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, (\mbox{\hyperlink{bxe_8h_aa1313c508aa8012a090f4873ef2d6433}{SC\_PATH}}(sc) + 6));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17215}17215         \mbox{\hyperlink{ecore__init__ops_8h_a18bd1098e8701f5447d147af65bca7c2}{ecore\_ilt\_client\_init\_op\_ilt}}(sc, \&ilt, \&ilt\_cli, \mbox{\hyperlink{ecore__init_8h_a8c8d87be4a1ac939ea218b3ea699a4a6}{INITOP\_CLEAR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17216}17216         \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17217}17217 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17218}17218         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3d7a8a520ef4187fbd32e4d2e9ee6e0c}{PXP2\_REG\_RQ\_DRAM\_ALIGN}}, \mbox{\hyperlink{bxe_8h_a3e0cabb756dcfcc5f02f4f9d816714c7}{BXE\_PXP\_DRAM\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17219}17219         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa75606e911c9aa962a685fc731b1a508}{PXP2\_REG\_RQ\_DRAM\_ALIGN\_RD}}, \mbox{\hyperlink{bxe_8h_a3e0cabb756dcfcc5f02f4f9d816714c7}{BXE\_PXP\_DRAM\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17220}17220         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9fae9fff1457a876cb9fea94488e3638}{PXP2\_REG\_RQ\_DRAM\_ALIGN\_SEL}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17221}17221     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17222}17222 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17223}17223     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab79119ee126f16cf1d58d0cbe02ab1f2}{PXP2\_REG\_RQ\_DISABLE\_INPUTS}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17224}17224     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9b8169f78da9eb64976f7f7d7408474c}{PXP2\_REG\_RD\_DISABLE\_INPUTS}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17225}17225 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17226}17226     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17227}17227         \textcolor{keywordtype}{int} factor = \mbox{\hyperlink{bxe_8h_a1b2ebcb5e39c8833b57e1d70aa728757}{CHIP\_REV\_IS\_EMUL}}(sc) ? 1000 :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17228}17228                      (\mbox{\hyperlink{bxe_8h_aa74010abe4e9d6f15f3425915a3f1e22}{CHIP\_REV\_IS\_FPGA}}(sc) ? 400 : 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17229}17229 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17230}17230         \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a9264cfdb2e13af4caf85329a0bf9ad5b}{BLOCK\_PGLUE\_B}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17231}17231         \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ab2803344fa2f154ab199f48cf1ee9307}{BLOCK\_ATC}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17232}17232 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17233}17233         \textcolor{comment}{/* let the HW do it's magic... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17234}17234         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17235}17235             DELAY(200000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17236}17236             val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_afb4b0b367c3fc162a1c7bd09c1f0e3d5}{ATC\_REG\_ATC\_INIT\_DONE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17237}17237         \} \textcolor{keywordflow}{while} (factor-\/-\/ \&\& (val != 1));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17238}17238 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17239}17239         \textcolor{keywordflow}{if} (val != 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17240}17240             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}ATC\_INIT failed val = 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17241}17241             \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17242}17242         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17243}17243     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17244}17244 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17245}17245     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}after pglue and atc init\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17246}17246 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17247}17247     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a7de4b0450c5d147c0386fe46c03c4eaa}{BLOCK\_DMAE}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17248}17248 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17249}17249     \mbox{\hyperlink{bxe_8c_ab1aef29ef9a4e26025ae82bbcbe6bd89}{bxe\_iov\_init\_dmae}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17250}17250 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17251}17251     \textcolor{comment}{/* clean the DMAE memory */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17252}17252     sc-\/>\mbox{\hyperlink{structbxe__softc_ab8635fb9ce6cf45243a4e83c338680e7}{dmae\_ready}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17253}17253     \mbox{\hyperlink{ecore__init__ops_8h_a284e53d6bc6e43a273222d9e33e51d08}{ecore\_init\_fill}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae0ecda0175a98401e36260bf56475e87}{TSEM\_REG\_PRAM}}, 0, 8, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17254}17254 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17255}17255     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13aaf2951101c0a3c26a730f5658ec24419}{BLOCK\_TCM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17256}17256 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17257}17257     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abc01480ebcab309b85b835d7fb789a10}{BLOCK\_UCM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17258}17258 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17259}17259     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a268c9c8269508c38d71b4433c51b25e4}{BLOCK\_CCM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17260}17260 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17261}17261     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a6c3cf7e8d680940502c6360cc8f20479}{BLOCK\_XCM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17262}17262 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17263}17263     \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3c9334dca9d19325cfd0f81de9e58892}{XSEM\_REG\_PASSIVE\_BUFFER}}, 3);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17264}17264     \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6fed24413ae0c6f95c071f16b36018d8}{CSEM\_REG\_PASSIVE\_BUFFER}}, 3);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17265}17265     \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(sc, \mbox{\hyperlink{ecore__reg_8h_a90a6b99d969ac8fd1f860b006efb3357}{TSEM\_REG\_PASSIVE\_BUFFER}}, 3);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17266}17266     \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(sc, \mbox{\hyperlink{ecore__reg_8h_a4c1c1f82f2ca6a6e4ea7037f56a59c98}{USEM\_REG\_PASSIVE\_BUFFER}}, 3);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17267}17267 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17268}17268     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a375632703f86050232f61b2097f6d78c}{BLOCK\_QM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17269}17269 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17270}17270     \textcolor{comment}{/* QM queues pointers table */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17271}17271     \mbox{\hyperlink{ecore__init__ops_8h_a33eec0947e5be17ce1ab35489fe674a0}{ecore\_qm\_init\_ptr\_table}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a95756baba748982379d79c2a5cdb0518}{qm\_cid\_count}}, \mbox{\hyperlink{ecore__init_8h_a5c63c1522f886037d84058d441dd449f}{INITOP\_SET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17272}17272 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17273}17273     \textcolor{comment}{/* soft reset pulse */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17274}17274     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa5b6a5df2541b53639b05b9c412e80fb}{QM\_REG\_SOFT\_RESET}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17275}17275     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa5b6a5df2541b53639b05b9c412e80fb}{QM\_REG\_SOFT\_RESET}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17276}17276 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17277}17277     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17278}17278         \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a2b11a2adab2c1b033fce2ae5efa85336}{BLOCK\_TM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17279}17279 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17280}17280     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a786d321f8b0183f7ff9926d19fec5ac9}{BLOCK\_DORQ}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17281}17281     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_abf2f4040383dd35746ce0e1df7d6a21e}{DORQ\_REG\_DPM\_CID\_OFST}}, \mbox{\hyperlink{bxe_8h_a1ba59ba640ac1b758c0a462287b059a6}{BXE\_DB\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17282}17282     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17283}17283         \textcolor{comment}{/* enable hw interrupt from doorbell Q */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17284}17284         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3a4f3fa476f3f638e619beb21a6bb769}{DORQ\_REG\_DORQ\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17285}17285     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17286}17286 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17287}17287     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a4f06af99f86b23872fcbbc7cad0daf0a}{BLOCK\_BRB1}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17288}17288 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17289}17289     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13af78f6eccbbe0f7ba23cfb8ce3338bb72}{BLOCK\_PRS}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17290}17290     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a17491744567e33c8248a0b19f07676d5}{PRS\_REG\_A\_PRSU\_20}}, 0xf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17291}17291 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17292}17292     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17293}17293         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_adb1bcaec59b7b62f10fa4ecfbd24ba1b}{PRS\_REG\_E1HOV\_MODE}}, sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_abb4551aa4dfc0ae82e0ef5a89ad2c0b2}{path\_has\_ovlan}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17294}17294     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17295}17295 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17296}17296     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc) \&\& !\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17297}17297         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ae7897d9ae4bc1c0e272f50940f76b8d4}{IS\_MF\_AFEX}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17298}17298             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17299}17299 \textcolor{comment}{             * configure that AFEX and VLAN headers must be}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17300}17300 \textcolor{comment}{             * received in AFEX mode}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17301}17301 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17302}17302             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8f18073d384720a483cc325cabeff0bf}{PRS\_REG\_HDRS\_AFTER\_BASIC}}, 0xE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17303}17303             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a22396235ff7d0e3f8a80bb6d117a6ba3}{PRS\_REG\_MUST\_HAVE\_HDRS}}, 0xA);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17304}17304             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a57f812494f3340c92003230d0a3a4cda}{PRS\_REG\_HDRS\_AFTER\_TAG\_0}}, 0x6);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17305}17305             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a28f5e0f6281a72ab91dc14198c0b254d}{PRS\_REG\_TAG\_ETHERTYPE\_0}}, 0x8926);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17306}17306             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a44cbffbf2649483d7385c223a292fe15}{PRS\_REG\_TAG\_LEN\_0}}, 0x4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17307}17307         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17308}17308             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17309}17309 \textcolor{comment}{             * Bit-\/map indicating which L2 hdrs may appear}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17310}17310 \textcolor{comment}{             * after the basic Ethernet header}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17311}17311 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17312}17312             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8f18073d384720a483cc325cabeff0bf}{PRS\_REG\_HDRS\_AFTER\_BASIC}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17313}17313                    sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_abb4551aa4dfc0ae82e0ef5a89ad2c0b2}{path\_has\_ovlan}} ? 7 : 6);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17314}17314         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17315}17315     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17316}17316 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17317}17317     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a97d8c0fe7877f506dc6b3ce34b53952e}{BLOCK\_TSDM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17318}17318     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a58c6f47f3e1b45018812cb685e7c291d}{BLOCK\_CSDM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17319}17319     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a92976abedce3cb78ebf70619d60c90eb}{BLOCK\_USDM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17320}17320     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a1afd92f97e85655fe22c2e0c4bb4d760}{BLOCK\_XSDM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17321}17321 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17322}17322     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17323}17323         \textcolor{comment}{/* reset VFC memories */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17324}17324         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a919bf3a375787caba689831deec85b95}{TSEM\_REG\_FAST\_MEMORY}} + \mbox{\hyperlink{ecore__reg_8h_a73e5d8dc776241fa577c700eb060502c}{VFC\_REG\_MEMORIES\_RST}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17325}17325                \mbox{\hyperlink{ecore__reg_8h_aa470c82299238e58a89f12987ae3bb95}{VFC\_MEMORIES\_RST\_REG\_CAM\_RST}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17326}17326                \mbox{\hyperlink{ecore__reg_8h_ac4375733ea25e4c8f345752a04596b44}{VFC\_MEMORIES\_RST\_REG\_RAM\_RST}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17327}17327         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a83d9053ce3e02eb316fcd86d46e9ce9b}{XSEM\_REG\_FAST\_MEMORY}} + \mbox{\hyperlink{ecore__reg_8h_a73e5d8dc776241fa577c700eb060502c}{VFC\_REG\_MEMORIES\_RST}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17328}17328                \mbox{\hyperlink{ecore__reg_8h_aa470c82299238e58a89f12987ae3bb95}{VFC\_MEMORIES\_RST\_REG\_CAM\_RST}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17329}17329                \mbox{\hyperlink{ecore__reg_8h_ac4375733ea25e4c8f345752a04596b44}{VFC\_MEMORIES\_RST\_REG\_RAM\_RST}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17330}17330 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17331}17331         DELAY(20000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17332}17332     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17333}17333 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17334}17334     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13acb7e9d32c57b5b0f9d24fe973e87d8b7}{BLOCK\_TSEM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17335}17335     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ad1620a01b2698b83169fde6fac772527}{BLOCK\_USEM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17336}17336     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13acd18e18c2b5cecd8d11297350f75d545}{BLOCK\_CSEM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17337}17337     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a82f33613a03c3aa12de96f41c8b77af5}{BLOCK\_XSEM}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17338}17338 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17339}17339     \textcolor{comment}{/* sync semi rtc */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17340}17340     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_ae418017ed656db86eb2d5143fb42c181}{MISC\_REGISTERS\_RESET\_REG\_1\_CLEAR}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17341}17341            0x80000000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17342}17342     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af36b43f83fb93cff57ac592cc3e54e61}{GRCBASE\_MISC}} + \mbox{\hyperlink{ecore__reg_8h_a0c2f3bf148b2daccef768b3f892a7746}{MISC\_REGISTERS\_RESET\_REG\_1\_SET}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17343}17343            0x80000000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17344}17344 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17345}17345     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ab65d1cd17679dea6002aa15f745a08ad}{BLOCK\_UPB}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17346}17346     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abd85e322cc75ba64d7042858b509c4a1}{BLOCK\_XPB}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17347}17347     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a9117cc2fea999a9b3679f39e9047744a}{BLOCK\_PBF}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17348}17348 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17349}17349     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17350}17350         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ae7897d9ae4bc1c0e272f50940f76b8d4}{IS\_MF\_AFEX}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17351}17351             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17352}17352 \textcolor{comment}{             * configure that AFEX and VLAN headers must be}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17353}17353 \textcolor{comment}{             * sent in AFEX mode}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17354}17354 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17355}17355             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af23df11b10fd88185f7c3083d494017e}{PBF\_REG\_HDRS\_AFTER\_BASIC}}, 0xE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17356}17356             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa6adba457eeda6360be26ac17613722b}{PBF\_REG\_MUST\_HAVE\_HDRS}}, 0xA);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17357}17357             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac6bfd6f54763e594eb4c3ae878172615}{PBF\_REG\_HDRS\_AFTER\_TAG\_0}}, 0x6);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17358}17358             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad04b3fc29fa922423e12e52ea60b5d8e}{PBF\_REG\_TAG\_ETHERTYPE\_0}}, 0x8926);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17359}17359             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac08a9b6d10a52a22eb87ceb66122b5e7}{PBF\_REG\_TAG\_LEN\_0}}, 0x4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17360}17360         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17361}17361             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af23df11b10fd88185f7c3083d494017e}{PBF\_REG\_HDRS\_AFTER\_BASIC}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17362}17362                    sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_abb4551aa4dfc0ae82e0ef5a89ad2c0b2}{path\_has\_ovlan}} ? 7 : 6);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17363}17363         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17364}17364     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17365}17365 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17366}17366     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a21e507ad7ce95d9121d29605a762c021}{SRC\_REG\_SOFT\_RST}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17367}17367 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17368}17368     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ad54d93c1b8978a1675806a4079ce1403}{BLOCK\_SRC}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17369}17369 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17370}17370     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17371}17371         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab4f7199752d994d6edddd12eac61204f}{SRC\_REG\_KEYSEARCH\_0}}, 0x63285672);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17372}17372         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a183af1c5414d821a48863abfa5d1790a}{SRC\_REG\_KEYSEARCH\_1}}, 0x24b8f2cc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17373}17373         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab2d8cc8338b7819c4031932a231e5ba1}{SRC\_REG\_KEYSEARCH\_2}}, 0x223aef9b);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17374}17374         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9c234a289ac5bb6ba086c6cbc2955816}{SRC\_REG\_KEYSEARCH\_3}}, 0x26001e3a);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17375}17375         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8aa2e1ee3c38fc2729e8b3b7b26dc7de}{SRC\_REG\_KEYSEARCH\_4}}, 0x7ae91116);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17376}17376         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a927ecb12c78123c1c2b0bdf4c8cf9b4b}{SRC\_REG\_KEYSEARCH\_5}}, 0x5ce5230b);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17377}17377         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9a6a1cc077e92f7c546a579094fd5aa5}{SRC\_REG\_KEYSEARCH\_6}}, 0x298d8adf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17378}17378         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a30583f9999739cad0a62c72c4d35b013}{SRC\_REG\_KEYSEARCH\_7}}, 0x6eb0ff09);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17379}17379         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a4da0437fa3a58f265fe5110abd6c8917}{SRC\_REG\_KEYSEARCH\_8}}, 0x1830f82f);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17380}17380         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ace27da675e5bedf9b781136e5130cb54}{SRC\_REG\_KEYSEARCH\_9}}, 0x01e46be7);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17381}17381     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17382}17382     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a21e507ad7ce95d9121d29605a762c021}{SRC\_REG\_SOFT\_RST}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17383}17383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17384}17384     \textcolor{keywordflow}{if} (\textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{unioncdu__context}{cdu\_context}}) != 1024) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17385}17385         \textcolor{comment}{/* we currently assume that a context is 1024 bytes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17386}17386         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}please adjust the size of cdu\_context(\%ld)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17387}17387               (\textcolor{keywordtype}{long})\textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{unioncdu__context}{cdu\_context}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17388}17388     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17389}17389 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17390}17390     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a01064cae36a690f58057add81df8ce9c}{BLOCK\_CDU}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17391}17391     val = (4 << 24) + (0 << 12) + 1024;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17392}17392     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a04547612dec5263d0a8b2917d334898b}{CDU\_REG\_CDU\_GLOBAL\_PARAMS}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17393}17393 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17394}17394     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a05656c0d45340d89dbb37bca31f07c02}{BLOCK\_CFC}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17395}17395 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17396}17396     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1121c4ab967e83169b1a97946b3b8438}{CFC\_REG\_INIT\_REG}}, 0x7FF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17397}17397     \textcolor{comment}{/* enable context validation interrupt from CFC */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17398}17398     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a84f5c0c38b2279d87bb0afc90bba6f71}{CFC\_REG\_CFC\_INT\_MASK}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17399}17399 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17400}17400     \textcolor{comment}{/* set the thresholds to prevent CFC/CDU race */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17401}17401     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7d0bb43f8e153c4a045f92cfe12d689}{CFC\_REG\_DEBUG0}}, 0x20020000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17402}17402     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13aafd1c0ae28eacc80febaeccf6c6a4b0c}{BLOCK\_HC}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17403}17403 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17404}17404     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc) \&\& \mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17405}17405         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa52281729f3a31db4f1095a4f27ce1bb}{IGU\_REG\_RESET\_MEMORIES}}, 0x36);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17406}17406     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17407}17407 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17408}17408     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a573217e9bd0167ae396b0f0f174f2aa3}{BLOCK\_IGU}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17409}17409     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abce999b29d4f037b48b9d47e7f17163f}{BLOCK\_MISC\_AEU}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17410}17410 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17411}17411     \textcolor{comment}{/* Reset PCIE errors for debug */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17412}17412     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, 0x2814, 0xffffffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17413}17413     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, 0x3820, 0xffffffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17414}17414 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17415}17415     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17416}17416         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a443a4ffe202b7987909db72a80a86c65}{PCICFG\_OFFSET}} + \mbox{\hyperlink{ecore__reg_8h_a3ba48002b9b16d8d45b87d5d64840025}{PXPCS\_TL\_CONTROL\_5}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17417}17417                (\mbox{\hyperlink{ecore__reg_8h_a400c267c0456d483cf3d96d94208cdcd}{PXPCS\_TL\_CONTROL\_5\_ERR\_UNSPPORT1}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17418}17418                 \mbox{\hyperlink{ecore__reg_8h_a779110f0e83a87f0a0b32202d94099b3}{PXPCS\_TL\_CONTROL\_5\_ERR\_UNSPPORT}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17419}17419         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a443a4ffe202b7987909db72a80a86c65}{PCICFG\_OFFSET}} + \mbox{\hyperlink{ecore__reg_8h_ae2c233a1cae41471643b7ea2581cc158}{PXPCS\_TL\_FUNC345\_STAT}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17420}17420                (\mbox{\hyperlink{ecore__reg_8h_a9e19201430f48cd58ac56ce22fb7686a}{PXPCS\_TL\_FUNC345\_STAT\_ERR\_UNSPPORT4}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17421}17421                 \mbox{\hyperlink{ecore__reg_8h_a7505f4a0b322953d8396b493f9714c8d}{PXPCS\_TL\_FUNC345\_STAT\_ERR\_UNSPPORT3}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17422}17422                 \mbox{\hyperlink{ecore__reg_8h_ad86078d8dc0f697aa66259698a61ec48}{PXPCS\_TL\_FUNC345\_STAT\_ERR\_UNSPPORT2}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17423}17423         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a443a4ffe202b7987909db72a80a86c65}{PCICFG\_OFFSET}} + \mbox{\hyperlink{ecore__reg_8h_a9a06870cfbbf706fdac9f9430bc6b401}{PXPCS\_TL\_FUNC678\_STAT}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17424}17424                (\mbox{\hyperlink{ecore__reg_8h_a4eddfbd155299586c6b5915aa3d0502c}{PXPCS\_TL\_FUNC678\_STAT\_ERR\_UNSPPORT7}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17425}17425                 \mbox{\hyperlink{ecore__reg_8h_a43aa5afecb79abd75b7ce59bcd119cae}{PXPCS\_TL\_FUNC678\_STAT\_ERR\_UNSPPORT6}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17426}17426                 \mbox{\hyperlink{ecore__reg_8h_a8043127b2a986373f4d761d6e3a77ffd}{PXPCS\_TL\_FUNC678\_STAT\_ERR\_UNSPPORT5}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17427}17427     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17428}17428 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17429}17429     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a361c175ad9267a5719199d34dc0194f3}{BLOCK\_NIG}}, \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a7684f3e8fa115ed5f8f43a89a38aafc8}{PHASE\_COMMON}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17430}17430 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17431}17431     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17432}17432         \textcolor{comment}{/* in E3 this done in per-\/port section */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17433}17433         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17434}17434             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ad56835f58b23551c33c633f15c842057}{NIG\_REG\_LLH\_MF\_MODE}}, \mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17435}17435     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17436}17436 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17437}17437     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17438}17438         \textcolor{comment}{/* not applicable for E2 (and above ...) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17439}17439         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_af0f833c4bfcbe066b2f581b9230d591e}{NIG\_REG\_LLH\_E1HOV\_MODE}}, \mbox{\hyperlink{bxe_8h_ac6f96bf386e9fc529b007d013928c561}{IS\_MF\_SD}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17440}17440     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17441}17441 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17442}17442     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17443}17443         DELAY(200000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17444}17444     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17445}17445 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17446}17446     \textcolor{comment}{/* finish CFC init */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17447}17447     val = \mbox{\hyperlink{bxe_8h_ad21cf35d4568bc89ebf783290163bfde}{reg\_poll}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7e6a9b440a8e3f9c65460403bcb5dcc3}{CFC\_REG\_LL\_INIT\_DONE}}, 1, 100, 10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17448}17448     \textcolor{keywordflow}{if} (val != 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17449}17449         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}CFC LL\_INIT failed val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17450}17450         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17451}17451     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17452}17452     val = \mbox{\hyperlink{bxe_8h_ad21cf35d4568bc89ebf783290163bfde}{reg\_poll}}(sc, \mbox{\hyperlink{ecore__reg_8h_a035b559e8a63496598327698876dfe93}{CFC\_REG\_AC\_INIT\_DONE}}, 1, 100, 10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17453}17453     \textcolor{keywordflow}{if} (val != 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17454}17454         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}CFC AC\_INIT failed val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17455}17455         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17456}17456     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17457}17457     val = \mbox{\hyperlink{bxe_8h_ad21cf35d4568bc89ebf783290163bfde}{reg\_poll}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab3b9a9e203523f150673c1ede2f2f979}{CFC\_REG\_CAM\_INIT\_DONE}}, 1, 100, 10);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17458}17458     \textcolor{keywordflow}{if} (val != 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17459}17459         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}CFC CAM\_INIT failed val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17460}17460         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17461}17461     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17462}17462     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7d0bb43f8e153c4a045f92cfe12d689}{CFC\_REG\_DEBUG0}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17463}17463 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17464}17464     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17465}17465         \textcolor{comment}{/* read NIG statistic to see if this is our first up since powerup */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17466}17466         \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8419324d0e4909ffa675dca9d6c18c9d}{NIG\_REG\_STAT2\_BRB\_OCTET}}, 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17467}17467         val = *\mbox{\hyperlink{bxe_8h_a5ce4bf2db974ead076c9ae29cdd9907b}{BXE\_SP}}(sc, wb\_data[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17468}17468 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17469}17469         \textcolor{comment}{/* do internal memory self test */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17470}17470         \textcolor{keywordflow}{if} ((val == 0) \&\& \mbox{\hyperlink{bxe_8c_af181e7c0cc2d066d64e7462f577386b3}{bxe\_int\_mem\_test}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17471}17471             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}internal mem self test failed val=0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17472}17472             \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17473}17473         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17474}17474     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17475}17475 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17476}17476     \mbox{\hyperlink{bxe_8c_a522e54e13119d99fbd2192b03d78fb79}{bxe\_setup\_fan\_failure\_detection}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17477}17477 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17478}17478     \textcolor{comment}{/* clear PXP2 attentions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17479}17479     \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0496140fe5ca7a16e1d55782de806880}{PXP2\_REG\_PXP2\_INT\_STS\_CLR\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17480}17480 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17481}17481     \mbox{\hyperlink{bxe_8c_aaa8b1c1e612be4d848378cdbd93666f9}{bxe\_enable\_blocks\_attention}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17482}17482 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17483}17483     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17484}17484         \mbox{\hyperlink{ecore__init_8h_a84a34abca95c9a311bf5f248738d10c3}{ecore\_enable\_blocks\_parity}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17485}17485     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17486}17486 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17487}17487     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17488}17488         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17489}17489             \mbox{\hyperlink{bxe_8c_a4df6abcf398e80938acca55680086781}{bxe\_common\_init\_phy}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17490}17490         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17491}17491     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17492}17492 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17493}17493     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17494}17494 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17495}17495 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17501}17501 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17502}\mbox{\hyperlink{bxe_8c_a554e8156b5e4e1dd4874d8f8e7c700b7}{17502}} \mbox{\hyperlink{bxe_8c_a554e8156b5e4e1dd4874d8f8e7c700b7}{bxe\_init\_hw\_common\_chip}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17503}17503 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17504}17504     \textcolor{keywordtype}{int} rc = \mbox{\hyperlink{bxe_8c_a150bbbcff688497647bd566b92f52772}{bxe\_init\_hw\_common}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17505}17505 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17506}17506     \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17507}17507         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}bxe\_init\_hw\_common failed rc=\%d\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17508}17508         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17509}17509     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17510}17510 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17511}17511     \textcolor{comment}{/* In E2 2-\/PORT mode, same ext phy is used for the two paths */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17512}17512     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17513}17513         \mbox{\hyperlink{bxe_8c_a4df6abcf398e80938acca55680086781}{bxe\_common\_init\_phy}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17514}17514     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17515}17515 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17516}17516     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17517}17517 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17518}17518 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17519}17519 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17520}\mbox{\hyperlink{bxe_8c_a008a29ad2e1da1668eab151f8c3023ee}{17520}} \mbox{\hyperlink{bxe_8c_a008a29ad2e1da1668eab151f8c3023ee}{bxe\_init\_hw\_port}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17521}17521 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17522}17522     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17523}17523     \textcolor{keywordtype}{int} init\_phase = port ? \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a1c7cc0e82e63f2df62630ae66680e339}{PHASE\_PORT1}} : \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409ab79cb24b35a7ee0861169ee962745eb7}{PHASE\_PORT0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17524}17524     uint32\_t low, high;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17525}17525     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17526}17526 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17527}17527     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}starting port init for port \%d\(\backslash\)n"{}}, port);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17528}17528 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17529}17529     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a806c07f7a1452151d7e9ecc5ccd55dca}{NIG\_REG\_MASK\_INTERRUPT\_PORT0}} + port*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17530}17530 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17531}17531     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a24c81c958913c17de919c3189ab47a04}{BLOCK\_MISC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17532}17532     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a0d349428ab298b8ce72419f2249e36a4}{BLOCK\_PXP}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17533}17533     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a11aae77dd00a239ff5db0a32d19aa33b}{BLOCK\_PXP2}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17534}17534 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17535}17535     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17536}17536 \textcolor{comment}{     * Timers bug workaround: disables the pf\_master bit in pglue at}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17537}17537 \textcolor{comment}{     * common phase, we need to enable it here before any dmae access are}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17538}17538 \textcolor{comment}{     * attempted. Therefore we manually added the enable-\/master to the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17539}17539 \textcolor{comment}{     * port phase (it also happens in the function phase)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17540}17540 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17541}17541     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17542}17542         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a477901a830dcfaa0d3891614100a568d}{PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17543}17543     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17544}17544 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17545}17545     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ab2803344fa2f154ab199f48cf1ee9307}{BLOCK\_ATC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17546}17546     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a7de4b0450c5d147c0386fe46c03c4eaa}{BLOCK\_DMAE}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17547}17547     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a9264cfdb2e13af4caf85329a0bf9ad5b}{BLOCK\_PGLUE\_B}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17548}17548     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a375632703f86050232f61b2097f6d78c}{BLOCK\_QM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17549}17549 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17550}17550     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13aaf2951101c0a3c26a730f5658ec24419}{BLOCK\_TCM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17551}17551     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abc01480ebcab309b85b835d7fb789a10}{BLOCK\_UCM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17552}17552     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a268c9c8269508c38d71b4433c51b25e4}{BLOCK\_CCM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17553}17553     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a6c3cf7e8d680940502c6360cc8f20479}{BLOCK\_XCM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17554}17554 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17555}17555     \textcolor{comment}{/* QM cid (connection) count */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17556}17556     \mbox{\hyperlink{ecore__init__ops_8h_aee211e390cdcf127c8141c3a0e6ada6e}{ecore\_qm\_init\_cid\_count}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a95756baba748982379d79c2a5cdb0518}{qm\_cid\_count}}, \mbox{\hyperlink{ecore__init_8h_a5c63c1522f886037d84058d441dd449f}{INITOP\_SET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17557}17557 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17558}17558     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17559}17559         \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a2b11a2adab2c1b033fce2ae5efa85336}{BLOCK\_TM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17560}17560         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a093ebcd87d6990eead231ca678edbced}{TM\_REG\_LIN0\_SCAN\_TIME}} + port*4, 20);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17561}17561         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a713ead51fdd6dfc2ab0803706750a8e3}{TM\_REG\_LIN0\_MAX\_ACTIVE\_CID}} + port*4, 31);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17562}17562     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17563}17563 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17564}17564     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a786d321f8b0183f7ff9926d19fec5ac9}{BLOCK\_DORQ}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17565}17565 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17566}17566     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a4f06af99f86b23872fcbbc7cad0daf0a}{BLOCK\_BRB1}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17567}17567 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17568}17568     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc) || \mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17569}17569         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17570}17570             low = (\mbox{\hyperlink{bxe_8h_a86960b7f8726378aa40d47099e02bd63}{BXE\_ONE\_PORT}}(sc) ? 160 : 246);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17571}17571         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}} > 4096) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17572}17572             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a86960b7f8726378aa40d47099e02bd63}{BXE\_ONE\_PORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17573}17573                 low = 160;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17574}17574             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17575}17575                 val = sc-\/>\mbox{\hyperlink{structbxe__softc_aef93a72826c1cd4ac79c215f6eeedfce}{mtu}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17576}17576                 \textcolor{comment}{/* (24*1024 + val*4)/256 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17577}17577                 low = (96 + (val / 64) + ((val \% 64) ? 1 : 0));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17578}17578             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17579}17579         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17580}17580             low = (\mbox{\hyperlink{bxe_8h_a86960b7f8726378aa40d47099e02bd63}{BXE\_ONE\_PORT}}(sc) ? 80 : 160);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17581}17581         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17582}17582         high = (low + 56); \textcolor{comment}{/* 14*1024/256 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17583}17583         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3214977a534e217923c6917673c5892d}{BRB1\_REG\_PAUSE\_LOW\_THRESHOLD\_0}} + port*4, low);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17584}17584         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae72c1468b33576899c0571ab1b48657f}{BRB1\_REG\_PAUSE\_HIGH\_THRESHOLD\_0}} + port*4, high);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17585}17585     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17586}17586 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17587}17587     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17588}17588         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17589}17589                \mbox{\hyperlink{ecore__reg_8h_aa5e68ebf0ba24f5cbee021b1b20f5ec2}{BRB1\_REG\_MAC\_GUARANTIED\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17590}17590                \mbox{\hyperlink{ecore__reg_8h_a79ca13f20d0fb012d161962f523ec847}{BRB1\_REG\_MAC\_GUARANTIED\_0}}, 40);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17591}17591     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17592}17592 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17593}17593     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13af78f6eccbbe0f7ba23cfb8ce3338bb72}{BLOCK\_PRS}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17594}17594     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17595}17595         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ae7897d9ae4bc1c0e272f50940f76b8d4}{IS\_MF\_AFEX}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17596}17596             \textcolor{comment}{/* configure headers for AFEX mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17597}17597             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17598}17598                    \mbox{\hyperlink{ecore__reg_8h_ade54937b86527141d02a163639452106}{PRS\_REG\_HDRS\_AFTER\_BASIC\_PORT\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17599}17599                    \mbox{\hyperlink{ecore__reg_8h_a029382b0b087521681af2dabbd1582e4}{PRS\_REG\_HDRS\_AFTER\_BASIC\_PORT\_0}}, 0xE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17600}17600             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17601}17601                    \mbox{\hyperlink{ecore__reg_8h_a1502a649b68d0cf4606e3bc872c622e5}{PRS\_REG\_HDRS\_AFTER\_TAG\_0\_PORT\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17602}17602                    \mbox{\hyperlink{ecore__reg_8h_a861cd7aa2d8d2ec9f8ce35fd40981177}{PRS\_REG\_HDRS\_AFTER\_TAG\_0\_PORT\_0}}, 0x6);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17603}17603             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17604}17604                    \mbox{\hyperlink{ecore__reg_8h_a01751c7dd8c7e1da80f0a45caa457bf2}{PRS\_REG\_MUST\_HAVE\_HDRS\_PORT\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17605}17605                    \mbox{\hyperlink{ecore__reg_8h_a4882576a1e886e4d7f85510ba2df5bf1}{PRS\_REG\_MUST\_HAVE\_HDRS\_PORT\_0}}, 0xA);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17606}17606         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17607}17607             \textcolor{comment}{/* Ovlan exists only if we are in multi-\/function +}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17608}17608 \textcolor{comment}{             * switch-\/dependent mode, in switch-\/independent there}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17609}17609 \textcolor{comment}{             * is no ovlan headers}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17610}17610 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17611}17611             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17612}17612                    \mbox{\hyperlink{ecore__reg_8h_ade54937b86527141d02a163639452106}{PRS\_REG\_HDRS\_AFTER\_BASIC\_PORT\_1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17613}17613                    \mbox{\hyperlink{ecore__reg_8h_a029382b0b087521681af2dabbd1582e4}{PRS\_REG\_HDRS\_AFTER\_BASIC\_PORT\_0}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17614}17614                    (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_abb4551aa4dfc0ae82e0ef5a89ad2c0b2}{path\_has\_ovlan}} ? 7 : 6));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17615}17615         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17616}17616     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17617}17617 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17618}17618     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a97d8c0fe7877f506dc6b3ce34b53952e}{BLOCK\_TSDM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17619}17619     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a58c6f47f3e1b45018812cb685e7c291d}{BLOCK\_CSDM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17620}17620     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a92976abedce3cb78ebf70619d60c90eb}{BLOCK\_USDM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17621}17621     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a1afd92f97e85655fe22c2e0c4bb4d760}{BLOCK\_XSDM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17622}17622 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17623}17623     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13acb7e9d32c57b5b0f9d24fe973e87d8b7}{BLOCK\_TSEM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17624}17624     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ad1620a01b2698b83169fde6fac772527}{BLOCK\_USEM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17625}17625     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13acd18e18c2b5cecd8d11297350f75d545}{BLOCK\_CSEM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17626}17626     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a82f33613a03c3aa12de96f41c8b77af5}{BLOCK\_XSEM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17627}17627 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17628}17628     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ab65d1cd17679dea6002aa15f745a08ad}{BLOCK\_UPB}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17629}17629     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abd85e322cc75ba64d7042858b509c4a1}{BLOCK\_XPB}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17630}17630 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17631}17631     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a9117cc2fea999a9b3679f39e9047744a}{BLOCK\_PBF}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17632}17632 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17633}17633     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17634}17634         \textcolor{comment}{/* configure PBF to work without PAUSE mtu 9000 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17635}17635         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a5ac19ed24c479413e63176ea2d8c0e3f}{PBF\_REG\_P0\_PAUSE\_ENABLE}} + port*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17636}17636 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17637}17637         \textcolor{comment}{/* update threshold */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17638}17638         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aaa011344448a979cf0b1b3cba8fe313a}{PBF\_REG\_P0\_ARB\_THRSH}} + port*4, (9040/16));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17639}17639         \textcolor{comment}{/* update init credit */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17640}17640         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aefee0b2f11728b546bcec7d578b28cca}{PBF\_REG\_P0\_INIT\_CRD}} + port*4, (9040/16) + 553 -\/ 22);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17641}17641 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17642}17642         \textcolor{comment}{/* probe changes */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17643}17643         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a025ee8a00dadb788ece577d4876185f1}{PBF\_REG\_INIT\_P0}} + port*4, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17644}17644         DELAY(50);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17645}17645         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a025ee8a00dadb788ece577d4876185f1}{PBF\_REG\_INIT\_P0}} + port*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17646}17646     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17647}17647 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17648}17648     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a7a2ea5f298c9398408f94e76e28c4c36}{CNIC\_SUPPORT}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17649}17649         \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ad54d93c1b8978a1675806a4079ce1403}{BLOCK\_SRC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17650}17650     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17651}17651 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17652}17652     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a01064cae36a690f58057add81df8ce9c}{BLOCK\_CDU}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17653}17653     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a05656c0d45340d89dbb37bca31f07c02}{BLOCK\_CFC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17654}17654 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17655}17655     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17656}17656         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1a880b547de30d4c1acf8a13c6527d18}{HC\_REG\_LEADING\_EDGE\_0}} + port*8, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17657}17657         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a5e78f09d9fd794c58b65669a22779043}{HC\_REG\_TRAILING\_EDGE\_0}} + port*8, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17658}17658     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17659}17659     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13aafd1c0ae28eacc80febaeccf6c6a4b0c}{BLOCK\_HC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17660}17660 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17661}17661     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a573217e9bd0167ae396b0f0f174f2aa3}{BLOCK\_IGU}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17662}17662 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17663}17663     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abce999b29d4f037b48b9d47e7f17163f}{BLOCK\_MISC\_AEU}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17664}17664     \textcolor{comment}{/* init aeu\_mask\_attn\_func\_0/1:}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17665}17665 \textcolor{comment}{     *  -\/ SF mode: bits 3-\/7 are masked. only bits 0-\/2 are in use}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17666}17666 \textcolor{comment}{     *  -\/ MF mode: bit 3 is masked. bits 0-\/2 are in use as in SF}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17667}17667 \textcolor{comment}{     *             bits 4-\/7 are used for "{}per vn group attention"{} */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17668}17668     val = \mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc) ? 0xF7 : 0x7;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17669}17669     \textcolor{comment}{/* Enable DCBX attention for all but E1 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17670}17670     val |= \mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc) ? 0 : 0x10;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17671}17671     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab4f826eb27e815cd197a08618e789f7b}{MISC\_REG\_AEU\_MASK\_ATTN\_FUNC\_0}} + port*4, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17672}17672 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17673}17673     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a361c175ad9267a5719199d34dc0194f3}{BLOCK\_NIG}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17674}17674 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17675}17675     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17676}17676         \textcolor{comment}{/* Bit-\/map indicating which L2 hdrs may appear after the}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17677}17677 \textcolor{comment}{         * basic Ethernet header}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17678}17678 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17679}17679         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ae7897d9ae4bc1c0e272f50940f76b8d4}{IS\_MF\_AFEX}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17680}17680             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17681}17681                    \mbox{\hyperlink{ecore__reg_8h_a3808be7a3a539f3da7ff38ec7bb8c92d}{NIG\_REG\_P1\_HDRS\_AFTER\_BASIC}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17682}17682                    \mbox{\hyperlink{ecore__reg_8h_ab40356c9c25883d3e8590d9da414cdf1}{NIG\_REG\_P0\_HDRS\_AFTER\_BASIC}}, 0xE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17683}17683         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17684}17684             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17685}17685                    \mbox{\hyperlink{ecore__reg_8h_a3808be7a3a539f3da7ff38ec7bb8c92d}{NIG\_REG\_P1\_HDRS\_AFTER\_BASIC}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17686}17686                    \mbox{\hyperlink{ecore__reg_8h_ab40356c9c25883d3e8590d9da414cdf1}{NIG\_REG\_P0\_HDRS\_AFTER\_BASIC}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17687}17687                    \mbox{\hyperlink{bxe_8h_ac6f96bf386e9fc529b007d013928c561}{IS\_MF\_SD}}(sc) ? 7 : 6);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17688}17688         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17689}17689 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17690}17690         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17691}17691             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17692}17692                    \mbox{\hyperlink{ecore__reg_8h_ab20a375e35d2574bc09404458b032d75}{NIG\_REG\_LLH1\_MF\_MODE}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17693}17693                    \mbox{\hyperlink{ecore__reg_8h_ad56835f58b23551c33c633f15c842057}{NIG\_REG\_LLH\_MF\_MODE}}, \mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17694}17694         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17695}17695     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17696}17696     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17697}17697         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a56258abcb3ad407b5deecbb414309da3}{NIG\_REG\_XGXS\_SERDES0\_MODE\_SEL}} + port*4, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17698}17698     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17699}17699 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17700}17700     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17701}17701         \textcolor{comment}{/* 0x2 disable mf\_ov, 0x1 enable */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17702}17702         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a9ecd9d0ad72de98b0859a00ecb5d20f9}{NIG\_REG\_LLH0\_BRB1\_DRV\_MASK\_MF}} + port*4,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17703}17703                (\mbox{\hyperlink{bxe_8h_ac6f96bf386e9fc529b007d013928c561}{IS\_MF\_SD}}(sc) ? 0x1 : 0x2));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17704}17704 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17705}17705         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17706}17706             val = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17707}17707             \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_add5b856681e4acda056e1e532464afeb}{mf\_info}}.\mbox{\hyperlink{structbxe__mf__info_a33d0085198d9eb9b2029a29075d2a4d0}{mf\_mode}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17708}17708             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a06c32c448971dc058e4e66ab49852014}{MULTI\_FUNCTION\_SD}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17709}17709                 val = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17710}17710                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17711}17711             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316a2f41465e78a44a916f834f175638c80a}{MULTI\_FUNCTION\_SI}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17712}17712             \textcolor{keywordflow}{case} \mbox{\hyperlink{ecore__hsi_8h_a598b3758a496e5ef82a6a0aa1cff5316ab41d9d078d4ad15e3808cf22f3e05821}{MULTI\_FUNCTION\_AFEX}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17713}17713                 val = 2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17714}17714                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17715}17715             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17716}17716 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17717}17717             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) ? \mbox{\hyperlink{ecore__reg_8h_a34df8c2d56508452c41abb52ae3aac6f}{NIG\_REG\_LLH1\_CLS\_TYPE}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17718}17718                         \mbox{\hyperlink{ecore__reg_8h_a1c3b0fa4a19e5847dfb63585ea91803d}{NIG\_REG\_LLH0\_CLS\_TYPE}}), val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17719}17719         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17720}17720         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae9e90448d77f435e2da17c0bc9064d7f}{NIG\_REG\_LLFC\_ENABLE\_0}} + port*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17721}17721         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a070d3b84ff7f81bcc523e0a69bb7624c}{NIG\_REG\_LLFC\_OUT\_EN\_0}} + port*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17722}17722         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8d6fa15eeb6cd425952712a4faa5fe26}{NIG\_REG\_PAUSE\_ENABLE\_0}} + port*4, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17723}17723     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17724}17724 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17725}17725     \textcolor{comment}{/* If SPIO5 is set to generate interrupts, enable it for this port */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17726}17726     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aea6a81518722b188f6dee5ba6b90d9f7}{MISC\_REG\_SPIO\_EVENT\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17727}17727     \textcolor{keywordflow}{if} (val \& \mbox{\hyperlink{ecore__reg_8h_abf9d38c632a5d495f68da837ad0b12bd}{MISC\_SPIO\_SPIO5}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17728}17728         uint32\_t \mbox{\hyperlink{structreg__addr}{reg\_addr}} = (port ? \mbox{\hyperlink{ecore__reg_8h_a279a27ade0af5030215b6afd1b9d4c9c}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_1\_OUT\_0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17729}17729                                     \mbox{\hyperlink{ecore__reg_8h_aff48db9d459a874195704e419d017636}{MISC\_REG\_AEU\_ENABLE1\_FUNC\_0\_OUT\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17730}17730         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{structreg__addr}{reg\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17731}17731         val |= \mbox{\hyperlink{ecore__reg_8h_ab2e1fef03140f2cfa471fd5b3c7b85c7}{AEU\_INPUTS\_ATTN\_BITS\_SPIO5}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17732}17732         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{structreg__addr}{reg\_addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17733}17733     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17734}17734 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17735}17735     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17736}17736 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17737}17737 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17738}17738 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17739}\mbox{\hyperlink{bxe_8c_adc2f6589c5e285aa3321903ea16f563b}{17739}} \mbox{\hyperlink{bxe_8c_adc2f6589c5e285aa3321903ea16f563b}{bxe\_flr\_clnup\_reg\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17740}17740                        uint32\_t         reg,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17741}17741                        uint32\_t         expected,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17742}17742                        uint32\_t         poll\_count)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17743}17743 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17744}17744     uint32\_t cur\_cnt = poll\_count;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17745}17745     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17746}17746 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17747}17747     \textcolor{keywordflow}{while} ((val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, reg)) != expected \&\& cur\_cnt-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17748}17748         DELAY(\mbox{\hyperlink{bxe_8c_ada41c66713fe0642ac2b58eb295ff274}{FLR\_WAIT\_INTERVAL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17749}17749     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17750}17750 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17751}17751     \textcolor{keywordflow}{return} (val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17752}17752 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17753}17753 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17754}17754 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17755}\mbox{\hyperlink{bxe_8c_a366ed500c8997b7378e9326df85a5bea}{17755}} \mbox{\hyperlink{bxe_8c_a366ed500c8997b7378e9326df85a5bea}{bxe\_flr\_clnup\_poll\_hw\_counter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17756}17756                               uint32\_t         reg,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17757}17757                               \textcolor{keywordtype}{char}             *msg,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17758}17758                               uint32\_t         poll\_cnt)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17759}17759 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17760}17760     uint32\_t val = \mbox{\hyperlink{bxe_8c_adc2f6589c5e285aa3321903ea16f563b}{bxe\_flr\_clnup\_reg\_poll}}(sc, reg, 0, poll\_cnt);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17761}17761 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17762}17762     \textcolor{keywordflow}{if} (val != 0) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17763}17763         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}\%s usage count=\%d\(\backslash\)n"{}}, msg, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17764}17764         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17765}17765     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17766}17766 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17767}17767     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17768}17768 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17769}17769 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17770}17770 \textcolor{comment}{/* Common routines with VF FLR cleanup */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17771}17771 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17772}\mbox{\hyperlink{bxe_8c_a390d7493159b51070109dfa90f678abf}{17772}} \mbox{\hyperlink{bxe_8c_a390d7493159b51070109dfa90f678abf}{bxe\_flr\_clnup\_poll\_count}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17773}17773 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17774}17774     \textcolor{comment}{/* adjust polling timeout */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17775}17775     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a1b2ebcb5e39c8833b57e1d70aa728757}{CHIP\_REV\_IS\_EMUL}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17776}17776         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_ace9fcc5fdedd8e61818f47e3aa552659}{FLR\_POLL\_CNT}} * 2000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17777}17777     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17778}17778 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17779}17779     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_aa74010abe4e9d6f15f3425915a3f1e22}{CHIP\_REV\_IS\_FPGA}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17780}17780         \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_ace9fcc5fdedd8e61818f47e3aa552659}{FLR\_POLL\_CNT}} * 120);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17781}17781     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17782}17782 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17783}17783     \textcolor{keywordflow}{return} (\mbox{\hyperlink{bxe_8c_ace9fcc5fdedd8e61818f47e3aa552659}{FLR\_POLL\_CNT}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17784}17784 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17785}17785 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17786}17786 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17787}\mbox{\hyperlink{bxe_8c_a22997aabda163eccb6d52d0559b23bda}{17787}} \mbox{\hyperlink{bxe_8c_a22997aabda163eccb6d52d0559b23bda}{bxe\_poll\_hw\_usage\_counters}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17788}17788                            uint32\_t         poll\_cnt)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17789}17789 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17790}17790     \textcolor{comment}{/* wait for CFC PF usage-\/counter to zero (includes all the VFs) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17791}17791     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a366ed500c8997b7378e9326df85a5bea}{bxe\_flr\_clnup\_poll\_hw\_counter}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17792}17792                                       \mbox{\hyperlink{ecore__reg_8h_a262b619ce0996da751b847914cc7d535}{CFC\_REG\_NUM\_LCIDS\_INSIDE\_PF}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17793}17793                                       \textcolor{stringliteral}{"{}CFC PF usage counter timed out"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17794}17794                                       poll\_cnt)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17795}17795         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17796}17796     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17797}17797 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17798}17798     \textcolor{comment}{/* Wait for DQ PF usage-\/counter to zero (until DQ cleanup) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17799}17799     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a366ed500c8997b7378e9326df85a5bea}{bxe\_flr\_clnup\_poll\_hw\_counter}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17800}17800                                       \mbox{\hyperlink{ecore__reg_8h_af3ee12a39dc0569786eb40d93f1576d6}{DORQ\_REG\_PF\_USAGE\_CNT}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17801}17801                                       \textcolor{stringliteral}{"{}DQ PF usage counter timed out"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17802}17802                                       poll\_cnt)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17803}17803         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17804}17804     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17805}17805 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17806}17806     \textcolor{comment}{/* Wait for QM PF usage-\/counter to zero (until DQ cleanup) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17807}17807     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a366ed500c8997b7378e9326df85a5bea}{bxe\_flr\_clnup\_poll\_hw\_counter}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17808}17808                                       \mbox{\hyperlink{ecore__reg_8h_acf962d4903a4c5a258172bbd3017b5a7}{QM\_REG\_PF\_USG\_CNT\_0}} + 4*\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17809}17809                                       \textcolor{stringliteral}{"{}QM PF usage counter timed out"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17810}17810                                       poll\_cnt)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17811}17811         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17812}17812     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17813}17813 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17814}17814     \textcolor{comment}{/* Wait for Timer PF usage-\/counters to zero (until DQ cleanup) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17815}17815     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a366ed500c8997b7378e9326df85a5bea}{bxe\_flr\_clnup\_poll\_hw\_counter}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17816}17816                                       \mbox{\hyperlink{ecore__reg_8h_a4512a41b8d0e0ee05d0e7678de961b1f}{TM\_REG\_LIN0\_VNIC\_UC}} + 4*\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17817}17817                                       \textcolor{stringliteral}{"{}Timers VNIC usage counter timed out"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17818}17818                                       poll\_cnt)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17819}17819         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17820}17820     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17821}17821 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17822}17822     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a366ed500c8997b7378e9326df85a5bea}{bxe\_flr\_clnup\_poll\_hw\_counter}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17823}17823                                       \mbox{\hyperlink{ecore__reg_8h_a0c42fd0b2190a8c6834b8a2ecf28fbe0}{TM\_REG\_LIN0\_NUM\_SCANS}} + 4*\mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17824}17824                                       \textcolor{stringliteral}{"{}Timers NUM\_SCANS usage counter timed out"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17825}17825                                       poll\_cnt)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17826}17826         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17827}17827     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17828}17828 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17829}17829     \textcolor{comment}{/* Wait DMAE PF usage counter to zero */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17830}17830     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a366ed500c8997b7378e9326df85a5bea}{bxe\_flr\_clnup\_poll\_hw\_counter}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17831}17831                                       \mbox{\hyperlink{bxe_8h_a7073b85751b1558e9b7d0a5198d6e0d0}{dmae\_reg\_go\_c}}[\mbox{\hyperlink{bxe_8h_ad95e93180e4db5383ab03e00237ea93b}{INIT\_DMAE\_C}}(sc)],}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17832}17832                                       \textcolor{stringliteral}{"{}DMAE dommand register timed out"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17833}17833                                       poll\_cnt)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17834}17834         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17835}17835     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17836}17836 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17837}17837     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17838}17838 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17839}17839 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17840}\mbox{\hyperlink{bxe_8c_a6d4bc221200075404519653dc71bcf45}{17840}} \textcolor{preprocessor}{\#define OP\_GEN\_PARAM(param)                                            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17841}17841 \textcolor{preprocessor}{    (((param) << SDM\_OP\_GEN\_COMP\_PARAM\_SHIFT) \& SDM\_OP\_GEN\_COMP\_PARAM)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17842}\mbox{\hyperlink{bxe_8c_a551e192773acffc19c4bca9bb031f9ea}{17842}} \textcolor{preprocessor}{\#define OP\_GEN\_TYPE(type)                                           \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17843}17843 \textcolor{preprocessor}{    (((type) << SDM\_OP\_GEN\_COMP\_TYPE\_SHIFT) \& SDM\_OP\_GEN\_COMP\_TYPE)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17844}\mbox{\hyperlink{bxe_8c_a7c042411e22e4c2816c1676d000e4545}{17844}} \textcolor{preprocessor}{\#define OP\_GEN\_AGG\_VECT(index)                                             \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17845}17845 \textcolor{preprocessor}{    (((index) << SDM\_OP\_GEN\_AGG\_VECT\_IDX\_SHIFT) \& SDM\_OP\_GEN\_AGG\_VECT\_IDX)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17846}17846 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17847}17847 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17848}\mbox{\hyperlink{bxe_8c_a2c9f1317560d763d5327934b80921c48}{17848}} \mbox{\hyperlink{bxe_8c_a2c9f1317560d763d5327934b80921c48}{bxe\_send\_final\_clnup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17849}17849                      uint8\_t          clnup\_func,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17850}17850                      uint32\_t         poll\_cnt)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17851}17851 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17852}17852     uint32\_t op\_gen\_command = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17853}17853     uint32\_t comp\_addr = (\mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17854}17854                           \mbox{\hyperlink{ecore__fw__defs_8h_ab10a5a7d01307eb71f678e0a7a54c059}{CSTORM\_FINAL\_CLEANUP\_COMPLETE\_OFFSET}}(clnup\_func));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17855}17855     \textcolor{keywordtype}{int} ret = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17856}17856 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17857}17857     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, comp\_addr)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17858}17858         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Cleanup complete was not 0 before sending\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17859}17859         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17860}17860     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17861}17861 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17862}17862     op\_gen\_command |= \mbox{\hyperlink{bxe_8c_a6d4bc221200075404519653dc71bcf45}{OP\_GEN\_PARAM}}(\mbox{\hyperlink{ecore__fw__defs_8h_afc4d0111d4687ad941aae2fead808198}{XSTORM\_AGG\_INT\_FINAL\_CLEANUP\_INDEX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17863}17863     op\_gen\_command |= \mbox{\hyperlink{bxe_8c_a551e192773acffc19c4bca9bb031f9ea}{OP\_GEN\_TYPE}}(\mbox{\hyperlink{ecore__fw__defs_8h_a1468313fbcb821ca0fbd99d00140c8f5}{XSTORM\_AGG\_INT\_FINAL\_CLEANUP\_COMP\_TYPE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17864}17864     op\_gen\_command |= \mbox{\hyperlink{bxe_8c_a7c042411e22e4c2816c1676d000e4545}{OP\_GEN\_AGG\_VECT}}(clnup\_func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17865}17865     op\_gen\_command |= 1 << \mbox{\hyperlink{ecore__hsi_8h_a91869c69dfbdd0d954cc5433d7f3ddac}{SDM\_OP\_GEN\_AGG\_VECT\_IDX\_VALID\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17866}17866 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17867}17867     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}sending FW Final cleanup\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17868}17868     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a94e3b1d4bc29bc80c5fcf262345bfd6e}{XSDM\_REG\_OPERATION\_GEN}}, op\_gen\_command);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17869}17869 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17870}17870     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_adc2f6589c5e285aa3321903ea16f563b}{bxe\_flr\_clnup\_reg\_poll}}(sc, comp\_addr, 1, poll\_cnt) != 1) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17871}17871         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FW final cleanup did not succeed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17872}17872         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}At timeout completion address contained \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17873}17873               (\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, comp\_addr)));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17874}17874         \mbox{\hyperlink{bxe_8h_ace0469b96f587d9679d0c110924d91a9}{bxe\_panic}}(sc, (\textcolor{stringliteral}{"{}FLR cleanup failed\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17875}17875         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17876}17876     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17877}17877 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17878}17878     \textcolor{comment}{/* Zero completion for nxt FLR */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17879}17879     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, comp\_addr, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17880}17880 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17881}17881     \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17882}17882 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17883}17883 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17884}17884 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17885}\mbox{\hyperlink{bxe_8c_ae41981e6eaf6934445cc078a916f4f7a}{17885}} \mbox{\hyperlink{bxe_8c_ae41981e6eaf6934445cc078a916f4f7a}{bxe\_pbf\_pN\_buf\_flushed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}       *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17886}17886                        \textcolor{keyword}{struct} \mbox{\hyperlink{structpbf__pN__buf__regs}{pbf\_pN\_buf\_regs}} *regs,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17887}17887                        uint32\_t               poll\_count)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17888}17888 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17889}17889     uint32\_t init\_crd, crd, crd\_start, crd\_freed, crd\_freed\_start;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17890}17890     uint32\_t cur\_cnt = poll\_count;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17891}17891 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17892}17892     crd\_freed = crd\_freed\_start = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_ab520bad2dd9d3196ebc2a4720a98dc5e}{crd\_freed}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17893}17893     crd = crd\_start = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_a0a2cc3edebc82f0230b0eb77115810f7}{crd}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17894}17894     init\_crd = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_a36f2ebecbc9d22794a9c6e89f22e8750}{init\_crd}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17895}17895 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17896}17896     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}INIT CREDIT[\%d] : \%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{pN}}, init\_crd);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17897}17897     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}CREDIT[\%d]      : s:\%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{pN}}, crd);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17898}17898     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}CREDIT\_FREED[\%d]: s:\%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{pN}}, crd\_freed);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17899}17899 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17900}17900     \textcolor{keywordflow}{while} ((crd != init\_crd) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17901}17901            ((uint32\_t)((int32\_t)crd\_freed -\/ (int32\_t)crd\_freed\_start) <}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17902}17902             (init\_crd -\/ crd\_start))) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17903}17903         \textcolor{keywordflow}{if} (cur\_cnt-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17904}17904             DELAY(\mbox{\hyperlink{bxe_8c_ada41c66713fe0642ac2b58eb295ff274}{FLR\_WAIT\_INTERVAL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17905}17905             crd = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_a0a2cc3edebc82f0230b0eb77115810f7}{crd}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17906}17906             crd\_freed = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_ab520bad2dd9d3196ebc2a4720a98dc5e}{crd\_freed}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17907}17907         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17908}17908             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PBF tx buffer[\%d] timed out\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{pN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17909}17909             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}CREDIT[\%d]      : c:\%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{pN}}, crd);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17910}17910             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}CREDIT\_FREED[\%d]: c:\%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{pN}}, crd\_freed);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17911}17911             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17912}17912         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17913}17913     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17914}17914 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17915}17915     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Waited \%d*\%d usec for PBF tx buffer[\%d]\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17916}17916           poll\_count-\/cur\_cnt, \mbox{\hyperlink{bxe_8c_ada41c66713fe0642ac2b58eb295ff274}{FLR\_WAIT\_INTERVAL}}, regs-\/>\mbox{\hyperlink{structpbf__pN__buf__regs_addd3b0326eaf894c30339bef8055b87e}{pN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17917}17917 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17918}17918 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17919}17919 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17920}\mbox{\hyperlink{bxe_8c_a0b8a039e82932c14298a1a86ed4c8309}{17920}} \mbox{\hyperlink{bxe_8c_a0b8a039e82932c14298a1a86ed4c8309}{bxe\_pbf\_pN\_cmd\_flushed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}}       *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17921}17921                        \textcolor{keyword}{struct} \mbox{\hyperlink{structpbf__pN__cmd__regs}{pbf\_pN\_cmd\_regs}} *regs,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17922}17922                        uint32\_t               poll\_count)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17923}17923 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17924}17924     uint32\_t occup, to\_free, freed, freed\_start;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17925}17925     uint32\_t cur\_cnt = poll\_count;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17926}17926 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17927}17927     occup = to\_free = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_a4a1d8cec6aeac1714d064daa0c37a643}{lines\_occup}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17928}17928     freed = freed\_start = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_ab0d9d726ca4ca9edf9eceb7a85f6c2c0}{lines\_freed}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17929}17929 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17930}17930     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}OCCUPANCY[\%d]   : s:\%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_aa006545286818a4f990a2254b7217ac5}{pN}}, occup);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17931}17931     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}LINES\_FREED[\%d] : s:\%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_aa006545286818a4f990a2254b7217ac5}{pN}}, freed);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17932}17932 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17933}17933     \textcolor{keywordflow}{while} (occup \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17934}17934            ((uint32\_t)((int32\_t)freed -\/ (int32\_t)freed\_start) < to\_free)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17935}17935         \textcolor{keywordflow}{if} (cur\_cnt-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17936}17936             DELAY(\mbox{\hyperlink{bxe_8c_ada41c66713fe0642ac2b58eb295ff274}{FLR\_WAIT\_INTERVAL}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17937}17937             occup = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_a4a1d8cec6aeac1714d064daa0c37a643}{lines\_occup}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17938}17938             freed = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_ab0d9d726ca4ca9edf9eceb7a85f6c2c0}{lines\_freed}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17939}17939         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17940}17940             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PBF cmd queue[\%d] timed out\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_aa006545286818a4f990a2254b7217ac5}{pN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17941}17941             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}OCCUPANCY[\%d]   : s:\%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_aa006545286818a4f990a2254b7217ac5}{pN}}, occup);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17942}17942             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}LINES\_FREED[\%d] : s:\%x\(\backslash\)n"{}}, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_aa006545286818a4f990a2254b7217ac5}{pN}}, freed);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17943}17943             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17944}17944         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17945}17945     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17946}17946 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17947}17947     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Waited \%d*\%d usec for PBF cmd queue[\%d]\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17948}17948           poll\_count -\/ cur\_cnt, \mbox{\hyperlink{bxe_8c_ada41c66713fe0642ac2b58eb295ff274}{FLR\_WAIT\_INTERVAL}}, regs-\/>\mbox{\hyperlink{structpbf__pN__cmd__regs_aa006545286818a4f990a2254b7217ac5}{pN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17949}17949 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17950}17950 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17951}17951 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17952}\mbox{\hyperlink{bxe_8c_ad0010c02b0820a36ec0eadaecbc55ca1}{17952}} \mbox{\hyperlink{bxe_8c_ad0010c02b0820a36ec0eadaecbc55ca1}{bxe\_tx\_hw\_flushed}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, uint32\_t poll\_count)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17953}17953 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17954}17954     \textcolor{keyword}{struct }\mbox{\hyperlink{structpbf__pN__cmd__regs}{pbf\_pN\_cmd\_regs}} cmd\_regs[] = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17955}17955         \{0, (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17956}17956             \mbox{\hyperlink{ecore__reg_8h_ab07def491c669dabadee8b3838a60d11}{PBF\_REG\_TQ\_OCCUPANCY\_Q0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17957}17957             \mbox{\hyperlink{ecore__reg_8h_a7ae7e0fc79548e1fd1b74c35eab9831a}{PBF\_REG\_P0\_TQ\_OCCUPANCY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17958}17958             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17959}17959             \mbox{\hyperlink{ecore__reg_8h_a9d41d9723ee66ac92f9f1724c65553bc}{PBF\_REG\_TQ\_LINES\_FREED\_CNT\_Q0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17960}17960             \mbox{\hyperlink{ecore__reg_8h_ab76c74bb4d43d570728fcad9a9cb1d02}{PBF\_REG\_P0\_TQ\_LINES\_FREED\_CNT}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17961}17961         \{1, (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17962}17962             \mbox{\hyperlink{ecore__reg_8h_a61d7229a0f13c676ce03a55f47b27b35}{PBF\_REG\_TQ\_OCCUPANCY\_Q1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17963}17963             \mbox{\hyperlink{ecore__reg_8h_a9b5d945c522ed68c4e9bd7743d1285f0}{PBF\_REG\_P1\_TQ\_OCCUPANCY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17964}17964             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17965}17965             \mbox{\hyperlink{ecore__reg_8h_af85ef97ab4b0f6fc25265e35c323d670}{PBF\_REG\_TQ\_LINES\_FREED\_CNT\_Q1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17966}17966             \mbox{\hyperlink{ecore__reg_8h_a04c1e0efc280744a641a1256dc03ea3e}{PBF\_REG\_P1\_TQ\_LINES\_FREED\_CNT}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17967}17967         \{4, (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17968}17968             \mbox{\hyperlink{ecore__reg_8h_a7bc3e15206ae8fcf7cedd82951670c81}{PBF\_REG\_TQ\_OCCUPANCY\_LB\_Q}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17969}17969             \mbox{\hyperlink{ecore__reg_8h_a56905deeb93576d42d046ea48d8abb19}{PBF\_REG\_P4\_TQ\_OCCUPANCY}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17970}17970             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17971}17971             \mbox{\hyperlink{ecore__reg_8h_a3baa8f1e38640b234dd1bac10f3d1cbc}{PBF\_REG\_TQ\_LINES\_FREED\_CNT\_LB\_Q}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17972}17972             \mbox{\hyperlink{ecore__reg_8h_a3e0d51cb346a425452185b5d0f1a29fc}{PBF\_REG\_P4\_TQ\_LINES\_FREED\_CNT}}\}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17973}17973     \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17974}17974 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17975}17975     \textcolor{keyword}{struct }\mbox{\hyperlink{structpbf__pN__buf__regs}{pbf\_pN\_buf\_regs}} buf\_regs[] = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17976}17976         \{0, (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17977}17977             \mbox{\hyperlink{ecore__reg_8h_a8addef20d6b68b4238d39486b9458fb6}{PBF\_REG\_INIT\_CRD\_Q0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17978}17978             \mbox{\hyperlink{ecore__reg_8h_aefee0b2f11728b546bcec7d578b28cca}{PBF\_REG\_P0\_INIT\_CRD}} ,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17979}17979             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17980}17980             \mbox{\hyperlink{ecore__reg_8h_af95b57db98c859b692a9b8889ff5b5e3}{PBF\_REG\_CREDIT\_Q0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17981}17981             \mbox{\hyperlink{ecore__reg_8h_ae8722b9850e31708945ec4281cca5c1e}{PBF\_REG\_P0\_CREDIT}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17982}17982             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17983}17983             \mbox{\hyperlink{ecore__reg_8h_a4ec58775fa73288b1e9ef5d899136ea8}{PBF\_REG\_INTERNAL\_CRD\_FREED\_CNT\_Q0}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17984}17984             \mbox{\hyperlink{ecore__reg_8h_adbd44a28f3b922bf089f09e9fc4c8357}{PBF\_REG\_P0\_INTERNAL\_CRD\_FREED\_CNT}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17985}17985         \{1, (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17986}17986             \mbox{\hyperlink{ecore__reg_8h_ac647601d1646b6985a4c75bba805fc48}{PBF\_REG\_INIT\_CRD\_Q1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17987}17987             \mbox{\hyperlink{ecore__reg_8h_a3dec22d48eaa2e8d9545a1d8e14a2de2}{PBF\_REG\_P1\_INIT\_CRD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17988}17988             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17989}17989             \mbox{\hyperlink{ecore__reg_8h_afeaf64b08d3db28bb9e062a29f656cf5}{PBF\_REG\_CREDIT\_Q1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17990}17990             \mbox{\hyperlink{ecore__reg_8h_ae771679ebcf467cdacb7582962b1f1a9}{PBF\_REG\_P1\_CREDIT}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17991}17991             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17992}17992             \mbox{\hyperlink{ecore__reg_8h_afe1f7c63bb1f6d95c204b9b5527fca0a}{PBF\_REG\_INTERNAL\_CRD\_FREED\_CNT\_Q1}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17993}17993             \mbox{\hyperlink{ecore__reg_8h_ac264bd9908c5d41afee4df9f6a7c7399}{PBF\_REG\_P1\_INTERNAL\_CRD\_FREED\_CNT}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17994}17994         \{4, (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17995}17995             \mbox{\hyperlink{ecore__reg_8h_a7d81fdd687fd622f20f11ae0dfb154b0}{PBF\_REG\_INIT\_CRD\_LB\_Q}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17996}17996             \mbox{\hyperlink{ecore__reg_8h_a1213da1b6490792cd3f513579a745969}{PBF\_REG\_P4\_INIT\_CRD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17997}17997             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17998}17998             \mbox{\hyperlink{ecore__reg_8h_ad81f88ed81ebae510dce5711adb897e7}{PBF\_REG\_CREDIT\_LB\_Q}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l17999}17999             \mbox{\hyperlink{ecore__reg_8h_a151d68783e68d037497f143072907084}{PBF\_REG\_P4\_CREDIT}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18000}18000             (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18001}18001             \mbox{\hyperlink{ecore__reg_8h_a1c423ca221dd80ea34c62f4c337ef38c}{PBF\_REG\_INTERNAL\_CRD\_FREED\_CNT\_LB\_Q}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18002}18002             \mbox{\hyperlink{ecore__reg_8h_ab6eb7fe7efecea9632a041ee49da4460}{PBF\_REG\_P4\_INTERNAL\_CRD\_FREED\_CNT}}\},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18003}18003     \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18004}18004 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18005}18005     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18006}18006 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18007}18007     \textcolor{comment}{/* Verify the command queues are flushed P0, P1, P4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18008}18008     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe__elink_8h_a6242a25f9d996f0cc4f4cdb911218b75}{ARRAY\_SIZE}}(cmd\_regs); i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18009}18009         \mbox{\hyperlink{bxe_8c_a0b8a039e82932c14298a1a86ed4c8309}{bxe\_pbf\_pN\_cmd\_flushed}}(sc, \&cmd\_regs[i], poll\_count);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18010}18010     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18011}18011 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18012}18012     \textcolor{comment}{/* Verify the transmission buffers are flushed P0, P1, P4 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18013}18013     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe__elink_8h_a6242a25f9d996f0cc4f4cdb911218b75}{ARRAY\_SIZE}}(buf\_regs); i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18014}18014         \mbox{\hyperlink{bxe_8c_ae41981e6eaf6934445cc078a916f4f7a}{bxe\_pbf\_pN\_buf\_flushed}}(sc, \&buf\_regs[i], poll\_count);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18015}18015     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18016}18016 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18017}18017 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18018}18018 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18019}\mbox{\hyperlink{bxe_8c_ab93a5bbcdd20e2dd2a9be557746bba25}{18019}} \mbox{\hyperlink{bxe_8c_ab93a5bbcdd20e2dd2a9be557746bba25}{bxe\_hw\_enable\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18020}18020 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18021}18021     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18022}18022 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18023}18023     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a377123462898876b3db2cf18bd958f30}{CFC\_REG\_WEAK\_ENABLE\_PF}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18024}18024     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}CFC\_REG\_WEAK\_ENABLE\_PF is 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18025}18025 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18026}18026     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac0b95d0f56b69381638a06b86bee6ce6}{PBF\_REG\_DISABLE\_PF}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18027}18027     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PBF\_REG\_DISABLE\_PF is 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18028}18028 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18029}18029     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a4b50e83983497bfc79a833e4018f2382}{IGU\_REG\_PCI\_PF\_MSI\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18030}18030     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}IGU\_REG\_PCI\_PF\_MSI\_EN is 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18031}18031 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18032}18032     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aae8679b5d626e2d319c753a77f92b24f}{IGU\_REG\_PCI\_PF\_MSIX\_EN}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18033}18033     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}IGU\_REG\_PCI\_PF\_MSIX\_EN is 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18034}18034 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18035}18035     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae63037a94310f3b95f602980126e8446}{IGU\_REG\_PCI\_PF\_MSIX\_FUNC\_MASK}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18036}18036     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}IGU\_REG\_PCI\_PF\_MSIX\_FUNC\_MASK is 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18037}18037 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18038}18038     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a944ab5fe9f228d618c92a59f2b96ee0c}{PGLUE\_B\_REG\_SHADOW\_BME\_PF\_7\_0\_CLR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18039}18039     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PGLUE\_B\_REG\_SHADOW\_BME\_PF\_7\_0\_CLR is 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18040}18040 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18041}18041     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a8ad6931a628509d1a09dc681395adf53}{PGLUE\_B\_REG\_FLR\_REQUEST\_PF\_7\_0\_CLR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18042}18042     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PGLUE\_B\_REG\_FLR\_REQUEST\_PF\_7\_0\_CLR is 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18043}18043 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18044}18044     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_a477901a830dcfaa0d3891614100a568d}{PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18045}18045     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER is 0x\%x\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18046}18046 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18047}18047 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18048}18048 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18049}\mbox{\hyperlink{bxe_8c_ad1a4b3030790115ef80fd3d85c1ce471}{18049}} \mbox{\hyperlink{bxe_8c_ad1a4b3030790115ef80fd3d85c1ce471}{bxe\_pf\_flr\_clnup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18050}18050 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18051}18051     uint32\_t poll\_cnt = \mbox{\hyperlink{bxe_8c_a390d7493159b51070109dfa90f678abf}{bxe\_flr\_clnup\_poll\_count}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18052}18052 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18053}18053     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Cleanup after FLR PF[\%d]\(\backslash\)n"{}}, \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18054}18054 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18055}18055     \textcolor{comment}{/* Re-\/enable PF target read access */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18056}18056     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa3854feae081bd49ecaaf4a2213a58ad}{PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_TARGET\_READ}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18057}18057 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18058}18058     \textcolor{comment}{/* Poll HW usage counters */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18059}18059     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}Polling usage counters\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18060}18060     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a22997aabda163eccb6d52d0559b23bda}{bxe\_poll\_hw\_usage\_counters}}(sc, poll\_cnt)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18061}18061         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18062}18062     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18063}18063 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18064}18064     \textcolor{comment}{/* Zero the igu 'trailing edge' and 'leading edge' */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18065}18065 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18066}18066     \textcolor{comment}{/* Send the FW cleanup command */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18067}18067     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a2c9f1317560d763d5327934b80921c48}{bxe\_send\_final\_clnup}}(sc, (uint8\_t)\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc), poll\_cnt)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18068}18068         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18069}18069     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18070}18070 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18071}18071     \textcolor{comment}{/* ATC cleanup */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18072}18072 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18073}18073     \textcolor{comment}{/* Verify TX hw is flushed */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18074}18074     \mbox{\hyperlink{bxe_8c_ad0010c02b0820a36ec0eadaecbc55ca1}{bxe\_tx\_hw\_flushed}}(sc, poll\_cnt);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18075}18075 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18076}18076     \textcolor{comment}{/* Wait 100ms (not adjusted according to platform) */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18077}18077     DELAY(100000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18078}18078 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18079}18079     \textcolor{comment}{/* Verify no pending pci transactions */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18080}18080     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a75d25fa6159827fb2fbce7abd7f53068}{bxe\_is\_pcie\_pending}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18081}18081         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}PCIE Transactions still pending\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18082}18082     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18083}18083 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18084}18084     \textcolor{comment}{/* Debug */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18085}18085     \mbox{\hyperlink{bxe_8c_ab93a5bbcdd20e2dd2a9be557746bba25}{bxe\_hw\_enable\_status}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18086}18086 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18087}18087     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18088}18088 \textcolor{comment}{     * Master enable -\/ Due to WB DMAE writes performed before this}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18089}18089 \textcolor{comment}{     * register is re-\/initialized as part of the regular function init}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18090}18090 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18091}18091     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a477901a830dcfaa0d3891614100a568d}{PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18092}18092 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18093}18093     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18094}18094 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18095}18095 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18096}18096 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18097}\mbox{\hyperlink{bxe_8c_ac855ad87d25635fff4f3ab54bcbfba87}{18097}} \mbox{\hyperlink{bxe_8c_ac855ad87d25635fff4f3ab54bcbfba87}{bxe\_init\_hw\_func}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18098}18098 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18099}18099     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18100}18100     \textcolor{keywordtype}{int} func = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18101}18101     \textcolor{keywordtype}{int} init\_phase = \mbox{\hyperlink{ecore__init_8h_adb49720dc49f7d4e4cf9adbf2948e409a1cf9e151d7a7d020c9306eb3f0d4d07e}{PHASE\_PF0}} + func;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18102}18102     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__ilt}{ecore\_ilt}} *ilt = sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18103}18103     uint16\_t cdu\_ilt\_start;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18104}18104     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18105}18105     uint32\_t main\_mem\_base, main\_mem\_size, main\_mem\_prty\_clr;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18106}18106     \textcolor{keywordtype}{int} i, main\_mem\_width, rc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18107}18107 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18108}18108     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}starting func init for func \%d\(\backslash\)n"{}}, func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18109}18109 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18110}18110     \textcolor{comment}{/* FLR cleanup */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18111}18111     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18112}18112         rc = \mbox{\hyperlink{bxe_8c_ad1a4b3030790115ef80fd3d85c1ce471}{bxe\_pf\_flr\_clnup}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18113}18113         \textcolor{keywordflow}{if} (rc) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18114}18114             \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}FLR cleanup failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18115}18115             \textcolor{comment}{// XXX bxe\_fw\_dump(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18116}18116             \textcolor{comment}{// XXX bxe\_idle\_chk(sc);}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18117}18117             \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18118}18118         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18119}18119     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18120}18120 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18121}18121     \textcolor{comment}{/* set MSI reconfigure capability */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18122}18122     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18123}18123         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = (port ? \mbox{\hyperlink{ecore__reg_8h_a7ac5b708269e36b577935bbf69304c37}{HC\_REG\_CONFIG\_1}} : \mbox{\hyperlink{ecore__reg_8h_a2b823b00b743b26386d2b45bc39f2b53}{HC\_REG\_CONFIG\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18124}18124         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18125}18125         val |= \mbox{\hyperlink{ecore__reg_8h_a05f214bfddfc8a3825e8503d8883750c}{HC\_CONFIG\_0\_REG\_MSI\_ATTN\_EN\_0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18126}18126         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18127}18127     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18128}18128 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18129}18129     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a0d349428ab298b8ce72419f2249e36a4}{BLOCK\_PXP}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18130}18130     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a11aae77dd00a239ff5db0a32d19aa33b}{BLOCK\_PXP2}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18131}18131 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18132}18132     ilt = sc-\/>\mbox{\hyperlink{structbxe__softc_a7e5e49eba01a4bc1c0be198b92f7771a}{ilt}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18133}18133     cdu\_ilt\_start = ilt-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[\mbox{\hyperlink{ecore__init_8h_a180551a73ce2e64fd1b0f673fdbbbb29}{ILT\_CLIENT\_CDU}}].\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18134}18134 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18135}18135     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8h_a3eac5b9db8078800a12690cfae25a2f2}{L2\_ILT\_LINES}}(sc); i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18136}18136         ilt-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}}[cdu\_ilt\_start + i].\mbox{\hyperlink{structilt__line_adbf19054e485f743ae7de0549325e251}{page}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_aa7c394b86d59729298ef3d484234b9e0}{vcxt}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18137}18137         ilt-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}}[cdu\_ilt\_start + i].\mbox{\hyperlink{structilt__line_a181e67dcf2e0845343f19ed945bc7f66}{page\_mapping}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18138}18138             sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_ac562cde8b6a4d4aa8c835d66d71a0c22}{vcxt\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18139}18139         ilt-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}}[cdu\_ilt\_start + i].\mbox{\hyperlink{structilt__line_a8d3cf2e6a07e4b089023da3ef2d37aa6}{size}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a97e6ca5f820446e5c563bfbe92ceb9da}{context}}[i].\mbox{\hyperlink{structhw__context_af52403fbd932284a763ddb9cd9ec1671}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18140}18140     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18141}18141     \mbox{\hyperlink{ecore__init__ops_8h_a2152e6907ad690f5da0b8a00266fc00a}{ecore\_ilt\_init\_op}}(sc, \mbox{\hyperlink{ecore__init_8h_a5c63c1522f886037d84058d441dd449f}{INITOP\_SET}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18142}18142 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18143}18143     \textcolor{comment}{/* Set NIC mode */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18144}18144     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a68276bf6aacb8e1bf96ce43218b4581a}{PRS\_REG\_NIC\_MODE}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18145}18145     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}NIC MODE configured\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18146}18146 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18147}18147     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18148}18148         uint32\_t pf\_conf = \mbox{\hyperlink{ecore__reg_8h_a8b8d1b27a38e573f1833a7045c50deed}{IGU\_PF\_CONF\_FUNC\_EN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18149}18149 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18150}18150         \textcolor{comment}{/* Turn on a single ISR mode in IGU if driver is going to use}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18151}18151 \textcolor{comment}{         * INT\#x or MSI}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18152}18152 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18153}18153         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abc384dc0bfb012ac59fd9e6167dfa43a}{interrupt\_mode}} != \mbox{\hyperlink{bxe_8h_a389119722c5b560dd46c9c2f0ab68da1}{INTR\_MODE\_MSIX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18154}18154             pf\_conf |= \mbox{\hyperlink{ecore__reg_8h_a98013a0f9bd53ed91fe284826d4cfca3}{IGU\_PF\_CONF\_SINGLE\_ISR\_EN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18155}18155         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18156}18156 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18157}18157         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18158}18158 \textcolor{comment}{         * Timers workaround bug: function init part.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18159}18159 \textcolor{comment}{         * Need to wait 20msec after initializing ILT,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18160}18160 \textcolor{comment}{         * needed to make sure there are no requests in}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18161}18161 \textcolor{comment}{         * one of the PXP internal queues with "{}old"{} ILT addresses}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18162}18162 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18163}18163         DELAY(20000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18164}18164 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18165}18165         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18166}18166 \textcolor{comment}{         * Master enable -\/ Due to WB DMAE writes performed before this}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18167}18167 \textcolor{comment}{         * register is re-\/initialized as part of the regular function}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18168}18168 \textcolor{comment}{         * init}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18169}18169 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18170}18170         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a477901a830dcfaa0d3891614100a568d}{PGLUE\_B\_REG\_INTERNAL\_PFID\_ENABLE\_MASTER}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18171}18171         \textcolor{comment}{/* Enable the function in IGU */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18172}18172         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ae5ec232a01185e12eacee2d6bbc32e90}{IGU\_REG\_PF\_CONFIGURATION}}, pf\_conf);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18173}18173     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18174}18174 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18175}18175     sc-\/>\mbox{\hyperlink{structbxe__softc_ab8635fb9ce6cf45243a4e83c338680e7}{dmae\_ready}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18176}18176 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18177}18177     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a9264cfdb2e13af4caf85329a0bf9ad5b}{BLOCK\_PGLUE\_B}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18178}18178 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18179}18179     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18180}18180         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a92cc3d44294b453bfe04bab94aec83a5}{PGLUE\_B\_REG\_WAS\_ERROR\_PF\_7\_0\_CLR}}, func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18181}18181 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18182}18182     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ab2803344fa2f154ab199f48cf1ee9307}{BLOCK\_ATC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18183}18183     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a7de4b0450c5d147c0386fe46c03c4eaa}{BLOCK\_DMAE}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18184}18184     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a361c175ad9267a5719199d34dc0194f3}{BLOCK\_NIG}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18185}18185     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ad54d93c1b8978a1675806a4079ce1403}{BLOCK\_SRC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18186}18186     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a24c81c958913c17de919c3189ab47a04}{BLOCK\_MISC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18187}18187     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13aaf2951101c0a3c26a730f5658ec24419}{BLOCK\_TCM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18188}18188     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abc01480ebcab309b85b835d7fb789a10}{BLOCK\_UCM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18189}18189     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a268c9c8269508c38d71b4433c51b25e4}{BLOCK\_CCM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18190}18190     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a6c3cf7e8d680940502c6360cc8f20479}{BLOCK\_XCM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18191}18191     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13acb7e9d32c57b5b0f9d24fe973e87d8b7}{BLOCK\_TSEM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18192}18192     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ad1620a01b2698b83169fde6fac772527}{BLOCK\_USEM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18193}18193     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13acd18e18c2b5cecd8d11297350f75d545}{BLOCK\_CSEM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18194}18194     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a82f33613a03c3aa12de96f41c8b77af5}{BLOCK\_XSEM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18195}18195 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18196}18196     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18197}18197         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a511a555de15ed9dd21c03a65f8f7210e}{QM\_REG\_PF\_EN}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18198}18198 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18199}18199     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18200}18200         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a06a3fd20e663aa9f63bef5b95b2afae2}{TSEM\_REG\_VFPF\_ERR\_NUM}}, \mbox{\hyperlink{bxe_8h_a03c07985ebadb3ff76c1f1e43185b48c}{BXE\_MAX\_NUM\_OF\_VFS}} + func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18201}18201         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7d9d37e776bbfde89429a9078b18b18a}{USEM\_REG\_VFPF\_ERR\_NUM}}, \mbox{\hyperlink{bxe_8h_a03c07985ebadb3ff76c1f1e43185b48c}{BXE\_MAX\_NUM\_OF\_VFS}} + func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18202}18202         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a367b6a946c9813ee8a279369c72faa64}{CSEM\_REG\_VFPF\_ERR\_NUM}}, \mbox{\hyperlink{bxe_8h_a03c07985ebadb3ff76c1f1e43185b48c}{BXE\_MAX\_NUM\_OF\_VFS}} + func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18203}18203         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa65bf0a7d6a5c02847c5efbf07a496a0}{XSEM\_REG\_VFPF\_ERR\_NUM}}, \mbox{\hyperlink{bxe_8h_a03c07985ebadb3ff76c1f1e43185b48c}{BXE\_MAX\_NUM\_OF\_VFS}} + func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18204}18204     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18205}18205     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a375632703f86050232f61b2097f6d78c}{BLOCK\_QM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18206}18206 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18207}18207     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a2b11a2adab2c1b033fce2ae5efa85336}{BLOCK\_TM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18208}18208     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a786d321f8b0183f7ff9926d19fec5ac9}{BLOCK\_DORQ}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18209}18209 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18210}18210     \mbox{\hyperlink{bxe_8c_a99aa5275ad93cd8b45c995c871c68c67}{bxe\_iov\_init\_dq}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18211}18211 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18212}18212     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a4f06af99f86b23872fcbbc7cad0daf0a}{BLOCK\_BRB1}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18213}18213     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13af78f6eccbbe0f7ba23cfb8ce3338bb72}{BLOCK\_PRS}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18214}18214     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a97d8c0fe7877f506dc6b3ce34b53952e}{BLOCK\_TSDM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18215}18215     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a58c6f47f3e1b45018812cb685e7c291d}{BLOCK\_CSDM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18216}18216     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a92976abedce3cb78ebf70619d60c90eb}{BLOCK\_USDM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18217}18217     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a1afd92f97e85655fe22c2e0c4bb4d760}{BLOCK\_XSDM}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18218}18218     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13ab65d1cd17679dea6002aa15f745a08ad}{BLOCK\_UPB}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18219}18219     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abd85e322cc75ba64d7042858b509c4a1}{BLOCK\_XPB}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18220}18220     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a9117cc2fea999a9b3679f39e9047744a}{BLOCK\_PBF}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18221}18221     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18222}18222         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac0b95d0f56b69381638a06b86bee6ce6}{PBF\_REG\_DISABLE\_PF}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18223}18223 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18224}18224     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a01064cae36a690f58057add81df8ce9c}{BLOCK\_CDU}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18225}18225 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18226}18226     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a05656c0d45340d89dbb37bca31f07c02}{BLOCK\_CFC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18227}18227 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18228}18228     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18229}18229         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a377123462898876b3db2cf18bd958f30}{CFC\_REG\_WEAK\_ENABLE\_PF}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18230}18230 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18231}18231     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18232}18232         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac7750debed93c11358fbef94dd2d56ad}{NIG\_REG\_LLH0\_FUNC\_EN}} + port*8, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18233}18233         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a21736ba335fdf48a4063e032d90f7a1a}{NIG\_REG\_LLH0\_FUNC\_VLAN\_ID}} + port*8, \mbox{\hyperlink{bxe_8h_a2bdf5604b397316681ae5b4ecfbdc553}{OVLAN}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18234}18234     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18235}18235 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18236}18236     \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13abce999b29d4f037b48b9d47e7f17163f}{BLOCK\_MISC\_AEU}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18237}18237 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18238}18238     \textcolor{comment}{/* HC init per function */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18239}18239     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18240}18240         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18241}18241             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac8012f0e27f8e86268ea8623f555b75f}{MISC\_REG\_AEU\_GENERAL\_ATTN\_12}} + func*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18242}18242 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18243}18243             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a1a880b547de30d4c1acf8a13c6527d18}{HC\_REG\_LEADING\_EDGE\_0}} + port*8, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18244}18244             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a5e78f09d9fd794c58b65669a22779043}{HC\_REG\_TRAILING\_EDGE\_0}} + port*8, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18245}18245         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18246}18246         \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13aafd1c0ae28eacc80febaeccf6c6a4b0c}{BLOCK\_HC}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18247}18247 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18248}18248     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18249}18249         \textcolor{keywordtype}{int} num\_segs, sb\_idx, prod\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18250}18250 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18251}18251         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ac8012f0e27f8e86268ea8623f555b75f}{MISC\_REG\_AEU\_GENERAL\_ATTN\_12}} + func*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18252}18252 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18253}18253         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18254}18254             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a0e0d52da6a9442d5834260ecd9bd4d57}{IGU\_REG\_LEADING\_EDGE\_LATCH}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18255}18255             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aed2a0f0a296d65a50ff05634c73b0a06}{IGU\_REG\_TRAILING\_EDGE\_LATCH}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18256}18256         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18257}18257 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18258}18258         \mbox{\hyperlink{ecore__init__ops_8h_ab764db830aeb079755398b53998bf34e}{ecore\_init\_block}}(sc, \mbox{\hyperlink{ecore__init_8h_a39fca1837c5ce7715cbf571669660c13a573217e9bd0167ae396b0f0f174f2aa3}{BLOCK\_IGU}}, init\_phase);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18259}18259 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18260}18260         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18261}18261             \textcolor{keywordtype}{int} dsb\_idx = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18282}18282             \textcolor{comment}{/* non-\/default-\/status-\/blocks */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18283}18283             num\_segs = \mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18284}18284                 \mbox{\hyperlink{ecore__reg_8h_a6504925b281186e15e8f1bb4f904f470}{IGU\_BC\_NDSB\_NUM\_SEGS}} : \mbox{\hyperlink{ecore__reg_8h_a3d8a43912b256e50d6661efecbe54852}{IGU\_NORM\_NDSB\_NUM\_SEGS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18285}18285             \textcolor{keywordflow}{for} (sb\_idx = 0; sb\_idx < sc-\/>\mbox{\hyperlink{structbxe__softc_a3bfc5946a9a75867b12280c74a86b7f2}{igu\_sb\_cnt}}; sb\_idx++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18286}18286                 prod\_offset = (sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} + sb\_idx) *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18287}18287                     num\_segs;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18288}18288 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18289}18289                 \textcolor{keywordflow}{for} (i = 0; i < num\_segs; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18290}18290                     \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = \mbox{\hyperlink{ecore__reg_8h_a585c47fa06f052d5de72a7cc662fbfae}{IGU\_REG\_PROD\_CONS\_MEMORY}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18291}18291                             (prod\_offset + i) * 4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18292}18292                     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18293}18293                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18294}18294                 \textcolor{comment}{/* send consumer update with value 0 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18295}18295                 \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} + sb\_idx,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18296}18296                            \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18297}18297                 \mbox{\hyperlink{bxe_8c_af44e9e6f0e3b558a7564245ff1e99228}{bxe\_igu\_clear\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a65ed923e4426cfb165c36af86eb27c4a}{igu\_base\_sb}} + sb\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18298}18298             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18299}18299 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18300}18300             \textcolor{comment}{/* default-\/status-\/blocks */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18301}18301             num\_segs = \mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18302}18302                 \mbox{\hyperlink{ecore__reg_8h_a4f5c3bea5f456b9b7a97ef225e71d145}{IGU\_BC\_DSB\_NUM\_SEGS}} : \mbox{\hyperlink{ecore__reg_8h_a95bedbcd7de17a9e7bf9b9791cd39c48}{IGU\_NORM\_DSB\_NUM\_SEGS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18303}18303 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18304}18304             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a5ad4f3bd54323d94c9dba4fe7953339a}{CHIP\_IS\_MODE\_4\_PORT}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18305}18305                 dsb\_idx = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18306}18306             \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18307}18307                 dsb\_idx = \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18308}18308 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18309}18309             prod\_offset = (\mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc) ?}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18310}18310                        \mbox{\hyperlink{ecore__reg_8h_ab0ab77612bd574179cfd4cac0d097664}{IGU\_BC\_BASE\_DSB\_PROD}} + dsb\_idx :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18311}18311                        \mbox{\hyperlink{ecore__reg_8h_aa66309c7cdfacf8fd389c47f79ae5fad}{IGU\_NORM\_BASE\_DSB\_PROD}} + dsb\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18312}18312 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18313}18313             \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18314}18314 \textcolor{comment}{             * igu prods come in chunks of E1HVN\_MAX (4) -\/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18315}18315 \textcolor{comment}{             * does not matters what is the current chip mode}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18316}18316 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18317}18317             \textcolor{keywordflow}{for} (i = 0; i < (num\_segs * \mbox{\hyperlink{ecore__hsi_8h_a670e229f40328f1307b95395c0acce99}{E1HVN\_MAX}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18318}18318                  i += \mbox{\hyperlink{ecore__hsi_8h_a670e229f40328f1307b95395c0acce99}{E1HVN\_MAX}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18319}18319                 \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = \mbox{\hyperlink{ecore__reg_8h_a585c47fa06f052d5de72a7cc662fbfae}{IGU\_REG\_PROD\_CONS\_MEMORY}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18320}18320                             (prod\_offset + i)*4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18321}18321                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18322}18322             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18323}18323             \textcolor{comment}{/* send consumer update with 0 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18324}18324             \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2bf5f32947675ae0d5df68ea36a726e2}{CHIP\_INT\_MODE\_IS\_BC}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18325}18325                 \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18326}18326                            \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18327}18327                 \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18328}18328                            \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15aee004464002da1f049df18db71aeee28}{CSTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18329}18329                 \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18330}18330                            \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a2d6422437bf1c70769aa12f35ff33788}{XSTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18331}18331                 \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18332}18332                            \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15aaf50b2bc0bb5e23d30cc0d9ec1053278}{TSTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18333}18333                 \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18334}18334                            \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15acaa87a3dcde4d68946835b794e3c321b}{ATTENTION\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18335}18335             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18336}18336                 \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18337}18337                            \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15a217b5a6f513c467bc0e87294b492d172}{USTORM\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18338}18338                 \mbox{\hyperlink{bxe_8h_a26424dd266e8e6aa025cbc8c536b1269}{bxe\_ack\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18339}18339                            \mbox{\hyperlink{ecore__hsi_8h_a59a1eeb29e0fbfbf3462483f63be8d15acaa87a3dcde4d68946835b794e3c321b}{ATTENTION\_ID}}, 0, \mbox{\hyperlink{ecore__hsi_8h_a77b01f7a5c79fdc1f67c4f8a383dcb16a47c4d85391cf860b4de067b149539dc4}{IGU\_INT\_NOP}}, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18340}18340             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18341}18341             \mbox{\hyperlink{bxe_8c_af44e9e6f0e3b558a7564245ff1e99228}{bxe\_igu\_clear\_sb}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a2763985ef2f6467d8b2b6728f386b03d}{igu\_dsb\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18342}18342 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18343}18343             \textcolor{comment}{/* !!! these should become driver const once}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18344}18344 \textcolor{comment}{               rf-\/tool supports split-\/68 const */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18345}18345             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_aca0d1d68140d92b41b21a7f03f434754}{IGU\_REG\_SB\_INT\_BEFORE\_MASK\_LSB}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18346}18346             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a458204612e0a6251d54ed265f373af42}{IGU\_REG\_SB\_INT\_BEFORE\_MASK\_MSB}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18347}18347             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a4606702c956c382417da788ed6d58ee6}{IGU\_REG\_SB\_MASK\_LSB}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18348}18348             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_abd0639b762620079df1fc85c73de21b6}{IGU\_REG\_SB\_MASK\_MSB}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18349}18349             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a73e4a9919ea9ab2dd74fb3897fee5b65}{IGU\_REG\_PBA\_STATUS\_LSB}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18350}18350             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a72cc47367eaaf7209177c1e74b03b8bf}{IGU\_REG\_PBA\_STATUS\_MSB}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18351}18351         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18352}18352     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18353}18353 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18354}18354     \textcolor{comment}{/* Reset PCIE errors for debug */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18355}18355     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, 0x2114, 0xffffffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18356}18356     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, 0x2120, 0xffffffff);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18357}18357 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18358}18358     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18359}18359         main\_mem\_size = \mbox{\hyperlink{ecore__reg_8h_aa4cba8bf9beba471bd970178b20c0f3f}{HC\_REG\_MAIN\_MEMORY\_SIZE}} / 2; \textcolor{comment}{/*dwords*/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18360}18360         main\_mem\_base = \mbox{\hyperlink{ecore__reg_8h_af48ab2215e1caa411ec7d4bff6d36737}{HC\_REG\_MAIN\_MEMORY}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18361}18361                 \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc) * (main\_mem\_size * 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18362}18362         main\_mem\_prty\_clr = \mbox{\hyperlink{ecore__reg_8h_afcf3cd144024e8df576435b745ff4477}{HC\_REG\_HC\_PRTY\_STS\_CLR}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18363}18363         main\_mem\_width = 8;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18364}18364 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18365}18365         val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, main\_mem\_prty\_clr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18366}18366         \textcolor{keywordflow}{if} (val) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18367}18367             \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18368}18368                   \textcolor{stringliteral}{"{}Parity errors in HC block during function init (0x\%x)!\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18369}18369                   val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18370}18370         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18371}18371 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18372}18372         \textcolor{comment}{/* Clear "{}false"{} parity errors in MSI-\/X table */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18373}18373         \textcolor{keywordflow}{for} (i = main\_mem\_base;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18374}18374              i < main\_mem\_base + main\_mem\_size * 4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18375}18375              i += main\_mem\_width) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18376}18376             \mbox{\hyperlink{bxe_8c_a664d8e7df322bd9c09a9e3490f81c2c0}{bxe\_read\_dmae}}(sc, i, main\_mem\_width / 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18377}18377             \mbox{\hyperlink{bxe_8c_aaa8fc0ab983f385e3747884a95182cc6}{bxe\_write\_dmae}}(sc, \mbox{\hyperlink{bxe_8h_a0578105af3ab7e0663e8bac38ce2e13b}{BXE\_SP\_MAPPING}}(sc, wb\_data),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18378}18378                            i, main\_mem\_width / 4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18379}18379         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18380}18380         \textcolor{comment}{/* Clear HC parity attention */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18381}18381         \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, main\_mem\_prty\_clr);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18382}18382     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18383}18383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18384}18384 \textcolor{preprocessor}{\#if 1}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18385}18385     \textcolor{comment}{/* Enable STORMs SP logging */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18386}18386     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, \mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18387}18387            \mbox{\hyperlink{ecore__fw__defs_8h_aa19d9db3f2690402d6c708d0054d5900}{USTORM\_RECORD\_SLOW\_PATH\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc)), 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18388}18388     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, \mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18389}18389            \mbox{\hyperlink{ecore__fw__defs_8h_a5e2b5bf703ce4cc32530112229c45c9f}{TSTORM\_RECORD\_SLOW\_PATH\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc)), 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18390}18390     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18391}18391            \mbox{\hyperlink{ecore__fw__defs_8h_a49a02973c738d1dab5f716e6c486f866}{CSTORM\_RECORD\_SLOW\_PATH\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc)), 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18392}18392     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(sc, \mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18393}18393            \mbox{\hyperlink{ecore__fw__defs_8h_a87391ba597b4d72b6912e6d7a3a8b42e}{XSTORM\_RECORD\_SLOW\_PATH\_OFFSET}}(\mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(sc)), 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18394}18394 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18395}18395 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18396}18396     \mbox{\hyperlink{bxe__elink_8c_a7d457113ec4f380dc0f966e30a86c426}{elink\_phy\_probe}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18397}18397 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18398}18398     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18399}18399 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18400}18400 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18401}18401 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18402}\mbox{\hyperlink{bxe_8c_a729d2d2ed606c6f8b8cb7cf365ee7904}{18402}} \mbox{\hyperlink{bxe_8c_a729d2d2ed606c6f8b8cb7cf365ee7904}{bxe\_link\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18403}18403 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18404}18404     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18405}18405         \mbox{\hyperlink{bxe_8c_a14e8527499fd626cb6b4461a58392214}{bxe\_acquire\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18406}18406         \mbox{\hyperlink{bxe__elink_8c_a63b3bcc2b3c516c7649d659ddd183089}{elink\_lfa\_reset}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18407}18407         \mbox{\hyperlink{bxe_8c_a561b8e285128d224a86a9a93763b6213}{bxe\_release\_phy\_lock}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18408}18408     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18409}18409         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ab985d87cc604d780c09fe4c6463366d2}{CHIP\_REV\_IS\_SLOW}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18410}18410             \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}Bootcode is missing -\/ cannot reset link\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18411}18411         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18412}18412     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18413}18413 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18414}18414 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18415}18415 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18416}\mbox{\hyperlink{bxe_8c_a935c1cf956bb9743cda9b33f81e118f6}{18416}} \mbox{\hyperlink{bxe_8c_a935c1cf956bb9743cda9b33f81e118f6}{bxe\_reset\_port}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18417}18417 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18418}18418     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18419}18419     uint32\_t val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18420}18420 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18421}18421         \mbox{\hyperlink{bxe__elink_8h_aa522dcae95aa9083792b5111ca199838}{ELINK\_DEBUG\_P0}}(sc, \textcolor{stringliteral}{"{}bxe\_reset\_port called\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18422}18422     \textcolor{comment}{/* reset physical Link */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18423}18423     \mbox{\hyperlink{bxe_8c_a729d2d2ed606c6f8b8cb7cf365ee7904}{bxe\_link\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18424}18424 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18425}18425     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a806c07f7a1452151d7e9ecc5ccd55dca}{NIG\_REG\_MASK\_INTERRUPT\_PORT0}} + port*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18426}18426 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18427}18427     \textcolor{comment}{/* Do not rcv packets to BRB */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18428}18428     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_a093bbde80d7838bf0af3b4d65fa47f30}{NIG\_REG\_LLH0\_BRB1\_DRV\_MASK}} + port*4, 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18429}18429     \textcolor{comment}{/* Do not direct rcv packets that are not for MCP to the BRB */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18430}18430     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, (port ? \mbox{\hyperlink{ecore__reg_8h_a188b2800497394076e7f5a11aac19d43}{NIG\_REG\_LLH1\_BRB1\_NOT\_MCP}} :}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18431}18431                \mbox{\hyperlink{ecore__reg_8h_ad4baed5f99ed5f6623b8c679c30f61e5}{NIG\_REG\_LLH0\_BRB1\_NOT\_MCP}}), 0x0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18432}18432 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18433}18433     \textcolor{comment}{/* Configure AEU */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18434}18434     \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__reg_8h_ab4f826eb27e815cd197a08618e789f7b}{MISC\_REG\_AEU\_MASK\_ATTN\_FUNC\_0}} + port*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18435}18435 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18436}18436     DELAY(100000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18437}18437 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18438}18438     \textcolor{comment}{/* Check for BRB port occupancy */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18439}18439     val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__reg_8h_aeb4eb270c2d063b7b2a132560aa51aeb}{BRB1\_REG\_PORT\_NUM\_OCC\_BLOCKS\_0}} + port*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18440}18440     \textcolor{keywordflow}{if} (val) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18441}18441         \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18442}18442               \textcolor{stringliteral}{"{}BRB1 is not empty, \%d blocks are occupied\(\backslash\)n"{}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18443}18443     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18444}18444 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18445}18445     \textcolor{comment}{/* TODO: Close Doorbell port? */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18446}18446 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18447}18447 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18448}18448 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18449}\mbox{\hyperlink{bxe_8c_a363ac58c8221f72faec0ebff4e0b8646}{18449}} \mbox{\hyperlink{bxe_8c_a363ac58c8221f72faec0ebff4e0b8646}{bxe\_ilt\_wr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18450}18450            uint32\_t         index,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18451}18451            bus\_addr\_t       \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18452}18452 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18453}18453     \textcolor{keywordtype}{int} reg;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18454}18454     uint32\_t wb\_write[2];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18455}18455 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18456}18456     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18457}18457         reg = \mbox{\hyperlink{ecore__reg_8h_a0058feebfe1c698234c22287d826d57c}{PXP2\_REG\_RQ\_ONCHIP\_AT}} + index*8;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18458}18458     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18459}18459         reg = \mbox{\hyperlink{ecore__reg_8h_abd69812d01011e9a47aca58c34cd22da}{PXP2\_REG\_RQ\_ONCHIP\_AT\_B0}} + index*8;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18460}18460     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18461}18461 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18462}18462     wb\_write[0] = \mbox{\hyperlink{bxe_8h_ac8dfed410029b9135ccb2f577e762e20}{ONCHIP\_ADDR1}}(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18463}18463     wb\_write[1] = \mbox{\hyperlink{bxe_8h_a649785c54cc5245abcf165268050419d}{ONCHIP\_ADDR2}}(\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18464}18464     \mbox{\hyperlink{bxe_8h_af679576d81b65be7ee9caf88dfff6b53}{REG\_WR\_DMAE}}(sc, reg, wb\_write, 2);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18465}18465 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18466}18466 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18467}18467 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18468}\mbox{\hyperlink{bxe_8c_a32ff4556c789c9a11192ee1e733d65fe}{18468}} \mbox{\hyperlink{bxe_8c_a32ff4556c789c9a11192ee1e733d65fe}{bxe\_clear\_func\_ilt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18469}18469                    uint32\_t         func)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18470}18470 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18471}18471     uint32\_t i, base = \mbox{\hyperlink{bxe_8h_a700fb5b3e5e119f5e538a22ef1a6aeaf}{FUNC\_ILT\_BASE}}(func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18472}18472     \textcolor{keywordflow}{for} (i = base; i < base + \mbox{\hyperlink{bxe_8h_abba8b4df4415bad57c217f355778ae67}{ILT\_PER\_FUNC}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18473}18473         \mbox{\hyperlink{bxe_8c_a363ac58c8221f72faec0ebff4e0b8646}{bxe\_ilt\_wr}}(sc, i, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18474}18474     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18475}18475 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18476}18476 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18477}18477 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18478}\mbox{\hyperlink{bxe_8c_aacbeae78d36edf6f97894cebf7975757}{18478}} \mbox{\hyperlink{bxe_8c_aacbeae78d36edf6f97894cebf7975757}{bxe\_reset\_func}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18479}18479 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18480}18480     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18481}18481     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18482}18482     \textcolor{keywordtype}{int} func = \mbox{\hyperlink{bxe_8h_ab0e2f29619f4d496391455a56c5b4c9a}{SC\_FUNC}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18483}18483     \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18484}18484 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18485}18485     \textcolor{comment}{/* Disable the function in the FW */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18486}18486     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a679bde4fe36279330edae061b0c01ef1}{XSTORM\_FUNC\_EN\_OFFSET}}(func), 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18487}18487     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_abaa14f5ab4f3ee4018e00245f69e2760}{CSTORM\_FUNC\_EN\_OFFSET}}(func), 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18488}18488     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a3586af3ba6132bb5993fe3afc34cd5c8}{BAR\_TSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_a5a4293ff74fb2911413bcdcd373f4824}{TSTORM\_FUNC\_EN\_OFFSET}}(func), 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18489}18489     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_aa7325010f7450d10f588cbf98dfbefd0}{BAR\_USTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_aab306b10beb3a9329fe64243f676134f}{USTORM\_FUNC\_EN\_OFFSET}}(func), 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18490}18490 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18491}18491     \textcolor{comment}{/* FP SBs */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18492}18492     \mbox{\hyperlink{bxe_8h_a1cb7bdf9bd5d0d7441582179871291ba}{FOR\_EACH\_ETH\_QUEUE}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, i) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18493}18493         fp = \&\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18494}18494         \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18495}18495                 \mbox{\hyperlink{ecore__fw__defs_8h_a12a8265ff1ea5a2595dcaa67dfe95863}{CSTORM\_STATUS\_BLOCK\_DATA\_STATE\_OFFSET}}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a210f7120d5922e380b3210ee6de6a625}{fw\_sb\_id}}),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18496}18496                 \mbox{\hyperlink{ecore__hsi_8h_ac6327c28b6bed775df6656e6e2761189a8952aa109b087c8cefdc64927f325b40}{SB\_DISABLED}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18497}18497     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18498}18498 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18499}18499     \textcolor{comment}{/* SP SB */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18500}18500     \mbox{\hyperlink{bxe_8h_aeac1605bb77eb0242f9c3c90389bb326}{REG\_WR8}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a6499d67b502348ffaca94d726432c457}{BAR\_CSTRORM\_INTMEM}} +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18501}18501             \mbox{\hyperlink{ecore__fw__defs_8h_ac4d47a8aba2e25592c6154ac686cd9f2}{CSTORM\_SP\_STATUS\_BLOCK\_DATA\_STATE\_OFFSET}}(func),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18502}18502             \mbox{\hyperlink{ecore__hsi_8h_ac6327c28b6bed775df6656e6e2761189a8952aa109b087c8cefdc64927f325b40}{SB\_DISABLED}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18503}18503 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18504}18504     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ecore__fw__defs_8h_a7c7c97ae6cd415d3eee65a9a909095c2}{XSTORM\_SPQ\_DATA\_SIZE}} / 4; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18505}18505         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a7664349b15db9f0fca7658f97502d20c}{BAR\_XSTRORM\_INTMEM}} + \mbox{\hyperlink{ecore__fw__defs_8h_aedbb85242b7397dbd2ce4a0bad2ad46e}{XSTORM\_SPQ\_DATA\_OFFSET}}(func), 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18506}18506     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18507}18507 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18508}18508     \textcolor{comment}{/* Configure IGU */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18509}18509     \textcolor{keywordflow}{if} (\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_afbbfe518d07eeade83861570b3c70522}{int\_block}} == \mbox{\hyperlink{bxe_8h_a4ac136efe441681db8dd1e7aac81b6b1}{INT\_BLOCK\_HC}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18510}18510         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a1a880b547de30d4c1acf8a13c6527d18}{HC\_REG\_LEADING\_EDGE\_0}} + port*8, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18511}18511         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a5e78f09d9fd794c58b65669a22779043}{HC\_REG\_TRAILING\_EDGE\_0}} + port*8, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18512}18512     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18513}18513         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a0e0d52da6a9442d5834260ecd9bd4d57}{IGU\_REG\_LEADING\_EDGE\_LATCH}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18514}18514         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_aed2a0f0a296d65a50ff05634c73b0a06}{IGU\_REG\_TRAILING\_EDGE\_LATCH}}, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18515}18515     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18516}18516 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18517}18517     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a0ffecbe4b8a8cd1b2d4015f342a8c4f6}{CNIC\_LOADED}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18518}18518         \textcolor{comment}{/* Disable Timer scan */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18519}18519         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a8d95a216fd556561f8d09645c63d9b0b}{TM\_REG\_EN\_LINEAR0\_TIMER}} + port*4, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18520}18520         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18521}18521 \textcolor{comment}{         * Wait for at least 10ms and up to 2 second for the timers}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18522}18522 \textcolor{comment}{         * scan to complete}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18523}18523 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18524}18524         \textcolor{keywordflow}{for} (i = 0; i < 200; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18525}18525             DELAY(10000);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18526}18526             \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, \mbox{\hyperlink{ecore__reg_8h_a20a5736f10c3d8915eaf70d93227abbc}{TM\_REG\_LIN0\_SCAN\_ON}} + port*4))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18527}18527                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18528}18528         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18529}18529     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18530}18530 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18531}18531     \textcolor{comment}{/* Clear ILT */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18532}18532     \mbox{\hyperlink{bxe_8c_a32ff4556c789c9a11192ee1e733d65fe}{bxe\_clear\_func\_ilt}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}, func);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18533}18533 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18534}18534     \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18535}18535 \textcolor{comment}{     * Timers workaround bug for E2: if this is vnic-\/3,}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18536}18536 \textcolor{comment}{     * we need to set the entire ilt range for this timers.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18537}18537 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18538}18538     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) \&\& \mbox{\hyperlink{bxe_8h_a3ec450b79abe824ab9e0a51e20531c3b}{SC\_VN}}(\mbox{\hyperlink{structbxe__fastpath_a81bc28ee4a64da02a35bb6aa23e85a96}{sc}}) == 3) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18539}18539         \textcolor{keyword}{struct }\mbox{\hyperlink{structilt__client__info}{ilt\_client\_info}} ilt\_cli;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18540}18540         \textcolor{comment}{/* use dummy TM client */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18541}18541         memset(\&ilt\_cli, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structilt__client__info}{ilt\_client\_info}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18542}18542         ilt\_cli.\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18543}18543         ilt\_cli.\mbox{\hyperlink{structilt__client__info_a4a68602f851fe2de1008a08f87de23a4}{end}} = \mbox{\hyperlink{bxe_8h_a1b4c05c9443029a26855da3290c964ce}{ILT\_NUM\_PAGE\_ENTRIES}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18544}18544         ilt\_cli.\mbox{\hyperlink{structilt__client__info_ad04dd6692ca86708fc92df3ef580acbe}{client\_num}} = \mbox{\hyperlink{ecore__init_8h_a816e0c661a8523d460c2419dead0fc15}{ILT\_CLIENT\_TM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18545}18545 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18546}18546         \mbox{\hyperlink{ecore__init__ops_8h_a93aef2ab4fa90247c906ec7eeb3ec8d9}{ecore\_ilt\_boundry\_init\_op}}(sc, \&ilt\_cli, 0, \mbox{\hyperlink{ecore__init_8h_a8c8d87be4a1ac939ea218b3ea699a4a6}{INITOP\_CLEAR}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18547}18547     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18548}18548 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18549}18549     \textcolor{comment}{/* this assumes that reset\_port() called before reset\_func()*/}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18550}18550     \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18551}18551         \mbox{\hyperlink{bxe_8c_a2d96110aed3521282cc163243d1d0d2b}{bxe\_pf\_disable}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18552}18552     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18553}18553 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18554}18554     sc-\/>\mbox{\hyperlink{structbxe__softc_ab8635fb9ce6cf45243a4e83c338680e7}{dmae\_ready}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18555}18555 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18556}18556 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18557}18557 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18558}\mbox{\hyperlink{bxe_8c_aa05a5bf8a0d3e3af23c3f2f36d5b597d}{18558}} \mbox{\hyperlink{bxe_8c_aa05a5bf8a0d3e3af23c3f2f36d5b597d}{bxe\_gunzip\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18559}18559 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18560}18560     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18561}18561 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18562}18562 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18563}18563 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18564}\mbox{\hyperlink{bxe_8c_a521fdd38ddcfeda64d9f34f4abb25df4}{18564}} \mbox{\hyperlink{bxe_8c_a521fdd38ddcfeda64d9f34f4abb25df4}{bxe\_gunzip\_end}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18565}18565 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18566}18566     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18567}18567 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18568}18568 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18569}18569 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18570}\mbox{\hyperlink{bxe_8c_aa8391729ddc4dffe9e9743833465d2e1}{18570}} \mbox{\hyperlink{bxe_8c_aa8391729ddc4dffe9e9743833465d2e1}{bxe\_init\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18571}18571 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18572}18572     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18573}18573         \mbox{\hyperlink{57710__init__values_8c_a595d10cd3bcc49e6a67c949fe7ad3595}{ecore\_init\_e1\_firmware}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18574}18574         sc-\/>\mbox{\hyperlink{structbxe__softc_a1a98bfa8ffde70e0c99fc3ba965df22f}{iro\_array}} = \mbox{\hyperlink{57710__int__offsets_8h_a6db5e3431ca62ad16241c2c667ee65f5}{e1\_iro\_arr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18575}18575     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18576}18576         \mbox{\hyperlink{57711__init__values_8c_a39c9f90d503b72f99759149aaccc6f79}{ecore\_init\_e1h\_firmware}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18577}18577         sc-\/>\mbox{\hyperlink{structbxe__softc_a1a98bfa8ffde70e0c99fc3ba965df22f}{iro\_array}} = \mbox{\hyperlink{57711__int__offsets_8h_af963ee38a0a5f5ae97836ab8f0e8aa8c}{e1h\_iro\_arr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18578}18578     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!\mbox{\hyperlink{bxe_8h_a66eaa1f86451caaa1bb3480cf81c92e6}{CHIP\_IS\_E1x}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18579}18579         \mbox{\hyperlink{57712__init__values_8c_ad71a1b559980ee917d7df904b16b10a7}{ecore\_init\_e2\_firmware}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18580}18580         sc-\/>\mbox{\hyperlink{structbxe__softc_a1a98bfa8ffde70e0c99fc3ba965df22f}{iro\_array}} = \mbox{\hyperlink{57712__int__offsets_8h_a411cd0b922953d6c28e0b2f2b106bac6}{e2\_iro\_arr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18581}18581     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18582}18582         \mbox{\hyperlink{bxe_8h_ad98d4a2ef547d2e6ee4d771dab81119a}{BLOGE}}(sc, \textcolor{stringliteral}{"{}Unsupported chip revision\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18583}18583         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18584}18584     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18585}18585 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18586}18586     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18587}18587 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18588}18588 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18589}18589 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18590}\mbox{\hyperlink{bxe_8c_adff9bc8b18f2118751d6ee7229c08554}{18590}} \mbox{\hyperlink{bxe_8c_adff9bc8b18f2118751d6ee7229c08554}{bxe\_release\_firmware}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18591}18591 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18592}18592     \textcolor{comment}{/* Do nothing */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18593}18593     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18594}18594 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18595}18595 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18596}18596 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18597}\mbox{\hyperlink{bxe_8c_ae503e763b89d9b14b6192f78b8d0fefc}{18597}} \mbox{\hyperlink{bxe_8c_ae503e763b89d9b14b6192f78b8d0fefc}{ecore\_gunzip}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18598}18598              \textcolor{keyword}{const} uint8\_t    *zbuf,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18599}18599              \textcolor{keywordtype}{int}              len)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18600}18600 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18601}18601     \textcolor{comment}{/* XXX : Implement... */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18602}18602     \mbox{\hyperlink{bxe_8h_ada57d59812b435b5290a9a028aefa29a}{BLOGD}}(sc, \mbox{\hyperlink{bxe_8h_ab23d4d8a89c5f85844db5b1b9dda49b5}{DBG\_LOAD}}, \textcolor{stringliteral}{"{}ECORE\_GUNZIP NOT IMPLEMENTED\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18603}18603     \textcolor{keywordflow}{return} (FALSE);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18604}18604 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18605}18605 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18606}18606 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18607}\mbox{\hyperlink{bxe_8c_a5bee497e663d28493a2ace4603ca69f8}{18607}} \mbox{\hyperlink{bxe_8c_a5bee497e663d28493a2ace4603ca69f8}{ecore\_reg\_wr\_ind}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18608}18608                  uint32\_t         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18609}18609                  uint32\_t         val)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18610}18610 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18611}18611     \mbox{\hyperlink{bxe_8c_a6b0b85c9fb56fb801f648985f1e35bb0}{bxe\_reg\_wr\_ind}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18612}18612 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18613}18613 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18614}18614 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18615}\mbox{\hyperlink{bxe_8c_a14cf7293b7bc7fe6fdbd68f2bedf0ee5}{18615}} \mbox{\hyperlink{bxe_8c_a14cf7293b7bc7fe6fdbd68f2bedf0ee5}{ecore\_write\_dmae\_phys\_len}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18616}18616                           bus\_addr\_t       phys\_addr,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18617}18617                           uint32\_t         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18618}18618                           uint32\_t         len)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18619}18619 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18620}18620     \mbox{\hyperlink{bxe_8c_a71216cf17d1dd4d3357b8ca4c350d26a}{bxe\_write\_dmae\_phys\_len}}(sc, phys\_addr, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18621}18621 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18622}18622 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18623}18623 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18624}\mbox{\hyperlink{bxe_8c_ab05cdbe02d08b583d1714e0f5db5d42d}{18624}} \mbox{\hyperlink{bxe_8c_ab05cdbe02d08b583d1714e0f5db5d42d}{ecore\_storm\_memset\_struct}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18625}18625                           uint32\_t         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18626}18626                           \textcolor{keywordtype}{size\_t}           \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18627}18627                           uint32\_t         *data)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18628}18628 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18629}18629     uint8\_t i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18630}18630     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}}/4; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18631}18631         \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + (i * 4), data[i]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18632}18632     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18633}18633 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18634}18634 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18635}18635 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18636}18636 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18637}18637 \textcolor{comment}{ * character device -\/ ioctl interface definitions}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18638}18638 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18639}18639 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18640}18640 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18641}18641 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{bxe__dump_8h}{bxe\_dump.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18642}18642 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{bxe__ioctl_8h}{bxe\_ioctl.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18643}18643 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18644}18644 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18645}18645 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{bxe_8c_af5a4a2432c330e43cc6a2cbe31b63afb}{bxe\_eioctl}}(\textcolor{keyword}{struct} cdev *dev, u\_long cmd, caddr\_t data, \textcolor{keywordtype}{int} fflag,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18646}18646                 \textcolor{keyword}{struct} thread *td);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18647}18647 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18648}\mbox{\hyperlink{bxe_8c_ae0a0b8e04b44fb6e39d44e30f043a1b7}{18648}} \textcolor{keyword}{static} \textcolor{keyword}{struct }cdevsw \mbox{\hyperlink{bxe_8c_ae0a0b8e04b44fb6e39d44e30f043a1b7}{bxe\_cdevsw}} = \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18649}18649     .d\_version = D\_VERSION,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18650}18650     .d\_ioctl = \mbox{\hyperlink{bxe_8c_af5a4a2432c330e43cc6a2cbe31b63afb}{bxe\_eioctl}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18651}18651     .d\_name = \textcolor{stringliteral}{"{}bxecnic"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18652}18652 \};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18653}18653 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18654}\mbox{\hyperlink{bxe_8c_a911c49f33202d0cbebf617c2de2517ae}{18654}} \textcolor{preprocessor}{\#define BXE\_PATH(sc)    (CHIP\_IS\_E1x(sc) ? 0 : (sc-\/>pcie\_func \& 1))}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18655}18655 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18656}18656 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18657}\mbox{\hyperlink{bxe_8c_abac74723ea86efb2f0ea418879f9695c}{18657}} \textcolor{preprocessor}{\#define DUMP\_ALL\_PRESETS        0x1FFF}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18658}\mbox{\hyperlink{bxe_8c_a1e7ff40548ec3e35f09c9b0113a45ce6}{18658}} \textcolor{preprocessor}{\#define DUMP\_MAX\_PRESETS        13}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18659}\mbox{\hyperlink{bxe_8c_a13426c1920db410a78363270cff16c47}{18659}} \textcolor{preprocessor}{\#define IS\_E1\_REG(chips)        ((chips \& DUMP\_CHIP\_E1) == DUMP\_CHIP\_E1)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18660}\mbox{\hyperlink{bxe_8c_a5c928a5761e5fc8ae3fe3ebfe4a104ea}{18660}} \textcolor{preprocessor}{\#define IS\_E1H\_REG(chips)       ((chips \& DUMP\_CHIP\_E1H) == DUMP\_CHIP\_E1H)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18661}\mbox{\hyperlink{bxe_8c_ae146c0ecbfb9d3680ad86b81ae8b00e5}{18661}} \textcolor{preprocessor}{\#define IS\_E2\_REG(chips)        ((chips \& DUMP\_CHIP\_E2) == DUMP\_CHIP\_E2)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18662}\mbox{\hyperlink{bxe_8c_a09a5e6edd2f9d60fcc51fb3e7b9b2f92}{18662}} \textcolor{preprocessor}{\#define IS\_E3A0\_REG(chips)      ((chips \& DUMP\_CHIP\_E3A0) == DUMP\_CHIP\_E3A0)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18663}\mbox{\hyperlink{bxe_8c_a293fb48035bfe6c9fd95eef4010fcd07}{18663}} \textcolor{preprocessor}{\#define IS\_E3B0\_REG(chips)      ((chips \& DUMP\_CHIP\_E3B0) == DUMP\_CHIP\_E3B0)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18664}18664 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18665}\mbox{\hyperlink{bxe_8c_ac42cdf47794163512d7897678687837c}{18665}} \textcolor{preprocessor}{\#define IS\_REG\_IN\_PRESET(presets, idx)  \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18666}18666 \textcolor{preprocessor}{                ((presets \& (1 << (idx-\/1))) == (1 << (idx-\/1)))}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18667}18667 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18668}18668 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18669}18669 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18670}\mbox{\hyperlink{bxe_8c_a958956eadcd31aba58784510a11288aa}{18670}} \mbox{\hyperlink{bxe_8c_a958956eadcd31aba58784510a11288aa}{bxe\_get\_preset\_regs\_len}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, uint32\_t preset)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18671}18671 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18672}18672     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18673}18673         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_aa337689afce49218873ee9b4d8a9393c}{dump\_num\_registers}}[0][preset-\/1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18674}18674     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18675}18675         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_aa337689afce49218873ee9b4d8a9393c}{dump\_num\_registers}}[1][preset-\/1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18676}18676     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18677}18677         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_aa337689afce49218873ee9b4d8a9393c}{dump\_num\_registers}}[2][preset-\/1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18678}18678     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a46f7068679ec1b6d114d03a22fc65bba}{CHIP\_IS\_E3A0}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18679}18679         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_aa337689afce49218873ee9b4d8a9393c}{dump\_num\_registers}}[3][preset-\/1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18680}18680     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18681}18681         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_aa337689afce49218873ee9b4d8a9393c}{dump\_num\_registers}}[4][preset-\/1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18682}18682     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18683}18683         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18684}18684 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18685}18685 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18686}18686 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18687}\mbox{\hyperlink{bxe_8c_af4898bbe61cb7d765b028fd7fa12a0d4}{18687}} \mbox{\hyperlink{bxe_8c_af4898bbe61cb7d765b028fd7fa12a0d4}{bxe\_get\_total\_regs\_len32}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18688}18688 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18689}18689     uint32\_t preset\_idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18690}18690     \textcolor{keywordtype}{int} regdump\_len32 = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18691}18691 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18692}18692 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18693}18693     \textcolor{comment}{/* Calculate the total preset regs length */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18694}18694     \textcolor{keywordflow}{for} (preset\_idx = 1; preset\_idx <= \mbox{\hyperlink{bxe_8c_a1e7ff40548ec3e35f09c9b0113a45ce6}{DUMP\_MAX\_PRESETS}}; preset\_idx++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18695}18695         regdump\_len32 += \mbox{\hyperlink{bxe_8c_a958956eadcd31aba58784510a11288aa}{bxe\_get\_preset\_regs\_len}}(sc, preset\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18696}18696     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18697}18697 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18698}18698     \textcolor{keywordflow}{return} regdump\_len32;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18699}18699 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18700}18700 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18701}18701 \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18702}\mbox{\hyperlink{bxe_8c_a1580ba11efc9ffb061d6c65b280a09ee}{18702}} \mbox{\hyperlink{bxe_8c_a1580ba11efc9ffb061d6c65b280a09ee}{\_\_bxe\_get\_page\_addr\_ar}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18703}18703 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18704}18704     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18705}18705         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_a4a0d804e20066ca0227ddd291fb27c2f}{page\_vals\_e2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18706}18706     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18707}18707         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_a0f3349c27eed25daaca6d90332bd8c84}{page\_vals\_e3}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18708}18708     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18709}18709         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18710}18710 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18711}18711 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18712}18712 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18713}\mbox{\hyperlink{bxe_8c_ab1fe6e1acff776b02b1153c0e521b96c}{18713}} \mbox{\hyperlink{bxe_8c_ab1fe6e1acff776b02b1153c0e521b96c}{\_\_bxe\_get\_page\_reg\_num}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18714}18714 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18715}18715     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18716}18716         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_a5248d9cd05bec6793d90b463e4d00161}{PAGE\_MODE\_VALUES\_E2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18717}18717     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18718}18718         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_a643632032f9f82db874664f60f5a8786}{PAGE\_MODE\_VALUES\_E3}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18719}18719     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18720}18720         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18721}18721 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18722}18722 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18723}18723 \textcolor{keyword}{static} \textcolor{keyword}{const} uint32\_t *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18724}\mbox{\hyperlink{bxe_8c_a7329cfc07a86b5f923eb538103183965}{18724}} \mbox{\hyperlink{bxe_8c_a7329cfc07a86b5f923eb538103183965}{\_\_bxe\_get\_page\_write\_ar}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18725}18725 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18726}18726     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18727}18727         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_a695521cc87164cabc8075e288f31008c}{page\_write\_regs\_e2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18728}18728     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18729}18729         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_acfaf11199c591cdfe971582837d61b90}{page\_write\_regs\_e3}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18730}18730     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18731}18731         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18732}18732 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18733}18733 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18734}18734 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18735}\mbox{\hyperlink{bxe_8c_ab9293812e53f201d5e84469e17b642ae}{18735}} \mbox{\hyperlink{bxe_8c_ab9293812e53f201d5e84469e17b642ae}{\_\_bxe\_get\_page\_write\_num}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18736}18736 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18737}18737     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18738}18738         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_ad4218bf1952f0cd3ef831d2392120e0d}{PAGE\_WRITE\_REGS\_E2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18739}18739     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18740}18740         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_a9e2d5878ebe89d9ba417029903894730}{PAGE\_WRITE\_REGS\_E3}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18741}18741     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18742}18742         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18743}18743 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18744}18744 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18745}18745 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structreg__addr}{reg\_addr}} *}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18746}\mbox{\hyperlink{bxe_8c_ab1a016c31549d1b1760c441c45b29bee}{18746}} \mbox{\hyperlink{bxe_8c_ab1a016c31549d1b1760c441c45b29bee}{\_\_bxe\_get\_page\_read\_ar}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18747}18747 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18748}18748     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18749}18749         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_a4437e49154abb70ac7f1aeaec73d894f}{page\_read\_regs\_e2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18750}18750     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18751}18751         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_a380c77f4ab65cba68aca16594ef2e97c}{page\_read\_regs\_e3}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18752}18752     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18753}18753         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18754}18754 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18755}18755 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18756}18756 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18757}\mbox{\hyperlink{bxe_8c_a85a9b2cc2b416761a81bea0312303fe5}{18757}} \mbox{\hyperlink{bxe_8c_a85a9b2cc2b416761a81bea0312303fe5}{\_\_bxe\_get\_page\_read\_num}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18758}18758 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18759}18759     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18760}18760         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_af74aac2121398ee14ee9c9ce4e9428e1}{PAGE\_READ\_REGS\_E2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18761}18761     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18762}18762         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe__dump_8h_af73a3eb78eb9767038d062208f474f9c}{PAGE\_READ\_REGS\_E3}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18763}18763     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18764}18764         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18765}18765 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18766}18766 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18767}18767 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18768}\mbox{\hyperlink{bxe_8c_ab7072b044ec86cf2fbe5cbd8339a6155}{18768}} \mbox{\hyperlink{bxe_8c_ab7072b044ec86cf2fbe5cbd8339a6155}{bxe\_is\_reg\_in\_chip}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structreg__addr}{reg\_addr}} *reg\_info)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18769}18769 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18770}18770     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18771}18771         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_a13426c1920db410a78363270cff16c47}{IS\_E1\_REG}}(reg\_info-\/>\mbox{\hyperlink{structreg__addr_a05f16fcaf0a69a5122669478125de5db}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18772}18772     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18773}18773         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_a5c928a5761e5fc8ae3fe3ebfe4a104ea}{IS\_E1H\_REG}}(reg\_info-\/>\mbox{\hyperlink{structreg__addr_a05f16fcaf0a69a5122669478125de5db}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18774}18774     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18775}18775         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_ae146c0ecbfb9d3680ad86b81ae8b00e5}{IS\_E2\_REG}}(reg\_info-\/>\mbox{\hyperlink{structreg__addr_a05f16fcaf0a69a5122669478125de5db}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18776}18776     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a46f7068679ec1b6d114d03a22fc65bba}{CHIP\_IS\_E3A0}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18777}18777         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_a09a5e6edd2f9d60fcc51fb3e7b9b2f92}{IS\_E3A0\_REG}}(reg\_info-\/>\mbox{\hyperlink{structreg__addr_a05f16fcaf0a69a5122669478125de5db}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18778}18778     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18779}18779         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_a293fb48035bfe6c9fd95eef4010fcd07}{IS\_E3B0\_REG}}(reg\_info-\/>\mbox{\hyperlink{structreg__addr_a05f16fcaf0a69a5122669478125de5db}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18780}18780     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18781}18781         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18782}18782 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18783}18783 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18784}18784 \textcolor{keyword}{static} \textcolor{keywordtype}{bool}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18785}\mbox{\hyperlink{bxe_8c_a8fc52af4611311bbc863a17943e57e59}{18785}} \mbox{\hyperlink{bxe_8c_a8fc52af4611311bbc863a17943e57e59}{bxe\_is\_wreg\_in\_chip}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structwreg__addr}{wreg\_addr}} *wreg\_info)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18786}18786 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18787}18787     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18788}18788         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_a13426c1920db410a78363270cff16c47}{IS\_E1\_REG}}(wreg\_info-\/>\mbox{\hyperlink{structwreg__addr_abfb0c79e78aa2831d09b8d9ae6470e4e}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18789}18789     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18790}18790         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_a5c928a5761e5fc8ae3fe3ebfe4a104ea}{IS\_E1H\_REG}}(wreg\_info-\/>\mbox{\hyperlink{structwreg__addr_abfb0c79e78aa2831d09b8d9ae6470e4e}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18791}18791     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18792}18792         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_ae146c0ecbfb9d3680ad86b81ae8b00e5}{IS\_E2\_REG}}(wreg\_info-\/>\mbox{\hyperlink{structwreg__addr_abfb0c79e78aa2831d09b8d9ae6470e4e}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18793}18793     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a46f7068679ec1b6d114d03a22fc65bba}{CHIP\_IS\_E3A0}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18794}18794         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_a09a5e6edd2f9d60fcc51fb3e7b9b2f92}{IS\_E3A0\_REG}}(wreg\_info-\/>\mbox{\hyperlink{structwreg__addr_abfb0c79e78aa2831d09b8d9ae6470e4e}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18795}18795     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18796}18796         \textcolor{keywordflow}{return} \mbox{\hyperlink{bxe_8c_a293fb48035bfe6c9fd95eef4010fcd07}{IS\_E3B0\_REG}}(wreg\_info-\/>\mbox{\hyperlink{structwreg__addr_abfb0c79e78aa2831d09b8d9ae6470e4e}{chips}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18797}18797     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18798}18798         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18799}18799 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18800}18800 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18812}18812 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18813}\mbox{\hyperlink{bxe_8c_ab313b856f921c0018975ccd81c1140c8}{18813}} \mbox{\hyperlink{bxe_8c_ab313b856f921c0018975ccd81c1140c8}{bxe\_read\_pages\_regs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, uint32\_t *p, uint32\_t preset)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18814}18814 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18815}18815     uint32\_t i, j, k, n;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18816}18816 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18817}18817     \textcolor{comment}{/* addresses of the paged registers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18818}18818     \textcolor{keyword}{const} uint32\_t *page\_addr = \mbox{\hyperlink{bxe_8c_a1580ba11efc9ffb061d6c65b280a09ee}{\_\_bxe\_get\_page\_addr\_ar}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18819}18819     \textcolor{comment}{/* number of paged registers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18820}18820     \textcolor{keywordtype}{int} num\_pages = \mbox{\hyperlink{bxe_8c_ab1fe6e1acff776b02b1153c0e521b96c}{\_\_bxe\_get\_page\_reg\_num}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18821}18821     \textcolor{comment}{/* write addresses */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18822}18822     \textcolor{keyword}{const} uint32\_t *write\_addr = \mbox{\hyperlink{bxe_8c_a7329cfc07a86b5f923eb538103183965}{\_\_bxe\_get\_page\_write\_ar}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18823}18823     \textcolor{comment}{/* number of write addresses */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18824}18824     \textcolor{keywordtype}{int} write\_num = \mbox{\hyperlink{bxe_8c_ab9293812e53f201d5e84469e17b642ae}{\_\_bxe\_get\_page\_write\_num}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18825}18825     \textcolor{comment}{/* read addresses info */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18826}18826     \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structreg__addr}{reg\_addr}} *read\_addr = \mbox{\hyperlink{bxe_8c_ab1a016c31549d1b1760c441c45b29bee}{\_\_bxe\_get\_page\_read\_ar}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18827}18827     \textcolor{comment}{/* number of read addresses */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18828}18828     \textcolor{keywordtype}{int} read\_num = \mbox{\hyperlink{bxe_8c_a85a9b2cc2b416761a81bea0312303fe5}{\_\_bxe\_get\_page\_read\_num}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18829}18829     uint32\_t \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}}, \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18830}18830 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18831}18831     \textcolor{keywordflow}{for} (i = 0; i < num\_pages; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18832}18832         \textcolor{keywordflow}{for} (j = 0; j < write\_num; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18833}18833             \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, write\_addr[j], page\_addr[i]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18834}18834 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18835}18835             \textcolor{keywordflow}{for} (k = 0; k < read\_num; k++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18836}18836                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ac42cdf47794163512d7897678687837c}{IS\_REG\_IN\_PRESET}}(read\_addr[k].\mbox{\hyperlink{structreg__addr_a4663ddb3904704a2349e1e919d19b294}{presets}}, preset)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18837}18837                     \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}} = read\_addr[k].\mbox{\hyperlink{structreg__addr_a4841930be7b7438b9fbfb6548581daeb}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18838}18838                     \textcolor{keywordflow}{for} (n = 0; n < \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}}; n++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18839}18839                         \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = read\_addr[k].\mbox{\hyperlink{structreg__addr_a5ad7d288226c364572955c09892b4902}{addr}} + n*4;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18840}18840                         *p++ = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18841}18841                     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18842}18842                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18843}18843             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18844}18844         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18845}18845     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18846}18846     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18847}18847 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18848}18848 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18849}18849 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18850}18850 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18851}\mbox{\hyperlink{bxe_8c_a1a1452d894f50a9777bc862e694ba531}{18851}} \mbox{\hyperlink{bxe_8c_a1a1452d894f50a9777bc862e694ba531}{bxe\_get\_preset\_regs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, uint32\_t *p, uint32\_t preset)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18852}18852 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18853}18853     uint32\_t i, j, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18854}18854     \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structwreg__addr}{wreg\_addr}} *wreg\_addr\_p = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18855}18855 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18856}18856     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18857}18857         wreg\_addr\_p = \&\mbox{\hyperlink{bxe__dump_8h_a60075257503146cbacc6e096831ae8cf}{wreg\_addr\_e1}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18858}18858     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18859}18859         wreg\_addr\_p = \&\mbox{\hyperlink{bxe__dump_8h_adae990015c66442ddfee1338fe341037}{wreg\_addr\_e1h}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18860}18860     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18861}18861         wreg\_addr\_p = \&\mbox{\hyperlink{bxe__dump_8h_abbcd0eaae2bf2a0116e9973b75ec143f}{wreg\_addr\_e2}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18862}18862     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a46f7068679ec1b6d114d03a22fc65bba}{CHIP\_IS\_E3A0}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18863}18863         wreg\_addr\_p = \&\mbox{\hyperlink{bxe__dump_8h_a166d4f9f301b135fa956bdbc80e62d5f}{wreg\_addr\_e3}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18864}18864     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18865}18865         wreg\_addr\_p = \&\mbox{\hyperlink{bxe__dump_8h_a18bbfcf17b0f123d0b6b26f8178a256f}{wreg\_addr\_e3b0}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18866}18866     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18867}18867         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18868}18868 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18869}18869     \textcolor{comment}{/* Read the idle\_chk registers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18870}18870     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe__dump_8h_a649cfaea2e667fcd85fd227adc9c5c1f}{IDLE\_REGS\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18871}18871         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ab7072b044ec86cf2fbe5cbd8339a6155}{bxe\_is\_reg\_in\_chip}}(sc, \&\mbox{\hyperlink{bxe__dump_8h_ade365032ada2332ddad231e69fe9285d}{idle\_reg\_addrs}}[i]) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18872}18872             \mbox{\hyperlink{bxe_8c_ac42cdf47794163512d7897678687837c}{IS\_REG\_IN\_PRESET}}(\mbox{\hyperlink{bxe__dump_8h_ade365032ada2332ddad231e69fe9285d}{idle\_reg\_addrs}}[i].\mbox{\hyperlink{structwreg__addr_a52af8545c6130fca5e5dcad86ecf9178}{presets}}, preset)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18873}18873             \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe__dump_8h_ade365032ada2332ddad231e69fe9285d}{idle\_reg\_addrs}}[i].\mbox{\hyperlink{structreg__addr_a4841930be7b7438b9fbfb6548581daeb}{size}}; j++)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18874}18874                 *p++ = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe__dump_8h_ade365032ada2332ddad231e69fe9285d}{idle\_reg\_addrs}}[i].\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + j*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18875}18875         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18876}18876     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18877}18877 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18878}18878     \textcolor{comment}{/* Read the regular registers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18879}18879     \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{bxe__dump_8h_acec572ed9edbd4e057c4bc62e453e5b7}{REGS\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18880}18880         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_ab7072b044ec86cf2fbe5cbd8339a6155}{bxe\_is\_reg\_in\_chip}}(sc, \&\mbox{\hyperlink{bxe__dump_8h_a54e0ae872146d9cb61998cf06fb2a5b0}{reg\_addrs}}[i]) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18881}18881             \mbox{\hyperlink{bxe_8c_ac42cdf47794163512d7897678687837c}{IS\_REG\_IN\_PRESET}}(\mbox{\hyperlink{bxe__dump_8h_a54e0ae872146d9cb61998cf06fb2a5b0}{reg\_addrs}}[i].\mbox{\hyperlink{structwreg__addr_a52af8545c6130fca5e5dcad86ecf9178}{presets}}, preset)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18882}18882             \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{bxe__dump_8h_a54e0ae872146d9cb61998cf06fb2a5b0}{reg\_addrs}}[i].\mbox{\hyperlink{structreg__addr_a4841930be7b7438b9fbfb6548581daeb}{size}}; j++)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18883}18883                 *p++ = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{bxe__dump_8h_a54e0ae872146d9cb61998cf06fb2a5b0}{reg\_addrs}}[i].\mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + j*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18884}18884         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18885}18885     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18886}18886 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18887}18887     \textcolor{comment}{/* Read the CAM registers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18888}18888     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8c_a8fc52af4611311bbc863a17943e57e59}{bxe\_is\_wreg\_in\_chip}}(sc, wreg\_addr\_p) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18889}18889         \mbox{\hyperlink{bxe_8c_ac42cdf47794163512d7897678687837c}{IS\_REG\_IN\_PRESET}}(wreg\_addr\_p-\/>\mbox{\hyperlink{structwreg__addr_a52af8545c6130fca5e5dcad86ecf9178}{presets}}, preset)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18890}18890         \textcolor{keywordflow}{for} (i = 0; i < wreg\_addr\_p-\/>\mbox{\hyperlink{structwreg__addr_a609b979383a768582d8f6eb2478b3132}{size}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18891}18891             *p++ = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, wreg\_addr\_p-\/>\mbox{\hyperlink{structwreg__addr_a0394098337e90d9629a3003b2cc18c36}{addr}} + i*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18892}18892 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18893}18893             \textcolor{comment}{/* In case of wreg\_addr register, read additional}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18894}18894 \textcolor{comment}{               registers from read\_regs array}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18895}18895 \textcolor{comment}{             */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18896}18896             \textcolor{keywordflow}{for} (j = 0; j < wreg\_addr\_p-\/>\mbox{\hyperlink{structwreg__addr_a05d754bc16b1417b70b32ea7e3ca17f8}{read\_regs\_count}}; j++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18897}18897                 \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} = *(wreg\_addr\_p-\/>\mbox{\hyperlink{structwreg__addr_a38c7a0e282f2e329aad696151478003c}{read\_regs}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18898}18898                 *p++ = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{ecore__init_8h_ab439e3a90339e2e8ca8f82d4557a34e5}{addr}} + j*4);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18899}18899             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18900}18900         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18901}18901     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18902}18902 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18903}18903     \textcolor{comment}{/* Paged registers are supported in E2 \& E3 only */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18904}18904     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc) || \mbox{\hyperlink{bxe_8h_ad17f2d47187022bf90ee2471ad971e23}{CHIP\_IS\_E3}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18905}18905         \textcolor{comment}{/* Read "{}paged"{} registers */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18906}18906         \mbox{\hyperlink{bxe_8c_ab313b856f921c0018975ccd81c1140c8}{bxe\_read\_pages\_regs}}(sc, p, preset);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18907}18907     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18908}18908 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18909}18909     \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18910}18910 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18911}18911 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18912}18912 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18913}\mbox{\hyperlink{bxe_8c_a29af23f076c40ae19a6f213ce619d7e4}{18913}} \mbox{\hyperlink{bxe_8c_a29af23f076c40ae19a6f213ce619d7e4}{bxe\_grc\_dump}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18914}18914 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18915}18915     \textcolor{keywordtype}{int} rval = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18916}18916     uint32\_t preset\_idx;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18917}18917     uint8\_t *buf;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18918}18918     uint32\_t \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18919}18919     \textcolor{keyword}{struct  }\mbox{\hyperlink{structdump__header}{dump\_header}} *d\_hdr;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18920}18920     uint32\_t i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18921}18921     uint32\_t reg\_val;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18922}18922     uint32\_t \mbox{\hyperlink{structreg__addr}{reg\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18923}18923     uint32\_t cmd\_offset;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18924}18924     \textcolor{keyword}{struct }\mbox{\hyperlink{structecore__ilt}{ecore\_ilt}} *ilt = \mbox{\hyperlink{ecore__sp_8h_a9de3db74dfbcfe79a0eccf582c8547e8}{SC\_ILT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18925}18925     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__fastpath}{bxe\_fastpath}} *fp;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18926}18926     \textcolor{keyword}{struct }\mbox{\hyperlink{structilt__client__info}{ilt\_client\_info}} *ilt\_cli;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18927}18927     \textcolor{keywordtype}{int} grc\_dump\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18928}18928 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18929}18929 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18930}18930     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}} || sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18931}18931         \textcolor{keywordflow}{return} (rval);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18932}18932     }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18933}18933     sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18934}18934     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Started collecting grcdump\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18935}18935 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18936}18936     grc\_dump\_size = (\mbox{\hyperlink{bxe_8c_af4898bbe61cb7d765b028fd7fa12a0d4}{bxe\_get\_total\_regs\_len32}}(sc) * \textcolor{keyword}{sizeof}(uint32\_t)) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18937}18937                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct  }\mbox{\hyperlink{structdump__header}{dump\_header}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18938}18938 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18939}18939     sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}} = malloc(grc\_dump\_size, M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18940}18940 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18941}18941     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18942}18942         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}Unable to allocate memory for grcdump collection\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18943}18943         \textcolor{keywordflow}{return}(ENOMEM);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18944}18944     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18945}18945 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18946}18946 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18947}18947 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18948}18948     \textcolor{comment}{/* Disable parity attentions as long as following dump may}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18949}18949 \textcolor{comment}{     * cause false alarms by reading never written registers. We}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18950}18950 \textcolor{comment}{     * will re-\/enable parity attentions right after the dump.}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18951}18951 \textcolor{comment}{     */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18952}18952 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18953}18953     \textcolor{comment}{/* Disable parity on path 0 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18954}18954     \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18955}18955 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18956}18956     \mbox{\hyperlink{ecore__init_8h_addab334cdfe184bce1503bbc4071ec4a}{ecore\_disable\_blocks\_parity}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18957}18957 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18958}18958     \textcolor{comment}{/* Disable parity on path 1 */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18959}18959     \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18960}18960     \mbox{\hyperlink{ecore__init_8h_addab334cdfe184bce1503bbc4071ec4a}{ecore\_disable\_blocks\_parity}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18961}18961 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18962}18962     \textcolor{comment}{/* Return to current function */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18963}18963     \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18964}18964 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18965}18965     buf = sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18966}18966     d\_hdr = sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18967}18967 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18968}18968     d\_hdr-\/>\mbox{\hyperlink{structdump__header_a3dd196e6991f224567abc7fb5b0ebef7}{header\_size}} = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct  }\mbox{\hyperlink{structdump__header}{dump\_header}}) >> 2) -\/ 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18969}18969     d\_hdr-\/>\mbox{\hyperlink{structdump__header_a0649d7d65283945c9738433479c8586b}{version}} = \mbox{\hyperlink{bxe__dump_8h_ac1de1d00076a2bd0031ceee6b64f1ca6}{BNX2X\_DUMP\_VERSION}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18970}18970     d\_hdr-\/>\mbox{\hyperlink{structdump__header_ab2214e43ad5e5ed6c03aef6dca37c7a6}{preset}} = \mbox{\hyperlink{bxe_8c_abac74723ea86efb2f0ea418879f9695c}{DUMP\_ALL\_PRESETS}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18971}18971 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18972}18972     \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a2516c277e406bffe8233d587a20eee98}{CHIP\_IS\_E1}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18973}18973         d\_hdr-\/>\mbox{\hyperlink{structdump__header_a135270466c8ae4d9af30cc0d13a9e5b9}{dump\_meta\_data}} = \mbox{\hyperlink{bxe__dump_8h_a1bfea7364c105e52fa80c404be8ee5eb}{DUMP\_CHIP\_E1}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18974}18974     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a3077ae6b73888a20f92f47fd712d5412}{CHIP\_IS\_E1H}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18975}18975         d\_hdr-\/>\mbox{\hyperlink{structdump__header_a135270466c8ae4d9af30cc0d13a9e5b9}{dump\_meta\_data}} = \mbox{\hyperlink{bxe__dump_8h_aceeac83d03d88bd52e887a1cfb99c4b8}{DUMP\_CHIP\_E1H}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18976}18976     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_ac42d8b584e562b76b7b16ef274c0abf4}{CHIP\_IS\_E2}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18977}18977         d\_hdr-\/>\mbox{\hyperlink{structdump__header_a135270466c8ae4d9af30cc0d13a9e5b9}{dump\_meta\_data}} = \mbox{\hyperlink{bxe__dump_8h_af77f69606049c6d24067d438f4597016}{DUMP\_CHIP\_E2}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18978}18978                 (\mbox{\hyperlink{bxe_8c_a911c49f33202d0cbebf617c2de2517ae}{BXE\_PATH}}(sc) ? \mbox{\hyperlink{bxe__dump_8h_a844ec76f1209f841823b53f43e8d649b}{DUMP\_PATH\_1}} : \mbox{\hyperlink{bxe__dump_8h_a01e83e93f7939ba5c85da5b5cc61e6eb}{DUMP\_PATH\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18979}18979     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a46f7068679ec1b6d114d03a22fc65bba}{CHIP\_IS\_E3A0}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18980}18980         d\_hdr-\/>\mbox{\hyperlink{structdump__header_a135270466c8ae4d9af30cc0d13a9e5b9}{dump\_meta\_data}} = \mbox{\hyperlink{bxe__dump_8h_afd87d196aa3404b74af41e98b5061466}{DUMP\_CHIP\_E3A0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18981}18981                 (\mbox{\hyperlink{bxe_8c_a911c49f33202d0cbebf617c2de2517ae}{BXE\_PATH}}(sc) ? \mbox{\hyperlink{bxe__dump_8h_a844ec76f1209f841823b53f43e8d649b}{DUMP\_PATH\_1}} : \mbox{\hyperlink{bxe__dump_8h_a01e83e93f7939ba5c85da5b5cc61e6eb}{DUMP\_PATH\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18982}18982     \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a88845bb40c9d911003b542196365680a}{CHIP\_IS\_E3B0}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18983}18983         d\_hdr-\/>\mbox{\hyperlink{structdump__header_a135270466c8ae4d9af30cc0d13a9e5b9}{dump\_meta\_data}} = \mbox{\hyperlink{bxe__dump_8h_ae64e1c1ed0b5c9ea86a741e4dd9c8bf4}{DUMP\_CHIP\_E3B0}} |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18984}18984                 (\mbox{\hyperlink{bxe_8c_a911c49f33202d0cbebf617c2de2517ae}{BXE\_PATH}}(sc) ? \mbox{\hyperlink{bxe__dump_8h_a844ec76f1209f841823b53f43e8d649b}{DUMP\_PATH\_1}} : \mbox{\hyperlink{bxe__dump_8h_a01e83e93f7939ba5c85da5b5cc61e6eb}{DUMP\_PATH\_0}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18985}18985     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18986}18986 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18987}18987     buf += \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct  }\mbox{\hyperlink{structdump__header}{dump\_header}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18988}18988 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18989}18989     \textcolor{keywordflow}{for} (preset\_idx = 1; preset\_idx <= \mbox{\hyperlink{bxe_8c_a1e7ff40548ec3e35f09c9b0113a45ce6}{DUMP\_MAX\_PRESETS}}; preset\_idx++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18990}18990 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18991}18991         \textcolor{comment}{/* Skip presets with IOR */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18992}18992         \textcolor{keywordflow}{if} ((preset\_idx == 2) || (preset\_idx == 5) || (preset\_idx == 8) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18993}18993             (preset\_idx == 11))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18994}18994             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18995}18995 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18996}18996         rval = \mbox{\hyperlink{bxe_8c_a1a1452d894f50a9777bc862e694ba531}{bxe\_get\_preset\_regs}}(sc, (uint32\_t *)buf, preset\_idx);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18997}18997 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18998}18998         \textcolor{keywordflow}{if} (rval)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l18999}18999             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19000}19000 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19001}19001         \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}} = \mbox{\hyperlink{bxe_8c_a958956eadcd31aba58784510a11288aa}{bxe\_get\_preset\_regs\_len}}(sc, preset\_idx) * (\textcolor{keyword}{sizeof} (uint32\_t));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19002}19002 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19003}19003         buf += \mbox{\hyperlink{bxe_8c_ab2c6b258f02add8fdf4cfc7c371dd772}{size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19004}19004     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19005}19005 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19006}19006     \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19007}19007     \mbox{\hyperlink{ecore__init_8h_a695dc26e3806f46c4548dff2972bad24}{ecore\_clear\_blocks\_parity}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19008}19008     \mbox{\hyperlink{ecore__init_8h_a84a34abca95c9a311bf5f248738d10c3}{ecore\_enable\_blocks\_parity}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19009}19009 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19010}19010     \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19011}19011     \mbox{\hyperlink{ecore__init_8h_a695dc26e3806f46c4548dff2972bad24}{ecore\_clear\_blocks\_parity}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19012}19012     \mbox{\hyperlink{ecore__init_8h_a84a34abca95c9a311bf5f248738d10c3}{ecore\_enable\_blocks\_parity}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19013}19013 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19014}19014     \textcolor{comment}{/* Return to current function */}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19015}19015     \mbox{\hyperlink{bxe_8c_aa42681b2d06542bd29d4cc0a353cae3e}{bxe\_pretend\_func}}(sc, \mbox{\hyperlink{bxe_8h_abb4570e70ecad9dc0cc573fd292fa02b}{SC\_ABS\_FUNC}}(sc));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19016}19016 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19017}19017 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19018}19018 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19019}19019     \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19020}19020         \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_a2c3fbe23b4774241f30b0204ea9a8fc1}{fw\_stats\_req}}  != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19021}19021                 \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}fw stats start\_paddr \%\#jx end\_paddr \%\#jx vaddr \%p size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19022}19022                                 (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_abf1e238777265bb9bc47ed71a8eb6001}{fw\_stats\_req\_mapping}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19023}19023                                 (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_aecca2710e1fb926a62f32e81d88a29da}{fw\_stats\_data\_mapping}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19024}19024                                 sc-\/>\mbox{\hyperlink{structbxe__softc_a2c3fbe23b4774241f30b0204ea9a8fc1}{fw\_stats\_req}}, (sc-\/>\mbox{\hyperlink{structbxe__softc_ac66bceaf5ec45dd36505e85a692047e8}{fw\_stats\_req\_size}} + sc-\/>\mbox{\hyperlink{structbxe__softc_a7ebfeb3942c9b62a2549c8a6865f68c2}{fw\_stats\_data\_size}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19025}19025                 \}       }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19026}19026                 \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19027}19027                         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}def\_status\_block paddr \%p vaddr \%p size 0x\%zx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19028}19028                                 (\textcolor{keywordtype}{void} *)sc-\/>\mbox{\hyperlink{structbxe__softc_a5616618606f87ac08d580b76aef3a7a1}{def\_sb\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, sc-\/>\mbox{\hyperlink{structbxe__softc_afe0bf6a981c8d850cc507da3d274306a}{def\_sb}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19029}19029                                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhost__sp__status__block}{host\_sp\_status\_block}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19030}19030                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19031}19031                 \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19032}19032                 \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}event\_queue paddr \%\#jx vaddr \%p size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19033}19033                                 (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a893b07d9377d754d707356fd73bb7c0e}{eq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}}, \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19034}19034                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19035}19035                 \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19036}19036                 \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}slow path paddr \%\#jx vaddr \%p size 0x\%zx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19037}19037                                 (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a6e6e12c4955eba9329126b25ca6b4684}{sp\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19038}19038                                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__slowpath}{bxe\_slowpath}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19039}19039                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19040}19040                 \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19041}19041                 \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}slow path queue paddr \%\#jx vaddr \%p size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19042}19042                                 (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ac6df398242748a31fdc80385bcc80888}{spq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}}, \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19043}19043                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19044}19044                 \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_af588b548b6b822a34c3ad7b281ec0487}{gz\_buf\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19045}19045                 \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}fw\_buf paddr \%\#jx vaddr \%p size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19046}19046                                 (uintmax\_t)sc-\/>\mbox{\hyperlink{structbxe__softc_af588b548b6b822a34c3ad7b281ec0487}{gz\_buf\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, sc-\/>\mbox{\hyperlink{structbxe__softc_af588b548b6b822a34c3ad7b281ec0487}{gz\_buf\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19047}19047                                 \mbox{\hyperlink{bxe_8h_a17032543d2db5002df52fd08f2825357}{FW\_BUF\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19048}19048                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19049}19049         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19050}19050                 fp = \&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19051}19051                         \textcolor{keywordflow}{if}(fp-\/>\mbox{\hyperlink{structbxe__fastpath_a018a5dd30470e1e6a4d70e907d82ef65}{sb\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL \&\& fp-\/>\mbox{\hyperlink{structbxe__fastpath_a036a081fcc7076714f6a4926be8ae354}{tx\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19052}19052                         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4987c39d05c289f627935f0b1661bec6}{rx\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL \&\& fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19053}19053                         fp-\/>\mbox{\hyperlink{structbxe__fastpath_a25b66543dacbc0212e674f98ff70eca3}{rx\_sge\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19054}19054 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19055}19055                                 \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}FP status block fp \%d paddr \%\#jx vaddr \%p size 0x\%zx\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19056}19056                                 (uintmax\_t)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a018a5dd30470e1e6a4d70e907d82ef65}{sb\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a018a5dd30470e1e6a4d70e907d82ef65}{sb\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19057}19057                                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{union} \mbox{\hyperlink{unionbxe__host__hc__status__block}{bxe\_host\_hc\_status\_block}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19058}19058                                 \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}TX BD CHAIN fp \%d paddr \%\#jx vaddr \%p size 0x\%x\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19059}19059                                 (uintmax\_t)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a036a081fcc7076714f6a4926be8ae354}{tx\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a036a081fcc7076714f6a4926be8ae354}{tx\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19060}19060                                 (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * \mbox{\hyperlink{bxe_8h_a5b78f26ceb1ad036c2ce8a8dee493691}{TX\_BD\_NUM\_PAGES}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19061}19061                         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}RX BD CHAIN fp \%d paddr \%\#jx vaddr \%p size 0x\%x\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19062}19062                                 (uintmax\_t)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4987c39d05c289f627935f0b1661bec6}{rx\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a4987c39d05c289f627935f0b1661bec6}{rx\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19063}19063                                 (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * \mbox{\hyperlink{bxe_8h_ad01c7d2ab724866dcb46c514431fa4a3}{RX\_BD\_NUM\_PAGES}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19064}19064                         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}RX RCQ CHAIN fp \%d paddr \%\#jx vaddr \%p size 0x\%zx\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19065}19065                                 (uintmax\_t)fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_ab5de6c956cb79323d455706fc119b45d}{rcq\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19066}19066                                 (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * \mbox{\hyperlink{bxe_8h_a17518816b5fca4f643cf28daa7acc55b}{RCQ\_NUM\_PAGES}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19067}19067                         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}RX SGE CHAIN fp \%d paddr \%\#jx vaddr \%p size 0x\%x\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19068}19068                                 (uintmax\_t)fp-\/>\mbox{\hyperlink{structbxe__fastpath_a25b66543dacbc0212e674f98ff70eca3}{rx\_sge\_dma}}.\mbox{\hyperlink{structbxe__dma_aa41914e47d6ed6e5c0e2193e406375e7}{paddr}}, fp-\/>\mbox{\hyperlink{structbxe__fastpath_a25b66543dacbc0212e674f98ff70eca3}{rx\_sge\_dma}}.\mbox{\hyperlink{structbxe__dma_a4eded4389e385308c9fa7518588248e4}{vaddr}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19069}19069                                 (\mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}} * \mbox{\hyperlink{bxe_8h_ae9875871c72b8147f3bc813b2368db08}{RX\_SGE\_NUM\_PAGES}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19070}19070                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19071}19071                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19072}19072                 \textcolor{keywordflow}{if}(ilt != NULL ) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19073}19073                 ilt\_cli = \&ilt-\/>\mbox{\hyperlink{structecore__ilt_ac6afc23c2af5a66337c5f4d49d423ed2}{clients}}[1];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19074}19074                         \textcolor{keywordflow}{if}(ilt-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19075}19075                 \textcolor{keywordflow}{for} (i = ilt\_cli-\/>\mbox{\hyperlink{structilt__client__info_aff03bd4edf96ab67836ba6dc7d0871fa}{start}}; i <= ilt\_cli-\/>end; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19076}19076                         \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}ECORE\_ILT paddr \%\#jx vaddr \%p size 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19077}19077                                 (uintmax\_t)(((\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__dma}{bxe\_dma}} *)((\&ilt-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}}[i])-\/>page))-\/>paddr),}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19078}19078                                 ((\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__dma}{bxe\_dma}} *)((\&ilt-\/>\mbox{\hyperlink{structecore__ilt_af5515ca2b64a0e1a887814d3829f1603}{lines}}[i])-\/>page))-\/>vaddr, \mbox{\hyperlink{bxe_8h_a9795c430fec7cc5137683102d57c0648}{BCM\_PAGE\_SIZE}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19079}19079                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19080}19080                         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19081}19081                 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19082}19082 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19083}19083 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19084}19084         cmd\_offset = \mbox{\hyperlink{ecore__reg_8h_a63a08b86667c5b063c5ce328bf421e99}{DMAE\_REG\_CMD\_MEM}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19085}19085         \textcolor{keywordflow}{for} (i = 0; i < 224; i++) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19086}19086                 \mbox{\hyperlink{structreg__addr}{reg\_addr}} = (cmd\_offset +(i * 4));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19087}19087                 reg\_val = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, \mbox{\hyperlink{structreg__addr}{reg\_addr}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19088}19088                 \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}DMAE\_REG\_CMD\_MEM i=\%d reg\_addr 0x\%x reg\_val 0x\%08x\(\backslash\)n"{}},i,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19089}19089                                 \mbox{\hyperlink{structreg__addr}{reg\_addr}}, reg\_val);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19090}19090         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19091}19091         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19092}19092 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19093}19093     \mbox{\hyperlink{bxe_8h_a671481f25bb9f2b7ea5fd0d5c856d7d9}{BLOGI}}(sc, \textcolor{stringliteral}{"{}Collection of grcdump done\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19094}19094     sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}} = 1;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19095}19095     \textcolor{keywordflow}{return}(rval);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19096}19096 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19097}19097 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19098}19098 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19099}\mbox{\hyperlink{bxe_8c_ac76a2390458e70291dd5bfd2109c62db}{19099}} \mbox{\hyperlink{bxe_8c_ac76a2390458e70291dd5bfd2109c62db}{bxe\_add\_cdev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19100}19100 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19101}19101     sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}} = malloc(\mbox{\hyperlink{bxe__ioctl_8h_ad432cb7e53029b914e8fa358ae3e64f6}{BXE\_EEPROM\_MAX\_DATA\_LEN}}, M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19102}19102 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19103}19103     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19104}19104         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}Unable to alloc for eeprom size buffer\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19105}19105         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19106}19106     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19107}19107 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19108}19108     sc-\/>\mbox{\hyperlink{structbxe__softc_a5e47c0d88fafc2067ec669c3f5ca9b49}{ioctl\_dev}} = make\_dev(\&\mbox{\hyperlink{bxe_8c_ae0a0b8e04b44fb6e39d44e30f043a1b7}{bxe\_cdevsw}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19109}19109                             sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}-\/>if\_dunit,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19110}19110                             UID\_ROOT,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19111}19111                             GID\_WHEEL,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19112}19112                             0600,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19113}19113                             \textcolor{stringliteral}{"{}\%s"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19114}19114                             if\_name(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19115}19115 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19116}19116     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a5e47c0d88fafc2067ec669c3f5ca9b49}{ioctl\_dev}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19117}19117         free(sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19118}19118         sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19119}19119         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19120}19120     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19121}19121 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19122}19122     sc-\/>\mbox{\hyperlink{structbxe__softc_a5e47c0d88fafc2067ec669c3f5ca9b49}{ioctl\_dev}}-\/>si\_drv1 = sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19123}19123 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19124}19124     \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19125}19125 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19126}19126 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19127}19127 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19128}\mbox{\hyperlink{bxe_8c_a47a7891fb4cd1503371e2731bc8fec42}{19128}} \mbox{\hyperlink{bxe_8c_a47a7891fb4cd1503371e2731bc8fec42}{bxe\_del\_cdev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19129}19129 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19130}19130     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a5e47c0d88fafc2067ec669c3f5ca9b49}{ioctl\_dev}} != NULL)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19131}19131         destroy\_dev(sc-\/>\mbox{\hyperlink{structbxe__softc_a5e47c0d88fafc2067ec669c3f5ca9b49}{ioctl\_dev}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19132}19132 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19133}19133     \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19134}19134         free(sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19135}19135         sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19136}19136     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19137}19137     sc-\/>\mbox{\hyperlink{structbxe__softc_a5e47c0d88fafc2067ec669c3f5ca9b49}{ioctl\_dev}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19138}19138 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19139}19139     \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19140}19140 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19141}19141 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19142}\mbox{\hyperlink{bxe_8c_af6532a4c928f4b0667e7a73ef16cb085}{19142}} \textcolor{keyword}{static} \textcolor{keywordtype}{bool} \mbox{\hyperlink{bxe_8c_af6532a4c928f4b0667e7a73ef16cb085}{bxe\_is\_nvram\_accessible}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19143}19143 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19144}19144 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19145}19145     \textcolor{keywordflow}{if} ((if\_getdrvflags(sc-\/>\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING) == 0)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19146}19146         \textcolor{keywordflow}{return} FALSE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19147}19147 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19148}19148     \textcolor{keywordflow}{return} TRUE;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19149}19149 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19150}19150 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19151}19151 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19152}19152 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19153}\mbox{\hyperlink{bxe_8c_a2efb286b1e0e21a0b7c94521fbcd8dea}{19153}} \mbox{\hyperlink{bxe_8c_a2efb286b1e0e21a0b7c94521fbcd8dea}{bxe\_wr\_eeprom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, \textcolor{keywordtype}{void} *data, uint32\_t \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, uint32\_t len)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19154}19154 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19155}19155     \textcolor{keywordtype}{int} rval = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19156}19156 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19157}19157     \textcolor{keywordflow}{if}(!\mbox{\hyperlink{bxe_8c_af6532a4c928f4b0667e7a73ef16cb085}{bxe\_is\_nvram\_accessible}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19158}19158         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}Cannot access eeprom when interface is down\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19159}19159         \textcolor{keywordflow}{return} (-\/EAGAIN);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19160}19160     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19161}19161     rval = \mbox{\hyperlink{bxe_8c_a25d6cfb297b5c3d9aaf0436b841952cd}{bxe\_nvram\_write}}(sc, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, (uint8\_t *)data, len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19162}19162 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19163}19163 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19164}19164    \textcolor{keywordflow}{return} (rval);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19165}19165 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19166}19166 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19167}19167 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19168}\mbox{\hyperlink{bxe_8c_ad4eaff0c44ff3c57c8e8c4cee658a9b5}{19168}} \mbox{\hyperlink{bxe_8c_ad4eaff0c44ff3c57c8e8c4cee658a9b5}{bxe\_rd\_eeprom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, \textcolor{keywordtype}{void} *data, uint32\_t \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, uint32\_t len)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19169}19169 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19170}19170     \textcolor{keywordtype}{int} rval = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19171}19171 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19172}19172     \textcolor{keywordflow}{if}(!\mbox{\hyperlink{bxe_8c_af6532a4c928f4b0667e7a73ef16cb085}{bxe\_is\_nvram\_accessible}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19173}19173         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}Cannot access eeprom when interface is down\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19174}19174         \textcolor{keywordflow}{return} (-\/EAGAIN);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19175}19175     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19176}19176     rval = \mbox{\hyperlink{bxe_8c_a45bcc7f142ced7ca1993f58b5ef7ff21}{bxe\_nvram\_read}}(sc, \mbox{\hyperlink{bxe_8c_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}, (uint8\_t *)data, len);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19177}19177 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19178}19178    \textcolor{keywordflow}{return} (rval);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19179}19179 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19180}19180 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19181}19181 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19182}\mbox{\hyperlink{bxe_8c_a52f6f79beef8eb4044a4a469d548c35c}{19182}} \mbox{\hyperlink{bxe_8c_a52f6f79beef8eb4044a4a469d548c35c}{bxe\_eeprom\_rd\_wr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, \mbox{\hyperlink{structbxe__eeprom}{bxe\_eeprom\_t}} *eeprom)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19183}19183 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19184}19184     \textcolor{keywordtype}{int} rval = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19185}19185 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19186}19186     \textcolor{keywordflow}{switch} (eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_af465c43943da5fd43b5d28ae8ac7ef98}{eeprom\_cmd}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19187}19187 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19188}19188     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a91146749912a77dc0c487ae28f756788}{BXE\_EEPROM\_CMD\_SET\_EEPROM}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19189}19189 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19190}19190         rval = copyin(eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_ae47ed4659c4d1cac6572a967124b1ddd}{eeprom\_data}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19191}19191                        eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_abcd05ce458b156d146d2179a6f8c2b00}{eeprom\_data\_len}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19192}19192 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19193}19193         \textcolor{keywordflow}{if} (rval)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19194}19194             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19195}19195 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19196}19196         rval = \mbox{\hyperlink{bxe_8c_a2efb286b1e0e21a0b7c94521fbcd8dea}{bxe\_wr\_eeprom}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}}, eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_ad523078b19d0251416996854aa366c62}{eeprom\_offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19197}19197                        eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_abcd05ce458b156d146d2179a6f8c2b00}{eeprom\_data\_len}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19198}19198         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19199}19199 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19200}19200     \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a4d5ef689dd01b39454cf27da304a6d5a}{BXE\_EEPROM\_CMD\_GET\_EEPROM}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19201}19201 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19202}19202         rval = \mbox{\hyperlink{bxe_8c_ad4eaff0c44ff3c57c8e8c4cee658a9b5}{bxe\_rd\_eeprom}}(sc, sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}}, eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_ad523078b19d0251416996854aa366c62}{eeprom\_offset}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19203}19203                        eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_abcd05ce458b156d146d2179a6f8c2b00}{eeprom\_data\_len}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19204}19204 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19205}19205         \textcolor{keywordflow}{if} (rval) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19206}19206             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19207}19207         \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19208}19208 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19209}19209         rval = copyout(sc-\/>\mbox{\hyperlink{structbxe__softc_a3757cd5e6b3c72f91f62bb8ab3488b97}{eeprom}}, eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_ae47ed4659c4d1cac6572a967124b1ddd}{eeprom\_data}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19210}19210                        eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_abcd05ce458b156d146d2179a6f8c2b00}{eeprom\_data\_len}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19211}19211         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19212}19212 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19213}19213     \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19214}19214             rval = EINVAL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19215}19215             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19216}19216     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19217}19217 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19218}19218     \textcolor{keywordflow}{if} (rval) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19219}19219         \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}ioctl cmd \%d  failed rval \%d\(\backslash\)n"{}}, eeprom-\/>\mbox{\hyperlink{structbxe__eeprom_af465c43943da5fd43b5d28ae8ac7ef98}{eeprom\_cmd}}, rval);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19220}19220     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19221}19221 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19222}19222     \textcolor{keywordflow}{return} (rval);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19223}19223 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19224}19224 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19225}19225 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19226}\mbox{\hyperlink{bxe_8c_a0ba42a9f59a3152870aa7c7bdb48e060}{19226}} \mbox{\hyperlink{bxe_8c_a0ba42a9f59a3152870aa7c7bdb48e060}{bxe\_get\_settings}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc, \mbox{\hyperlink{structbxe__dev__setting}{bxe\_dev\_setting\_t}} *dev\_p)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19227}19227 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19228}19228     uint32\_t ext\_phy\_config;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19229}19229     \textcolor{keywordtype}{int} port = \mbox{\hyperlink{bxe_8h_a9fd59e630d8540d1b74153d03b4bfe4a}{SC\_PORT}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19230}19230     \textcolor{keywordtype}{int} cfg\_idx = \mbox{\hyperlink{bxe_8c_a4076cc1317dc700e3906fa6a55950093}{bxe\_get\_link\_cfg\_idx}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19231}19231 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19232}19232     dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_ad739387758aabda73c0c0abad3746737}{supported}} = sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[cfg\_idx] |}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19233}19233             (sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a85cd4c70dda04d58fe64229420aa7164}{supported}}[cfg\_idx \string^ 1] \&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19234}19234             (\mbox{\hyperlink{bxe__elink_8h_a9f4618aff8180f46ccdf461cb713b410}{ELINK\_SUPPORTED\_TP}} | \mbox{\hyperlink{bxe__elink_8h_a15949ea3eb2d72e035a00abad8235ec9}{ELINK\_SUPPORTED\_FIBRE}}));}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19235}19235     dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a7b11f8a740ca80ce3ca8dc4689d05565}{advertising}} = sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a58dabb00cf6e77e4f85db64531681bde}{advertising}}[cfg\_idx];}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19236}19236     \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_afcce2918313d023955dec5f34a8b526d}{phy}}[\mbox{\hyperlink{bxe_8c_a5818dc1ef1981651afb43d64515b3d3a}{bxe\_get\_cur\_phy\_idx}}(sc)].\mbox{\hyperlink{structelink__phy_a50bc555771466493db9fd6a3b2410944}{media\_type}} ==}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19237}19237         \mbox{\hyperlink{bxe__elink_8h_ad224c7083e192afa10d036059a1a8e1f}{ELINK\_ETH\_PHY\_SFP\_1G\_FIBER}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19238}19238         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_ad739387758aabda73c0c0abad3746737}{supported}} = \string~(\mbox{\hyperlink{bxe__elink_8h_abf422afe89f78dc4914b358232e40322}{ELINK\_SUPPORTED\_10000baseT\_Full}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19239}19239         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a7b11f8a740ca80ce3ca8dc4689d05565}{advertising}} \&= \string~(\mbox{\hyperlink{bxe_8h_a1df98b8e1d48bbfb9b5f9cb7901de6e8}{ADVERTISED\_10000baseT\_Full}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19240}19240     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19241}19241     \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structbxe__softc_a0246d801d0d663f6bd355f4b77141503}{state}} == \mbox{\hyperlink{bxe_8h_a0dd62d11afd1a1ce0273f5043e1130bd}{BXE\_STATE\_OPEN}}) \&\& sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}} \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19242}19242         !(sc-\/>\mbox{\hyperlink{structbxe__softc_a0ff1022ca3d124fb46d969c5f103780d}{flags}} \& \mbox{\hyperlink{bxe_8h_ae259e37c454eb48694a93b14502c93ca}{BXE\_MF\_FUNC\_DIS}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19243}19243         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a49b3a5b4c5af507d65c4f9959649be2e}{duplex}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_aebc38ae85e8537694f2d303ba6e93117}{duplex}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19244}19244         \textcolor{keywordflow}{if} (\mbox{\hyperlink{bxe_8h_a01f741f8fbaf0612b9fe05f0f88cff5b}{IS\_MF}}(sc) \&\& !\mbox{\hyperlink{bxe_8h_ae4bf799f775eeafef627dac04f6aec10}{BXE\_NOMCP}}(sc))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19245}19245             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a4f3dd4453e2c415308dffae78980ac31}{speed}} = \mbox{\hyperlink{bxe_8c_a7e544d96042fae5b8cd7595d3a10d18f}{bxe\_get\_mf\_speed}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19246}19246         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19247}19247             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a4f3dd4453e2c415308dffae78980ac31}{speed}} = sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_a324c3d820f392e712f071dde6a4aa6ca}{line\_speed}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19248}19248     \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19249}19249         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a49b3a5b4c5af507d65c4f9959649be2e}{duplex}} = \mbox{\hyperlink{bxe_8h_a78e587cd5254958b6e299dd542c5e22a}{DUPLEX\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19250}19250         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a4f3dd4453e2c415308dffae78980ac31}{speed}} = \mbox{\hyperlink{bxe_8h_a657820bbd3501b55446f36b257073bae}{SPEED\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19251}19251     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19252}19252 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19253}19253     dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a3a6fc081672cdf071494a45b60d663d1}{port}} = \mbox{\hyperlink{bxe_8c_a3619a0afe1a93594db30d43160cf032d}{bxe\_media\_detect}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19254}19254 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19255}19255     ext\_phy\_config = \mbox{\hyperlink{bxe_8h_af115302c1229218e8fb5dcff87e98f94}{SHMEM\_RD}}(sc,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19256}19256                          dev\_info.port\_hw\_config[port].external\_phy\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19257}19257     \textcolor{keywordflow}{if}((ext\_phy\_config \& \mbox{\hyperlink{ecore__hsi_8h_ab0480d0a5fb02c81beabe3f8f4d1cd6f}{PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_MASK}}) ==}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19258}19258         \mbox{\hyperlink{ecore__hsi_8h_a6e84ba27deb1f4d57c66947ceb63fe65}{PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_DIRECT}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19259}19259         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a164da561d2c6a74b59d7d04fd972859d}{phy\_address}} =  sc-\/>\mbox{\hyperlink{structbxe__softc_ab76a99413d3c61655c4cfc7970416744}{port}}.\mbox{\hyperlink{structbxe__port_a15920480b8858f3688cf555a0c992749}{phy\_addr}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19260}19260     \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(((ext\_phy\_config \& \mbox{\hyperlink{ecore__hsi_8h_ab0480d0a5fb02c81beabe3f8f4d1cd6f}{PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_MASK}}) !=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19261}19261             \mbox{\hyperlink{ecore__hsi_8h_adaef43e149dfc943116ba29e4ed531bb}{PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_FAILURE}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19262}19262         ((ext\_phy\_config \& \mbox{\hyperlink{ecore__hsi_8h_ab0480d0a5fb02c81beabe3f8f4d1cd6f}{PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_MASK}}) !=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19263}19263             \mbox{\hyperlink{ecore__hsi_8h_ad8d2fa7cde19d324ead45a340c419cbf}{PORT\_HW\_CFG\_XGXS\_EXT\_PHY\_TYPE\_NOT\_CONN}}))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19264}19264         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a164da561d2c6a74b59d7d04fd972859d}{phy\_address}} = \mbox{\hyperlink{bxe__elink_8h_af88d54cc2338e623415976b36b6fb32e}{ELINK\_XGXS\_EXT\_PHY\_ADDR}}(ext\_phy\_config);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19265}19265     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19266}19266         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a164da561d2c6a74b59d7d04fd972859d}{phy\_address}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19267}19267 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19268}19268     \textcolor{keywordflow}{if}(sc-\/>\mbox{\hyperlink{structbxe__softc_ab670b8f62c0209b7cf02268ffe355aa4}{link\_params}}.\mbox{\hyperlink{structelink__params_a7fcb7cdde587869677e20c3b25605b77}{req\_line\_speed}}[cfg\_idx] == \mbox{\hyperlink{bxe__elink_8h_afaf2d80469609a7f551ea532de2e6e8d}{ELINK\_SPEED\_AUTO\_NEG}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19269}19269         dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_ae84844287a54b42d52c828bd147e32e7}{autoneg}} = \mbox{\hyperlink{bxe_8h_a3a8d88b4deb60e5ee0feb07f156ab2d5}{AUTONEG\_ENABLE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19270}19270     \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19271}19271        dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_ae84844287a54b42d52c828bd147e32e7}{autoneg}} = \mbox{\hyperlink{bxe_8h_a38309c389333892852dada22a6915e3f}{AUTONEG\_DISABLE}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19272}19272 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19273}19273 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19274}19274     \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19275}19275 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19276}19276 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19277}19277 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19278}\mbox{\hyperlink{bxe_8c_af5a4a2432c330e43cc6a2cbe31b63afb}{19278}} \mbox{\hyperlink{bxe_8c_af5a4a2432c330e43cc6a2cbe31b63afb}{bxe\_eioctl}}(\textcolor{keyword}{struct} cdev *dev, u\_long cmd, caddr\_t data, \textcolor{keywordtype}{int} fflag,}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19279}19279         \textcolor{keyword}{struct} thread *td)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19280}19280 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19281}19281     \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}}    *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19282}19282     \textcolor{keywordtype}{int}                 rval = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19283}19283     \mbox{\hyperlink{structbxe__grcdump}{bxe\_grcdump\_t}}       *dump = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19284}19284     \textcolor{keywordtype}{int} grc\_dump\_size;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19285}19285     \mbox{\hyperlink{structbxe__drvinfo}{bxe\_drvinfo\_t}}   *drv\_infop = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19286}19286     \mbox{\hyperlink{structbxe__dev__setting}{bxe\_dev\_setting\_t}}  *dev\_p;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19287}19287     \mbox{\hyperlink{structbxe__dev__setting}{bxe\_dev\_setting\_t}}  dev\_set;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19288}19288     \mbox{\hyperlink{structbxe__get__regs}{bxe\_get\_regs\_t}}  *reg\_p;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19289}19289     \mbox{\hyperlink{structbxe__reg__rdw}{bxe\_reg\_rdw\_t}} *reg\_rdw\_p;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19290}19290     \mbox{\hyperlink{structbxe__pcicfg__rdw}{bxe\_pcicfg\_rdw\_t}} *cfg\_rdw\_p;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19291}19291     \mbox{\hyperlink{structbxe__perm__mac__addr}{bxe\_perm\_mac\_addr\_t}} *mac\_addr\_p;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19292}19292 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19293}19293 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19294}19294     \textcolor{keywordflow}{if} ((sc = (\textcolor{keyword}{struct} \mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *)\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}-\/>si\_drv1) == NULL)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19295}19295         \textcolor{keywordflow}{return} ENXIO;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19296}19296 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19297}19297     dump = (\mbox{\hyperlink{structbxe__grcdump}{bxe\_grcdump\_t}} *)data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19298}19298 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19299}19299     \textcolor{keywordflow}{switch}(cmd) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19300}19300 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19301}19301         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a2712f87432639cabe79935d25aeb4707}{BXE\_GRC\_DUMP\_SIZE}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19302}19302             dump-\/>\mbox{\hyperlink{structbxe__grcdump_a72eef0de7682698f8fb6c9be3ba07150}{pci\_func}} = sc-\/>\mbox{\hyperlink{structbxe__softc_ab6ce08d188ec8461f82c0d2e69ffb8ca}{pcie\_func}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19303}19303             dump-\/>\mbox{\hyperlink{structbxe__grcdump_a8c010e0d43b9b0db7c4f6b23fd121213}{grcdump\_size}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19304}19304                 (\mbox{\hyperlink{bxe_8c_af4898bbe61cb7d765b028fd7fa12a0d4}{bxe\_get\_total\_regs\_len32}}(sc) * \textcolor{keyword}{sizeof}(uint32\_t)) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19305}19305                      \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct  }\mbox{\hyperlink{structdump__header}{dump\_header}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19306}19306             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19307}19307 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19308}19308         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a74e49bf9c60873375052030626f0ead6}{BXE\_GRC\_DUMP}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19309}19309             }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19310}19310             grc\_dump\_size = (\mbox{\hyperlink{bxe_8c_af4898bbe61cb7d765b028fd7fa12a0d4}{bxe\_get\_total\_regs\_len32}}(sc) * \textcolor{keyword}{sizeof}(uint32\_t)) +}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19311}19311                                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct  }\mbox{\hyperlink{structdump__header}{dump\_header}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19312}19312             \textcolor{keywordflow}{if} ((!sc-\/>\mbox{\hyperlink{structbxe__softc_a4b1264f0563ea001f79c0a4db489b981}{trigger\_grcdump}}) || (dump-\/>\mbox{\hyperlink{structbxe__grcdump_aed4e8391517b3033cfe50bc4823c2146}{grcdump}} == NULL) ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19313}19313                 (dump-\/>\mbox{\hyperlink{structbxe__grcdump_a8c010e0d43b9b0db7c4f6b23fd121213}{grcdump\_size}} < grc\_dump\_size)) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19314}19314                 rval = EINVAL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19315}19315                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19316}19316             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19317}19317 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19318}19318             \textcolor{keywordflow}{if}((sc-\/>\mbox{\hyperlink{structbxe__softc_a4b1264f0563ea001f79c0a4db489b981}{trigger\_grcdump}}) \&\& (!sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19319}19319                 (!sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19320}19320                 rval =  \mbox{\hyperlink{bxe_8c_a29af23f076c40ae19a6f213ce619d7e4}{bxe\_grc\_dump}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19321}19321             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19322}19322 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19323}19323             \textcolor{keywordflow}{if}((!rval) \&\& (sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}}) \&\& (sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19324}19324                 (sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}} != NULL))  \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19325}19325                 dump-\/>\mbox{\hyperlink{structbxe__grcdump_aee6adfce5cea4d2e630e655486288309}{grcdump\_dwords}} = grc\_dump\_size >> 2;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19326}19326                 rval = copyout(sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}}, dump-\/>\mbox{\hyperlink{structbxe__grcdump_aed4e8391517b3033cfe50bc4823c2146}{grcdump}}, grc\_dump\_size);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19327}19327                 free(sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19328}19328                 sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19329}19329                 sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19330}19330                 sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19331}19331             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19332}19332 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19333}19333             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19334}19334 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19335}19335         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a850e631ceabcced8362c737f5de95bd4}{BXE\_DRV\_INFO}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19336}19336             drv\_infop = (\mbox{\hyperlink{structbxe__drvinfo}{bxe\_drvinfo\_t}} *)data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19337}19337             snprintf(drv\_infop-\/>\mbox{\hyperlink{structbxe__drvinfo_a52db787a13f865b5f238a20f0146fabb}{drv\_name}}, \mbox{\hyperlink{bxe__ioctl_8h_a0ecf444cb9c08d3d86985d7e5a4475d9}{BXE\_DRV\_NAME\_LENGTH}}, \textcolor{stringliteral}{"{}\%s"{}}, \textcolor{stringliteral}{"{}bxe"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19338}19338             snprintf(drv\_infop-\/>\mbox{\hyperlink{structbxe__drvinfo_a4d05bc8f5b02bde46989cec283c31de6}{drv\_version}}, \mbox{\hyperlink{bxe__ioctl_8h_a878df99b6484aca4a7736ae144390ec8}{BXE\_DRV\_VERSION\_LENGTH}}, \textcolor{stringliteral}{"{}v:\%s"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19339}19339                 \mbox{\hyperlink{bxe_8c_a976c2e4222c6339043f2145097755339}{BXE\_DRIVER\_VERSION}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19340}19340             snprintf(drv\_infop-\/>\mbox{\hyperlink{structbxe__drvinfo_a51fc6fec0759d1e0e146ca946a17dfe5}{mfw\_version}}, \mbox{\hyperlink{bxe__ioctl_8h_a10a45e6cb1b5fa6ee957c8cc6c4e17f8}{BXE\_MFW\_VERSION\_LENGTH}}, \textcolor{stringliteral}{"{}\%s"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19341}19341                 sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_ad79019752cbc53dd06c5b351504c55d5}{bc\_ver\_str}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19342}19342             snprintf(drv\_infop-\/>\mbox{\hyperlink{structbxe__drvinfo_add61f3583d99fc1e19eb925e7ccc379b}{stormfw\_version}}, \mbox{\hyperlink{bxe__ioctl_8h_a5e9e34f5aa4ae563ab09decfb90ba6ce}{BXE\_STORMFW\_VERSION\_LENGTH}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19343}19343                 \textcolor{stringliteral}{"{}\%s"{}}, sc-\/>\mbox{\hyperlink{structbxe__softc_aef7e0756f6d39df15a9a19d34f11b5e0}{fw\_ver\_str}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19344}19344             drv\_infop-\/>\mbox{\hyperlink{structbxe__drvinfo_a40386b42f71eaf91a224b16fad42395c}{eeprom\_dump\_len}} = sc-\/>\mbox{\hyperlink{structbxe__softc_abf5d6f6679739389c36ce2fe01e6ab0c}{devinfo}}.\mbox{\hyperlink{structbxe__devinfo_a56aa7da937334b74324d1a9bc1afb49a}{flash\_size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19345}19345             drv\_infop-\/>\mbox{\hyperlink{structbxe__drvinfo_a1a10afe71fee3cf3c87ca0e3e1a06be4}{reg\_dump\_len}} =}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19346}19346                 (\mbox{\hyperlink{bxe_8c_af4898bbe61cb7d765b028fd7fa12a0d4}{bxe\_get\_total\_regs\_len32}}(sc) * \textcolor{keyword}{sizeof}(uint32\_t))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19347}19347                     + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct  }\mbox{\hyperlink{structdump__header}{dump\_header}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19348}19348             snprintf(drv\_infop-\/>\mbox{\hyperlink{structbxe__drvinfo_afddf538f2c26d3fa9e6573f7554937ad}{bus\_info}}, \mbox{\hyperlink{bxe__ioctl_8h_a1b389e540f1bc61058170e8a7f5861af}{BXE\_BUS\_INFO\_LENGTH}}, \textcolor{stringliteral}{"{}\%d:\%d:\%d"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19349}19349                 sc-\/>\mbox{\hyperlink{structbxe__softc_a805a7bc48682774879bc5f8e7f5f7340}{pcie\_bus}}, sc-\/>\mbox{\hyperlink{structbxe__softc_a5f5a04f83e01bf3aa5ab17a137d91ad1}{pcie\_device}}, sc-\/>\mbox{\hyperlink{structbxe__softc_ab6ce08d188ec8461f82c0d2e69ffb8ca}{pcie\_func}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19350}19350             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19351}19351 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19352}19352         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a7c11786fb79a3b0ee16d5da72716cb98}{BXE\_DEV\_SETTING}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19353}19353             dev\_p = (\mbox{\hyperlink{structbxe__dev__setting}{bxe\_dev\_setting\_t}} *)data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19354}19354             \mbox{\hyperlink{bxe_8c_a0ba42a9f59a3152870aa7c7bdb48e060}{bxe\_get\_settings}}(sc, \&dev\_set);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19355}19355             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_ad739387758aabda73c0c0abad3746737}{supported}} = dev\_set.\mbox{\hyperlink{structbxe__dev__setting_ad739387758aabda73c0c0abad3746737}{supported}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19356}19356             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a7b11f8a740ca80ce3ca8dc4689d05565}{advertising}} = dev\_set.\mbox{\hyperlink{structbxe__dev__setting_a7b11f8a740ca80ce3ca8dc4689d05565}{advertising}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19357}19357             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a4f3dd4453e2c415308dffae78980ac31}{speed}} = dev\_set.\mbox{\hyperlink{structbxe__dev__setting_a4f3dd4453e2c415308dffae78980ac31}{speed}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19358}19358             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a49b3a5b4c5af507d65c4f9959649be2e}{duplex}} = dev\_set.\mbox{\hyperlink{structbxe__dev__setting_a49b3a5b4c5af507d65c4f9959649be2e}{duplex}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19359}19359             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a3a6fc081672cdf071494a45b60d663d1}{port}} = dev\_set.\mbox{\hyperlink{structbxe__dev__setting_a3a6fc081672cdf071494a45b60d663d1}{port}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19360}19360             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_a164da561d2c6a74b59d7d04fd972859d}{phy\_address}} = dev\_set.\mbox{\hyperlink{structbxe__dev__setting_a164da561d2c6a74b59d7d04fd972859d}{phy\_address}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19361}19361             dev\_p-\/>\mbox{\hyperlink{structbxe__dev__setting_ae84844287a54b42d52c828bd147e32e7}{autoneg}} = dev\_set.\mbox{\hyperlink{structbxe__dev__setting_ae84844287a54b42d52c828bd147e32e7}{autoneg}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19362}19362 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19363}19363             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19364}19364 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19365}19365         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a7218e8cc48da481ebbfd8fe975bc1e19}{BXE\_GET\_REGS}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19366}19366 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19367}19367             reg\_p = (\mbox{\hyperlink{structbxe__get__regs}{bxe\_get\_regs\_t}} *)data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19368}19368             grc\_dump\_size = reg\_p-\/>\mbox{\hyperlink{structbxe__get__regs_abd2a5d8073e7cf981779fd7a4cfa38dc}{reg\_buf\_len}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19369}19369 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19370}19370             \textcolor{keywordflow}{if}((!sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}}) \&\& (!sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}})) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19371}19371                 \mbox{\hyperlink{bxe_8c_a29af23f076c40ae19a6f213ce619d7e4}{bxe\_grc\_dump}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19372}19372             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19373}19373             \textcolor{keywordflow}{if}((sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}}) \&\& (sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19374}19374                 (sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}} != NULL))  \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19375}19375                 rval = copyout(sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}}, reg\_p-\/>\mbox{\hyperlink{structbxe__get__regs_a4228aef5c1680b2511fb821d8762420b}{reg\_buf}}, grc\_dump\_size);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19376}19376                 free(sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19377}19377                 sc-\/>\mbox{\hyperlink{structbxe__softc_a72ffd72d6c9aae3e33460ebe323b0610}{grc\_dump}} = NULL;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19378}19378                 sc-\/>\mbox{\hyperlink{structbxe__softc_a6656792eb148ff9fc287ccb6dfee07a7}{grcdump\_started}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19379}19379                 sc-\/>\mbox{\hyperlink{structbxe__softc_adde21b98daae5ed86767be9bdda01b32}{grcdump\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19380}19380             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19381}19381 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19382}19382             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19383}19383 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19384}19384         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a8540119fe7f0323ed4912a304abe7917}{BXE\_RDW\_REG}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19385}19385             reg\_rdw\_p = (\mbox{\hyperlink{structbxe__reg__rdw}{bxe\_reg\_rdw\_t}} *)data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19386}19386             \textcolor{keywordflow}{if}((reg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__reg__rdw_ae9060e48474d133df95093d4c0133e99}{reg\_cmd}} == \mbox{\hyperlink{bxe__ioctl_8h_a4f52b6a00c5c0d2533a2e821c67a0819}{BXE\_READ\_REG\_CMD}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19387}19387                 (reg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__reg__rdw_af4fb4031c50db24b381c219ebe50254e}{reg\_access\_type}} == \mbox{\hyperlink{bxe__ioctl_8h_a482cd584c692544ce289a71fb50eab16}{BXE\_REG\_ACCESS\_DIRECT}}))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19388}19388                 reg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__reg__rdw_a37be3c196eb9346db55360da155c690c}{reg\_val}} = \mbox{\hyperlink{bxe_8h_ad5b5982a88cea848e69de3f7b788f2ed}{REG\_RD}}(sc, reg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__reg__rdw_ae7fb83b32aa93cee16348a44b4ec37e2}{reg\_id}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19389}19389 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19390}19390             \textcolor{keywordflow}{if}((reg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__reg__rdw_ae9060e48474d133df95093d4c0133e99}{reg\_cmd}} == \mbox{\hyperlink{bxe__ioctl_8h_a45b263b62a155aeb8ef2bcaa687a561a}{BXE\_WRITE\_REG\_CMD}}) \&\&}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19391}19391                 (reg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__reg__rdw_af4fb4031c50db24b381c219ebe50254e}{reg\_access\_type}} == \mbox{\hyperlink{bxe__ioctl_8h_a482cd584c692544ce289a71fb50eab16}{BXE\_REG\_ACCESS\_DIRECT}}))}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19392}19392                 \mbox{\hyperlink{bxe_8h_aea6c0cdd0f515f8a82ba42a99b925474}{REG\_WR}}(sc, reg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__reg__rdw_ae7fb83b32aa93cee16348a44b4ec37e2}{reg\_id}}, reg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__reg__rdw_a37be3c196eb9346db55360da155c690c}{reg\_val}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19393}19393 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19394}19394             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19395}19395 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19396}19396         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_adebe669969b725d65f7307d92ad1502c}{BXE\_RDW\_PCICFG}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19397}19397             cfg\_rdw\_p = (\mbox{\hyperlink{structbxe__pcicfg__rdw}{bxe\_pcicfg\_rdw\_t}} *)data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19398}19398             \textcolor{keywordflow}{if}(cfg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__pcicfg__rdw_ac8747d19fd7f7aa5a81d047ac1fc3e77}{cfg\_cmd}} == \mbox{\hyperlink{bxe__ioctl_8h_abaa49fcd47f927e4d38a3969d7d574d7}{BXE\_READ\_PCICFG}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19399}19399 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19400}19400                 cfg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__pcicfg__rdw_afaf8d8f771e295fa44a7ba1421ed6718}{cfg\_val}} = pci\_read\_config(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, cfg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__pcicfg__rdw_a6d78c0acc4a4bd773eed17882592ba51}{cfg\_id}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19401}19401                                          cfg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__pcicfg__rdw_afb2ff00cd52f5bcd2d4a010c895102fe}{cfg\_width}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19402}19402 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19403}19403             \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(cfg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__pcicfg__rdw_ac8747d19fd7f7aa5a81d047ac1fc3e77}{cfg\_cmd}} == \mbox{\hyperlink{bxe__ioctl_8h_a01f12c5c24dbd60e6b5bf8876383a5c1}{BXE\_WRITE\_PCICFG}}) \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19404}19404                 pci\_write\_config(sc-\/>\mbox{\hyperlink{structbxe__softc_a6430864b9fa679cf1b820a9c7bff264c}{dev}}, cfg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__pcicfg__rdw_a6d78c0acc4a4bd773eed17882592ba51}{cfg\_id}}, cfg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__pcicfg__rdw_afaf8d8f771e295fa44a7ba1421ed6718}{cfg\_val}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19405}19405                             cfg\_rdw\_p-\/>\mbox{\hyperlink{structbxe__pcicfg__rdw_afb2ff00cd52f5bcd2d4a010c895102fe}{cfg\_width}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19406}19406             \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19407}19407                 \mbox{\hyperlink{bxe_8h_a4887f6e6410de4ba212bff17651a2bd4}{BLOGW}}(sc, \textcolor{stringliteral}{"{}BXE\_RDW\_PCICFG ioctl wrong cmd passed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19408}19408             \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19409}19409             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19410}19410 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19411}19411         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a871bc07d4e0f5f71f6a3c77bf03dd728}{BXE\_MAC\_ADDR}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19412}19412             mac\_addr\_p = (\mbox{\hyperlink{structbxe__perm__mac__addr}{bxe\_perm\_mac\_addr\_t}} *)data;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19413}19413             snprintf(mac\_addr\_p-\/>\mbox{\hyperlink{structbxe__perm__mac__addr_a91fe52e0521d605de0592fa2513b2d1c}{mac\_addr\_str}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structbxe__softc_af4d559cc56bc16a9fa22ca72ab331cb7}{mac\_addr\_str}}), \textcolor{stringliteral}{"{}\%s"{}},}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19414}19414                 sc-\/>\mbox{\hyperlink{structbxe__softc_af4d559cc56bc16a9fa22ca72ab331cb7}{mac\_addr\_str}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19415}19415             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19416}19416 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19417}19417         \textcolor{keywordflow}{case} \mbox{\hyperlink{bxe__ioctl_8h_a8fcc9bec0fee73e0501966497b04d55d}{BXE\_EEPROM}}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19418}19418             rval = \mbox{\hyperlink{bxe_8c_a52f6f79beef8eb4044a4a469d548c35c}{bxe\_eeprom\_rd\_wr}}(sc, (\mbox{\hyperlink{structbxe__eeprom}{bxe\_eeprom\_t}} *)data);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19419}19419             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19420}19420 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19421}19421 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19422}19422         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19423}19423             \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19424}19424     \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19425}19425 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19426}19426     \textcolor{keywordflow}{return} (rval);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19427}19427 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19428}19428 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19429}19429 \textcolor{preprocessor}{\#ifdef DEBUGNET}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19430}19430 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19431}19431 bxe\_debugnet\_init(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keywordtype}{int} *nrxr, \textcolor{keywordtype}{int} *ncl, \textcolor{keywordtype}{int} *clsize)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19432}19432 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19433}19433         \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19434}19434 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19435}19435         sc = if\_getsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19436}19436         \mbox{\hyperlink{bxe_8h_a5919e7e286f3f6ef13c2f25713c4c5a3}{BXE\_CORE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19437}19437         *nrxr = sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19438}19438         *ncl = DEBUGNET\_MAX\_IN\_FLIGHT;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19439}19439         *clsize = sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0].\mbox{\hyperlink{structbxe__fastpath_ab7d812607cee03c45efffc679003448c}{mbuf\_alloc\_size}};}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19440}19440         \mbox{\hyperlink{bxe_8h_a1168ec7898f5207108db50b82b8579fb}{BXE\_CORE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19441}19441 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19442}19442 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19443}19443 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19444}19444 bxe\_debugnet\_event(\textcolor{keyword}{struct} ifnet *\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}} \_\_unused, \textcolor{keyword}{enum} debugnet\_ev event \_\_unused)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19445}19445 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19446}19446 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19447}19447 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19448}19448 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19449}19449 bxe\_debugnet\_transmit(\textcolor{keyword}{struct} ifnet *\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \textcolor{keyword}{struct} mbuf *m)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19450}19450 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19451}19451         \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19452}19452         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19453}19453 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19454}19454         sc = if\_getsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19455}19455         \textcolor{keywordflow}{if} ((if\_getdrvflags(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& (IFF\_DRV\_RUNNING | IFF\_DRV\_OACTIVE)) !=}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19456}19456             IFF\_DRV\_RUNNING || !sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19457}19457                 \textcolor{keywordflow}{return} (ENOENT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19458}19458 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19459}19459         error = \mbox{\hyperlink{bxe_8c_a710078c9a6653e2d8965bca956ce98ed}{bxe\_tx\_encap}}(\&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0], \&m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19460}19460         \textcolor{keywordflow}{if} (error != 0 \&\& m != NULL)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19461}19461                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19462}19462         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19463}19463 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19464}19464 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19465}19465 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19466}19466 bxe\_debugnet\_poll(\textcolor{keyword}{struct} ifnet *\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}, \textcolor{keywordtype}{int} count)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19467}19467 \{}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19468}19468         \textcolor{keyword}{struct }\mbox{\hyperlink{structbxe__softc}{bxe\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19469}19469         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19470}19470 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19471}19471         sc = if\_getsoftc(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}});}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19472}19472         \textcolor{keywordflow}{if} ((if\_getdrvflags(\mbox{\hyperlink{structbxe__softc_ac366ca8d305c3090a2342a984e1f1a9d}{ifp}}) \& IFF\_DRV\_RUNNING) == 0 ||}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19473}19473             !sc-\/>\mbox{\hyperlink{structbxe__softc_a7fb293c08cf79e99c9f660a420cbe208}{link\_vars}}.\mbox{\hyperlink{structelink__vars_ab6fcf0bd1b548ff5b37ece3ac7a1c506}{link\_up}})}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19474}19474                 \textcolor{keywordflow}{return} (ENOENT);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19475}19475 }
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19476}19476         \textcolor{keywordflow}{for} (i = 0; i < sc-\/>\mbox{\hyperlink{structbxe__softc_aca8170352c02ea8bacebe2c65b572c5d}{num\_queues}}; i++)}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19477}19477                 (\textcolor{keywordtype}{void})\mbox{\hyperlink{bxe_8c_a686ef9c83cbbe9b76a38c5c8cd87bd7c}{bxe\_rxeof}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[i]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19478}19478         (void)\mbox{\hyperlink{bxe_8c_ad85194661cbd93eb4fb0192874087ff1}{bxe\_txeof}}(sc, \&sc-\/>\mbox{\hyperlink{structbxe__softc_a785d0e462c9484621bfc527bc689af01}{fp}}[0]);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19479}19479         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19480}19480 \}}
\DoxyCodeLine{\Hypertarget{bxe_8c_source_l19481}19481 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* DEBUGNET */}\textcolor{preprocessor}{}}

\end{DoxyCode}
