\hypertarget{sfxge_8c_source}{}\doxysection{sfxge.\+c}
\label{sfxge_8c_source}\index{dev/sfxge/sfxge.c@{dev/sfxge/sfxge.c}}
\mbox{\hyperlink{sfxge_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2010-\/2016 Solarflare Communications Inc.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00007}00007 \textcolor{comment}{ * This software was developed in part by Philip Paeps under contract for}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00008}00008 \textcolor{comment}{ * Solarflare Communications, Inc.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00010}00010 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00011}00011 \textcolor{comment}{ * modification, are permitted provided that the following conditions are met:}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00013}00013 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright notice,}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00014}00014 \textcolor{comment}{ *    this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00015}00015 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright notice,}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00016}00016 \textcolor{comment}{ *    this list of conditions and the following disclaimer in the documentation}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00017}00017 \textcolor{comment}{ *    and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00018}00018 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00019}00019 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "{}AS IS"{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00020}00020 \textcolor{comment}{ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00021}00021 \textcolor{comment}{ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00022}00022 \textcolor{comment}{ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00023}00023 \textcolor{comment}{ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00024}00024 \textcolor{comment}{ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00025}00025 \textcolor{comment}{ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00026}00026 \textcolor{comment}{ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00027}00027 \textcolor{comment}{ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00028}00028 \textcolor{comment}{ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00029}00029 \textcolor{comment}{ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00030}00030 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00031}00031 \textcolor{comment}{ * The views and conclusions contained in the software and documentation are}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00032}00032 \textcolor{comment}{ * those of the authors and should not be interpreted as representing official}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00033}00033 \textcolor{comment}{ * policies, either expressed or implied, of the FreeBSD Project.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00034}00034 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00037}\mbox{\hyperlink{sfxge_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00037}} \mbox{\hyperlink{sfxge_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00039}00039 \textcolor{preprocessor}{\#include "{}opt\_rss.h"{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/rman.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/smp.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/sockio.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/syslog.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <dev/pci/pcireg.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <dev/pci/pcivar.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <net/ethernet.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <net/if\_types.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00065}00065 \textcolor{preprocessor}{\#ifdef RSS}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <net/rss\_config.h>}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00067}00067 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00069}00069 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{efx_8h}{common/efx.h}}"{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00071}00071 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{sfxge_8h}{sfxge.h}}"{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00072}00072 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{sfxge__rx_8h}{sfxge\_rx.h}}"{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00073}00073 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{sfxge__ioc_8h}{sfxge\_ioc.h}}"{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00074}00074 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{sfxge__version_8h}{sfxge\_version.h}}"{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00076}\mbox{\hyperlink{sfxge_8c_a03bef253b7a820ed224d9acb10474fef}{00076}} \textcolor{preprocessor}{\#define SFXGE\_CAP (IFCAP\_VLAN\_MTU | IFCAP\_VLAN\_HWCSUM |                 \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00077}00077 \textcolor{preprocessor}{                   IFCAP\_RXCSUM | IFCAP\_TXCSUM |                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00078}00078 \textcolor{preprocessor}{                   IFCAP\_RXCSUM\_IPV6 | IFCAP\_TXCSUM\_IPV6 |              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00079}00079 \textcolor{preprocessor}{                   IFCAP\_TSO4 | IFCAP\_TSO6 |                            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00080}00080 \textcolor{preprocessor}{                   IFCAP\_JUMBO\_MTU |                                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00081}00081 \textcolor{preprocessor}{                   IFCAP\_VLAN\_HWTSO | IFCAP\_LINKSTATE | IFCAP\_HWSTATS)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00082}\mbox{\hyperlink{sfxge_8c_a2a2ce79a1799753741d2bacbe7a5bef4}{00082}} \textcolor{preprocessor}{\#define SFXGE\_CAP\_ENABLE SFXGE\_CAP}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00083}\mbox{\hyperlink{sfxge_8c_ae7c4602eb64a7bb9fe2da2c982262a03}{00083}} \textcolor{preprocessor}{\#define SFXGE\_CAP\_FIXED (IFCAP\_VLAN\_MTU |                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00084}00084 \textcolor{preprocessor}{                         IFCAP\_JUMBO\_MTU | IFCAP\_LINKSTATE | IFCAP\_HWSTATS)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00086}\mbox{\hyperlink{sfxge_8c_a07c9c1cb7444ac006936147dc8a65d9c}{00086}} \mbox{\hyperlink{sfxge_8c_a07c9c1cb7444ac006936147dc8a65d9c}{MALLOC\_DEFINE}}(M\_SFXGE, \textcolor{stringliteral}{"{}sfxge"{}}, \textcolor{stringliteral}{"{}Solarflare 10GigE driver"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00088}\mbox{\hyperlink{sfxge_8c_aa4a97ccfa635d63e0cf05baca337cbde}{00088}} \mbox{\hyperlink{sfxge_8c_aa4a97ccfa635d63e0cf05baca337cbde}{SYSCTL\_NODE}}(\_hw, OID\_AUTO, sfxge, CTLFLAG\_RD | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00089}00089     \textcolor{stringliteral}{"{}SFXGE driver parameters"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00091}\mbox{\hyperlink{sfxge_8c_a3b2198bef7d3c25a76282acc7efdb3c3}{00091}} \textcolor{preprocessor}{\#define SFXGE\_PARAM\_RX\_RING     SFXGE\_PARAM(rx\_ring)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00092}\mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{00092}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{sfxge\_rx\_ring\_entries}} = \mbox{\hyperlink{sfxge_8h_a4915afcd59f0cb465f998637581105ac}{SFXGE\_NDESCS}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00093}\mbox{\hyperlink{sfxge_8c_a506974263040d2da2f46cab0d711ba86}{00093}} \mbox{\hyperlink{sfxge_8c_a506974263040d2da2f46cab0d711ba86}{TUNABLE\_INT}}(\mbox{\hyperlink{sfxge_8c_a3b2198bef7d3c25a76282acc7efdb3c3}{SFXGE\_PARAM\_RX\_RING}}, \&\mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{sfxge\_rx\_ring\_entries}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00094}\mbox{\hyperlink{sfxge_8c_a0b370c0532f0c38a18cd909be5bb53ef}{00094}} \mbox{\hyperlink{sfxge_8c_a0b370c0532f0c38a18cd909be5bb53ef}{SYSCTL\_INT}}(\_hw\_sfxge, OID\_AUTO, rx\_ring, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00095}00095            \&\mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{sfxge\_rx\_ring\_entries}}, 0,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00096}00096            \textcolor{stringliteral}{"{}Maximum number of descriptors in a receive ring"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00098}\mbox{\hyperlink{sfxge_8c_ad544ac08c0b411f12f5cd4b9d1fa8a52}{00098}} \textcolor{preprocessor}{\#define SFXGE\_PARAM\_TX\_RING     SFXGE\_PARAM(tx\_ring)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00099}\mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{00099}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{sfxge\_tx\_ring\_entries}} = \mbox{\hyperlink{sfxge_8h_a4915afcd59f0cb465f998637581105ac}{SFXGE\_NDESCS}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00100}\mbox{\hyperlink{sfxge_8c_aba4d47b1813083365e3c15cc27b60269}{00100}} \mbox{\hyperlink{sfxge_8c_a506974263040d2da2f46cab0d711ba86}{TUNABLE\_INT}}(\mbox{\hyperlink{sfxge_8c_ad544ac08c0b411f12f5cd4b9d1fa8a52}{SFXGE\_PARAM\_TX\_RING}}, \&\mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{sfxge\_tx\_ring\_entries}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00101}\mbox{\hyperlink{sfxge_8c_a7654dc4e50711b4389d4596ed2fb1a50}{00101}} \mbox{\hyperlink{sfxge_8c_a0b370c0532f0c38a18cd909be5bb53ef}{SYSCTL\_INT}}(\_hw\_sfxge, OID\_AUTO, tx\_ring, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00102}00102            \&\mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{sfxge\_tx\_ring\_entries}}, 0,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00103}00103            \textcolor{stringliteral}{"{}Maximum number of descriptors in a transmit ring"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00105}\mbox{\hyperlink{sfxge_8c_a96ebac442c21206d2cb1021aeab86f9d}{00105}} \textcolor{preprocessor}{\#define SFXGE\_PARAM\_RESTART\_ATTEMPTS    SFXGE\_PARAM(restart\_attempts)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00106}\mbox{\hyperlink{sfxge_8c_a7587e929ad85dedddd51c166bc9564c1}{00106}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{sfxge_8c_a7587e929ad85dedddd51c166bc9564c1}{sfxge\_restart\_attempts}} = 3;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00107}\mbox{\hyperlink{sfxge_8c_a705b1ff7f19f3df2e9d7e453eacfb717}{00107}} \mbox{\hyperlink{sfxge_8c_a506974263040d2da2f46cab0d711ba86}{TUNABLE\_INT}}(\mbox{\hyperlink{sfxge_8c_a96ebac442c21206d2cb1021aeab86f9d}{SFXGE\_PARAM\_RESTART\_ATTEMPTS}}, \&\mbox{\hyperlink{sfxge_8c_a7587e929ad85dedddd51c166bc9564c1}{sfxge\_restart\_attempts}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00108}\mbox{\hyperlink{sfxge_8c_af9acf583e4eab777a220b02549a2cd75}{00108}} \mbox{\hyperlink{sfxge_8c_a0b370c0532f0c38a18cd909be5bb53ef}{SYSCTL\_INT}}(\_hw\_sfxge, OID\_AUTO, restart\_attempts, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00109}00109            \&\mbox{\hyperlink{sfxge_8c_a7587e929ad85dedddd51c166bc9564c1}{sfxge\_restart\_attempts}}, 0,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00110}00110            \textcolor{stringliteral}{"{}Maximum number of attempts to bring interface up after reset"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00112}00112 \textcolor{preprocessor}{\#if EFSYS\_OPT\_MCDI\_LOGGING}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00113}00113 \textcolor{preprocessor}{\#define SFXGE\_PARAM\_MCDI\_LOGGING        SFXGE\_PARAM(mcdi\_logging)}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00114}00114 \textcolor{keyword}{static} \textcolor{keywordtype}{int} sfxge\_mcdi\_logging = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00115}00115 \mbox{\hyperlink{sfxge_8c_a506974263040d2da2f46cab0d711ba86}{TUNABLE\_INT}}(SFXGE\_PARAM\_MCDI\_LOGGING, \&sfxge\_mcdi\_logging);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00116}00116 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00118}00118 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00119}00119 \mbox{\hyperlink{sfxge_8c_a71b4643158385717e1e6ed7cea6ca5db}{sfxge\_reset}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} npending);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00121}00121 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00122}\mbox{\hyperlink{sfxge_8c_a5c61661b1612af6cbb6102d94d3d16e4}{00122}} \mbox{\hyperlink{sfxge_8c_a5c61661b1612af6cbb6102d94d3d16e4}{sfxge\_estimate\_rsrc\_limits}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00123}00123 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00124}00124         \mbox{\hyperlink{structefx__drv__limits__s}{efx\_drv\_limits\_t}} limits;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00125}00125         \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00126}00126         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} evq\_max;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00127}00127         uint32\_t evq\_allocated;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00128}00128         uint32\_t rxq\_allocated;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00129}00129         uint32\_t txq\_allocated;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00131}00131         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00132}00132 \textcolor{comment}{         * Limit the number of event queues to:}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00133}00133 \textcolor{comment}{         *  -\/ number of CPUs}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00134}00134 \textcolor{comment}{         *  -\/ hardwire maximum RSS channels}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00135}00135 \textcolor{comment}{         *  -\/ administratively specified maximum RSS channels}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00136}00136 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00137}00137 \textcolor{preprocessor}{\#ifdef RSS}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00138}00138         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00139}00139 \textcolor{comment}{         * Avoid extra limitations so that the number of queues}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00140}00140 \textcolor{comment}{         * may be configured at administrator's will}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00141}00141 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00142}00142         evq\_max = MIN(MAX(rss\_getnumbuckets(), 1), \mbox{\hyperlink{efx_8h_a5e03b19e9228af8a5b384d89f0140188}{EFX\_MAXRSS}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00143}00143 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00144}00144         evq\_max = MIN(mp\_ncpus, \mbox{\hyperlink{efx_8h_a5e03b19e9228af8a5b384d89f0140188}{EFX\_MAXRSS}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00145}00145 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00146}00146         \textcolor{keywordflow}{if} (\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a334730213970097f7b79f47a116c45ea}{max\_rss\_channels}} > 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00147}00147                 evq\_max = MIN(evq\_max, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a334730213970097f7b79f47a116c45ea}{max\_rss\_channels}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00149}00149         memset(\&limits, 0, \textcolor{keyword}{sizeof}(limits));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00151}00151         limits.\mbox{\hyperlink{structefx__drv__limits__s_aaa13ac1c2b841f96f5c8736bd46378a4}{edl\_min\_evq\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00152}00152         limits.\mbox{\hyperlink{structefx__drv__limits__s_a6fc20779a79fae689be13034b17125c7}{edl\_max\_evq\_count}} = evq\_max;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00153}00153         limits.\mbox{\hyperlink{structefx__drv__limits__s_a1f34a605295922e9ec106b41b8beb492}{edl\_min\_txq\_count}} = \mbox{\hyperlink{sfxge__tx_8h_abedc03d80e0cb6b84a0ad1dc1db3b4b8}{SFXGE\_EVQ0\_N\_TXQ}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00154}00154         limits.\mbox{\hyperlink{structefx__drv__limits__s_ad4e86bc1daeea46c4ee6344cf9ae4c4f}{edl\_max\_txq\_count}} = evq\_max + \mbox{\hyperlink{sfxge__tx_8h_abedc03d80e0cb6b84a0ad1dc1db3b4b8}{SFXGE\_EVQ0\_N\_TXQ}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}) -\/ 1;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00155}00155         limits.\mbox{\hyperlink{structefx__drv__limits__s_ae5cf6749dcf1b4cc47852a0d08d93164}{edl\_min\_rxq\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00156}00156         limits.\mbox{\hyperlink{structefx__drv__limits__s_a08fd08a7080258729b7a7a18b90bd603}{edl\_max\_rxq\_count}} = evq\_max;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00158}00158         \mbox{\hyperlink{efx_8h_a00ff04f8b15a3173b116477983a7180b}{efx\_nic\_set\_drv\_limits}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \&limits);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00160}00160         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{efx_8h_a05a6c075e9f05b5ecdd1a083ec3c7b3a}{efx\_nic\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00161}00161                 \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00163}00163         rc = \mbox{\hyperlink{efx_8h_a26393c815c07cc3f415f945b583bd629}{efx\_nic\_get\_vi\_pool}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \&evq\_allocated, \&rxq\_allocated,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00164}00164                                  \&txq\_allocated);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00165}00165         \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00166}00166                 \mbox{\hyperlink{efx_8h_ab662107837bb9e47bf044d51e634dfcd}{efx\_nic\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00167}00167                 \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00168}00168         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00170}00170         KASSERT(txq\_allocated >= \mbox{\hyperlink{sfxge__tx_8h_abedc03d80e0cb6b84a0ad1dc1db3b4b8}{SFXGE\_EVQ0\_N\_TXQ}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00171}00171                 (\textcolor{stringliteral}{"{}txq\_allocated < \%u"{}}, \mbox{\hyperlink{sfxge__tx_8h_abedc03d80e0cb6b84a0ad1dc1db3b4b8}{SFXGE\_EVQ0\_N\_TXQ}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00173}00173         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8a31befc934bfb068dbcde4faa1a8377}{evq\_max}} = MIN(evq\_allocated, evq\_max);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00174}00174         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8a31befc934bfb068dbcde4faa1a8377}{evq\_max}} = MIN(rxq\_allocated, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8a31befc934bfb068dbcde4faa1a8377}{evq\_max}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00175}00175         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8a31befc934bfb068dbcde4faa1a8377}{evq\_max}} = MIN(txq\_allocated -\/ (\mbox{\hyperlink{sfxge__tx_8h_abedc03d80e0cb6b84a0ad1dc1db3b4b8}{SFXGE\_EVQ0\_N\_TXQ}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}) -\/ 1),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00176}00176                           \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8a31befc934bfb068dbcde4faa1a8377}{evq\_max}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00178}00178         KASSERT(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8a31befc934bfb068dbcde4faa1a8377}{evq\_max}} <= evq\_max,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00179}00179                 (\textcolor{stringliteral}{"{}allocated more than maximum requested"{}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00180}00180 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00181}00181 \textcolor{preprocessor}{\#ifdef RSS}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00182}00182         \textcolor{keywordflow}{if} (\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8a31befc934bfb068dbcde4faa1a8377}{evq\_max}} < rss\_getnumbuckets())}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00183}00183                 device\_printf(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}The number of allocated queues (\%u) "{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00184}00184                               \textcolor{stringliteral}{"{}is less than the number of RSS buckets (\%u); "{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00185}00185                               \textcolor{stringliteral}{"{}performance degradation might be observed"{}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00186}00186                               \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8a31befc934bfb068dbcde4faa1a8377}{evq\_max}}, rss\_getnumbuckets());}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00187}00187 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00189}00189         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00190}00190 \textcolor{comment}{         * NIC is kept initialized in the case of success to be able to}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00191}00191 \textcolor{comment}{         * initialize port to find out media types.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00192}00192 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00193}00193         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00194}00194 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00195}00195 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00196}00196 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00197}\mbox{\hyperlink{sfxge_8c_afacc2bc6ccc484f4c88ba9cc786a34ec}{00197}} \mbox{\hyperlink{sfxge_8c_afacc2bc6ccc484f4c88ba9cc786a34ec}{sfxge\_set\_drv\_limits}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00198}00198 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00199}00199         \mbox{\hyperlink{structefx__drv__limits__s}{efx\_drv\_limits\_t}} limits;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00201}00201         memset(\&limits, 0, \textcolor{keyword}{sizeof}(limits));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00202}00202 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00203}00203         \textcolor{comment}{/* Limits are strict since take into account initial estimation */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00204}00204         limits.\mbox{\hyperlink{structefx__drv__limits__s_aaa13ac1c2b841f96f5c8736bd46378a4}{edl\_min\_evq\_count}} = limits.\mbox{\hyperlink{structefx__drv__limits__s_a6fc20779a79fae689be13034b17125c7}{edl\_max\_evq\_count}} =}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00205}00205             \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a89fcae12e698e6f48c768676457c0b2c}{intr}}.\mbox{\hyperlink{structsfxge__intr_a6bd84e6985d84ff0bc389b3fa7b9f022}{n\_alloc}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00206}00206         limits.\mbox{\hyperlink{structefx__drv__limits__s_a1f34a605295922e9ec106b41b8beb492}{edl\_min\_txq\_count}} = limits.\mbox{\hyperlink{structefx__drv__limits__s_ad4e86bc1daeea46c4ee6344cf9ae4c4f}{edl\_max\_txq\_count}} =}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00207}00207             \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a89fcae12e698e6f48c768676457c0b2c}{intr}}.\mbox{\hyperlink{structsfxge__intr_a6bd84e6985d84ff0bc389b3fa7b9f022}{n\_alloc}} + \mbox{\hyperlink{sfxge__tx_8h_abedc03d80e0cb6b84a0ad1dc1db3b4b8}{SFXGE\_EVQ0\_N\_TXQ}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}) -\/ 1;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00208}00208         limits.\mbox{\hyperlink{structefx__drv__limits__s_ae5cf6749dcf1b4cc47852a0d08d93164}{edl\_min\_rxq\_count}} = limits.\mbox{\hyperlink{structefx__drv__limits__s_a08fd08a7080258729b7a7a18b90bd603}{edl\_max\_rxq\_count}} =}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00209}00209             \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a89fcae12e698e6f48c768676457c0b2c}{intr}}.\mbox{\hyperlink{structsfxge__intr_a6bd84e6985d84ff0bc389b3fa7b9f022}{n\_alloc}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00211}00211         \textcolor{keywordflow}{return} (\mbox{\hyperlink{efx_8h_a00ff04f8b15a3173b116477983a7180b}{efx\_nic\_set\_drv\_limits}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \&limits));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00212}00212 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00214}00214 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00215}\mbox{\hyperlink{sfxge_8c_ac7e811e3d344b8c05e901b1791db59bd}{00215}} \mbox{\hyperlink{sfxge_8c_ac7e811e3d344b8c05e901b1791db59bd}{sfxge\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00216}00216 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00217}00217         \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00219}00219         \mbox{\hyperlink{sfxge_8h_abdcf6e42ec47708a06998367ed1458eb}{SFXGE\_ADAPTER\_LOCK\_ASSERT\_OWNED}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00220}00220 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00221}00221         \textcolor{keywordflow}{if} (\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_abca3e8bcacfefd62b79cf6d4c70e4c0f}{init\_state}} == \mbox{\hyperlink{sfxge_8h_a4a81849a4422b0c8fecaa8368366d7c3a0c3b1e2331643edfa1488e9270d0d9c9}{SFXGE\_STARTED}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00222}00222                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00224}00224         \textcolor{keywordflow}{if} (\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_abca3e8bcacfefd62b79cf6d4c70e4c0f}{init\_state}} != \mbox{\hyperlink{sfxge_8h_a4a81849a4422b0c8fecaa8368366d7c3af572e55e983da96220d77de9c2472b25}{SFXGE\_REGISTERED}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00225}00225                 rc = EINVAL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00226}00226                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00227}00227         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00229}00229         \textcolor{comment}{/* Set required resource limits */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00230}00230         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{sfxge_8c_afacc2bc6ccc484f4c88ba9cc786a34ec}{sfxge\_set\_drv\_limits}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00231}00231                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00233}00233         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{efx_8h_a05a6c075e9f05b5ecdd1a083ec3c7b3a}{efx\_nic\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00234}00234                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00236}00236         \textcolor{comment}{/* Start processing interrupts. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00237}00237         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{sfxge_8h_a5828c2dc1afc493ed3bfb2191d05c0f6}{sfxge\_intr\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00238}00238                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00239}00239 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00240}00240         \textcolor{comment}{/* Start processing events. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00241}00241         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{sfxge_8h_aaa5f7a269ec6dea97435a2c6d9256466}{sfxge\_ev\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00242}00242                 \textcolor{keywordflow}{goto} fail3;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00243}00243 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00244}00244         \textcolor{comment}{/* Fire up the port. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00245}00245         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{sfxge_8h_a607a5f7f9a0ebd1dfcc17f487f99ec48}{sfxge\_port\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00246}00246                 \textcolor{keywordflow}{goto} fail4;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00248}00248         \textcolor{comment}{/* Start the receiver side. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00249}00249         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{sfxge__rx_8c_aae0081bf76972afbc33ef70fcc2bd2b1}{sfxge\_rx\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00250}00250                 \textcolor{keywordflow}{goto} fail5;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00252}00252         \textcolor{comment}{/* Start the transmitter side. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00253}00253         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{sfxge__tx_8c_adf0a8a29f683aac814ce750a1447266a}{sfxge\_tx\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00254}00254                 \textcolor{keywordflow}{goto} fail6;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00256}00256         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_abca3e8bcacfefd62b79cf6d4c70e4c0f}{init\_state}} = \mbox{\hyperlink{sfxge_8h_a4a81849a4422b0c8fecaa8368366d7c3a0c3b1e2331643edfa1488e9270d0d9c9}{SFXGE\_STARTED}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00258}00258         \textcolor{comment}{/* Tell the stack we're running. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00259}00259         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}}-\/>if\_drv\_flags |= IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00260}00260         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}}-\/>if\_drv\_flags \&= \string~IFF\_DRV\_OACTIVE;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00262}00262         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00264}00264 fail6:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00265}00265         \mbox{\hyperlink{sfxge__rx_8c_a162a7a39c001246f2ce785db3b39b548}{sfxge\_rx\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00267}00267 fail5:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00268}00268         \mbox{\hyperlink{sfxge_8h_abe31eb0c2eed222d4ffc82d1d8a983f7}{sfxge\_port\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00270}00270 fail4:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00271}00271         \mbox{\hyperlink{sfxge_8h_a237270e581803f01797e73eea4ab6b8b}{sfxge\_ev\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00272}00272 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00273}00273 fail3:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00274}00274         \mbox{\hyperlink{sfxge_8h_a2700e5a8a90c397d63364923647eee56}{sfxge\_intr\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00276}00276 fail2:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00277}00277         \mbox{\hyperlink{efx_8h_ab662107837bb9e47bf044d51e634dfcd}{efx\_nic\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00279}00279 fail:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00280}00280         device\_printf(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}sfxge\_start: \%d\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00282}00282         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00283}00283 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00285}00285 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00286}\mbox{\hyperlink{sfxge_8c_a5ab5eac63c07263a122644ec0eaa13b8}{00286}} \mbox{\hyperlink{sfxge_8c_a5ab5eac63c07263a122644ec0eaa13b8}{sfxge\_if\_init}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00287}00287 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00288}00288         \textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00290}00290         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *)arg;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00291}00291 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00292}00292         \mbox{\hyperlink{sfxge_8h_a7b3bdc65b5fbd4780537825ae4f6ca38}{SFXGE\_ADAPTER\_LOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00293}00293         (void)\mbox{\hyperlink{sfxge_8c_ac7e811e3d344b8c05e901b1791db59bd}{sfxge\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00294}00294         \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00295}00295 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00297}00297 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00298}\mbox{\hyperlink{sfxge_8c_ae88b0c6437493e9e6173f7ba7ca46311}{00298}} \mbox{\hyperlink{sfxge_8c_ae88b0c6437493e9e6173f7ba7ca46311}{sfxge\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00299}00299 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00300}00300         \mbox{\hyperlink{sfxge_8h_abdcf6e42ec47708a06998367ed1458eb}{SFXGE\_ADAPTER\_LOCK\_ASSERT\_OWNED}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00301}00301 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00302}00302         \textcolor{keywordflow}{if} (\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_abca3e8bcacfefd62b79cf6d4c70e4c0f}{init\_state}} != \mbox{\hyperlink{sfxge_8h_a4a81849a4422b0c8fecaa8368366d7c3a0c3b1e2331643edfa1488e9270d0d9c9}{SFXGE\_STARTED}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00303}00303                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00305}00305         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_abca3e8bcacfefd62b79cf6d4c70e4c0f}{init\_state}} = \mbox{\hyperlink{sfxge_8h_a4a81849a4422b0c8fecaa8368366d7c3af572e55e983da96220d77de9c2472b25}{SFXGE\_REGISTERED}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00306}00306 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00307}00307         \textcolor{comment}{/* Stop the transmitter. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00308}00308         \mbox{\hyperlink{sfxge__tx_8c_a889ec0ca9edaf9109254ad0396175b79}{sfxge\_tx\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00310}00310         \textcolor{comment}{/* Stop the receiver. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00311}00311         \mbox{\hyperlink{sfxge__rx_8c_a162a7a39c001246f2ce785db3b39b548}{sfxge\_rx\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00313}00313         \textcolor{comment}{/* Stop the port. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00314}00314         \mbox{\hyperlink{sfxge_8h_abe31eb0c2eed222d4ffc82d1d8a983f7}{sfxge\_port\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00315}00315 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00316}00316         \textcolor{comment}{/* Stop processing events. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00317}00317         \mbox{\hyperlink{sfxge_8h_a237270e581803f01797e73eea4ab6b8b}{sfxge\_ev\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00318}00318 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00319}00319         \textcolor{comment}{/* Stop processing interrupts. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00320}00320         \mbox{\hyperlink{sfxge_8h_a2700e5a8a90c397d63364923647eee56}{sfxge\_intr\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00322}00322         \mbox{\hyperlink{efx_8h_ab662107837bb9e47bf044d51e634dfcd}{efx\_nic\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00323}00323 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00324}00324         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}}-\/>if\_drv\_flags \&= \string~IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00325}00325 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00326}00326 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00327}00327 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00328}\mbox{\hyperlink{sfxge_8c_a7e9bd3ff2ad2df766d88bdd8e5275897}{00328}} \mbox{\hyperlink{sfxge_8c_a7e9bd3ff2ad2df766d88bdd8e5275897}{sfxge\_vpd\_ioctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, \mbox{\hyperlink{structsfxge__ioc__s}{sfxge\_ioc\_t}} *ioc)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00329}00329 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00330}00330         \mbox{\hyperlink{structefx__vpd__value__s}{efx\_vpd\_value\_t}} value;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00331}00331         \textcolor{keywordtype}{int} rc = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00332}00332 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00333}00333         \textcolor{keywordflow}{switch} (ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a8c2b47c5610c9af9397e80ef96d82b72}{op}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00334}00334         \textcolor{keywordflow}{case} \mbox{\hyperlink{sfxge__ioc_8h_a707f55727b8e2156d3b5103ab87e5619a9901c04e52cefcd732ee700a07b74cbc}{SFXGE\_VPD\_OP\_GET\_KEYWORD}}:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00335}00335                 value.\mbox{\hyperlink{structefx__vpd__value__s_a39c1cea40823eb8ac9bc280591ee35bf}{evv\_tag}} = ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_ab42b032554161ff77bff67b3b2598e83}{tag}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00336}00336                 value.\mbox{\hyperlink{structefx__vpd__value__s_a701ab163af0df9d46d880d8f62af95fa}{evv\_keyword}} = ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a55da0243fed5ae115cdda416d6bde808}{keyword}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00337}00337                 rc = \mbox{\hyperlink{efx_8h_af14c1fc27503c963a6a05d760e2a2a7f}{efx\_vpd\_get}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}}, \&value);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00338}00338                 \textcolor{keywordflow}{if} (rc != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00339}00339                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00340}00340                 ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a93bcce6e2bcffa6ea7b946d7c4914f2e}{len}} = MIN(ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a93bcce6e2bcffa6ea7b946d7c4914f2e}{len}}, value.\mbox{\hyperlink{structefx__vpd__value__s_a1388e03b644e4b87b9eb741016839582}{evv\_length}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00341}00341                 \textcolor{keywordflow}{if} (ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a1fe69c8fd0fbaaec778b3e8242d183d1}{payload}} != 0) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00342}00342                         rc = copyout(value.\mbox{\hyperlink{structefx__vpd__value__s_a125c3da4590cccddae3111c7d0279713}{evv\_value}}, ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a1fe69c8fd0fbaaec778b3e8242d183d1}{payload}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00343}00343                                      ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a93bcce6e2bcffa6ea7b946d7c4914f2e}{len}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00344}00344                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00345}00345                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00346}00346         \textcolor{keywordflow}{case} \mbox{\hyperlink{sfxge__ioc_8h_a707f55727b8e2156d3b5103ab87e5619aee013e02818651ce668bc2c45cf1436b}{SFXGE\_VPD\_OP\_SET\_KEYWORD}}:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00347}00347                 \textcolor{keywordflow}{if} (ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a93bcce6e2bcffa6ea7b946d7c4914f2e}{len}} > \textcolor{keyword}{sizeof}(value.\mbox{\hyperlink{structefx__vpd__value__s_a125c3da4590cccddae3111c7d0279713}{evv\_value}}))}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00348}00348                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00349}00349                 value.\mbox{\hyperlink{structefx__vpd__value__s_a39c1cea40823eb8ac9bc280591ee35bf}{evv\_tag}} = ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_ab42b032554161ff77bff67b3b2598e83}{tag}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00350}00350                 value.\mbox{\hyperlink{structefx__vpd__value__s_a701ab163af0df9d46d880d8f62af95fa}{evv\_keyword}} = ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a55da0243fed5ae115cdda416d6bde808}{keyword}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00351}00351                 value.\mbox{\hyperlink{structefx__vpd__value__s_a1388e03b644e4b87b9eb741016839582}{evv\_length}} = ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a93bcce6e2bcffa6ea7b946d7c4914f2e}{len}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00352}00352                 rc = copyin(ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_ab9637260694b417149e18cec8f183140}{u}}.\mbox{\hyperlink{structsfxge__ioc__s_ad15e1070072718b7494a9fa75c38d56c}{vpd}}.\mbox{\hyperlink{structsfxge__ioc__s_a1fe69c8fd0fbaaec778b3e8242d183d1}{payload}}, value.\mbox{\hyperlink{structefx__vpd__value__s_a125c3da4590cccddae3111c7d0279713}{evv\_value}}, value.\mbox{\hyperlink{structefx__vpd__value__s_a1388e03b644e4b87b9eb741016839582}{evv\_length}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00353}00353                 \textcolor{keywordflow}{if} (rc != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00354}00354                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00355}00355                 rc = \mbox{\hyperlink{efx_8h_a12de09663d094da5e6c1c55653dcbe36}{efx\_vpd\_set}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}}, \&value);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00356}00356                 \textcolor{keywordflow}{if} (rc != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00357}00357                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00358}00358                 rc = \mbox{\hyperlink{efx_8h_a7a3eb542a719942ae196597634a6f84b}{efx\_vpd\_verify}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00359}00359                 \textcolor{keywordflow}{if} (rc != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00360}00360                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00361}00361                 rc = \mbox{\hyperlink{efx_8h_a459e8165ddb6e11b18e7ebf3a1fd0d21}{efx\_vpd\_write}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00362}00362                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00363}00363         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00364}00364                 rc = EOPNOTSUPP;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00365}00365                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00366}00366         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00368}00368         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00369}00369 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00370}00370 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00371}00371 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00372}\mbox{\hyperlink{sfxge_8c_a6d22068c845bc47c47af09ab5134f1b2}{00372}} \mbox{\hyperlink{sfxge_8c_a6d22068c845bc47c47af09ab5134f1b2}{sfxge\_private\_ioctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, \mbox{\hyperlink{structsfxge__ioc__s}{sfxge\_ioc\_t}} *ioc)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00373}00373 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00374}00374         \textcolor{keywordflow}{switch} (ioc-\/>\mbox{\hyperlink{structsfxge__ioc__s_a8c2b47c5610c9af9397e80ef96d82b72}{op}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00375}00375         \textcolor{keywordflow}{case} \mbox{\hyperlink{sfxge__ioc_8h_a9c38398128c51ecea48711746eb6e1e4a1331f192e9cda79a8d1beb289637b4b3}{SFXGE\_MCDI\_IOC}}:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00376}00376                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{sfxge_8h_a6448fad6284ea63b4831878951fd6c26}{sfxge\_mcdi\_ioctl}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, ioc));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00377}00377         \textcolor{keywordflow}{case} \mbox{\hyperlink{sfxge__ioc_8h_a9c38398128c51ecea48711746eb6e1e4a97690df6d77410222fdb152bc2b6e0fd}{SFXGE\_NVRAM\_IOC}}:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00378}00378                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{sfxge_8h_a5e248ed0f186bb947cd2468ec8eade13}{sfxge\_nvram\_ioctl}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, ioc));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00379}00379         \textcolor{keywordflow}{case} \mbox{\hyperlink{sfxge__ioc_8h_a9c38398128c51ecea48711746eb6e1e4a4a36744969ee7c0b2742519064bb3ba6}{SFXGE\_VPD\_IOC}}:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00380}00380                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{sfxge_8c_a7e9bd3ff2ad2df766d88bdd8e5275897}{sfxge\_vpd\_ioctl}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, ioc));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00381}00381         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00382}00382                 \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00383}00383         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00384}00384 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00385}00385 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00386}00386 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00387}\mbox{\hyperlink{sfxge_8c_a30ed498c3ce6bbfe57d0c52d14be9edf}{00387}} \mbox{\hyperlink{sfxge_8c_a30ed498c3ce6bbfe57d0c52d14be9edf}{sfxge\_if\_ioctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}} *ifp, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} command, caddr\_t data)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00388}00388 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00389}00389         \textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00390}00390         \textcolor{keyword}{struct }ifreq *ifr;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00391}00391         \mbox{\hyperlink{structsfxge__ioc__s}{sfxge\_ioc\_t}} ioc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00392}00392         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00393}00393 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00394}00394         ifr = (\textcolor{keyword}{struct }ifreq *)data;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00395}00395         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}} = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00396}00396         error = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00397}00397 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00398}00398         \textcolor{keywordflow}{switch} (command) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00399}00399         \textcolor{keywordflow}{case} SIOCSIFFLAGS:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00400}00400                 \mbox{\hyperlink{sfxge_8h_a7b3bdc65b5fbd4780537825ae4f6ca38}{SFXGE\_ADAPTER\_LOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00401}00401                 \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_UP) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00402}00402                         \textcolor{keywordflow}{if} (ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00403}00403                                 \textcolor{keywordflow}{if} ((ifp-\/>if\_flags \string^ \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9f95a2c322e680922600871ea4edea27}{if\_flags}}) \&}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00404}00404                                     (IFF\_PROMISC | IFF\_ALLMULTI)) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00405}00405                                         \mbox{\hyperlink{sfxge_8h_a904c55bb5fc4136e610ec9becaf7d97b}{sfxge\_mac\_filter\_set}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00406}00406                                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00407}00407                         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00408}00408                                 \mbox{\hyperlink{sfxge_8c_ac7e811e3d344b8c05e901b1791db59bd}{sfxge\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00409}00409                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00410}00410                         \textcolor{keywordflow}{if} (ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00411}00411                                 \mbox{\hyperlink{sfxge_8c_ae88b0c6437493e9e6173f7ba7ca46311}{sfxge\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00412}00412                 \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9f95a2c322e680922600871ea4edea27}{if\_flags}} = ifp-\/>if\_flags;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00413}00413                 \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00414}00414                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00415}00415         \textcolor{keywordflow}{case} SIOCSIFMTU:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00416}00416                 \textcolor{keywordflow}{if} (ifr-\/>ifr\_mtu == ifp-\/>if\_mtu) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00417}00417                         \textcolor{comment}{/* Nothing to do */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00418}00418                         error = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00419}00419                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ifr-\/>ifr\_mtu > \mbox{\hyperlink{sfxge_8h_a04e1229bc18c85d9f633904461e55530}{SFXGE\_MAX\_MTU}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00420}00420                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00421}00421                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!(ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING)) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00422}00422                         ifp-\/>if\_mtu = ifr-\/>ifr\_mtu;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00423}00423                         error = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00424}00424                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00425}00425                         \textcolor{comment}{/* Restart required */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00426}00426                         \mbox{\hyperlink{sfxge_8h_a7b3bdc65b5fbd4780537825ae4f6ca38}{SFXGE\_ADAPTER\_LOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00427}00427                         \mbox{\hyperlink{sfxge_8c_ae88b0c6437493e9e6173f7ba7ca46311}{sfxge\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00428}00428                         ifp-\/>if\_mtu = ifr-\/>ifr\_mtu;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00429}00429                         error = \mbox{\hyperlink{sfxge_8c_ac7e811e3d344b8c05e901b1791db59bd}{sfxge\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00430}00430                         \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00431}00431                         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00432}00432                                 ifp-\/>if\_flags \&= \string~IFF\_UP;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00433}00433                                 ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00434}00434                                 if\_down(ifp);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00435}00435                         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00436}00436                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00437}00437                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00438}00438         \textcolor{keywordflow}{case} SIOCADDMULTI:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00439}00439         \textcolor{keywordflow}{case} SIOCDELMULTI:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00440}00440                 \textcolor{keywordflow}{if} (ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00441}00441                         \mbox{\hyperlink{sfxge_8h_a904c55bb5fc4136e610ec9becaf7d97b}{sfxge\_mac\_filter\_set}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00442}00442                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00443}00443         \textcolor{keywordflow}{case} SIOCSIFCAP:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00444}00444         \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00445}00445                 \textcolor{keywordtype}{int} reqcap = ifr-\/>ifr\_reqcap;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00446}00446                 \textcolor{keywordtype}{int} capchg\_mask;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00447}00447 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00448}00448                 \mbox{\hyperlink{sfxge_8h_a7b3bdc65b5fbd4780537825ae4f6ca38}{SFXGE\_ADAPTER\_LOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00449}00449 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00450}00450                 \textcolor{comment}{/* Capabilities to be changed in accordance with request */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00451}00451                 capchg\_mask = ifp-\/>if\_capenable \string^ reqcap;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00452}00452 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00453}00453                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00454}00454 \textcolor{comment}{                 * The networking core already rejects attempts to}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00455}00455 \textcolor{comment}{                 * enable capabilities we don't have.  We still have}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00456}00456 \textcolor{comment}{                 * to reject attempts to disable capabilities that we}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00457}00457 \textcolor{comment}{                 * can't (yet) disable.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00458}00458 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00459}00459                 KASSERT((reqcap \& \string~ifp-\/>if\_capabilities) == 0,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00460}00460                     (\textcolor{stringliteral}{"{}Unsupported capabilities 0x\%x requested 0x\%x vs "{}}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00461}00461                      \textcolor{stringliteral}{"{}supported 0x\%x"{}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00462}00462                      reqcap \& \string~ifp-\/>if\_capabilities,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00463}00463                      reqcap , ifp-\/>if\_capabilities));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00464}00464                 \textcolor{keywordflow}{if} (capchg\_mask \& \mbox{\hyperlink{sfxge_8c_ae7c4602eb64a7bb9fe2da2c982262a03}{SFXGE\_CAP\_FIXED}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00465}00465                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00466}00466                         \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00467}00467                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00468}00468                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00469}00469 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00470}00470                 \textcolor{comment}{/* Check request before any changes */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00471}00471                 \textcolor{keywordflow}{if} ((capchg\_mask \& IFCAP\_TSO4) \&\&}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00472}00472                     (reqcap \& (IFCAP\_TSO4 | IFCAP\_TXCSUM)) == IFCAP\_TSO4) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00473}00473                         error = EAGAIN;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00474}00474                         \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00475}00475                         if\_printf(ifp, \textcolor{stringliteral}{"{}enable txcsum before tso4\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00476}00476                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00477}00477                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00478}00478                 \textcolor{keywordflow}{if} ((capchg\_mask \& IFCAP\_TSO6) \&\&}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00479}00479                     (reqcap \& (IFCAP\_TSO6 | IFCAP\_TXCSUM\_IPV6)) == IFCAP\_TSO6) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00480}00480                         error = EAGAIN;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00481}00481                         \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00482}00482                         if\_printf(ifp, \textcolor{stringliteral}{"{}enable txcsum6 before tso6\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00483}00483                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00484}00484                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00486}00486                 \textcolor{keywordflow}{if} (reqcap \& IFCAP\_TXCSUM) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00487}00487                         ifp-\/>if\_hwassist |= (CSUM\_IP | CSUM\_TCP | CSUM\_UDP);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00488}00488                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00489}00489                         ifp-\/>if\_hwassist \&= \string~(CSUM\_IP | CSUM\_TCP | CSUM\_UDP);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00490}00490                         \textcolor{keywordflow}{if} (reqcap \& IFCAP\_TSO4) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00491}00491                                 reqcap \&= \string~IFCAP\_TSO4;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00492}00492                                 if\_printf(ifp,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00493}00493                                     \textcolor{stringliteral}{"{}tso4 disabled due to -\/txcsum\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00494}00494                         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00495}00495                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00496}00496                 \textcolor{keywordflow}{if} (reqcap \& IFCAP\_TXCSUM\_IPV6) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00497}00497                         ifp-\/>if\_hwassist |= (CSUM\_TCP\_IPV6 | CSUM\_UDP\_IPV6);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00498}00498                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00499}00499                         ifp-\/>if\_hwassist \&= \string~(CSUM\_TCP\_IPV6 | CSUM\_UDP\_IPV6);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00500}00500                         \textcolor{keywordflow}{if} (reqcap \& IFCAP\_TSO6) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00501}00501                                 reqcap \&= \string~IFCAP\_TSO6;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00502}00502                                 if\_printf(ifp,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00503}00503                                     \textcolor{stringliteral}{"{}tso6 disabled due to -\/txcsum6\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00504}00504                         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00505}00505                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00506}00506 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00507}00507                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00508}00508 \textcolor{comment}{                 * The kernel takes both IFCAP\_TSOx and CSUM\_TSO into}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00509}00509 \textcolor{comment}{                 * account before using TSO. So, we do not touch}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00510}00510 \textcolor{comment}{                 * checksum flags when IFCAP\_TSOx is modified.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00511}00511 \textcolor{comment}{                 * Note that CSUM\_TSO is (CSUM\_IP\_TSO|CSUM\_IP6\_TSO),}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00512}00512 \textcolor{comment}{                 * but both bits are set in IPv4 and IPv6 mbufs.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00513}00513 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00514}00514 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00515}00515                 ifp-\/>if\_capenable = reqcap;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00516}00516 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00517}00517                 \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00518}00518                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00519}00519         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00520}00520         \textcolor{keywordflow}{case} SIOCSIFMEDIA:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00521}00521         \textcolor{keywordflow}{case} SIOCGIFMEDIA:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00522}00522                 error = ifmedia\_ioctl(ifp, ifr, \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a735867d18bed52d2912389fe246cb5f2}{media}}, command);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00523}00523                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00524}00524 \textcolor{preprocessor}{\#ifdef SIOCGI2C}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00525}00525         \textcolor{keywordflow}{case} SIOCGI2C:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00526}00526         \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00527}00527                 \textcolor{keyword}{struct }ifi2creq i2c;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00529}00529                 error = copyin(ifr\_data\_get\_ptr(ifr), \&i2c, \textcolor{keyword}{sizeof}(i2c));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00530}00530                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00531}00531                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00532}00532 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00533}00533                 \textcolor{keywordflow}{if} (i2c.len > \textcolor{keyword}{sizeof}(i2c.data)) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00534}00534                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00535}00535                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00536}00536                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00538}00538                 \mbox{\hyperlink{sfxge_8h_a7b3bdc65b5fbd4780537825ae4f6ca38}{SFXGE\_ADAPTER\_LOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00539}00539                 error = \mbox{\hyperlink{efx_8h_a3bb9f4159910f59c1e57c3a78d799cbd}{efx\_phy\_module\_get\_info}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, i2c.dev\_addr,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00540}00540                                                 i2c.offset, i2c.len,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00541}00541                                                 \&i2c.data[0]);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00542}00542                 \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00543}00543                 \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00544}00544                         error = copyout(\&i2c, ifr\_data\_get\_ptr(ifr),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00545}00545                             \textcolor{keyword}{sizeof}(i2c));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00546}00546                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00547}00547         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00548}00548 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00549}00549         \textcolor{keywordflow}{case} SIOCGPRIVATE\_0:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00550}00550                 error = priv\_check(curthread, PRIV\_DRIVER);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00551}00551                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00552}00552                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00553}00553                 error = copyin(ifr\_data\_get\_ptr(ifr), \&ioc, \textcolor{keyword}{sizeof}(ioc));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00554}00554                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00555}00555                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00556}00556                 error = \mbox{\hyperlink{sfxge_8c_a6d22068c845bc47c47af09ab5134f1b2}{sfxge\_private\_ioctl}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, \&ioc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00557}00557                 \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00558}00558                         error = copyout(\&ioc, ifr\_data\_get\_ptr(ifr),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00559}00559                             \textcolor{keyword}{sizeof}(ioc));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00560}00560                 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00561}00561                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00562}00562         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00563}00563                 error = ether\_ioctl(ifp, command, data);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00564}00564         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00565}00565 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00566}00566         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00567}00567 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00569}00569 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00570}\mbox{\hyperlink{sfxge_8c_aaea1091ef3cd6596f7bb2f64208b4a5b}{00570}} \mbox{\hyperlink{sfxge_8c_aaea1091ef3cd6596f7bb2f64208b4a5b}{sfxge\_ifnet\_fini}}(\textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00571}00571 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00572}00572         \textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}} = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00573}00573 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00574}00574         \mbox{\hyperlink{sfxge_8h_a7b3bdc65b5fbd4780537825ae4f6ca38}{SFXGE\_ADAPTER\_LOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00575}00575         \mbox{\hyperlink{sfxge_8c_ae88b0c6437493e9e6173f7ba7ca46311}{sfxge\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00576}00576         \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00578}00578         ifmedia\_removeall(\&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a735867d18bed52d2912389fe246cb5f2}{media}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00579}00579         ether\_ifdetach(ifp);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00580}00580         if\_free(ifp);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00581}00581 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00582}00582 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00583}00583 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00584}\mbox{\hyperlink{sfxge_8c_a3d267a0503988325d5c19615d531e2e7}{00584}} \mbox{\hyperlink{sfxge_8c_a3d267a0503988325d5c19615d531e2e7}{sfxge\_ifnet\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}} *ifp, \textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00585}00585 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00586}00586         \textcolor{keyword}{const} \mbox{\hyperlink{structefx__nic__cfg__s}{efx\_nic\_cfg\_t}} *encp = \mbox{\hyperlink{efx_8h_a729235beafd4ee82d0fdcf814e3e7f48}{efx\_nic\_cfg\_get}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00587}00587         device\_t \mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00588}00588         \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00589}00589 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00590}00590         \mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}} = \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00591}00591         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}} = ifp;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00592}00592 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00593}00593         if\_initname(ifp, device\_get\_name(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}), device\_get\_unit(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00594}00594         ifp-\/>if\_init = \mbox{\hyperlink{sfxge_8c_a5ab5eac63c07263a122644ec0eaa13b8}{sfxge\_if\_init}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00595}00595         ifp-\/>if\_softc = \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00596}00596         ifp-\/>\mbox{\hyperlink{structsfxge__softc_a9f95a2c322e680922600871ea4edea27}{if\_flags}} = IFF\_BROADCAST | IFF\_SIMPLEX | IFF\_MULTICAST;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00597}00597         ifp-\/>if\_ioctl = \mbox{\hyperlink{sfxge_8c_a30ed498c3ce6bbfe57d0c52d14be9edf}{sfxge\_if\_ioctl}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00599}00599         ifp-\/>if\_capabilities = \mbox{\hyperlink{sfxge_8c_a03bef253b7a820ed224d9acb10474fef}{SFXGE\_CAP}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00600}00600         ifp-\/>if\_capenable = \mbox{\hyperlink{sfxge_8c_a2a2ce79a1799753741d2bacbe7a5bef4}{SFXGE\_CAP\_ENABLE}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00601}00601         ifp-\/>if\_hw\_tsomax = \mbox{\hyperlink{sfxge__tx_8h_aadc3bece8a70eda311f5b2a89ff9c373}{SFXGE\_TSO\_MAX\_SIZE}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00602}00602         ifp-\/>if\_hw\_tsomaxsegcount = \mbox{\hyperlink{sfxge__tx_8h_a335d7962e252d3e432cb22e3d08347fb}{SFXGE\_TX\_MAPPING\_MAX\_SEG}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00603}00603         ifp-\/>if\_hw\_tsomaxsegsize = PAGE\_SIZE;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00604}00604 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00605}00605 \textcolor{preprocessor}{\#ifdef SFXGE\_LRO}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00606}00606         ifp-\/>if\_capabilities |= IFCAP\_LRO;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00607}00607         ifp-\/>if\_capenable |= IFCAP\_LRO;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00608}00608 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00610}00610         \textcolor{keywordflow}{if} (encp-\/>\mbox{\hyperlink{structefx__nic__cfg__s_a4c17131fc227121fc316aa25b400afe8}{enc\_hw\_tx\_insert\_vlan\_enabled}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00611}00611                 ifp-\/>if\_capabilities |= IFCAP\_VLAN\_HWTAGGING;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00612}00612                 ifp-\/>if\_capenable |= IFCAP\_VLAN\_HWTAGGING;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00613}00613         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00614}00614         ifp-\/>if\_hwassist = CSUM\_TCP | CSUM\_UDP | CSUM\_IP | CSUM\_TSO |}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00615}00615                            CSUM\_TCP\_IPV6 | CSUM\_UDP\_IPV6;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00616}00616 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00617}00617         ether\_ifattach(ifp, encp-\/>\mbox{\hyperlink{structefx__nic__cfg__s_a6467d8336ba64076ada0fe4a0cf059b5}{enc\_mac\_addr}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00618}00618 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00619}00619         ifp-\/>if\_transmit = \mbox{\hyperlink{sfxge__tx_8c_a5844465cf4e898c5542b83c42b52dae7}{sfxge\_if\_transmit}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00620}00620         ifp-\/>if\_qflush = \mbox{\hyperlink{sfxge__tx_8c_a331dc4cefcad5a95cdd2af2fed7bf990}{sfxge\_if\_qflush}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00621}00621 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00622}00622         ifp-\/>if\_get\_counter = \mbox{\hyperlink{sfxge_8h_a08a11453b16435c732493ed25b624cfd}{sfxge\_get\_counter}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00623}00623 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00624}00624         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}ifmedia\_init"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00625}00625         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{sfxge_8h_ae4200fca58c826aafe85869446c6d817}{sfxge\_port\_ifmedia\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00626}00626                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00627}00627 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00628}00628         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00629}00629 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00630}00630 fail:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00631}00631         ether\_ifdetach(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00632}00632         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00633}00633 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00634}00634 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00635}00635 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00636}\mbox{\hyperlink{sfxge_8c_a7e44d2b3f4980704f0f086e928409345}{00636}} \mbox{\hyperlink{sfxge_8c_a7e44d2b3f4980704f0f086e928409345}{sfxge\_sram\_buf\_tbl\_alloc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, \textcolor{keywordtype}{size\_t} n, uint32\_t *idp)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00637}00637 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00638}00638         KASSERT(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a45b98e9bc84dc310587d500233ee20d7}{buffer\_table\_next}} + n <=}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00639}00639                 \mbox{\hyperlink{efx_8h_a729235beafd4ee82d0fdcf814e3e7f48}{efx\_nic\_cfg\_get}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})-\/>\mbox{\hyperlink{structefx__nic__cfg__s_adf85e30b061b48fefda1866ad3f61ebb}{enc\_buftbl\_limit}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00640}00640                 (\textcolor{stringliteral}{"{}buffer table full"{}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00641}00641 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00642}00642         *idp = \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a45b98e9bc84dc310587d500233ee20d7}{buffer\_table\_next}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00643}00643         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a45b98e9bc84dc310587d500233ee20d7}{buffer\_table\_next}} += n;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00644}00644 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00646}00646 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00647}\mbox{\hyperlink{sfxge_8c_a0691c9620dc977fd90c55f2218fec1d1}{00647}} \mbox{\hyperlink{sfxge_8c_a0691c9620dc977fd90c55f2218fec1d1}{sfxge\_bar\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00648}00648 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00649}00649         \mbox{\hyperlink{structefsys__bar__s}{efsys\_bar\_t}} *esbp = \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adb7be0145ec4e1f828d7c9a7932e9a6c}{bar}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00650}00650 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00651}00651         esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a3203643ba659833ecf07428018ab8b80}{esb\_rid}} = PCIR\_BAR(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a89698f3b81bb9e06d4ad52ba4202d702}{mem\_bar}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00652}00652         \textcolor{keywordflow}{if} ((esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a96ed1fce4f12effa6fc2e1dd9357a6c4}{esb\_res}} = bus\_alloc\_resource\_any(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00653}00653             \&esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a3203643ba659833ecf07428018ab8b80}{esb\_rid}}, RF\_ACTIVE)) == NULL) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00654}00654                 device\_printf(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}Cannot allocate BAR region \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00655}00655                     \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a89698f3b81bb9e06d4ad52ba4202d702}{mem\_bar}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00656}00656                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00657}00657         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00658}00658         esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a477a1e81ea372683010c5d8cab4c0db1}{esb\_tag}} = rman\_get\_bustag(esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a96ed1fce4f12effa6fc2e1dd9357a6c4}{esb\_res}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00659}00659         esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a29721ec5f2d712a217782bc69c27c812}{esb\_handle}} = rman\_get\_bushandle(esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a96ed1fce4f12effa6fc2e1dd9357a6c4}{esb\_res}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00660}00660 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00661}00661         \mbox{\hyperlink{efsys_8h_a1f4633ebaf09d407fb5168d438935081}{SFXGE\_BAR\_LOCK\_INIT}}(esbp, device\_get\_nameunit(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00662}00662 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00663}00663         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00664}00664 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00665}00665 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00666}00666 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00667}\mbox{\hyperlink{sfxge_8c_ac841ca75c9bac6d81d5394fee97d6f56}{00667}} \mbox{\hyperlink{sfxge_8c_ac841ca75c9bac6d81d5394fee97d6f56}{sfxge\_bar\_fini}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00668}00668 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00669}00669         \mbox{\hyperlink{structefsys__bar__s}{efsys\_bar\_t}} *esbp = \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adb7be0145ec4e1f828d7c9a7932e9a6c}{bar}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00670}00670 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00671}00671         bus\_release\_resource(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, SYS\_RES\_MEMORY, esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a3203643ba659833ecf07428018ab8b80}{esb\_rid}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00672}00672             esbp-\/>\mbox{\hyperlink{structefsys__bar__s_a96ed1fce4f12effa6fc2e1dd9357a6c4}{esb\_res}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00673}00673         \mbox{\hyperlink{efsys_8h_a8446b26b7c638238192415adf0543e7b}{SFXGE\_BAR\_LOCK\_DESTROY}}(esbp);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00674}00674 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00675}00675 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00676}00676 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00677}\mbox{\hyperlink{sfxge_8c_ac3e464c2d6bdced34a534eb3f9276440}{00677}} \mbox{\hyperlink{sfxge_8c_ac3e464c2d6bdced34a534eb3f9276440}{sfxge\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00678}00678 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00679}00679         device\_t \mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00680}00680         \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00681}00681         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00682}00682         \textcolor{keywordtype}{char} rss\_param\_name[\textcolor{keyword}{sizeof}(\mbox{\hyperlink{sfxge_8h_a169346e68b91a7dea2039634ed9df582}{SFXGE\_PARAM}}(\%d.max\_rss\_channels))];}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00683}00683 \textcolor{preprocessor}{\#if EFSYS\_OPT\_MCDI\_LOGGING}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00684}00684         \textcolor{keywordtype}{char} mcdi\_log\_param\_name[\textcolor{keyword}{sizeof}(\mbox{\hyperlink{sfxge_8h_a169346e68b91a7dea2039634ed9df582}{SFXGE\_PARAM}}(\%d.mcdi\_logging))];}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00685}00685 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00686}00686 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00687}00687         \mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}} = \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00688}00688 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00689}00689         \mbox{\hyperlink{sfxge_8h_afa08c6752040c96d7038879e2ae30462}{SFXGE\_ADAPTER\_LOCK\_INIT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, device\_get\_nameunit(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00690}00690 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00691}00691         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a334730213970097f7b79f47a116c45ea}{max\_rss\_channels}} = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00692}00692         snprintf(rss\_param\_name, \textcolor{keyword}{sizeof}(rss\_param\_name),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00693}00693                  \mbox{\hyperlink{sfxge_8h_a169346e68b91a7dea2039634ed9df582}{SFXGE\_PARAM}}(\%d.max\_rss\_channels),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00694}00694                  (\textcolor{keywordtype}{int})device\_get\_unit(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00695}00695         TUNABLE\_INT\_FETCH(rss\_param\_name, \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a334730213970097f7b79f47a116c45ea}{max\_rss\_channels}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00696}00696 \textcolor{preprocessor}{\#if EFSYS\_OPT\_MCDI\_LOGGING}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00697}00697         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>mcdi\_logging = sfxge\_mcdi\_logging;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00698}00698         snprintf(mcdi\_log\_param\_name, \textcolor{keyword}{sizeof}(mcdi\_log\_param\_name),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00699}00699                  \mbox{\hyperlink{sfxge_8h_a169346e68b91a7dea2039634ed9df582}{SFXGE\_PARAM}}(\%d.mcdi\_logging),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00700}00700                  (\textcolor{keywordtype}{int})device\_get\_unit(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00701}00701         TUNABLE\_INT\_FETCH(mcdi\_log\_param\_name, \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>mcdi\_logging);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00702}00702 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00703}00703 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00704}00704         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a88597812fdc8d91474eb45e69d94929a}{stats\_node}} = SYSCTL\_ADD\_NODE(device\_get\_sysctl\_ctx(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00705}00705             SYSCTL\_CHILDREN(device\_get\_sysctl\_tree(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}})), OID\_AUTO, \textcolor{stringliteral}{"{}stats"{}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00706}00706             CTLFLAG\_RD | CTLFLAG\_MPSAFE, NULL, \textcolor{stringliteral}{"{}Statistics"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00707}00707         \textcolor{keywordflow}{if} (\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a88597812fdc8d91474eb45e69d94929a}{stats\_node}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00708}00708                 error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00709}00709                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00710}00710         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00711}00711 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00712}00712         TASK\_INIT(\&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a58062ef00ce15e89eb0cc7be0ea8091c}{task\_reset}}, 0, \mbox{\hyperlink{sfxge_8c_a71b4643158385717e1e6ed7cea6ca5db}{sfxge\_reset}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00713}00713 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00714}00714         (void) pci\_enable\_busmaster(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00715}00715 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00716}00716         \textcolor{comment}{/* Initialize DMA mappings. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00717}00717         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}dma\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00718}00718         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8h_ac658309892596a6154cae7eb2a57189c}{sfxge\_dma\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00719}00719                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00720}00720 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00721}00721         error = \mbox{\hyperlink{efx_8h_adcfeb91b96e1fe01298aa6853c79ed40}{efx\_family}}(pci\_get\_vendor(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}), pci\_get\_device(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00722}00722             \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}}, \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a89698f3b81bb9e06d4ad52ba4202d702}{mem\_bar}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00723}00723         KASSERT(error == 0, (\textcolor{stringliteral}{"{}Family should be filtered by sfxge\_probe()"{}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00724}00724 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00725}00725         \textcolor{comment}{/* Map the device registers. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00726}00726         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}bar\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00727}00727         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8c_a0691c9620dc977fd90c55f2218fec1d1}{sfxge\_bar\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00728}00728                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00729}00729 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00730}00730         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}nic\_create..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00731}00731 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00732}00732         \textcolor{comment}{/* Create the common code nic object. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00733}00733         \mbox{\hyperlink{efsys_8h_a110e3445b900dd05e4346cdeec173004}{SFXGE\_EFSYS\_LOCK\_INIT}}(\&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2f21d233d6063ebaa50e77d7088a955}{enp\_lock}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00734}00734                               device\_get\_nameunit(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}), \textcolor{stringliteral}{"{}nic"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00735}00735         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{efx_8h_a34bbbcb1316366c07444e35d5f7d4114}{efx\_nic\_create}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}}, (\mbox{\hyperlink{efsys_8h_abef755dca8c8076b62f3ab365a80f7b3}{efsys\_identifier\_t}} *)\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00736}00736             \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adb7be0145ec4e1f828d7c9a7932e9a6c}{bar}}, \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2f21d233d6063ebaa50e77d7088a955}{enp\_lock}}, \&\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00737}00737                 \textcolor{keywordflow}{goto} fail3;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00738}00738         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}} = \mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00739}00739 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00740}00740         \textcolor{comment}{/* Initialize MCDI to talk to the microcontroller. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00741}00741         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}mcdi\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00742}00742         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8h_a5aa1fec973d309030359502e9e74effc}{sfxge\_mcdi\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00743}00743                 \textcolor{keywordflow}{goto} fail4;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00744}00744 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00745}00745         \textcolor{comment}{/* Probe the NIC and build the configuration data area. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00746}00746         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}nic\_probe..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00747}00747         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{efx_8h_a31da7d04fc4f8b7291acd4841a095c93}{efx\_nic\_probe}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{efx_8h_a26eb341d68c0d8c4ecbfb2857d0046fdae633353678b0226ea96614ccc1dc237e}{EFX\_FW\_VARIANT\_DONT\_CARE}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00748}00748                 \textcolor{keywordflow}{goto} fail5;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00749}00749 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00750}00750         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{efsys_8h_a2b297a187e06a737352170371e18bef0}{ISP2}}(\mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{sfxge\_rx\_ring\_entries}}) ||}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00751}00751             (\mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{sfxge\_rx\_ring\_entries}} < \mbox{\hyperlink{efx_8h_ad064e304025d54c954326e932314eb5f}{EFX\_RXQ\_MINNDESCS}}) ||}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00752}00752             (\mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{sfxge\_rx\_ring\_entries}} > \mbox{\hyperlink{efx_8h_ae6a085590dfc2dca3da3c31777c65b9a}{EFX\_RXQ\_MAXNDESCS}})) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00753}00753                 log(LOG\_ERR, \textcolor{stringliteral}{"{}\%s=\%d must be power of 2 from \%u to \%u"{}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00754}00754                     \mbox{\hyperlink{sfxge_8c_a3b2198bef7d3c25a76282acc7efdb3c3}{SFXGE\_PARAM\_RX\_RING}}, \mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{sfxge\_rx\_ring\_entries}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00755}00755                     \mbox{\hyperlink{efx_8h_ad064e304025d54c954326e932314eb5f}{EFX\_RXQ\_MINNDESCS}}, \mbox{\hyperlink{efx_8h_ae6a085590dfc2dca3da3c31777c65b9a}{EFX\_RXQ\_MAXNDESCS}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00756}00756                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00757}00757                 \textcolor{keywordflow}{goto} fail\_rx\_ring\_entries;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00758}00758         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00759}00759         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ac87a839907969f5ae96044d2c8d012c6}{rxq\_entries}} = \mbox{\hyperlink{sfxge_8c_ad6bc800e47ae182320f39190f517bde3}{sfxge\_rx\_ring\_entries}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00760}00760 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00761}00761         \textcolor{keywordflow}{if} (\mbox{\hyperlink{efx_8h_a729235beafd4ee82d0fdcf814e3e7f48}{efx\_nic\_cfg\_get}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})-\/>enc\_features \& \mbox{\hyperlink{efx_8h_a434bf0302428d56b72263d73e017d66c}{EFX\_FEATURE\_TXQ\_CKSUM\_OP\_DESC}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00762}00762                 \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_afba7fc043b60e66b42e1e4d8c7274573}{txq\_dynamic\_cksum\_toggle\_supported}} = B\_TRUE;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00763}00763         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00764}00764                 \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_afba7fc043b60e66b42e1e4d8c7274573}{txq\_dynamic\_cksum\_toggle\_supported}} = B\_FALSE;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00765}00765 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00766}00766         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{efsys_8h_a2b297a187e06a737352170371e18bef0}{ISP2}}(\mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{sfxge\_tx\_ring\_entries}}) ||}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00767}00767             (\mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{sfxge\_tx\_ring\_entries}} < \mbox{\hyperlink{efx_8h_a63527b399ac3f2fe6b409ff46649a0ab}{EFX\_TXQ\_MINNDESCS}}) ||}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00768}00768             (\mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{sfxge\_tx\_ring\_entries}} > \mbox{\hyperlink{efx_8h_a729235beafd4ee82d0fdcf814e3e7f48}{efx\_nic\_cfg\_get}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})-\/>enc\_txq\_max\_ndescs)) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00769}00769                 log(LOG\_ERR, \textcolor{stringliteral}{"{}\%s=\%d must be power of 2 from \%u to \%u"{}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00770}00770                     \mbox{\hyperlink{sfxge_8c_ad544ac08c0b411f12f5cd4b9d1fa8a52}{SFXGE\_PARAM\_TX\_RING}}, \mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{sfxge\_tx\_ring\_entries}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00771}00771                     \mbox{\hyperlink{efx_8h_a63527b399ac3f2fe6b409ff46649a0ab}{EFX\_TXQ\_MINNDESCS}}, \mbox{\hyperlink{efx_8h_a729235beafd4ee82d0fdcf814e3e7f48}{efx\_nic\_cfg\_get}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})-\/>enc\_txq\_max\_ndescs);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00772}00772                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00773}00773                 \textcolor{keywordflow}{goto} fail\_tx\_ring\_entries;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00774}00774         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00775}00775         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a82983bb7bee86aa3c2ac0b195ea7db11}{txq\_entries}} = \mbox{\hyperlink{sfxge_8c_a5d1259413bc2d4dff5d55a254cf623f9}{sfxge\_tx\_ring\_entries}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00776}00776 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00777}00777         SYSCTL\_ADD\_STRING(device\_get\_sysctl\_ctx(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00778}00778                           SYSCTL\_CHILDREN(device\_get\_sysctl\_tree(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}})),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00779}00779                           OID\_AUTO, \textcolor{stringliteral}{"{}version"{}}, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00780}00780                           \mbox{\hyperlink{sfxge__version_8h_a17f7d92ad396ef4e426a3f2968a4db0e}{SFXGE\_VERSION\_STRING}}, 0,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00781}00781                           \textcolor{stringliteral}{"{}Driver version"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00782}00782 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00783}00783         SYSCTL\_ADD\_UINT(device\_get\_sysctl\_ctx(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00784}00784                         SYSCTL\_CHILDREN(device\_get\_sysctl\_tree(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}})),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00785}00785                         OID\_AUTO, \textcolor{stringliteral}{"{}phy\_type"{}}, CTLFLAG\_RD,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00786}00786                         NULL, \mbox{\hyperlink{efx_8h_a729235beafd4ee82d0fdcf814e3e7f48}{efx\_nic\_cfg\_get}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})-\/>enc\_phy\_type,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00787}00787                         \textcolor{stringliteral}{"{}PHY type"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00788}00788 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00789}00789         \textcolor{comment}{/* Initialize the NVRAM. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00790}00790         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}nvram\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00791}00791         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{efx_8h_a1e09d29b8217b67499310ed0830b27d2}{efx\_nvram\_init}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00792}00792                 \textcolor{keywordflow}{goto} fail6;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00793}00793 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00794}00794         \textcolor{comment}{/* Initialize the VPD. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00795}00795         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}vpd\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00796}00796         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{efx_8h_a39a781796eae9f615e845def8198b043}{efx\_vpd\_init}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00797}00797                 \textcolor{keywordflow}{goto} fail7;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00798}00798 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00799}00799         \mbox{\hyperlink{efx_8h_a2a71a81629a11d185e20bf2ef326e200}{efx\_mcdi\_new\_epoch}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00800}00800 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00801}00801         \textcolor{comment}{/* Reset the NIC. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00802}00802         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}nic\_reset..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00803}00803         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{efx_8h_ab04db04a00eb41283d3b5e9acf9b78bb}{efx\_nic\_reset}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00804}00804                 \textcolor{keywordflow}{goto} fail8;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00805}00805 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00806}00806         \textcolor{comment}{/* Initialize buffer table allocation. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00807}00807         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a45b98e9bc84dc310587d500233ee20d7}{buffer\_table\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00808}00808 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00809}00809         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00810}00810 \textcolor{comment}{         * Guarantee minimum and estimate maximum number of event queues}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00811}00811 \textcolor{comment}{         * to take it into account when MSI-\/X interrupts are allocated.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00812}00812 \textcolor{comment}{         * It initializes NIC and keeps it initialized on success.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00813}00813 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00814}00814         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8c_a5c61661b1612af6cbb6102d94d3d16e4}{sfxge\_estimate\_rsrc\_limits}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00815}00815                 \textcolor{keywordflow}{goto} fail8;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00816}00816 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00817}00817         \textcolor{comment}{/* Set up interrupts. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00818}00818         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}intr\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00819}00819         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8h_a5c90641fbf5a607302c197b1c66dd702}{sfxge\_intr\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00820}00820                 \textcolor{keywordflow}{goto} fail9;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00821}00821 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00822}00822         \textcolor{comment}{/* Initialize event processing state. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00823}00823         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}ev\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00824}00824         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8h_aeb2ca3e061ec4f570e05979c94dd0e09}{sfxge\_ev\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00825}00825                 \textcolor{keywordflow}{goto} fail11;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00826}00826 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00827}00827         \textcolor{comment}{/* Initialize port state. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00828}00828         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}port\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00829}00829         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8h_a067963db690fdcb0b1387bc56812ae93}{sfxge\_port\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00830}00830                 \textcolor{keywordflow}{goto} fail12;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00831}00831 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00832}00832         \textcolor{comment}{/* Initialize receive state. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00833}00833         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}rx\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00834}00834         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge__rx_8c_a28e7675295377906aec4f81314c2e230}{sfxge\_rx\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00835}00835                 \textcolor{keywordflow}{goto} fail13;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00836}00836 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00837}00837         \textcolor{comment}{/* Initialize transmit state. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00838}00838         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}tx\_init..."{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00839}00839         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge__tx_8c_a742e1da3921a29214fbee6ff472b6010}{sfxge\_tx\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00840}00840                 \textcolor{keywordflow}{goto} fail14;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00841}00841 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00842}00842         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_abca3e8bcacfefd62b79cf6d4c70e4c0f}{init\_state}} = \mbox{\hyperlink{sfxge_8h_a4a81849a4422b0c8fecaa8368366d7c3a8bf52dab96feb9e7cd034f5287c51f52}{SFXGE\_INITIALIZED}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00843}00843 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00844}00844         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}success"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00845}00845         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00846}00846 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00847}00847 fail14:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00848}00848         \mbox{\hyperlink{sfxge__rx_8c_a118e9056340ad4e644e1d97dc5096538}{sfxge\_rx\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00849}00849 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00850}00850 fail13:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00851}00851         \mbox{\hyperlink{sfxge_8h_a0b2db0cb0ee9a6037a479b612e705737}{sfxge\_port\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00852}00852 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00853}00853 fail12:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00854}00854         \mbox{\hyperlink{sfxge_8h_acd4e5aa5e944930beff23ae26bf76d98}{sfxge\_ev\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00855}00855 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00856}00856 fail11:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00857}00857         \mbox{\hyperlink{sfxge_8h_a40788088b24824304b8d7fb4ca8bcd6b}{sfxge\_intr\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00858}00858 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00859}00859 fail9:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00860}00860         \mbox{\hyperlink{efx_8h_ab662107837bb9e47bf044d51e634dfcd}{efx\_nic\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00862}00862 fail8:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00863}00863         \mbox{\hyperlink{efx_8h_a564c2b6ba1c891a0d802b2be045ff0b5}{efx\_vpd\_fini}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00864}00864 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00865}00865 fail7:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00866}00866         \mbox{\hyperlink{efx_8h_ad636a1edb0950da73823a9953b5755ce}{efx\_nvram\_fini}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00867}00867 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00868}00868 fail6:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00869}00869 fail\_tx\_ring\_entries:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00870}00870 fail\_rx\_ring\_entries:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00871}00871         \mbox{\hyperlink{efx_8h_aa27b90173bb5b3217b29b1fbc354a3f4}{efx\_nic\_unprobe}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00872}00872 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00873}00873 fail5:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00874}00874         \mbox{\hyperlink{sfxge_8h_a2947489345aea8021773aed7d4bb9f5a}{sfxge\_mcdi\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00875}00875 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00876}00876 fail4:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00877}00877         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}} = NULL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00878}00878         \mbox{\hyperlink{efx_8h_a3bb6451827699bb4e5999517860d780a}{efx\_nic\_destroy}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00879}00879         \mbox{\hyperlink{efsys_8h_a416a491110bffcbfa07cef2e46b5803a}{SFXGE\_EFSYS\_LOCK\_DESTROY}}(\&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2f21d233d6063ebaa50e77d7088a955}{enp\_lock}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00880}00880 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00881}00881 fail3:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00882}00882         \mbox{\hyperlink{sfxge_8c_ac841ca75c9bac6d81d5394fee97d6f56}{sfxge\_bar\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00883}00883         (void) pci\_disable\_busmaster(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00884}00884 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00885}00885 fail:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00886}00886         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}failed \%d"{}}, error);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00887}00887         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}} = NULL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00888}00888         \mbox{\hyperlink{sfxge_8h_a1de59bfa156721f3555713cf447b2099}{SFXGE\_ADAPTER\_LOCK\_DESTROY}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00889}00889         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00890}00890 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00891}00891 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00892}00892 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00893}\mbox{\hyperlink{sfxge_8c_a3235d44bb0050b260f198b0f0ec1a626}{00893}} \mbox{\hyperlink{sfxge_8c_a3235d44bb0050b260f198b0f0ec1a626}{sfxge\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00894}00894 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00895}00895         \mbox{\hyperlink{structefx__nic__s}{efx\_nic\_t}} *\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00896}00896 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00897}00897         \textcolor{comment}{/* Clean up transmit state. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00898}00898         \mbox{\hyperlink{sfxge__tx_8c_a013969ddfbb51e4f5f9f01eaa92d22f2}{sfxge\_tx\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00899}00899 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00900}00900         \textcolor{comment}{/* Clean up receive state. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00901}00901         \mbox{\hyperlink{sfxge__rx_8c_a118e9056340ad4e644e1d97dc5096538}{sfxge\_rx\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00902}00902 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00903}00903         \textcolor{comment}{/* Clean up port state. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00904}00904         \mbox{\hyperlink{sfxge_8h_a0b2db0cb0ee9a6037a479b612e705737}{sfxge\_port\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00905}00905 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00906}00906         \textcolor{comment}{/* Clean up event processing state. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00907}00907         \mbox{\hyperlink{sfxge_8h_acd4e5aa5e944930beff23ae26bf76d98}{sfxge\_ev\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00908}00908 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00909}00909         \textcolor{comment}{/* Clean up interrupts. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00910}00910         \mbox{\hyperlink{sfxge_8h_a40788088b24824304b8d7fb4ca8bcd6b}{sfxge\_intr\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00911}00911 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00912}00912         \textcolor{comment}{/* Tear down common code subsystems. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00913}00913         \mbox{\hyperlink{efx_8h_ab04db04a00eb41283d3b5e9acf9b78bb}{efx\_nic\_reset}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00914}00914         \mbox{\hyperlink{efx_8h_a564c2b6ba1c891a0d802b2be045ff0b5}{efx\_vpd\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00915}00915         \mbox{\hyperlink{efx_8h_ad636a1edb0950da73823a9953b5755ce}{efx\_nvram\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00916}00916         \mbox{\hyperlink{efx_8h_aa27b90173bb5b3217b29b1fbc354a3f4}{efx\_nic\_unprobe}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00917}00917 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00918}00918         \textcolor{comment}{/* Tear down MCDI. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00919}00919         \mbox{\hyperlink{sfxge_8h_a2947489345aea8021773aed7d4bb9f5a}{sfxge\_mcdi\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00920}00920 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00921}00921         \textcolor{comment}{/* Destroy common code context. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00922}00922         \mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}} = \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00923}00923         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}} = NULL;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00924}00924         \mbox{\hyperlink{efx_8h_a3bb6451827699bb4e5999517860d780a}{efx\_nic\_destroy}}(\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00925}00925 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00926}00926         \textcolor{comment}{/* Free DMA memory. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00927}00927         \mbox{\hyperlink{sfxge_8h_aa6ff480cbcee21b9a3a31209d4b454fb}{sfxge\_dma\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00928}00928 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00929}00929         \textcolor{comment}{/* Free mapped BARs. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00930}00930         \mbox{\hyperlink{sfxge_8c_ac841ca75c9bac6d81d5394fee97d6f56}{sfxge\_bar\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00931}00931 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00932}00932         (void) pci\_disable\_busmaster(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00933}00933 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00934}00934         taskqueue\_drain(taskqueue\_thread, \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a58062ef00ce15e89eb0cc7be0ea8091c}{task\_reset}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00935}00935 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00936}00936         \textcolor{comment}{/* Destroy the softc lock. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00937}00937         \mbox{\hyperlink{sfxge_8h_a1de59bfa156721f3555713cf447b2099}{SFXGE\_ADAPTER\_LOCK\_DESTROY}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00938}00938 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00939}00939 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00940}00940 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00941}\mbox{\hyperlink{sfxge_8c_a1ffccad28bcf6885c7e7e1e5c312167b}{00941}} \mbox{\hyperlink{sfxge_8c_a1ffccad28bcf6885c7e7e1e5c312167b}{sfxge\_vpd\_handler}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00942}00942 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00943}00943         \textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}} = arg1;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00944}00944         \mbox{\hyperlink{structefx__vpd__value__s}{efx\_vpd\_value\_t}} value;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00945}00945         \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00946}00946 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00947}00947         value.\mbox{\hyperlink{structefx__vpd__value__s_a39c1cea40823eb8ac9bc280591ee35bf}{evv\_tag}} = arg2 >> 16;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00948}00948         value.\mbox{\hyperlink{structefx__vpd__value__s_a701ab163af0df9d46d880d8f62af95fa}{evv\_keyword}} = arg2 \& 0xffff;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00949}00949         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{efx_8h_af14c1fc27503c963a6a05d760e2a2a7f}{efx\_vpd\_get}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}}, \&value))}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00950}00950             != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00951}00951                 \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00952}00952 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00953}00953         \textcolor{keywordflow}{return} (SYSCTL\_OUT(req, value.\mbox{\hyperlink{structefx__vpd__value__s_a125c3da4590cccddae3111c7d0279713}{evv\_value}}, value.\mbox{\hyperlink{structefx__vpd__value__s_a1388e03b644e4b87b9eb741016839582}{evv\_length}}));}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00954}00954 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00955}00955 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00956}00956 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00957}\mbox{\hyperlink{sfxge_8c_a078c3321434f2c1431b276d666f1cfa8}{00957}} \mbox{\hyperlink{sfxge_8c_a078c3321434f2c1431b276d666f1cfa8}{sfxge\_vpd\_try\_add}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, \textcolor{keyword}{struct} sysctl\_oid\_list *list,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00958}00958                   \mbox{\hyperlink{efx_8h_a5d110328749756feefa36417605cc084}{efx\_vpd\_tag\_t}} tag, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *keyword)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00959}00959 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00960}00960         \textcolor{keyword}{struct }sysctl\_ctx\_list *ctx = device\_get\_sysctl\_ctx(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00961}00961         \mbox{\hyperlink{structefx__vpd__value__s}{efx\_vpd\_value\_t}} value;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00962}00962 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00963}00963         \textcolor{comment}{/* Check whether VPD tag/keyword is present */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00964}00964         value.\mbox{\hyperlink{structefx__vpd__value__s_a39c1cea40823eb8ac9bc280591ee35bf}{evv\_tag}} = tag;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00965}00965         value.\mbox{\hyperlink{structefx__vpd__value__s_a701ab163af0df9d46d880d8f62af95fa}{evv\_keyword}} = \mbox{\hyperlink{efx_8h_a7f7a6b921f498d37765149306d6a35d0}{EFX\_VPD\_KEYWORD}}(keyword[0], keyword[1]);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00966}00966         \textcolor{keywordflow}{if} (\mbox{\hyperlink{efx_8h_af14c1fc27503c963a6a05d760e2a2a7f}{efx\_vpd\_get}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}}, \&value) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00967}00967                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00968}00968 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00969}00969         SYSCTL\_ADD\_PROC(ctx, list, OID\_AUTO, keyword,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00970}00970             CTLTYPE\_STRING | CTLFLAG\_RD | CTLFLAG\_NEEDGIANT,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00971}00971             \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, tag << 16 | \mbox{\hyperlink{efx_8h_a7f7a6b921f498d37765149306d6a35d0}{EFX\_VPD\_KEYWORD}}(keyword[0], keyword[1]),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00972}00972             \mbox{\hyperlink{sfxge_8c_a1ffccad28bcf6885c7e7e1e5c312167b}{sfxge\_vpd\_handler}}, \textcolor{stringliteral}{"{}A"{}}, \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00973}00973 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00974}00974 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00975}00975 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00976}\mbox{\hyperlink{sfxge_8c_aa61958cdecd569f926b24f0ec2032dda}{00976}} \mbox{\hyperlink{sfxge_8c_aa61958cdecd569f926b24f0ec2032dda}{sfxge\_vpd\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00977}00977 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00978}00978         \textcolor{keyword}{struct }sysctl\_ctx\_list *ctx = device\_get\_sysctl\_ctx(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00979}00979         \textcolor{keyword}{struct }sysctl\_oid *vpd\_node;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00980}00980         \textcolor{keyword}{struct }sysctl\_oid\_list *vpd\_list;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00981}00981         \textcolor{keywordtype}{char} keyword[3];}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00982}00982         \mbox{\hyperlink{structefx__vpd__value__s}{efx\_vpd\_value\_t}} value;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00983}00983         \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00984}00984 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00985}00985         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{efx_8h_af5edb3f10a3e3373979a60d546c19426}{efx\_vpd\_size}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00986}00986                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00987}00987 \textcolor{comment}{                 * Unprivileged functions deny VPD access.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00988}00988 \textcolor{comment}{                 * Simply skip VPD in this case.}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00989}00989 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00990}00990                 \textcolor{keywordflow}{if} (rc == EACCES)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00991}00991                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00992}00992                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00993}00993         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00994}00994         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}} = malloc(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}}, M\_SFXGE, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00995}00995         \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{efx_8h_ad04ea291a3051e8b3a0ef8beb3cec121}{efx\_vpd\_read}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00996}00996                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00997}00997 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00998}00998         \textcolor{comment}{/* Copy ID (product name) into device description, and log it. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l00999}00999         value.\mbox{\hyperlink{structefx__vpd__value__s_a39c1cea40823eb8ac9bc280591ee35bf}{evv\_tag}} = \mbox{\hyperlink{efx_8h_af0951c6e24be912fe3ace78fef31699baf868121e91c7b25d803142abb47d73fd}{EFX\_VPD\_ID}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01000}01000         \textcolor{keywordflow}{if} (\mbox{\hyperlink{efx_8h_af14c1fc27503c963a6a05d760e2a2a7f}{efx\_vpd\_get}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a012e90d30f8d90f3e1c4e5c2a41b86d5}{vpd\_size}}, \&value) == 0) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01001}01001                 value.\mbox{\hyperlink{structefx__vpd__value__s_a125c3da4590cccddae3111c7d0279713}{evv\_value}}[value.\mbox{\hyperlink{structefx__vpd__value__s_a1388e03b644e4b87b9eb741016839582}{evv\_length}}] = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01002}01002                 device\_set\_desc\_copy(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, value.\mbox{\hyperlink{structefx__vpd__value__s_a125c3da4590cccddae3111c7d0279713}{evv\_value}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01003}01003                 device\_printf(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}}, value.\mbox{\hyperlink{structefx__vpd__value__s_a125c3da4590cccddae3111c7d0279713}{evv\_value}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01004}01004         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01005}01005 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01006}01006         vpd\_node = SYSCTL\_ADD\_NODE(ctx,}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01007}01007             SYSCTL\_CHILDREN(device\_get\_sysctl\_tree(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}})), OID\_AUTO, \textcolor{stringliteral}{"{}vpd"{}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01008}01008             CTLFLAG\_RD | CTLFLAG\_MPSAFE, NULL, \textcolor{stringliteral}{"{}Vital Product Data"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01009}01009         vpd\_list = SYSCTL\_CHILDREN(vpd\_node);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01010}01010 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01011}01011         \textcolor{comment}{/* Add sysctls for all expected and any vendor-\/defined keywords. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01012}01012         \mbox{\hyperlink{sfxge_8c_a078c3321434f2c1431b276d666f1cfa8}{sfxge\_vpd\_try\_add}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, vpd\_list, \mbox{\hyperlink{efx_8h_af0951c6e24be912fe3ace78fef31699baae89202c0ac6f2b92db720dda29e467e}{EFX\_VPD\_RO}}, \textcolor{stringliteral}{"{}PN"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01013}01013         \mbox{\hyperlink{sfxge_8c_a078c3321434f2c1431b276d666f1cfa8}{sfxge\_vpd\_try\_add}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, vpd\_list, \mbox{\hyperlink{efx_8h_af0951c6e24be912fe3ace78fef31699baae89202c0ac6f2b92db720dda29e467e}{EFX\_VPD\_RO}}, \textcolor{stringliteral}{"{}EC"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01014}01014         \mbox{\hyperlink{sfxge_8c_a078c3321434f2c1431b276d666f1cfa8}{sfxge\_vpd\_try\_add}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, vpd\_list, \mbox{\hyperlink{efx_8h_af0951c6e24be912fe3ace78fef31699baae89202c0ac6f2b92db720dda29e467e}{EFX\_VPD\_RO}}, \textcolor{stringliteral}{"{}SN"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01015}01015         keyword[0] = \textcolor{charliteral}{'V'};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01016}01016         keyword[2] = 0;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01017}01017         \textcolor{keywordflow}{for} (keyword[1] = \textcolor{charliteral}{'0'}; keyword[1] <= \textcolor{charliteral}{'9'}; keyword[1]++)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01018}01018                 \mbox{\hyperlink{sfxge_8c_a078c3321434f2c1431b276d666f1cfa8}{sfxge\_vpd\_try\_add}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, vpd\_list, \mbox{\hyperlink{efx_8h_af0951c6e24be912fe3ace78fef31699baae89202c0ac6f2b92db720dda29e467e}{EFX\_VPD\_RO}}, keyword);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01019}01019         \textcolor{keywordflow}{for} (keyword[1] = \textcolor{charliteral}{'A'}; keyword[1] <= \textcolor{charliteral}{'Z'}; keyword[1]++)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01020}01020                 \mbox{\hyperlink{sfxge_8c_a078c3321434f2c1431b276d666f1cfa8}{sfxge\_vpd\_try\_add}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}, vpd\_list, \mbox{\hyperlink{efx_8h_af0951c6e24be912fe3ace78fef31699baae89202c0ac6f2b92db720dda29e467e}{EFX\_VPD\_RO}}, keyword);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01021}01021 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01022}01022 done:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01023}01023         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01024}01024 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01025}01025 fail2:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01026}01026         free(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, M\_SFXGE);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01027}01027 fail:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01028}01028         \textcolor{keywordflow}{return} (rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01029}01029 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01030}01030 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01031}01031 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01032}\mbox{\hyperlink{sfxge_8c_aeb7d452105f8eacf0002e76036154032}{01032}} \mbox{\hyperlink{sfxge_8c_aeb7d452105f8eacf0002e76036154032}{sfxge\_vpd\_fini}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01033}01033 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01034}01034         free(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_adc3a22bdb6e7dca2232d1b340d622ed1}{vpd\_data}}, M\_SFXGE);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01035}01035 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01036}01036 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01037}01037 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01038}\mbox{\hyperlink{sfxge_8c_a71b4643158385717e1e6ed7cea6ca5db}{01038}} \mbox{\hyperlink{sfxge_8c_a71b4643158385717e1e6ed7cea6ca5db}{sfxge\_reset}}(\textcolor{keywordtype}{void} *arg, \textcolor{keywordtype}{int} npending)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01039}01039 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01040}01040         \textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01041}01041         \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01042}01042         \textcolor{keywordtype}{unsigned} attempt;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01043}01043 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01044}01044         (void)npending;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01045}01045 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01046}01046         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *)arg;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01047}01047 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01048}01048         \mbox{\hyperlink{sfxge_8h_a7b3bdc65b5fbd4780537825ae4f6ca38}{SFXGE\_ADAPTER\_LOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01049}01049 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01050}01050         \textcolor{keywordflow}{if} (\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_abca3e8bcacfefd62b79cf6d4c70e4c0f}{init\_state}} != \mbox{\hyperlink{sfxge_8h_a4a81849a4422b0c8fecaa8368366d7c3a0c3b1e2331643edfa1488e9270d0d9c9}{SFXGE\_STARTED}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01051}01051                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01052}01052 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01053}01053         \mbox{\hyperlink{sfxge_8c_ae88b0c6437493e9e6173f7ba7ca46311}{sfxge\_stop}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01054}01054         \mbox{\hyperlink{efx_8h_ab04db04a00eb41283d3b5e9acf9b78bb}{efx\_nic\_reset}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01055}01055         \textcolor{keywordflow}{for} (attempt = 0; attempt < \mbox{\hyperlink{sfxge_8c_a7587e929ad85dedddd51c166bc9564c1}{sfxge\_restart\_attempts}}; ++attempt) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01056}01056                 \textcolor{keywordflow}{if} ((rc = \mbox{\hyperlink{sfxge_8c_ac7e811e3d344b8c05e901b1791db59bd}{sfxge\_start}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) == 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01057}01057                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01058}01058 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01059}01059                 device\_printf(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}start on reset failed (\%d)\(\backslash\)n"{}}, rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01060}01060                 DELAY(100000);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01061}01061         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01062}01062 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01063}01063         device\_printf(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}reset failed; interface is now stopped\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01064}01064 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01065}01065 done:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01066}01066         \mbox{\hyperlink{sfxge_8h_a81cfb308d405810569c021ccad8142d6}{SFXGE\_ADAPTER\_UNLOCK}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01067}01067 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01068}01068 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01069}01069 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01070}\mbox{\hyperlink{sfxge_8c_ac4c312ca0891e85e0a8766f1408933cf}{01070}} \mbox{\hyperlink{sfxge_8c_ac4c312ca0891e85e0a8766f1408933cf}{sfxge\_schedule\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01071}01071 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01072}01072         taskqueue\_enqueue(taskqueue\_thread, \&\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a58062ef00ce15e89eb0cc7be0ea8091c}{task\_reset}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01073}01073 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01074}01074 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01075}01075 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01076}\mbox{\hyperlink{sfxge_8c_aed13499d6970fcf16606210476c61d1b}{01076}} \mbox{\hyperlink{sfxge_8c_aed13499d6970fcf16606210476c61d1b}{sfxge\_attach}}(device\_t \mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01077}01077 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01078}01078         \textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01079}01079         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01080}01080         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01081}01081 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01082}01082         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}} = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01083}01083         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}} = dev;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01084}01084 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01085}01085         \textcolor{comment}{/* Allocate ifnet. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01086}01086         ifp = if\_alloc(IFT\_ETHER);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01087}01087         \textcolor{keywordflow}{if} (ifp == NULL) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01088}01088                 device\_printf(dev, \textcolor{stringliteral}{"{}Couldn't allocate ifnet\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01089}01089                 error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01090}01090                 \textcolor{keywordflow}{goto} fail;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01091}01091         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01092}01092         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}} = ifp;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01093}01093 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01094}01094         \textcolor{comment}{/* Initialize hardware. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01095}01095         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}create nic"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01096}01096         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8c_ac3e464c2d6bdced34a534eb3f9276440}{sfxge\_create}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01097}01097                 \textcolor{keywordflow}{goto} fail2;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01098}01098 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01099}01099         \textcolor{comment}{/* Create the ifnet for the port. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01100}01100         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}init ifnet"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01101}01101         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8c_a3d267a0503988325d5c19615d531e2e7}{sfxge\_ifnet\_init}}(ifp, \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01102}01102                 \textcolor{keywordflow}{goto} fail3;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01103}01103 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01104}01104         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}init vpd"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01105}01105         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{sfxge_8c_aa61958cdecd569f926b24f0ec2032dda}{sfxge\_vpd\_init}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}})) != 0)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01106}01106                 \textcolor{keywordflow}{goto} fail4;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01107}01107 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01108}01108         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01109}01109 \textcolor{comment}{         * NIC is initialized inside sfxge\_create() and kept inialized}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01110}01110 \textcolor{comment}{         * to be able to initialize port to discover media types in}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01111}01111 \textcolor{comment}{         * sfxge\_ifnet\_init().}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01112}01112 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01113}01113         \mbox{\hyperlink{efx_8h_ab662107837bb9e47bf044d51e634dfcd}{efx\_nic\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01114}01114 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01115}01115         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_abca3e8bcacfefd62b79cf6d4c70e4c0f}{init\_state}} = \mbox{\hyperlink{sfxge_8h_a4a81849a4422b0c8fecaa8368366d7c3af572e55e983da96220d77de9c2472b25}{SFXGE\_REGISTERED}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01116}01116 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01117}01117         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}success"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01118}01118         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01119}01119 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01120}01120 fail4:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01121}01121         \mbox{\hyperlink{sfxge_8c_aaea1091ef3cd6596f7bb2f64208b4a5b}{sfxge\_ifnet\_fini}}(ifp);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01122}01122 fail3:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01123}01123         \mbox{\hyperlink{efx_8h_ab662107837bb9e47bf044d51e634dfcd}{efx\_nic\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a8d634d233b767298d0e3a8c293be7da1}{enp}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01124}01124         \mbox{\hyperlink{sfxge_8c_a3235d44bb0050b260f198b0f0ec1a626}{sfxge\_destroy}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01125}01125 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01126}01126 fail2:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01127}01127         if\_free(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01128}01128 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01129}01129 fail:}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01130}01130         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}failed \%d"{}}, error);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01131}01131         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01132}01132 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01133}01133 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01134}01134 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01135}\mbox{\hyperlink{sfxge_8c_a31199c646648d816e6588be8a9557740}{01135}} \mbox{\hyperlink{sfxge_8c_a31199c646648d816e6588be8a9557740}{sfxge\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01136}01136 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01137}01137         \textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}} *\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01138}01138 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01139}01139         \mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}} = device\_get\_softc(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01140}01140 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01141}01141         \mbox{\hyperlink{sfxge_8c_aeb7d452105f8eacf0002e76036154032}{sfxge\_vpd\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01142}01142 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01143}01143         \textcolor{comment}{/* Destroy the ifnet. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01144}01144         \mbox{\hyperlink{sfxge_8c_aaea1091ef3cd6596f7bb2f64208b4a5b}{sfxge\_ifnet\_fini}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}}-\/>\mbox{\hyperlink{structsfxge__softc_ab2ed4b847b26afecdf8f9f9374a800d5}{ifnet}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01145}01145 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01146}01146         \textcolor{comment}{/* Tear down hardware. */}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01147}01147         \mbox{\hyperlink{sfxge_8c_a3235d44bb0050b260f198b0f0ec1a626}{sfxge\_destroy}}(\mbox{\hyperlink{sfxge_8h_a0fdd68fb60df8c76625b73b761e9b8d0}{sc}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01148}01148 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01149}01149         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01150}01150 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01151}01151 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01152}01152 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01153}\mbox{\hyperlink{sfxge_8c_a0c003af477e3f73b2808d7a89a04bc92}{01153}} \mbox{\hyperlink{sfxge_8c_a0c003af477e3f73b2808d7a89a04bc92}{sfxge\_probe}}(device\_t \mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01154}01154 \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01155}01155         uint16\_t pci\_vendor\_id;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01156}01156         uint16\_t pci\_device\_id;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01157}01157         \mbox{\hyperlink{efx_8h_accbac04ecb7f03366ca6c39377643171}{efx\_family\_t}} \mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01158}01158         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} \mbox{\hyperlink{structsfxge__softc_a89698f3b81bb9e06d4ad52ba4202d702}{mem\_bar}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01159}01159         \textcolor{keywordtype}{int} rc;}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01160}01160 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01161}01161         pci\_vendor\_id = pci\_get\_vendor(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01162}01162         pci\_device\_id = pci\_get\_device(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01163}01163 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01164}01164         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}PCI ID \%04x:\%04x"{}}, pci\_vendor\_id, pci\_device\_id);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01165}01165         rc = \mbox{\hyperlink{efx_8h_adcfeb91b96e1fe01298aa6853c79ed40}{efx\_family}}(pci\_vendor\_id, pci\_device\_id, \&\mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}}, \&\mbox{\hyperlink{structsfxge__softc_a89698f3b81bb9e06d4ad52ba4202d702}{mem\_bar}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01166}01166         \textcolor{keywordflow}{if} (rc != 0) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01167}01167                 \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}efx\_family fail \%d"{}}, rc);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01168}01168                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01169}01169         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01170}01170 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01171}01171         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}} == \mbox{\hyperlink{efx_8h_a4aff6510915e7149989f98d0d6c95730a458972a1a3d5e599b5ed70389259073b}{EFX\_FAMILY\_SIENA}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01172}01172                 device\_set\_desc(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}Solarflare SFC9000 family"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01173}01173                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01174}01174         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01175}01175 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01176}01176         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}} == \mbox{\hyperlink{efx_8h_a4aff6510915e7149989f98d0d6c95730abad8ff13bd0d1532545ae5c5127bc4a6}{EFX\_FAMILY\_HUNTINGTON}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01177}01177                 device\_set\_desc(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}Solarflare SFC9100 family"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01178}01178                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01179}01179         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01180}01180 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01181}01181         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}} == \mbox{\hyperlink{efx_8h_a4aff6510915e7149989f98d0d6c95730a25f50693aca87eb22cb0b73b264e2f3c}{EFX\_FAMILY\_MEDFORD}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01182}01182                 device\_set\_desc(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}Solarflare SFC9200 family"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01183}01183                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01184}01184         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01185}01185 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01186}01186         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}} == \mbox{\hyperlink{efx_8h_a4aff6510915e7149989f98d0d6c95730a054ebd23ac405ef66d6f478806a0c786}{EFX\_FAMILY\_MEDFORD2}}) \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01187}01187                 device\_set\_desc(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}Solarflare SFC9250 family"{}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01188}01188                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01189}01189         \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01190}01190 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01191}01191         \mbox{\hyperlink{sfxge_8h_a3b11f515bcdd5f96bf297f7c2bad5304}{DBGPRINT}}(\mbox{\hyperlink{structsfxge__softc_a9bb41724d2a2835122b085d5c0c2af7a}{dev}}, \textcolor{stringliteral}{"{}impossible controller family \%d"{}}, \mbox{\hyperlink{structsfxge__softc_a6af2058fb55ada2417307747a439bb08}{family}});}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01192}01192         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01193}01193 \}}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01194}01194 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01195}\mbox{\hyperlink{sfxge_8c_ab01c55f48d4b74aba7a87415c4f5e4e6}{01195}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{sfxge_8c_ab01c55f48d4b74aba7a87415c4f5e4e6}{sfxge\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01196}01196         DEVMETHOD(device\_probe,         \mbox{\hyperlink{sfxge_8c_a0c003af477e3f73b2808d7a89a04bc92}{sfxge\_probe}}),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01197}01197         DEVMETHOD(device\_attach,        \mbox{\hyperlink{sfxge_8c_aed13499d6970fcf16606210476c61d1b}{sfxge\_attach}}),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01198}01198         DEVMETHOD(device\_detach,        \mbox{\hyperlink{sfxge_8c_a31199c646648d816e6588be8a9557740}{sfxge\_detach}}),}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01199}01199 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01200}01200         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01201}01201 \};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01202}01202 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01203}\mbox{\hyperlink{sfxge_8c_a42517734e1b949b7949f9f0d83303c99}{01203}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{sfxge_8c_a42517734e1b949b7949f9f0d83303c99}{sfxge\_devclass}};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01204}01204 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01205}\mbox{\hyperlink{sfxge_8c_a299008d0e3acc831363df011cc943a46}{01205}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{sfxge_8c_a299008d0e3acc831363df011cc943a46}{sfxge\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01206}01206         \textcolor{stringliteral}{"{}sfxge"{}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01207}01207         \mbox{\hyperlink{sfxge_8c_ab01c55f48d4b74aba7a87415c4f5e4e6}{sfxge\_methods}},}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01208}01208         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structsfxge__softc}{sfxge\_softc}})}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01209}01209 \};}
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01210}01210 }
\DoxyCodeLine{\Hypertarget{sfxge_8c_source_l01211}\mbox{\hyperlink{sfxge_8c_a66c1aed84ca86e4d78e70acb10492d63}{01211}} \mbox{\hyperlink{sfxge_8c_a66c1aed84ca86e4d78e70acb10492d63}{DRIVER\_MODULE}}(sfxge, pci, \mbox{\hyperlink{sfxge_8c_a299008d0e3acc831363df011cc943a46}{sfxge\_driver}}, \mbox{\hyperlink{sfxge_8c_a42517734e1b949b7949f9f0d83303c99}{sfxge\_devclass}}, 0, 0);}

\end{DoxyCode}
