\hypertarget{if__ure_8c_source}{}\doxysection{if\+\_\+ure.\+c}
\label{if__ure_8c_source}\index{dev/usb/net/if\_ure.c@{dev/usb/net/if\_ure.c}}
\mbox{\hyperlink{if__ure_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00002}00002 \textcolor{comment}{ * Copyright (c) 2015-\/2016 Kevin Lo <kevlo@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00003}00003 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00005}00005 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00006}00006 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00007}00007 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00008}00008 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00009}00009 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00010}00010 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00012}00012 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00013}00013 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00014}00014 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00015}00015 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00016}00016 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00017}00017 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00018}00018 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00019}00019 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00020}00020 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00021}00021 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00022}00022 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00023}00023 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00024}00024 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00025}00025 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00026}00026 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00027}00027 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00028}\mbox{\hyperlink{if__ure_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00028}} \mbox{\hyperlink{if__ure_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00030}00030 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00031}00031 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00047}00047 \textcolor{comment}{/* needed for checksum offload */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <netinet/ip.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <dev/mii/mii.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <dev/mii/miivar.h>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00057}00057 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00059}\mbox{\hyperlink{if__ure_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00059}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR   ure\_debug}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__ethernet_8h}{dev/usb/net/usb\_ethernet.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__urereg_8h}{dev/usb/net/if\_urereg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00066}00066 \textcolor{preprocessor}{\#include "{}miibus\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00068}00068 \textcolor{preprocessor}{\#include "{}opt\_inet6.h"{}}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00070}00070 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00071}00071 \textcolor{keyword}{static} \textcolor{keywordtype}{int} ure\_debug = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00073}00073 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, ure, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00074}00074     \textcolor{stringliteral}{"{}USB ure"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00075}00075 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_ure, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN, \&ure\_debug, 0,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00076}00076     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00077}00077 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00079}00079 \textcolor{preprocessor}{\#ifdef USB\_DEBUG\_VAR}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00080}00080 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00081}00081 \textcolor{preprocessor}{\#define DEVPRINTFN(n,dev,fmt,...) do \{                  \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00082}00082 \textcolor{preprocessor}{        if ((USB\_DEBUG\_VAR) >= (n)) \{                   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00083}00083 \textcolor{preprocessor}{                device\_printf((dev), "{}\%s: "{}} fmt,        \(\backslash\)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00084}00084                     \_\_FUNCTION\_\_ ,\#\#\_\_VA\_ARGS\_\_);       \(\backslash\)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00085}00085         \}                                               \(\backslash\)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00086}00086 \} while (0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00087}00087 \textcolor{preprocessor}{\#define DEVPRINTF(...)    DEVPRINTFN(1, \_\_VA\_ARGS\_\_)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00088}00088 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00089}\mbox{\hyperlink{if__ure_8c_a51e0c2be27c3fc89eda51006bdc19bdc}{00089}} \textcolor{preprocessor}{\#define DEVPRINTF(...) do \{ \} while (0)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00090}\mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{00090}} \textcolor{preprocessor}{\#define DEVPRINTFN(...) do \{ \} while (0)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00091}00091 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00092}00092 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00094}00094 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00095}00095 \textcolor{comment}{ * Various supported device vendors/products.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00096}00096 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00097}\mbox{\hyperlink{if__ure_8c_a32041a16624c828d32be57d0443e59fd}{00097}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{if__ure_8c_a32041a16624c828d32be57d0443e59fd}{ure\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00098}00098 \textcolor{preprocessor}{\#define URE\_DEV(v,p,i)  \{ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00099}00099 \textcolor{preprocessor}{  USB\_VPI(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p, i), \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00100}00100 \textcolor{preprocessor}{  USB\_IFACE\_CLASS(UICLASS\_VENDOR), \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00101}00101 \textcolor{preprocessor}{  USB\_IFACE\_SUBCLASS(UISUBCLASS\_VENDOR) \}}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00102}00102         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(LENOVO, RTL8153, \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00103}00103         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(LENOVO, TBT3LAN, 0),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00104}00104         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(LENOVO, TBT3LANGEN2, 0),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00105}00105         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(LENOVO, ONELINK, 0),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00106}00106         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(LENOVO, USBCLAN, 0),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00107}00107         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(LENOVO, USBCLANGEN2, 0),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00108}00108         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(NVIDIA, RTL8153, \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00109}00109         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(REALTEK, RTL8152, \mbox{\hyperlink{if__urereg_8h_afea11f2c8f6035b1e47282147f6d8b76}{URE\_FLAG\_8152}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00110}00110         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(REALTEK, RTL8153, \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00111}00111         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(TPLINK, RTL8153, \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00112}00112         \mbox{\hyperlink{if__ure_8c_a40da073df3657a70a3853e0f47126fe7}{URE\_DEV}}(REALTEK, RTL8156, \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00113}00113 \textcolor{preprocessor}{\#undef URE\_DEV}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00114}00114 \};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00116}\mbox{\hyperlink{if__ure_8c_aaf573b14a9de9f4f8127fa65524f4023}{00116}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{if__ure_8c_aaf573b14a9de9f4f8127fa65524f4023}{ure\_probe}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00117}\mbox{\hyperlink{if__ure_8c_a4418b9062a61a3a87279e4d41952979e}{00117}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{if__ure_8c_a4418b9062a61a3a87279e4d41952979e}{ure\_attach}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00118}\mbox{\hyperlink{if__ure_8c_a690692e7c67deebeed78677b77ee846d}{00118}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{if__ure_8c_a690692e7c67deebeed78677b77ee846d}{ure\_detach}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00119}00119 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00120}\mbox{\hyperlink{if__ure_8c_a25160ceda9a487927811b5430fc3658a}{00120}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__ure_8c_a25160ceda9a487927811b5430fc3658a}{ure\_bulk\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00121}\mbox{\hyperlink{if__ure_8c_af2ee7fe1ae25996e825562cb9899eee5}{00121}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__ure_8c_af2ee7fe1ae25996e825562cb9899eee5}{ure\_bulk\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00123}\mbox{\hyperlink{if__ure_8c_a4935a56043d65bc533db92793fcbe024}{00123}} \textcolor{keyword}{static} miibus\_readreg\_t \mbox{\hyperlink{if__ure_8c_a4935a56043d65bc533db92793fcbe024}{ure\_miibus\_readreg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00124}\mbox{\hyperlink{if__ure_8c_ad854b883ccc75b92ffcca4349dfcc45a}{00124}} \textcolor{keyword}{static} miibus\_writereg\_t \mbox{\hyperlink{if__ure_8c_ad854b883ccc75b92ffcca4349dfcc45a}{ure\_miibus\_writereg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00125}\mbox{\hyperlink{if__ure_8c_ae3c6218b9746a23dce411878a644e052}{00125}} \textcolor{keyword}{static} miibus\_statchg\_t \mbox{\hyperlink{if__ure_8c_ae3c6218b9746a23dce411878a644e052}{ure\_miibus\_statchg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00127}\mbox{\hyperlink{if__ure_8c_a056c6c58e59e0030631702d332d36e08}{00127}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__ure_8c_a056c6c58e59e0030631702d332d36e08}{ure\_attach\_post}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00128}\mbox{\hyperlink{if__ure_8c_a23e5baaaa9dba418464c3400e483ad7b}{00128}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__ure_8c_a23e5baaaa9dba418464c3400e483ad7b}{ure\_init}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00129}\mbox{\hyperlink{if__ure_8c_a2c2c805cc92f8d86e7eda677b5856382}{00129}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__ure_8c_a2c2c805cc92f8d86e7eda677b5856382}{ure\_stop}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00130}\mbox{\hyperlink{if__ure_8c_a5b04ec000c99aeee639131fc79a783d6}{00130}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__ure_8c_a5b04ec000c99aeee639131fc79a783d6}{ure\_start}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00131}\mbox{\hyperlink{if__ure_8c_a9407a022465ea9217e6406c3f09cc1b5}{00131}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__ure_8c_a9407a022465ea9217e6406c3f09cc1b5}{ure\_tick}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00132}\mbox{\hyperlink{if__ure_8c_a2d9197c99094f9a6ff92c29e0b5e8d74}{00132}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__ure_8c_a2d9197c99094f9a6ff92c29e0b5e8d74}{ure\_rxfilter}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00134}00134 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_a3c8b3d81662ff26849f52100529451da}{ure\_ctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint8\_t, uint16\_t, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00135}00135                     \textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00136}00136 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_a96281943d07b4cd3d49db68b4a02537e}{ure\_read\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t, \textcolor{keywordtype}{void} *,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00137}00137                     \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00138}00138 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t, \textcolor{keywordtype}{void} *,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00139}00139                     \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00140}00140 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00141}00141 \textcolor{keyword}{static} uint16\_t \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00142}00142 \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{if__ure_8c_aa1481b9bce219ce2146ceb7d735215d6}{ure\_read\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00143}00143 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00144}00144 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00145}00145 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00146}00146 \textcolor{keyword}{static} uint16\_t \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00147}00147 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00148}00148 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_ae3631d2ed3eacbaed598730a5a27c6f3}{ure\_sram\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00150}00150 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_a559df0905d0fc8be49ec362240a153c0}{ure\_sysctl\_chipver}}(SYSCTL\_HANDLER\_ARGS);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00151}00151 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00152}00152 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_af21297221493a64138faf18292423be8}{ure\_read\_chipver}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00153}00153 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_aa4bb6fd477c41184dc14288ed1890f73}{ure\_attach\_post\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00154}00154 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_ab00be5b3fae45b4e1f2b50f555cdb6c8}{ure\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00155}00155 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_ae3a2fbbd001b7b9591af7ad4946030f0}{ure\_ifmedia\_upd}}(\textcolor{keyword}{struct} ifnet *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00156}00156 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a8ffd694656eb5d37a03bb64a11955ff6}{ure\_ifmedia\_sts}}(\textcolor{keyword}{struct} ifnet *, \textcolor{keyword}{struct} ifmediareq *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00157}00157 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a57bc32559858ebf8e97fef6dc44e9be0}{ure\_add\_media\_types}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00158}00158 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a1a3ca773941d7e908fe95b69cb728418}{ure\_link\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00159}00159 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ure_8c_a6ba32065af5a51dba287f7eb135357e7}{ure\_get\_link\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00160}00160 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{if__ure_8c_a51336eab590618e862cf89766c4923bd}{ure\_ioctl}}(\textcolor{keyword}{struct} ifnet *, u\_long, caddr\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00161}00161 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a24a94174cafdb5f291319df005cdec47}{ure\_rtl8152\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00162}00162 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a432929462a103eba6dc31d3f715ccd9b}{ure\_rtl8152\_nic\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00163}00163 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a62288668305be36fd0b0b4af54630b97}{ure\_rtl8153\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00164}00164 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_abbfbc0652270b0a4e3beb410efea9650}{ure\_rtl8153b\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00165}00165 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_af131bb4131fabf0f015f05bfdb1b4b32}{ure\_rtl8153b\_nic\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00166}00166 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a32cf9bad386006ebbf7d9fb8dd1b3f5e}{ure\_disable\_teredo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00167}00167 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, \textcolor{keywordtype}{bool});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00168}00168 \textcolor{keyword}{static} uint16\_t \mbox{\hyperlink{if__ure_8c_abbc725fc5104d9ef52d92ea8734bd54d}{ure\_phy\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__ure_8c_a3dca4b12b0a5b2cdf3046f7d0a6ca371}{ure\_rxcsum}}(\textcolor{keywordtype}{int} capenb, \textcolor{keyword}{struct} \mbox{\hyperlink{structure__rxpkt}{ure\_rxpkt}} *rp, \textcolor{keyword}{struct} mbuf *m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00170}00170 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__ure_8c_ac5f1e7f9c2e02e42d05b97d9cdea6f2a}{ure\_txcsum}}(\textcolor{keyword}{struct} mbuf *m, \textcolor{keywordtype}{int} caps, uint32\_t *regout);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00172}\mbox{\hyperlink{if__ure_8c_a7aa2be9fa5e331a387ec8990b4d16c3b}{00172}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{if__ure_8c_a7aa2be9fa5e331a387ec8990b4d16c3b}{ure\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00173}00173         \textcolor{comment}{/* Device interface. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00174}00174         DEVMETHOD(device\_probe, \mbox{\hyperlink{if__ure_8c_aaf573b14a9de9f4f8127fa65524f4023}{ure\_probe}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00175}00175         DEVMETHOD(device\_attach, \mbox{\hyperlink{if__ure_8c_a4418b9062a61a3a87279e4d41952979e}{ure\_attach}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00176}00176         DEVMETHOD(device\_detach, \mbox{\hyperlink{if__ure_8c_a690692e7c67deebeed78677b77ee846d}{ure\_detach}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00178}00178         \textcolor{comment}{/* MII interface. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00179}00179         DEVMETHOD(miibus\_readreg, \mbox{\hyperlink{if__ure_8c_a4935a56043d65bc533db92793fcbe024}{ure\_miibus\_readreg}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00180}00180         DEVMETHOD(miibus\_writereg, \mbox{\hyperlink{if__ure_8c_ad854b883ccc75b92ffcca4349dfcc45a}{ure\_miibus\_writereg}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00181}00181         DEVMETHOD(miibus\_statchg, \mbox{\hyperlink{if__ure_8c_ae3c6218b9746a23dce411878a644e052}{ure\_miibus\_statchg}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00182}00182 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00183}00183         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00184}00184 \};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00186}\mbox{\hyperlink{if__ure_8c_ab1c0a3f9a3ab7224acd6ffcea0ae5b43}{00186}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{if__ure_8c_ab1c0a3f9a3ab7224acd6ffcea0ae5b43}{ure\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00187}00187         .name = \textcolor{stringliteral}{"{}ure"{}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00188}00188         .methods = \mbox{\hyperlink{if__ure_8c_a7aa2be9fa5e331a387ec8990b4d16c3b}{ure\_methods}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00189}00189         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00190}00190 \};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00191}00191 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00192}\mbox{\hyperlink{if__ure_8c_ab140410eb722afb05d28625489b60ed8}{00192}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{if__ure_8c_ab140410eb722afb05d28625489b60ed8}{ure\_devclass}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00194}\mbox{\hyperlink{if__ure_8c_aa6e1e87a12253898d10a0c92247e05ee}{00194}} \mbox{\hyperlink{if__ure_8c_aa6e1e87a12253898d10a0c92247e05ee}{DRIVER\_MODULE}}(ure, uhub, \mbox{\hyperlink{if__ure_8c_ab1c0a3f9a3ab7224acd6ffcea0ae5b43}{ure\_driver}}, \mbox{\hyperlink{if__ure_8c_ab140410eb722afb05d28625489b60ed8}{ure\_devclass}}, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00195}\mbox{\hyperlink{if__ure_8c_a6103e50cbdaa73f6244c5ebc6d21429d}{00195}} \mbox{\hyperlink{if__ure_8c_aa6e1e87a12253898d10a0c92247e05ee}{DRIVER\_MODULE}}(miibus, ure, miibus\_driver, miibus\_devclass, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00196}\mbox{\hyperlink{if__ure_8c_a3c9645a0628af8e2792b51b1579f72dc}{00196}} \mbox{\hyperlink{if__ure_8c_a3c9645a0628af8e2792b51b1579f72dc}{MODULE\_DEPEND}}(ure, uether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00197}\mbox{\hyperlink{if__ure_8c_ac570773c7c6f5391c65b2cc4a9ff39b9}{00197}} \mbox{\hyperlink{if__ure_8c_a3c9645a0628af8e2792b51b1579f72dc}{MODULE\_DEPEND}}(ure, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00198}\mbox{\hyperlink{if__ure_8c_a2878ab6026d6d4bdaab989960e1a3f88}{00198}} \mbox{\hyperlink{if__ure_8c_a3c9645a0628af8e2792b51b1579f72dc}{MODULE\_DEPEND}}(ure, ether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00199}\mbox{\hyperlink{if__ure_8c_a8ecb360a70b0eef06b7a8f88e95df924}{00199}} \mbox{\hyperlink{if__ure_8c_a3c9645a0628af8e2792b51b1579f72dc}{MODULE\_DEPEND}}(ure, miibus, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00200}\mbox{\hyperlink{if__ure_8c_a835bea0c329c361ebea502efee47a1d7}{00200}} \mbox{\hyperlink{if__ure_8c_a835bea0c329c361ebea502efee47a1d7}{MODULE\_VERSION}}(ure, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00201}\mbox{\hyperlink{if__ure_8c_ace3754401ff77d7d516f5c13ecc85aae}{00201}} \mbox{\hyperlink{if__ure_8c_ace3754401ff77d7d516f5c13ecc85aae}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{if__ure_8c_a32041a16624c828d32be57d0443e59fd}{ure\_devs}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00202}00202 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00203}\mbox{\hyperlink{if__ure_8c_adb23adb2a6f5590bfb5e6c98e641e236}{00203}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether__methods}{usb\_ether\_methods}} \mbox{\hyperlink{if__ure_8c_adb23adb2a6f5590bfb5e6c98e641e236}{ure\_ue\_methods}} = \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00204}00204         .\mbox{\hyperlink{structusb__ether__methods_a9568a90d86c68824b84eb6e5ccc7ebfc}{ue\_attach\_post}} = \mbox{\hyperlink{if__ure_8c_a056c6c58e59e0030631702d332d36e08}{ure\_attach\_post}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00205}00205         .ue\_attach\_post\_sub = \mbox{\hyperlink{if__ure_8c_aa4bb6fd477c41184dc14288ed1890f73}{ure\_attach\_post\_sub}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00206}00206         .ue\_start = \mbox{\hyperlink{if__ure_8c_a5b04ec000c99aeee639131fc79a783d6}{ure\_start}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00207}00207         .ue\_init = \mbox{\hyperlink{if__ure_8c_a23e5baaaa9dba418464c3400e483ad7b}{ure\_init}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00208}00208         .ue\_stop = \mbox{\hyperlink{if__ure_8c_a2c2c805cc92f8d86e7eda677b5856382}{ure\_stop}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00209}00209         .ue\_tick = \mbox{\hyperlink{if__ure_8c_a9407a022465ea9217e6406c3f09cc1b5}{ure\_tick}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00210}00210         .ue\_setmulti = \mbox{\hyperlink{if__ure_8c_a2d9197c99094f9a6ff92c29e0b5e8d74}{ure\_rxfilter}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00211}00211         .ue\_setpromisc = \mbox{\hyperlink{if__ure_8c_a2d9197c99094f9a6ff92c29e0b5e8d74}{ure\_rxfilter}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00212}00212         .ue\_mii\_upd = \mbox{\hyperlink{if__ure_8c_ae3a2fbbd001b7b9591af7ad4946030f0}{ure\_ifmedia\_upd}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00213}00213         .ue\_mii\_sts = \mbox{\hyperlink{if__ure_8c_a8ffd694656eb5d37a03bb64a11955ff6}{ure\_ifmedia\_sts}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00214}00214 \};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00215}00215 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00216}\mbox{\hyperlink{if__ure_8c_a6efe6fe5657863c4d057adf1078e58c6}{00216}} \textcolor{preprocessor}{\#define URE\_SETBIT\_1(sc, reg, index, x) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00217}00217 \textcolor{preprocessor}{        ure\_write\_1(sc, reg, index, ure\_read\_1(sc, reg, index) | (x))}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00218}\mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{00218}} \textcolor{preprocessor}{\#define URE\_SETBIT\_2(sc, reg, index, x) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00219}00219 \textcolor{preprocessor}{        ure\_write\_2(sc, reg, index, ure\_read\_2(sc, reg, index) | (x))}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00220}\mbox{\hyperlink{if__ure_8c_aeb0f1dc74828df84c750d8cd7ee1637c}{00220}} \textcolor{preprocessor}{\#define URE\_SETBIT\_4(sc, reg, index, x) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00221}00221 \textcolor{preprocessor}{        ure\_write\_4(sc, reg, index, ure\_read\_4(sc, reg, index) | (x))}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00223}\mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{00223}} \textcolor{preprocessor}{\#define URE\_CLRBIT\_1(sc, reg, index, x) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00224}00224 \textcolor{preprocessor}{        ure\_write\_1(sc, reg, index, ure\_read\_1(sc, reg, index) \& \string~(x))}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00225}\mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{00225}} \textcolor{preprocessor}{\#define URE\_CLRBIT\_2(sc, reg, index, x) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00226}00226 \textcolor{preprocessor}{        ure\_write\_2(sc, reg, index, ure\_read\_2(sc, reg, index) \& \string~(x))}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00227}\mbox{\hyperlink{if__ure_8c_a9832745d6519d1506fa0953b4ece8d1c}{00227}} \textcolor{preprocessor}{\#define URE\_CLRBIT\_4(sc, reg, index, x) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00228}00228 \textcolor{preprocessor}{        ure\_write\_4(sc, reg, index, ure\_read\_4(sc, reg, index) \& \string~(x))}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00230}00230 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00231}\mbox{\hyperlink{if__ure_8c_a3c8b3d81662ff26849f52100529451da}{00231}} \mbox{\hyperlink{if__ure_8c_a3c8b3d81662ff26849f52100529451da}{ure\_ctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint8\_t rw, uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, uint16\_t index,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00232}00232     \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00233}00233 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00234}00234         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00236}00236         \mbox{\hyperlink{if__urereg_8h_a0cda26e3d089d2d6c3cacbb656d71276}{URE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00238}00238         \textcolor{keywordflow}{if} (rw == \mbox{\hyperlink{if__urereg_8h_a6feb3e748f851a4b0ba0903afe584e5e}{URE\_CTL\_WRITE}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00239}00239                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00240}00240         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00241}00241                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00242}00242         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{usb_8h_a2e5fb48757cb795a44b99af832d6cd7d}{UR\_SET\_ADDRESS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00243}00243         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00244}00244         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, index);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00245}00245         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00246}00246 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00247}00247         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf, 1000));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00248}00248 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00249}00249 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00250}00250 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00251}\mbox{\hyperlink{if__ure_8c_a96281943d07b4cd3d49db68b4a02537e}{00251}} \mbox{\hyperlink{if__ure_8c_a96281943d07b4cd3d49db68b4a02537e}{ure\_read\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t addr, uint16\_t index,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00252}00252     \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00253}00253 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00255}00255         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__ure_8c_a3c8b3d81662ff26849f52100529451da}{ure\_ctl}}(sc, \mbox{\hyperlink{if__urereg_8h_af9882c495e52e3d3eefd46ecf75d9546}{URE\_CTL\_READ}}, addr, index, buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00256}00256 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00258}00258 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00259}\mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{00259}} \mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t addr, uint16\_t index,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00260}00260     \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00261}00261 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00263}00263         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__ure_8c_a3c8b3d81662ff26849f52100529451da}{ure\_ctl}}(sc, \mbox{\hyperlink{if__urereg_8h_a6feb3e748f851a4b0ba0903afe584e5e}{URE\_CTL\_WRITE}}, addr, index, buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00264}00264 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00266}00266 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00267}\mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{00267}} \mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t index)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00268}00268 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00269}00269         uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00270}00270         uint8\_t temp[4];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00271}00271         uint8\_t shift;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00272}00272 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00273}00273         shift = (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 3) << 3;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00274}00274         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \&= \string~3;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00276}00276         \mbox{\hyperlink{if__ure_8c_a96281943d07b4cd3d49db68b4a02537e}{ure\_read\_mem}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, index, \&temp, 4);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00277}00277         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(temp);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00278}00278         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >>= shift;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00279}00279 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00280}00280         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xff);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00281}00281 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00282}00282 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00283}00283 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00284}\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{00284}} \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t index)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00285}00285 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00286}00286         uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00287}00287         uint8\_t temp[4];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00288}00288         uint8\_t shift;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00290}00290         shift = (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 2) << 3;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00291}00291         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \&= \string~3;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00293}00293         \mbox{\hyperlink{if__ure_8c_a96281943d07b4cd3d49db68b4a02537e}{ure\_read\_mem}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, index, \&temp, 4);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00294}00294         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(temp);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00295}00295         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} >>= shift;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00297}00297         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0xffff);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00298}00298 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00300}00300 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00301}\mbox{\hyperlink{if__ure_8c_aa1481b9bce219ce2146ceb7d735215d6}{00301}} \mbox{\hyperlink{if__ure_8c_aa1481b9bce219ce2146ceb7d735215d6}{ure\_read\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t index)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00302}00302 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00303}00303         uint8\_t temp[4];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00305}00305         \mbox{\hyperlink{if__ure_8c_a96281943d07b4cd3d49db68b4a02537e}{ure\_read\_mem}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, index, \&temp, 4);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00306}00306         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(temp));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00307}00307 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00309}00309 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00310}\mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{00310}} \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t index, uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00311}00311 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00312}00312         uint16\_t byen;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00313}00313         uint8\_t temp[4];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00314}00314         uint8\_t shift;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00315}00315 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00316}00316         byen = \mbox{\hyperlink{if__urereg_8h_ac6768048b2cfaace1ceca839c8636683}{URE\_BYTE\_EN\_BYTE}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00317}00317         shift = \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 3;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00318}00318         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= 0xff;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00320}00320         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 3) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00321}00321                 byen <<= shift;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00322}00322                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} <<= (shift << 3);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00323}00323                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \&= \string~3;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00324}00324         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00326}00326         \mbox{\hyperlink{usb__endian_8h_a864b3f3abc2ce39bc4c60fadac2a7303}{USETDW}}(temp, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00327}00327         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, index | byen, \&temp, 4));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00328}00328 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00329}00329 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00330}00330 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00331}\mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{00331}} \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t index, uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00332}00332 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00333}00333         uint16\_t byen;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00334}00334         uint8\_t temp[4];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00335}00335         uint8\_t shift;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00337}00337         byen = \mbox{\hyperlink{if__urereg_8h_a4dea79bc60d0cd4a19689da58e64b159}{URE\_BYTE\_EN\_WORD}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00338}00338         shift = \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 2;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00339}00339         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= 0xffff;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00340}00340 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00341}00341         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \& 2) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00342}00342                 byen <<= shift;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00343}00343                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} <<= (shift << 3);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00344}00344                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \&= \string~3;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00345}00345         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00347}00347         \mbox{\hyperlink{usb__endian_8h_a864b3f3abc2ce39bc4c60fadac2a7303}{USETDW}}(temp, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00348}00348         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, index | byen, \&temp, 4));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00349}00349 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00351}00351 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00352}\mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{00352}} \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t index, uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00353}00353 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00354}00354         uint8\_t temp[4];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00355}00355 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00356}00356         \mbox{\hyperlink{usb__endian_8h_a864b3f3abc2ce39bc4c60fadac2a7303}{USETDW}}(temp, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00357}00357         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, index | \mbox{\hyperlink{if__urereg_8h_abb66dde5d089bc3106f11f508ba2d2ec}{URE\_BYTE\_EN\_DWORD}}, \&temp, 4));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00358}00358 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00360}00360 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00361}\mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{00361}} \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t addr)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00362}00362 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00363}00363         uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00364}00364 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00365}00365         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a1d43506bdd4bc50ccb131a7e9c0a4429}{URE\_PLA\_OCP\_GPHY\_BASE}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, addr \& 0xf000);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00366}00366         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = (addr \& 0x0fff) | 0xb000;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00368}00368         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00369}00369 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00370}00370 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00371}00371 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00372}\mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{00372}} \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t addr, uint16\_t data)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00373}00373 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00374}00374         uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00375}00375 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00376}00376         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a1d43506bdd4bc50ccb131a7e9c0a4429}{URE\_PLA\_OCP\_GPHY\_BASE}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, addr \& 0xf000);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00377}00377         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = (addr \& 0x0fff) | 0xb000;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00378}00378 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00379}00379         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, data);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00380}00380 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00382}00382 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00383}\mbox{\hyperlink{if__ure_8c_ae3631d2ed3eacbaed598730a5a27c6f3}{00383}} \mbox{\hyperlink{if__ure_8c_ae3631d2ed3eacbaed598730a5a27c6f3}{ure\_sram\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t addr, uint16\_t data)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00384}00384 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00385}00385         \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a867d1b39b0c23bf600bf14448ed030e5}{URE\_OCP\_SRAM\_ADDR}}, addr);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00386}00386         \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_ae5978db11d8a81e03217ab8990aadef2}{URE\_OCP\_SRAM\_DATA}}, data);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00387}00387 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00388}00388 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00389}00389 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00390}\mbox{\hyperlink{if__ure_8c_a9b60b03a977049e8eb46594b7692310a}{00390}} \mbox{\hyperlink{if__ure_8c_a4935a56043d65bc533db92793fcbe024}{ure\_miibus\_readreg}}(device\_t dev, \textcolor{keywordtype}{int} phy, \textcolor{keywordtype}{int} \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00391}00391 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00392}00392         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00393}00393         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00394}00394         \textcolor{keywordtype}{int} locked;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00395}00395 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00396}00396         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00397}00397         locked = mtx\_owned(\&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00398}00398         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00399}00399                 \mbox{\hyperlink{if__urereg_8h_a86b959b786b7d75ed325be926a3fd12f}{URE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00400}00400 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00401}00401         \textcolor{comment}{/* Let the rgephy driver read the URE\_GMEDIASTAT register. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00402}00402         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} == \mbox{\hyperlink{if__urereg_8h_ad71adcfdc2dd701d688ef55148c4f03e}{URE\_GMEDIASTAT}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00403}00403                 \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00404}00404                         \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00405}00405                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_ad71adcfdc2dd701d688ef55148c4f03e}{URE\_GMEDIASTAT}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00406}00406         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00408}00408         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_aff5c3080cfa1506f808947cc45b9ffc4}{URE\_OCP\_BASE\_MII}} + \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} * 2);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00409}00409 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00410}00410         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00411}00411                 \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00412}00412         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00413}00413 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00414}00414 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00415}00415 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00416}\mbox{\hyperlink{if__ure_8c_a0ac2d7b136ff514f5dd91c8d984739b6}{00416}} \mbox{\hyperlink{if__ure_8c_ad854b883ccc75b92ffcca4349dfcc45a}{ure\_miibus\_writereg}}(device\_t dev, \textcolor{keywordtype}{int} phy, \textcolor{keywordtype}{int} \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00417}00417 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00418}00418         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00419}00419         \textcolor{keywordtype}{int} locked;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00421}00421         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00422}00422         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_ab371a32e164c64d163ed64658e151907}{sc\_phyno}} != phy)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00423}00423                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00425}00425         locked = mtx\_owned(\&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00426}00426         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00427}00427                 \mbox{\hyperlink{if__urereg_8h_a86b959b786b7d75ed325be926a3fd12f}{URE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00429}00429         \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_aff5c3080cfa1506f808947cc45b9ffc4}{URE\_OCP\_BASE\_MII}} + \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} * 2, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00430}00430 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00431}00431         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00432}00432                 \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00433}00433         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00434}00434 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00435}00435 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00436}00436 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00437}\mbox{\hyperlink{if__ure_8c_a9236a815d77454891beab8b4c658466a}{00437}} \mbox{\hyperlink{if__ure_8c_ae3c6218b9746a23dce411878a644e052}{ure\_miibus\_statchg}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00438}00438 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00439}00439         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00440}00440         \textcolor{keyword}{struct }mii\_data *mii;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00441}00441         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00442}00442         \textcolor{keywordtype}{int} locked;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00444}00444         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00445}00445         mii = \mbox{\hyperlink{if__auereg_8h_adb491f9d26e8663f329b26e167f5edde}{GET\_MII}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00446}00446         locked = mtx\_owned(\&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00447}00447         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00448}00448                 \mbox{\hyperlink{if__urereg_8h_a86b959b786b7d75ed325be926a3fd12f}{URE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00449}00449 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00450}00450         ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00451}00451         \textcolor{keywordflow}{if} (mii == NULL || ifp == NULL ||}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00452}00452             (ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING) == 0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00453}00453                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00455}00455         sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \&= \string~URE\_FLAG\_LINK;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00456}00456         \textcolor{keywordflow}{if} ((mii-\/>mii\_media\_status \& (IFM\_ACTIVE | IFM\_AVALID)) ==}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00457}00457             (IFM\_ACTIVE | IFM\_AVALID)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00458}00458                 \textcolor{keywordflow}{switch} (IFM\_SUBTYPE(mii-\/>mii\_media\_active)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00459}00459                 \textcolor{keywordflow}{case} IFM\_10\_T:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00460}00460                 \textcolor{keywordflow}{case} IFM\_100\_TX:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00461}00461                         sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} |= \mbox{\hyperlink{if__urereg_8h_a15f0ce3af47f0b03046f1335bfc5213c}{URE\_FLAG\_LINK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00462}00462                         sc-\/>\mbox{\hyperlink{structure__softc_af737056460f49bef67e910567147d25a}{sc\_rxstarted}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00463}00463                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00464}00464                 \textcolor{keywordflow}{case} IFM\_1000\_T:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00465}00465                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_afea11f2c8f6035b1e47282147f6d8b76}{URE\_FLAG\_8152}}) != 0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00466}00466                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00467}00467                         sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} |= \mbox{\hyperlink{if__urereg_8h_a15f0ce3af47f0b03046f1335bfc5213c}{URE\_FLAG\_LINK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00468}00468                         sc-\/>\mbox{\hyperlink{structure__softc_af737056460f49bef67e910567147d25a}{sc\_rxstarted}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00469}00469                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00470}00470                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00471}00471                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00472}00472                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00473}00473         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00474}00474 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00475}00475         \textcolor{comment}{/* Lost link, do nothing. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00476}00476         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a15f0ce3af47f0b03046f1335bfc5213c}{URE\_FLAG\_LINK}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00477}00477                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00478}00478 done:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00479}00479         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00480}00480                 \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00481}00481 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00482}00482 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00483}00483 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00484}00484 \textcolor{comment}{ * Probe for a RTL8152/RTL8153 chip.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00485}00485 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00486}00486 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00487}\mbox{\hyperlink{if__ure_8c_ae92f48278b01cc565ae3cd1dcd97289d}{00487}} \mbox{\hyperlink{if__ure_8c_aaf573b14a9de9f4f8127fa65524f4023}{ure\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00488}00488 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00489}00489         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00490}00490 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00491}00491         uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00492}00492         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00493}00493                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00494}00494         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} != \mbox{\hyperlink{if__urereg_8h_a1878109bdfa0cca8979191a8abbb498a}{URE\_IFACE\_IDX}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00495}00495                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00497}00497         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{if__ure_8c_a32041a16624c828d32be57d0443e59fd}{ure\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__ure_8c_a32041a16624c828d32be57d0443e59fd}{ure\_devs}}), uaa));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00498}00498 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00499}00499 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00500}00500 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00501}00501 \textcolor{comment}{ * Attach the interface. Allocate softc structures, do ifmedia}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00502}00502 \textcolor{comment}{ * setup and ethernet/BPF attach.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00503}00503 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00504}00504 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00505}\mbox{\hyperlink{if__ure_8c_a05b4441424ba22dbe33b5ed20b6efe18}{00505}} \mbox{\hyperlink{if__ure_8c_a4418b9062a61a3a87279e4d41952979e}{ure\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00506}00506 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00507}00507         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00508}00508         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00509}00509         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00510}00510         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} ure\_config\_rx[\mbox{\hyperlink{if__urereg_8h_ab66a8449759602f1cf0ae33dbe92a67c}{URE\_MAX\_RX}}];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00511}00511         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} ure\_config\_tx[\mbox{\hyperlink{if__urereg_8h_a9520e7de49fb3969ad4494e79957785d}{URE\_MAX\_TX}}];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00512}00512         uint8\_t iface\_index;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00513}00513         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00514}00514         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00515}00515 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00516}00516         sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{usbdi_8h_ad61be4846786fb86de5691968d1e9b66}{USB\_GET\_DRIVER\_INFO}}(uaa);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00517}00517         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00518}00518         mtx\_init(\&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}}, device\_get\_nameunit(dev), NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00519}00519 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00520}00520         iface\_index = \mbox{\hyperlink{if__urereg_8h_a1878109bdfa0cca8979191a8abbb498a}{URE\_IFACE\_IDX}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00521}00521 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00522}00522         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}} | \mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00523}00523                 sc-\/>\mbox{\hyperlink{structure__softc_ac40ade5a02b568713faced001e511320}{sc\_rxbufsz}} = \mbox{\hyperlink{if__urereg_8h_ae7cf5b5e1e657352982384e131ee8244}{URE\_8153\_RX\_BUFSZ}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00524}00524         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00525}00525                 sc-\/>\mbox{\hyperlink{structure__softc_ac40ade5a02b568713faced001e511320}{sc\_rxbufsz}} = \mbox{\hyperlink{if__urereg_8h_a39e1261946a8bfb2d6fdf1e9eddf7486}{URE\_8156\_RX\_BUFSZ}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00526}00526         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00527}00527                 sc-\/>\mbox{\hyperlink{structure__softc_ac40ade5a02b568713faced001e511320}{sc\_rxbufsz}} = \mbox{\hyperlink{if__urereg_8h_ad1cb2a165eaa47969f240c36bd25448b}{URE\_8152\_RX\_BUFSZ}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00529}00529         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ab66a8449759602f1cf0ae33dbe92a67c}{URE\_MAX\_RX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00530}00530                 ure\_config\_rx[i] = (\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00531}00531                         .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00532}00532                         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00533}00533                         .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00534}00534                         .bufsize = sc-\/>\mbox{\hyperlink{structure__softc_ac40ade5a02b568713faced001e511320}{sc\_rxbufsz}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00535}00535                         .flags = \{.pipe\_bof = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00536}00536                         .callback = \mbox{\hyperlink{if__ure_8c_a25160ceda9a487927811b5430fc3658a}{ure\_bulk\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00537}00537                         .timeout = 0,   \textcolor{comment}{/* no timeout */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00538}00538                 \};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00539}00539         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00540}00540         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, \&iface\_index, sc-\/>\mbox{\hyperlink{structure__softc_ad357cf18ba65f8a44ca3b2db176a2500}{sc\_rx\_xfer}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00541}00541             ure\_config\_rx, \mbox{\hyperlink{if__urereg_8h_ab66a8449759602f1cf0ae33dbe92a67c}{URE\_MAX\_RX}}, sc, \&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00542}00542         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00543}00543                 device\_printf(dev, \textcolor{stringliteral}{"{}allocating USB RX transfers failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00544}00544                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00545}00545         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00546}00546 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00547}00547         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_a9520e7de49fb3969ad4494e79957785d}{URE\_MAX\_TX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00548}00548                 ure\_config\_tx[i] = (\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00549}00549                         .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00550}00550                         .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00551}00551                         .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00552}00552                         .bufsize = \mbox{\hyperlink{if__urereg_8h_a9fd76c13cab7e36b6de72aa99acc1e2b}{URE\_TX\_BUFSZ}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00553}00553                         .flags = \{.pipe\_bof = 1,.force\_short\_xfer = 1,\},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00554}00554                         .callback = \mbox{\hyperlink{if__ure_8c_af2ee7fe1ae25996e825562cb9899eee5}{ure\_bulk\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00555}00555                         .timeout = 10000,       \textcolor{comment}{/* 10 seconds */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00556}00556                 \};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00557}00557         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00558}00558         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, \&iface\_index, sc-\/>\mbox{\hyperlink{structure__softc_afb29c37c85e8d3448848f764321774c4}{sc\_tx\_xfer}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00559}00559             ure\_config\_tx, \mbox{\hyperlink{if__urereg_8h_a9520e7de49fb3969ad4494e79957785d}{URE\_MAX\_TX}}, sc, \&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00560}00560         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00561}00561                 \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structure__softc_ad357cf18ba65f8a44ca3b2db176a2500}{sc\_rx\_xfer}}, \mbox{\hyperlink{if__urereg_8h_ab66a8449759602f1cf0ae33dbe92a67c}{URE\_MAX\_RX}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00562}00562                 device\_printf(dev, \textcolor{stringliteral}{"{}allocating USB TX transfers failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00563}00563                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00564}00564         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00565}00565 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00566}00566         ue-\/>\mbox{\hyperlink{structusb__ether_af979047fbf844a27c7f2266c87fd03a4}{ue\_sc}} = sc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00567}00567         ue-\/>\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}} = dev;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00568}00568         ue-\/>\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00569}00569         ue-\/>\mbox{\hyperlink{structusb__ether_af390d8b75a7bd2d9f347f808f0c15a4f}{ue\_mtx}} = \&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00570}00570         ue-\/>\mbox{\hyperlink{structusb__ether_a2b787f8aab7c5db729211c3a1c3bc141}{ue\_methods}} = \&\mbox{\hyperlink{if__ure_8c_adb23adb2a6f5590bfb5e6c98e641e236}{ure\_ue\_methods}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00571}00571 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00572}00572         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__ethernet_8c_ad75ada74935d33849a41ff3448d1f291}{uether\_ifattach}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00573}00573         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00574}00574                 device\_printf(dev, \textcolor{stringliteral}{"{}could not attach interface\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00575}00575                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00576}00576         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00577}00577         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00578}00578 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00579}00579 detach:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00580}00580         \mbox{\hyperlink{if__ure_8c_a690692e7c67deebeed78677b77ee846d}{ure\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00581}00581         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00582}00582 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00583}00583 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00584}00584 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00585}\mbox{\hyperlink{if__ure_8c_a460d7c53be62e7533b52dab4592686bb}{00585}} \mbox{\hyperlink{if__ure_8c_a690692e7c67deebeed78677b77ee846d}{ure\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00586}00586 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00587}00587         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00588}00588         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00589}00589 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00590}00590         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structure__softc_afb29c37c85e8d3448848f764321774c4}{sc\_tx\_xfer}}, \mbox{\hyperlink{if__urereg_8h_a9520e7de49fb3969ad4494e79957785d}{URE\_MAX\_TX}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00591}00591         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structure__softc_ad357cf18ba65f8a44ca3b2db176a2500}{sc\_rx\_xfer}}, \mbox{\hyperlink{if__urereg_8h_ab66a8449759602f1cf0ae33dbe92a67c}{URE\_MAX\_RX}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00592}00592         \mbox{\hyperlink{usb__ethernet_8c_a15f91b3474535af40e16b2c05d023e99}{uether\_ifdetach}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00593}00593         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00595}00595         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00596}00596 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00597}00597 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00598}00598 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00599}00599 \textcolor{comment}{ * Copy from USB buffers to a new mbuf chain with pkt header.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00600}00600 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00601}00601 \textcolor{comment}{ * This will use m\_getm2 to get a mbuf chain w/ properly sized mbuf}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00602}00602 \textcolor{comment}{ * clusters as necessary.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00603}00603 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00604}00604 \textcolor{keyword}{static} \textcolor{keyword}{struct }mbuf *}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00605}\mbox{\hyperlink{if__ure_8c_a1f5ba3442734b099043ccf8749e9c2ab}{00605}} \mbox{\hyperlink{if__ure_8c_a1f5ba3442734b099043ccf8749e9c2ab}{ure\_makembuf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc, \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00606}00606     \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00607}00607 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00608}00608         \textcolor{keyword}{struct }usb\_page\_search\_res;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00609}00609         \textcolor{keyword}{struct }mbuf *m, *mb;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00610}00610         \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} tlen;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00611}00611 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00612}00612         m = m\_getm2(NULL, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} + ETHER\_ALIGN, M\_NOWAIT, MT\_DATA, M\_PKTHDR);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00613}00613         \textcolor{keywordflow}{if} (m == NULL)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00614}00614                 \textcolor{keywordflow}{return} (m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00615}00615 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00616}00616         \textcolor{comment}{/* uether\_newbuf does this. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00617}00617         m\_adj(m, ETHER\_ALIGN);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00618}00618 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00619}00619         m-\/>m\_pkthdr.len = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00620}00620 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00621}00621         \textcolor{keywordflow}{for} (mb = m; \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > 0; mb = mb-\/>m\_next) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00622}00622                 tlen = MIN(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, M\_TRAILINGSPACE(mb));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00623}00623 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00624}00624                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}}, mtod(mb, uint8\_t *), tlen);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00625}00625                 mb-\/>m\_len = tlen;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00626}00626 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00627}00627                 \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} += tlen;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00628}00628                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/= tlen;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00629}00629         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00631}00631         \textcolor{keywordflow}{return} (m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00632}00632 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00633}00633 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00634}00634 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00635}\mbox{\hyperlink{if__ure_8c_a03ee8adfed47f4de032c3ef32b1ab1e2}{00635}} \mbox{\hyperlink{if__ure_8c_a25160ceda9a487927811b5430fc3658a}{ure\_bulk\_read\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00636}00636 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00637}00637         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00638}00638         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00639}00639         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00640}00640         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00641}00641         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00642}00642         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__rxpkt}{ure\_rxpkt}} pkt;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00643}00643         \textcolor{keywordtype}{int} actlen, off, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00644}00644         \textcolor{keywordtype}{int} caps;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00645}00645         uint32\_t pktcsum;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00646}00646 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00647}00647         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00648}00648 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00649}00649         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00650}00650         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00651}00651                 off = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00652}00652                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00653}00653                 caps = if\_getcapenable(ifp);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00654}00654                 \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(13, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}rcb start\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00655}00655                 \textcolor{keywordflow}{while} (actlen > 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00656}00656                         \textcolor{keywordflow}{if} (actlen < (\textcolor{keywordtype}{int})(\textcolor{keyword}{sizeof}(pkt))) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00657}00657                                 if\_inc\_counter(ifp, IFCOUNTER\_IERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00658}00658                                 \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00659}00659                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00660}00660                         \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, off, \&pkt, \textcolor{keyword}{sizeof}(pkt));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00661}00661 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00662}00662                         off += \textcolor{keyword}{sizeof}(pkt);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00663}00663                         actlen -\/= \textcolor{keyword}{sizeof}(pkt);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00664}00664 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00665}00665                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = le32toh(pkt.\mbox{\hyperlink{structure__rxpkt_a940e6844f0c780f1e40eb2c2efd5a6af}{ure\_pktlen}}) \& \mbox{\hyperlink{if__urereg_8h_af6f6d3e6d3c500c4f97ab52608725511}{URE\_RXPKT\_LEN\_MASK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00666}00666 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00667}00667                         \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(13, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00668}00668                             \textcolor{stringliteral}{"{}rxpkt: \%\#x, \%\#x, \%\#x, \%\#x, \%\#x, \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00669}00669                             pkt.\mbox{\hyperlink{structure__rxpkt_a940e6844f0c780f1e40eb2c2efd5a6af}{ure\_pktlen}}, pkt.\mbox{\hyperlink{structure__rxpkt_a3fbb214eaacc632bd2a5aa42422012c6}{ure\_csum}}, pkt.\mbox{\hyperlink{structure__rxpkt_a05bf4a672230204faf79064a09d6207d}{ure\_misc}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00670}00670                             pkt.\mbox{\hyperlink{structure__rxpkt_a221fc8ce84a06ec9dbfaf3d18eb9e498}{ure\_rsvd2}}, pkt.\mbox{\hyperlink{structure__rxpkt_a53f201b400cb3c6d6fa56400aeb806e4}{ure\_rsvd3}}, pkt.\mbox{\hyperlink{structure__rxpkt_a3abcaeab6de0ce59d6171a1ac8c0e792}{ure\_rsvd4}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00671}00671                         \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(13, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}len: \%d\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00672}00672 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00673}00673                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} >= \mbox{\hyperlink{if__urereg_8h_af6f6d3e6d3c500c4f97ab52608725511}{URE\_RXPKT\_LEN\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00674}00674                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00675}00675 \textcolor{comment}{                                 * drop the rest of this segment.  With out}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00676}00676 \textcolor{comment}{                                 * more information, we cannot know where next}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00677}00677 \textcolor{comment}{                                 * packet starts.  Blindly continuing would}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00678}00678 \textcolor{comment}{                                 * cause a packet in packet attack, allowing}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00679}00679 \textcolor{comment}{                                 * one VLAN to inject packets w/o a VLAN tag,}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00680}00680 \textcolor{comment}{                                 * or injecting packets into other VLANs.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00681}00681 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00682}00682                                 if\_inc\_counter(ifp, IFCOUNTER\_IERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00683}00683                                 \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00684}00684                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00686}00686                         \textcolor{keywordflow}{if} (actlen < \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00687}00687                                 if\_inc\_counter(ifp, IFCOUNTER\_IERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00688}00688                                 \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00689}00689                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00690}00690 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00691}00691                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} >= (ETHER\_HDR\_LEN + ETHER\_CRC\_LEN))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00692}00692                                 m = \mbox{\hyperlink{if__ure_8c_a1f5ba3442734b099043ccf8749e9c2ab}{ure\_makembuf}}(pc, off, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/ ETHER\_CRC\_LEN);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00693}00693                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00694}00694                                 m = NULL;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00695}00695                         \textcolor{keywordflow}{if} (m == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00696}00696                                 if\_inc\_counter(ifp, IFCOUNTER\_IQDROPS, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00697}00697                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00698}00698                                 \textcolor{comment}{/* make mbuf and queue */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00699}00699                                 pktcsum = le32toh(pkt.\mbox{\hyperlink{structure__rxpkt_a3fbb214eaacc632bd2a5aa42422012c6}{ure\_csum}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00700}00700                                 \textcolor{keywordflow}{if} (caps \& IFCAP\_VLAN\_HWTAGGING \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00701}00701                                     pktcsum \& \mbox{\hyperlink{if__urereg_8h_a8ff1625e1088f418aa5ad50c9efe33fe}{URE\_RXPKT\_RX\_VLAN\_TAG}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00702}00702                                         m-\/>m\_pkthdr.ether\_vtag =}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00703}00703                                             bswap16(pktcsum \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00704}00704                                             \mbox{\hyperlink{if__urereg_8h_a27087dd7b4ce37bafbae7e893250c5f6}{URE\_RXPKT\_VLAN\_MASK}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00705}00705                                         m-\/>m\_flags |= M\_VLANTAG;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00706}00706                                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00707}00707 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00708}00708                                 \textcolor{comment}{/* set the necessary flags for rx checksum */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00709}00709                                 \mbox{\hyperlink{if__ure_8c_a3dca4b12b0a5b2cdf3046f7d0a6ca371}{ure\_rxcsum}}(caps, \&pkt, m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00710}00710 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00711}00711                                 \mbox{\hyperlink{usb__ethernet_8c_a821ec2eb97a85d4969f2859e6f51a783}{uether\_rxmbuf}}(ue, m, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} -\/ ETHER\_CRC\_LEN);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00712}00712                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00713}00713 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00714}00714                         off += roundup(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, \mbox{\hyperlink{if__urereg_8h_a0714669c7665585f290e3a42b159847c}{URE\_RXPKT\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00715}00715                         actlen -\/= roundup(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, \mbox{\hyperlink{if__urereg_8h_a0714669c7665585f290e3a42b159847c}{URE\_RXPKT\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00716}00716                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00717}00717                 \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(13, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}rcb end\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00718}00718 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00719}00719                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00720}00720         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00721}00721 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00722}00722                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00723}00723                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00724}00724                 \mbox{\hyperlink{usb__ethernet_8c_a007aff306fb41573661e03ac71e45966}{uether\_rxflush}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00725}00725                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00726}00726 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00727}00727         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00728}00728                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}bulk read error, \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00729}00729                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00730}00730 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00731}00731                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00732}00732                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00733}00733                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00734}00734                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00735}00735                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00736}00736                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00737}00737         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00738}00738 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00739}00739 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00740}00740 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00741}\mbox{\hyperlink{if__ure_8c_a774fc0ebd9053679d99e04b95ea62daa}{00741}} \mbox{\hyperlink{if__ure_8c_af2ee7fe1ae25996e825562cb9899eee5}{ure\_bulk\_write\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00742}00742 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00743}00743         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00744}00744         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00745}00745         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00746}00746         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00747}00747         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__txpkt}{ure\_txpkt}} txpkt;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00748}00748         uint32\_t regtmp;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00749}00749         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, pos;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00750}00750         \textcolor{keywordtype}{int} rem;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00751}00751         \textcolor{keywordtype}{int} caps;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00752}00752 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00753}00753         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00754}00754         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00755}00755                 DPRINTFN(11, \textcolor{stringliteral}{"{}transfer complete\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00756}00756                 ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_OACTIVE;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00757}00757 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00758}00758                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00759}00759         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00760}00760 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00761}00761                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a15f0ce3af47f0b03046f1335bfc5213c}{URE\_FLAG\_LINK}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00762}00762                         \textcolor{comment}{/* don't send anything if there is no link! */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00763}00763                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00764}00764                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00765}00765 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00766}00766                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00767}00767                 caps = if\_getcapenable(ifp);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00768}00768 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00769}00769                 pos = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00770}00770                 rem = \mbox{\hyperlink{if__urereg_8h_a9fd76c13cab7e36b6de72aa99acc1e2b}{URE\_TX\_BUFSZ}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00771}00771                 \textcolor{keywordflow}{while} (rem > \textcolor{keyword}{sizeof}(txpkt)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00772}00772                         IFQ\_DRV\_DEQUEUE(\&ifp-\/>if\_snd, m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00773}00773                         \textcolor{keywordflow}{if} (m == NULL)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00774}00774                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00775}00775 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00776}00776                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00777}00777 \textcolor{comment}{                         * make sure we don't ever send too large of a}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00778}00778 \textcolor{comment}{                         * packet}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00779}00779 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00780}00780                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = m-\/>m\_pkthdr.len;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00781}00781                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} \& \mbox{\hyperlink{if__urereg_8h_a31ba6db9ce82e24a1fec0d11be842575}{URE\_TXPKT\_LEN\_MASK}}) != \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00782}00782                                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00783}00783                                     \textcolor{stringliteral}{"{}pkt len too large: \%\#x"{}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00784}00784 pkterror:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00785}00785                                 if\_inc\_counter(ifp, IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00786}00786                                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00787}00787                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00788}00788                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00789}00789 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00790}00790                         \textcolor{keywordflow}{if} (\textcolor{keyword}{sizeof}(txpkt) +}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00791}00791                             roundup(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, \mbox{\hyperlink{if__urereg_8h_afb40fc06b13ef150ca8f41df06fea544}{URE\_TXPKT\_ALIGN}}) > rem) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00792}00792                                 \textcolor{comment}{/* out of space */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00793}00793                                 IFQ\_DRV\_PREPEND(\&ifp-\/>if\_snd, m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00794}00794                                 m = NULL;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00795}00795                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00796}00796                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00797}00797 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00798}00798                         txpkt = (\textcolor{keyword}{struct }\mbox{\hyperlink{structure__txpkt}{ure\_txpkt}})\{\};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00799}00799                         txpkt.\mbox{\hyperlink{structure__txpkt_ae2ea68636bb8e39db5f00139cef4c6f3}{ure\_pktlen}} = htole32((\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} \& \mbox{\hyperlink{if__urereg_8h_a31ba6db9ce82e24a1fec0d11be842575}{URE\_TXPKT\_LEN\_MASK}}) |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00800}00800                             \mbox{\hyperlink{if__urereg_8h_a95f42f8ea2a69825ffac46a8ddb8f452}{URE\_TKPKT\_TX\_FS}} | \mbox{\hyperlink{if__urereg_8h_a3ddb77f1522b7be12b7c315474a556f4}{URE\_TKPKT\_TX\_LS}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00801}00801                         \textcolor{keywordflow}{if} (m-\/>m\_flags \& M\_VLANTAG) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00802}00802                                 txpkt.\mbox{\hyperlink{structure__txpkt_a56afdee7cdecd65f48b5e87047940a17}{ure\_csum}} = htole32(}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00803}00803                                     bswap16(m-\/>m\_pkthdr.ether\_vtag \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00804}00804                                     \mbox{\hyperlink{if__urereg_8h_ac13ad792d9c49a00b42fae88304e365c}{URE\_TXPKT\_VLAN\_MASK}}) | \mbox{\hyperlink{if__urereg_8h_a254e23683baafcdd6d5b92cd23ee19ae}{URE\_TXPKT\_VLAN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00805}00805                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00806}00806                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_ac5f1e7f9c2e02e42d05b97d9cdea6f2a}{ure\_txcsum}}(m, caps, \&regtmp)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00807}00807                                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00808}00808                                     \textcolor{stringliteral}{"{}pkt l4 off too large"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00809}00809                                 \textcolor{keywordflow}{goto} pkterror;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00810}00810                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00811}00811                         txpkt.\mbox{\hyperlink{structure__txpkt_a56afdee7cdecd65f48b5e87047940a17}{ure\_csum}} |= htole32(regtmp);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00812}00812 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00813}00813                         \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(13, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00814}00814                             \textcolor{stringliteral}{"{}txpkt: mbflg: \%\#x, \%\#x, \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00815}00815                             m-\/>m\_pkthdr.csum\_flags, le32toh(txpkt.\mbox{\hyperlink{structure__txpkt_ae2ea68636bb8e39db5f00139cef4c6f3}{ure\_pktlen}}),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00816}00816                             le32toh(txpkt.\mbox{\hyperlink{structure__txpkt_a56afdee7cdecd65f48b5e87047940a17}{ure\_csum}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00817}00817 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00818}00818                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, pos, \&txpkt, \textcolor{keyword}{sizeof}(txpkt));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00819}00819 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00820}00820                         pos += \textcolor{keyword}{sizeof}(txpkt);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00821}00821                         rem -\/= \textcolor{keyword}{sizeof}(txpkt);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00822}00822 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00823}00823                         \mbox{\hyperlink{usbdi_8h_a9696aa8bcb25b1adcf45e8387a13897a}{usbd\_m\_copy\_in}}(pc, pos, m, 0, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00824}00824 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00825}00825                         pos += roundup(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, \mbox{\hyperlink{if__urereg_8h_afb40fc06b13ef150ca8f41df06fea544}{URE\_TXPKT\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00826}00826                         rem -\/= roundup(\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, \mbox{\hyperlink{if__urereg_8h_afb40fc06b13ef150ca8f41df06fea544}{URE\_TXPKT\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00827}00827 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00828}00828                         if\_inc\_counter(ifp, IFCOUNTER\_OPACKETS, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00829}00829 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00830}00830                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00831}00831 \textcolor{comment}{                         * If there's a BPF listener, bounce a copy}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00832}00832 \textcolor{comment}{                         * of this frame to him.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00833}00833 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00834}00834                         BPF\_MTAP(ifp, m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00835}00835 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00836}00836                         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00837}00837                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00838}00838 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00839}00839                 \textcolor{comment}{/* no packets to send */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00840}00840                 \textcolor{keywordflow}{if} (pos == 0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00841}00841                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00842}00842 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00843}00843                 \textcolor{comment}{/* Set frame length. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00844}00844                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, pos);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00845}00845 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00846}00846                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00847}00847 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00848}00848                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00849}00849 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00850}00850         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00851}00851                 DPRINTFN(11, \textcolor{stringliteral}{"{}transfer error, \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00852}00852                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00853}00853 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00854}00854                 if\_inc\_counter(ifp, IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00855}00855                 ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_OACTIVE;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00856}00856 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00857}00857                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945aeb31baaa7bf416e200f2a0d4ece60820}{USB\_ERR\_TIMEOUT}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00858}00858                         \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(12, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00859}00859                             \textcolor{stringliteral}{"{}pkt tx timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00860}00860                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00862}00862                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00863}00863                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00864}00864                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00865}00865                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00866}00866                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00867}00867         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00868}00868 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00869}00869 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00870}00870 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00871}\mbox{\hyperlink{if__ure_8c_af21297221493a64138faf18292423be8}{00871}} \mbox{\hyperlink{if__ure_8c_af21297221493a64138faf18292423be8}{ure\_read\_chipver}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00872}00872 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00873}00873         uint16\_t ver;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00874}00874 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00875}00875         ver = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a5f8177fef5210afe09193c6b03fa1834}{URE\_PLA\_TCR1}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \& \mbox{\hyperlink{if__urereg_8h_a064faa15469b4d17eef23b999f96cd8f}{URE\_VERSION\_MASK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00876}00876         sc-\/>\mbox{\hyperlink{structure__softc_aeeaf7a3e0ae99c3611140e2a405b0c47}{sc\_ver}} = ver;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00877}00877         \textcolor{keywordflow}{switch} (ver) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00878}00878         \textcolor{keywordflow}{case} 0x4c00:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00879}00879                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_a717eb260e8ba580ee8e395062614f1d4}{URE\_CHIP\_VER\_4C00}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00880}00880                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_afea11f2c8f6035b1e47282147f6d8b76}{URE\_FLAG\_8152}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00881}00881                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00882}00882         \textcolor{keywordflow}{case} 0x4c10:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00883}00883                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_ad45b2254873fa8da09c6ceae2ef3ba8e}{URE\_CHIP\_VER\_4C10}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00884}00884                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_afea11f2c8f6035b1e47282147f6d8b76}{URE\_FLAG\_8152}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00885}00885                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00886}00886         \textcolor{keywordflow}{case} 0x5c00:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00887}00887                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_a9cc26233f7974a36182f29e7c6c47aae}{URE\_CHIP\_VER\_5C00}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00888}00888                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00889}00889                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00890}00890         \textcolor{keywordflow}{case} 0x5c10:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00891}00891                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_a4ec379db57e1db2186e573607df75441}{URE\_CHIP\_VER\_5C10}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00892}00892                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00893}00893                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00894}00894         \textcolor{keywordflow}{case} 0x5c20:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00895}00895                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_ae78e467f938a407f1a8d2ec3f43ba9f5}{URE\_CHIP\_VER\_5C20}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00896}00896                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00897}00897                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00898}00898         \textcolor{keywordflow}{case} 0x5c30:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00899}00899                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_aca19befbd6cf9ca85316c41705e478ac}{URE\_CHIP\_VER\_5C30}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00900}00900                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00901}00901                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00902}00902         \textcolor{keywordflow}{case} 0x6000:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00903}00903                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00904}00904                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_a149b751c0de8b91cf8b1fa44bead72c9}{URE\_CHIP\_VER\_6000}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00905}00905                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00906}00906         \textcolor{keywordflow}{case} 0x6010:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00907}00907                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00908}00908                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_ad920305fbe1a05b824cdf2c001b5d19b}{URE\_CHIP\_VER\_6010}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00909}00909                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00910}00910         \textcolor{keywordflow}{case} 0x7020:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00911}00911                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00912}00912                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_ab3d2cb6f6aa86956c0ccb647674eea7f}{URE\_CHIP\_VER\_7020}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00913}00913                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00914}00914         \textcolor{keywordflow}{case} 0x7030:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00915}00915                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00916}00916                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_af5210d75e24adcc05d3036e8e778fc97}{URE\_CHIP\_VER\_7030}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00917}00917                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00918}00918         \textcolor{keywordflow}{case} 0x7400:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00919}00919                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00920}00920                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_a8112f52dfd1e631589aa18d0bd119134}{URE\_CHIP\_VER\_7400}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00921}00921                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00922}00922         \textcolor{keywordflow}{case} 0x7410:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00923}00923                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} = \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00924}00924                 sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} |= \mbox{\hyperlink{if__urereg_8h_afbaf885fad10adee034d44c952f35168}{URE\_CHIP\_VER\_7410}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00925}00925                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00926}00926         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00927}00927                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00928}00928                     \textcolor{stringliteral}{"{}unknown version 0x\%04x\(\backslash\)n"{}}, ver);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00929}00929                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00930}00930         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00931}00931 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00932}00932 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00933}00933 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00934}\mbox{\hyperlink{if__ure_8c_a559df0905d0fc8be49ec362240a153c0}{00934}} \mbox{\hyperlink{if__ure_8c_a559df0905d0fc8be49ec362240a153c0}{ure\_sysctl\_chipver}}(SYSCTL\_HANDLER\_ARGS)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00935}00935 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00936}00936         \textcolor{keyword}{struct }sbuf sb;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00937}00937         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = arg1;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00938}00938         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00939}00939 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00940}00940         sbuf\_new\_for\_sysctl(\&sb, NULL, 0, \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00941}00941 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00942}00942         sbuf\_printf(\&sb, \textcolor{stringliteral}{"{}\%04x"{}}, sc-\/>\mbox{\hyperlink{structure__softc_aeeaf7a3e0ae99c3611140e2a405b0c47}{sc\_ver}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00943}00943 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00944}00944         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = sbuf\_finish(\&sb);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00945}00945         sbuf\_delete(\&sb);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00946}00946 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00947}00947         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00948}00948 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00949}00949 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00950}00950 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00951}\mbox{\hyperlink{if__ure_8c_a97f5e8c14e4697dbecad04bbe533cda4}{00951}} \mbox{\hyperlink{if__ure_8c_a056c6c58e59e0030631702d332d36e08}{ure\_attach\_post}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00952}00952 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00953}00953         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00954}00954 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00955}00955         sc-\/>\mbox{\hyperlink{structure__softc_af737056460f49bef67e910567147d25a}{sc\_rxstarted}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00956}00956         sc-\/>\mbox{\hyperlink{structure__softc_ab371a32e164c64d163ed64658e151907}{sc\_phyno}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00957}00957 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00958}00958         \textcolor{comment}{/* Determine the chip version. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00959}00959         \mbox{\hyperlink{if__ure_8c_af21297221493a64138faf18292423be8}{ure\_read\_chipver}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00960}00960 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00961}00961         \textcolor{comment}{/* Initialize controller and get station address. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00962}00962         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_afea11f2c8f6035b1e47282147f6d8b76}{URE\_FLAG\_8152}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00963}00963                 \mbox{\hyperlink{if__ure_8c_a24a94174cafdb5f291319df005cdec47}{ure\_rtl8152\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00964}00964         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}} | \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00965}00965                 \mbox{\hyperlink{if__ure_8c_abbfbc0652270b0a4e3beb410efea9650}{ure\_rtl8153b\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00966}00966         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00967}00967                 \mbox{\hyperlink{if__ure_8c_a62288668305be36fd0b0b4af54630b97}{ure\_rtl8153\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00968}00968 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00969}00969         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& \mbox{\hyperlink{if__urereg_8h_a717eb260e8ba580ee8e395062614f1d4}{URE\_CHIP\_VER\_4C00}}) ||}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00970}00970             (sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& \mbox{\hyperlink{if__urereg_8h_ad45b2254873fa8da09c6ceae2ef3ba8e}{URE\_CHIP\_VER\_4C10}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00971}00971                 \mbox{\hyperlink{if__ure_8c_a96281943d07b4cd3d49db68b4a02537e}{ure\_read\_mem}}(sc, \mbox{\hyperlink{if__urereg_8h_a04b518caa16e5f4b155d9898667cb4ac}{URE\_PLA\_IDR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00972}00972                     ue-\/>\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}}, 8);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00973}00973         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00974}00974                 \mbox{\hyperlink{if__ure_8c_a96281943d07b4cd3d49db68b4a02537e}{ure\_read\_mem}}(sc, \mbox{\hyperlink{if__urereg_8h_ac7bb47bb73d1d3d4cc5b21ac1c8cd6d8}{URE\_PLA\_BACKUP}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00975}00975                     ue-\/>\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}}, 8);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00976}00976 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00977}00977         \textcolor{keywordflow}{if} (ETHER\_IS\_ZERO(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00978}00978                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}MAC assigned randomly\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00979}00979                 arc4rand(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}}, ETHER\_ADDR\_LEN, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00980}00980                 sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}}[0] \&= \string~0x01; \textcolor{comment}{/* unicast */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00981}00981                 sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}}[0] |= 0x02;  \textcolor{comment}{/* locally administered */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00982}00982         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00983}00983 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00984}00984 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00985}00985 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00986}\mbox{\hyperlink{if__ure_8c_aa4bb6fd477c41184dc14288ed1890f73}{00986}} \mbox{\hyperlink{if__ure_8c_aa4bb6fd477c41184dc14288ed1890f73}{ure\_attach\_post\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00987}00987 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00988}00988         \textcolor{keyword}{struct }sysctl\_ctx\_list *sctx;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00989}00989         \textcolor{keyword}{struct }sysctl\_oid *soid;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00990}00990         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00991}00991         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00992}00992         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00993}00993 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00994}00994         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00995}00995         ifp = ue-\/>\mbox{\hyperlink{structusb__ether_a71587f92772527f72d98bfe0753ecb59}{ue\_ifp}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00996}00996         ifp-\/>if\_flags = IFF\_BROADCAST | IFF\_SIMPLEX | IFF\_MULTICAST;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00997}00997         ifp-\/>if\_start = \mbox{\hyperlink{usb__ethernet_8c_af7cfd4fe0b46839cf9f541bd19a572aa}{uether\_start}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00998}00998         ifp-\/>if\_ioctl = \mbox{\hyperlink{if__ure_8c_a51336eab590618e862cf89766c4923bd}{ure\_ioctl}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l00999}00999         ifp-\/>if\_init = \mbox{\hyperlink{usb__ethernet_8c_aa635260c4b0cc1ae229343fdbb212aed}{uether\_init}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01000}01000         IFQ\_SET\_MAXLEN(\&ifp-\/>if\_snd, ifqmaxlen);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01001}01001         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01002}01002 \textcolor{comment}{         * Try to keep two transfers full at a time.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01003}01003 \textcolor{comment}{         * \string~(TRANSFER\_SIZE / 80 bytes/pkt * 2 buffers in flight)}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01004}01004 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01005}01005         ifp-\/>if\_snd.ifq\_drv\_maxlen = 512;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01006}01006         IFQ\_SET\_READY(\&ifp-\/>if\_snd);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01007}01007 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01008}01008         if\_setcapabilitiesbit(ifp, IFCAP\_VLAN\_MTU, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01009}01009         if\_setcapabilitiesbit(ifp, IFCAP\_VLAN\_HWTAGGING, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01010}01010         if\_setcapabilitiesbit(ifp, IFCAP\_VLAN\_HWCSUM|IFCAP\_HWCSUM, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01011}01011         if\_sethwassist(ifp, CSUM\_IP|CSUM\_IP\_UDP|CSUM\_IP\_TCP);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01012}01012 \textcolor{preprocessor}{\#ifdef INET6}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01013}01013         if\_setcapabilitiesbit(ifp, IFCAP\_HWCSUM\_IPV6, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01014}01014 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01015}01015         if\_setcapenable(ifp, if\_getcapabilities(ifp));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01016}01016 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01017}01017         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01018}01018                 ifmedia\_init(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_IMASK, \mbox{\hyperlink{if__ure_8c_ae3a2fbbd001b7b9591af7ad4946030f0}{ure\_ifmedia\_upd}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01019}01019                     \mbox{\hyperlink{if__ure_8c_a8ffd694656eb5d37a03bb64a11955ff6}{ure\_ifmedia\_sts}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01020}01020                 \mbox{\hyperlink{if__ure_8c_a57bc32559858ebf8e97fef6dc44e9be0}{ure\_add\_media\_types}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01021}01021                 ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_ETHER | IFM\_AUTO, 0, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01022}01022                 ifmedia\_set(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_ETHER | IFM\_AUTO);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01023}01023                 sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}.ifm\_media = IFM\_ETHER | IFM\_AUTO;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01024}01024                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01025}01025         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01026}01026                 bus\_topo\_lock();}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01027}01027                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = mii\_attach(ue-\/>\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \&ue-\/>\mbox{\hyperlink{structusb__ether_aaaff0fbb35cadc4c4659ad026c6209bd}{ue\_miibus}}, ifp,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01028}01028                     \mbox{\hyperlink{usb__ethernet_8c_aa3be820abeb131b1bcef5cf3597f8aab}{uether\_ifmedia\_upd}}, ue-\/>\mbox{\hyperlink{structusb__ether_a2b787f8aab7c5db729211c3a1c3bc141}{ue\_methods}}-\/>\mbox{\hyperlink{structusb__ether__methods_a6a2347de6dea9a8401ce3df5a25b393b}{ue\_mii\_sts}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01029}01029                     BMSR\_DEFCAPMASK, sc-\/>\mbox{\hyperlink{structure__softc_ab371a32e164c64d163ed64658e151907}{sc\_phyno}}, MII\_OFFSET\_ANY, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01030}01030                 bus\_topo\_unlock();}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01031}01031         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01032}01032 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01033}01033         sctx = device\_get\_sysctl\_ctx(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01034}01034         soid = device\_get\_sysctl\_tree(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01035}01035         SYSCTL\_ADD\_PROC(sctx, SYSCTL\_CHILDREN(soid), OID\_AUTO, \textcolor{stringliteral}{"{}chipver"{}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01036}01036             CTLTYPE\_STRING | CTLFLAG\_RD | CTLFLAG\_MPSAFE, sc, 0,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01037}01037             \mbox{\hyperlink{if__ure_8c_a559df0905d0fc8be49ec362240a153c0}{ure\_sysctl\_chipver}}, \textcolor{stringliteral}{"{}A"{}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01038}01038             \textcolor{stringliteral}{"{}Return string with chip version."{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01039}01039 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01040}01040         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01041}01041 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01042}01042 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01043}01043 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01044}\mbox{\hyperlink{if__ure_8c_a9bf0f8eb6dcaf310eed0c143b51d6695}{01044}} \mbox{\hyperlink{if__ure_8c_a23e5baaaa9dba418464c3400e483ad7b}{ure\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01045}01045 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01046}01046         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01047}01047         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01048}01048         uint16\_t cpcr;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01049}01049         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01050}01050 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01051}01051         \mbox{\hyperlink{if__urereg_8h_a0cda26e3d089d2d6c3cacbb656d71276}{URE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01052}01052 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01053}01053         \textcolor{keywordflow}{if} ((ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING) != 0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01054}01054                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01055}01055 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01056}01056         \textcolor{comment}{/* Cancel pending I/O. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01057}01057         \mbox{\hyperlink{if__ure_8c_a2c2c805cc92f8d86e7eda677b5856382}{ure\_stop}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01058}01058 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01059}01059         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}} | \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01060}01060                 \mbox{\hyperlink{if__ure_8c_af131bb4131fabf0f015f05bfdb1b4b32}{ure\_rtl8153b\_nic\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01061}01061         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01062}01062                 \mbox{\hyperlink{if__ure_8c_ab00be5b3fae45b4e1f2b50f555cdb6c8}{ure\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01063}01063 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01064}01064         \textcolor{comment}{/* Set MAC address. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01065}01065         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a8bfbb1d7fb41408f1af9ad46f32b3c98}{URE\_PLA\_CRWECR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a48fb202c83000d8f71c2fc51c752a0d8}{URE\_CRWECR\_CONFIG}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01066}01066         \mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(sc, \mbox{\hyperlink{if__urereg_8h_a04b518caa16e5f4b155d9898667cb4ac}{URE\_PLA\_IDR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}} | \mbox{\hyperlink{if__urereg_8h_a1dfafcadd699f4836d48ecb7a2b55991}{URE\_BYTE\_EN\_SIX\_BYTES}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01067}01067             IF\_LLADDR(ifp), 8);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01068}01068         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a8bfbb1d7fb41408f1af9ad46f32b3c98}{URE\_PLA\_CRWECR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_aba99e74ad9e071d89efc434e2f9e5afc}{URE\_CRWECR\_NORAML}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01069}01069 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01070}01070         \textcolor{comment}{/* Set RX EARLY timeout and size */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01071}01071         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_ab00dc3d6060850c86d97941e3cb97652}{URE\_FLAG\_8153}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01072}01072                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01073}01073                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffafeaa1573d94f4b3f0c4a4caa423eb81e}{USB\_SPEED\_SUPER}}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01074}01074                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__urereg_8h_ae75d091f2e9b0bd559cf1c499a1afe7f}{URE\_COALESCE\_SUPER}} / 8;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01075}01075                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01076}01076                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa57eeede6d769b09c01ac9c9c62fef8c9}{USB\_SPEED\_HIGH}}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01077}01077                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__urereg_8h_a7c988b48a83f42f5536554f8ba25beac}{URE\_COALESCE\_HIGH}} / 8;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01078}01078                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01079}01079                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01080}01080                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__urereg_8h_ab1a06e84d05fdc80c7b12fa04ed8cd7f}{URE\_COALESCE\_SLOW}} / 8;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01081}01081                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01082}01082                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01083}01083                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ae5ee74756c48d20540107f1de406860a}{URE\_USB\_RX\_EARLY\_AGG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01084}01084                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__urereg_8h_ae7cf5b5e1e657352982384e131ee8244}{URE\_8153\_RX\_BUFSZ}} -\/ (\mbox{\hyperlink{if__urereg_8h_a1d2a122e266ab35d66cd476b4c721435}{URE\_FRAMELEN}}(if\_getmtu(ifp)) +}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01085}01085                     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structure__rxpkt}{ure\_rxpkt}}) + \mbox{\hyperlink{if__urereg_8h_a0714669c7665585f290e3a42b159847c}{URE\_RXPKT\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01086}01086                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a7949cd6876d78edfcc300e189200f234}{URE\_USB\_RX\_EARLY\_SIZE}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} / 4);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01087}01087         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01088}01088                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ae5ee74756c48d20540107f1de406860a}{URE\_USB\_RX\_EARLY\_AGG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 158);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01089}01089                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a34642ee7b8f5140b6fe5861cbbe418d7}{URE\_USB\_RX\_EXTRA\_AGG\_TMR}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 1875);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01090}01090                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__urereg_8h_ae7cf5b5e1e657352982384e131ee8244}{URE\_8153\_RX\_BUFSZ}} -\/ (\mbox{\hyperlink{if__urereg_8h_a1d2a122e266ab35d66cd476b4c721435}{URE\_FRAMELEN}}(if\_getmtu(ifp)) +}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01091}01091                     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structure__rxpkt}{ure\_rxpkt}}) + \mbox{\hyperlink{if__urereg_8h_a0714669c7665585f290e3a42b159847c}{URE\_RXPKT\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01092}01092                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a7949cd6876d78edfcc300e189200f234}{URE\_USB\_RX\_EARLY\_SIZE}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} / 8);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01093}01093                 \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a224feab41b8152ecb2f83169a1b29d93}{URE\_USB\_UPT\_RXDMA\_OWN}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01094}01094                     \mbox{\hyperlink{if__urereg_8h_a545da8fdab0c6ce22dee4a5de2065c98}{URE\_OWN\_UPDATE}} | \mbox{\hyperlink{if__urereg_8h_a2ceee1a9b86ae335800682704ccd5ce1}{URE\_OWN\_CLEAR}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01095}01095         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01096}01096                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ae5ee74756c48d20540107f1de406860a}{URE\_USB\_RX\_EARLY\_AGG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 80);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01097}01097                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a34642ee7b8f5140b6fe5861cbbe418d7}{URE\_USB\_RX\_EXTRA\_AGG\_TMR}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 1875);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01098}01098                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__urereg_8h_a39e1261946a8bfb2d6fdf1e9eddf7486}{URE\_8156\_RX\_BUFSZ}} -\/ (\mbox{\hyperlink{if__urereg_8h_a1d2a122e266ab35d66cd476b4c721435}{URE\_FRAMELEN}}(if\_getmtu(ifp)) +}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01099}01099                     \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structure__rxpkt}{ure\_rxpkt}}) + \mbox{\hyperlink{if__urereg_8h_a0714669c7665585f290e3a42b159847c}{URE\_RXPKT\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01100}01100                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a7949cd6876d78edfcc300e189200f234}{URE\_USB\_RX\_EARLY\_SIZE}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} / 8);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01101}01101                 \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a224feab41b8152ecb2f83169a1b29d93}{URE\_USB\_UPT\_RXDMA\_OWN}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01102}01102                     \mbox{\hyperlink{if__urereg_8h_a545da8fdab0c6ce22dee4a5de2065c98}{URE\_OWN\_UPDATE}} | \mbox{\hyperlink{if__urereg_8h_a2ceee1a9b86ae335800682704ccd5ce1}{URE\_OWN\_CLEAR}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01103}01103         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01104}01104 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01105}01105         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01106}01106                 \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a2e535fdb22fce4a239e532023a6f035f}{URE\_USB\_FW\_TASK}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a63b3cab35ecfcec3a1a6ab0342a6165f}{URE\_FC\_PATCH\_TASK}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01107}01107                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 500);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01108}01108                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a2e535fdb22fce4a239e532023a6f035f}{URE\_USB\_FW\_TASK}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a63b3cab35ecfcec3a1a6ab0342a6165f}{URE\_FC\_PATCH\_TASK}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01109}01109         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01110}01110 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01111}01111         \textcolor{comment}{/* Reset the packet filter. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01112}01112         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a355a8bd7d17e2386b01bbcea99e1072d}{URE\_PLA\_FMC}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a380cf0f426f651f1015d64ee5c8a2c0e}{URE\_FMC\_FCR\_MCU\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01113}01113         \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a355a8bd7d17e2386b01bbcea99e1072d}{URE\_PLA\_FMC}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a380cf0f426f651f1015d64ee5c8a2c0e}{URE\_FMC\_FCR\_MCU\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01114}01114 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01115}01115         \textcolor{comment}{/* Enable RX VLANs if enabled */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01116}01116         cpcr = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a7b5e24db24de8ef40e872ad300d49e74}{URE\_PLA\_CPCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01117}01117         \textcolor{keywordflow}{if} (if\_getcapenable(ifp) \& IFCAP\_VLAN\_HWTAGGING) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01118}01118                 \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(12, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}enabled hw vlan tag\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01119}01119                 cpcr |= \mbox{\hyperlink{if__urereg_8h_a8ff56cef84b01f140c432aea7d04021e}{URE\_CPCR\_RX\_VLAN}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01120}01120         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01121}01121                 \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(12, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}disabled hw vlan tag\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01122}01122                 cpcr \&= \string~URE\_CPCR\_RX\_VLAN;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01123}01123         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01124}01124         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a7b5e24db24de8ef40e872ad300d49e74}{URE\_PLA\_CPCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, cpcr);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01125}01125 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01126}01126         \textcolor{comment}{/* Enable transmit and receive. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01127}01127         \mbox{\hyperlink{if__ure_8c_a6efe6fe5657863c4d057adf1078e58c6}{URE\_SETBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a0f44e45a77a1120a8245376bf27fcf68}{URE\_PLA\_CR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a6fb58daa60cf316176d446294e37859c}{URE\_CR\_RE}} | \mbox{\hyperlink{if__urereg_8h_adebb83710afbb5b900b7808581d7e6b5}{URE\_CR\_TE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01128}01128 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01129}01129         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a2d405924e27d0d96ea809bc3fc04459f}{URE\_PLA\_MISC\_1}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a12e81780f4f37333f813e90569b508f4}{URE\_RXDY\_GATED\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01130}01130 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01131}01131         \textcolor{comment}{/*  Configure RX filters. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01132}01132         \mbox{\hyperlink{if__ure_8c_a2d9197c99094f9a6ff92c29e0b5e8d74}{ure\_rxfilter}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01133}01133 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01134}01134         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(sc-\/>\mbox{\hyperlink{structure__softc_afb29c37c85e8d3448848f764321774c4}{sc\_tx\_xfer}}[0]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01135}01135 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01136}01136         \textcolor{comment}{/* Indicate we are up and running. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01137}01137         ifp-\/>if\_drv\_flags |= IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01138}01138 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01139}01139         \textcolor{comment}{/* Switch to selected media. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01140}01140         \mbox{\hyperlink{if__ure_8c_ae3a2fbbd001b7b9591af7ad4946030f0}{ure\_ifmedia\_upd}}(ifp);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01141}01141 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01142}01142 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01143}01143 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01144}\mbox{\hyperlink{if__ure_8c_ab32fc5014056498becc1b284cdafc6e2}{01144}} \mbox{\hyperlink{if__ure_8c_a9407a022465ea9217e6406c3f09cc1b5}{ure\_tick}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01145}01145 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01146}01146         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01147}01147         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01148}01148         \textcolor{keyword}{struct }mii\_data *mii;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01149}01149 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01150}01150         \mbox{\hyperlink{if__urereg_8h_a0cda26e3d089d2d6c3cacbb656d71276}{URE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01151}01151 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01152}01152         (void)ifp;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01153}01153         \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < \mbox{\hyperlink{if__urereg_8h_ab66a8449759602f1cf0ae33dbe92a67c}{URE\_MAX\_RX}}; i++)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01154}01154                 \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(13, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01155}01155                     \textcolor{stringliteral}{"{}rx[\%d] = \%d\(\backslash\)n"{}}, i, \mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(sc-\/>\mbox{\hyperlink{structure__softc_ad357cf18ba65f8a44ca3b2db176a2500}{sc\_rx\_xfer}}[i]));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01156}01156 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01157}01157         \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < \mbox{\hyperlink{if__urereg_8h_a9520e7de49fb3969ad4494e79957785d}{URE\_MAX\_TX}}; i++)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01158}01158                 \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(13, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01159}01159                     \textcolor{stringliteral}{"{}tx[\%d] = \%d\(\backslash\)n"{}}, i, \mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(sc-\/>\mbox{\hyperlink{structure__softc_afb29c37c85e8d3448848f764321774c4}{sc\_tx\_xfer}}[i]));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01160}01160 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01161}01161         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01162}01162                 \mbox{\hyperlink{if__ure_8c_a1a3ca773941d7e908fe95b69cb728418}{ure\_link\_state}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01163}01163         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01164}01164                 mii = \mbox{\hyperlink{if__auereg_8h_adb491f9d26e8663f329b26e167f5edde}{GET\_MII}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01165}01165                 mii\_tick(mii);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01166}01166                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a15f0ce3af47f0b03046f1335bfc5213c}{URE\_FLAG\_LINK}}) == 0}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01167}01167                         \&\& mii-\/>mii\_media\_status \& IFM\_ACTIVE \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01168}01168                         IFM\_SUBTYPE(mii-\/>mii\_media\_active) != IFM\_NONE) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01169}01169                         sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} |= \mbox{\hyperlink{if__urereg_8h_a15f0ce3af47f0b03046f1335bfc5213c}{URE\_FLAG\_LINK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01170}01170                         sc-\/>\mbox{\hyperlink{structure__softc_af737056460f49bef67e910567147d25a}{sc\_rxstarted}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01171}01171                         \mbox{\hyperlink{if__ure_8c_a5b04ec000c99aeee639131fc79a783d6}{ure\_start}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01172}01172                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01173}01173         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01174}01174 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01175}01175 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01176}01176 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01177}\mbox{\hyperlink{if__ure_8c_a0e58f48b6a5292ce8367553783fd0cb1}{01177}} \mbox{\hyperlink{if__ure_8c_a0e58f48b6a5292ce8367553783fd0cb1}{ure\_hash\_maddr}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} sockaddr\_dl *sdl, u\_int cnt)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01178}01178 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01179}01179         uint32\_t h, *hashes = arg;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01180}01180 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01181}01181         h = ether\_crc32\_be(LLADDR(sdl), ETHER\_ADDR\_LEN) >> 26;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01182}01182         \textcolor{keywordflow}{if} (h < 32)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01183}01183                 hashes[0] |= (1 << h);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01184}01184         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01185}01185                 hashes[1] |= (1 << (h -\/ 32));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01186}01186         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01187}01187 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01188}01188 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01189}01189 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01190}01190 \textcolor{comment}{ * Program the 64-\/bit multicast hash filter.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01191}01191 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01192}01192 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01193}\mbox{\hyperlink{if__ure_8c_a4203a912697a7df9356d678cbac1ad88}{01193}} \mbox{\hyperlink{if__ure_8c_a2d9197c99094f9a6ff92c29e0b5e8d74}{ure\_rxfilter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01194}01194 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01195}01195         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01196}01196         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01197}01197         uint32\_t rxmode;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01198}01198         uint32\_t h, hashes[2] = \{ 0, 0 \};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01199}01199 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01200}01200         \mbox{\hyperlink{if__urereg_8h_a0cda26e3d089d2d6c3cacbb656d71276}{URE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01201}01201 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01202}01202         rxmode = \mbox{\hyperlink{if__ure_8c_aa1481b9bce219ce2146ceb7d735215d6}{ure\_read\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a79c21b195c49533aa2e5adad2000249f}{URE\_PLA\_RCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01203}01203         rxmode \&= \string~(\mbox{\hyperlink{if__urereg_8h_ae986f6405b409735bb67e6c2702ac03b}{URE\_RCR\_AAP}} | \mbox{\hyperlink{if__urereg_8h_a0456f935f714a15eba745ea0a24a71c4}{URE\_RCR\_AM}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01204}01204         rxmode |= \mbox{\hyperlink{if__urereg_8h_a168e2e6a581c1fab8bd530ff06b986a1}{URE\_RCR\_APM}};       \textcolor{comment}{/* accept physical match packets */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01205}01205         rxmode |= \mbox{\hyperlink{if__urereg_8h_a851c06b199be4433d7c55e9ed9b22390}{URE\_RCR\_AB}}; \textcolor{comment}{/* always accept broadcasts */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01206}01206         \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& (IFF\_ALLMULTI | IFF\_PROMISC)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01207}01207                 \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_PROMISC)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01208}01208                         rxmode |= \mbox{\hyperlink{if__urereg_8h_ae986f6405b409735bb67e6c2702ac03b}{URE\_RCR\_AAP}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01209}01209                 rxmode |= \mbox{\hyperlink{if__urereg_8h_a0456f935f714a15eba745ea0a24a71c4}{URE\_RCR\_AM}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01210}01210                 hashes[0] = hashes[1] = 0xffffffff;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01211}01211                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01212}01212         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01213}01213 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01214}01214         \textcolor{comment}{/* calculate multicast masks */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01215}01215         if\_foreach\_llmaddr(ifp, \mbox{\hyperlink{if__ure_8c_a0e58f48b6a5292ce8367553783fd0cb1}{ure\_hash\_maddr}}, \&hashes);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01216}01216 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01217}01217         h = bswap32(hashes[0]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01218}01218         hashes[0] = bswap32(hashes[1]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01219}01219         hashes[1] = h;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01220}01220         rxmode |= \mbox{\hyperlink{if__urereg_8h_a0456f935f714a15eba745ea0a24a71c4}{URE\_RCR\_AM}}; \textcolor{comment}{/* accept multicast packets */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01221}01221 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01222}01222 done:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01223}01223         \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(14, ue-\/>\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}rxfilt: RCR: \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01224}01224             \mbox{\hyperlink{if__ure_8c_aa1481b9bce219ce2146ceb7d735215d6}{ure\_read\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a79c21b195c49533aa2e5adad2000249f}{URE\_PLA\_RCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01225}01225         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a2b2e5d0c156bc1f67ef9eacab82bd9aa}{URE\_PLA\_MAR0}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, hashes[0]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01226}01226         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_af18dcfe71982ed9c3da013fa5df401bd}{URE\_PLA\_MAR4}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, hashes[1]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01227}01227         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a79c21b195c49533aa2e5adad2000249f}{URE\_PLA\_RCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, rxmode);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01228}01228 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01229}01229 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01230}01230 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01231}\mbox{\hyperlink{if__ure_8c_adb1f58d3753d271d274600d03b297546}{01231}} \mbox{\hyperlink{if__ure_8c_a5b04ec000c99aeee639131fc79a783d6}{ure\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01232}01232 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01233}01233         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01234}01234         \textcolor{keywordtype}{unsigned} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01235}01235 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01236}01236         \mbox{\hyperlink{if__urereg_8h_a0cda26e3d089d2d6c3cacbb656d71276}{URE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01237}01237 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01238}01238         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structure__softc_af737056460f49bef67e910567147d25a}{sc\_rxstarted}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01239}01239                 sc-\/>\mbox{\hyperlink{structure__softc_af737056460f49bef67e910567147d25a}{sc\_rxstarted}} = 1;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01240}01240                 \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__urereg_8h_ab66a8449759602f1cf0ae33dbe92a67c}{URE\_MAX\_RX}}; i++)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01241}01241                         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structure__softc_ad357cf18ba65f8a44ca3b2db176a2500}{sc\_rx\_xfer}}[i]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01242}01242         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01243}01243 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01244}01244         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{if__urereg_8h_a9520e7de49fb3969ad4494e79957785d}{URE\_MAX\_TX}}; i++)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01245}01245                 \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structure__softc_afb29c37c85e8d3448848f764321774c4}{sc\_tx\_xfer}}[i]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01246}01246 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01247}01247 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01248}01248 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01249}\mbox{\hyperlink{if__ure_8c_ab00be5b3fae45b4e1f2b50f555cdb6c8}{01249}} \mbox{\hyperlink{if__ure_8c_ab00be5b3fae45b4e1f2b50f555cdb6c8}{ure\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01250}01250 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01251}01251         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01252}01252 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01253}01253         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a0f44e45a77a1120a8245376bf27fcf68}{URE\_PLA\_CR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a92b8a89c6baaa5541b1cb8368aeed68a}{URE\_CR\_RST}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01254}01254 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01255}01255         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01256}01256                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a0f44e45a77a1120a8245376bf27fcf68}{URE\_PLA\_CR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01257}01257                     \mbox{\hyperlink{if__urereg_8h_a92b8a89c6baaa5541b1cb8368aeed68a}{URE\_CR\_RST}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01258}01258                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01259}01259                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01260}01260         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01261}01261         \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01262}01262                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}reset never completed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01263}01263 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01264}01264 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01265}01265 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01266}01266 \textcolor{comment}{ * Set media options.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01267}01267 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01268}01268 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01269}\mbox{\hyperlink{if__ure_8c_ae3a2fbbd001b7b9591af7ad4946030f0}{01269}} \mbox{\hyperlink{if__ure_8c_ae3a2fbbd001b7b9591af7ad4946030f0}{ure\_ifmedia\_upd}}(\textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01270}01270 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01271}01271         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01272}01272         \textcolor{keyword}{struct }ifmedia *ifm;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01273}01273         \textcolor{keyword}{struct }mii\_data *mii;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01274}01274         \textcolor{keyword}{struct }mii\_softc *miisc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01275}01275         \textcolor{keywordtype}{int} gig;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01276}01276         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01277}01277         \textcolor{keywordtype}{int} anar;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01278}01278         \textcolor{keywordtype}{int} locked;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01279}01279         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01280}01280 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01281}01281         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01282}01282                 ifm = \&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01283}01283                 \textcolor{keywordflow}{if} (IFM\_TYPE(ifm-\/>ifm\_media) != IFM\_ETHER)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01284}01284                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01285}01285 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01286}01286                 locked = mtx\_owned(\&sc-\/>\mbox{\hyperlink{structure__softc_aebe0da9e6783141471528dd80e8ae4af}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01287}01287                 \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01288}01288                         \mbox{\hyperlink{if__urereg_8h_a86b959b786b7d75ed325be926a3fd12f}{URE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01289}01289                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, 0xa5d4);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01290}01290                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} \&= \string~URE\_ADV\_2500TFDX;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01291}01291 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01292}01292                 anar = gig = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01293}01293                 \textcolor{keywordflow}{switch} (IFM\_SUBTYPE(ifm-\/>ifm\_media)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01294}01294                 \textcolor{keywordflow}{case} IFM\_AUTO:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01295}01295                         anar |= ANAR\_TX\_FD | ANAR\_TX | ANAR\_10\_FD | ANAR\_10;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01296}01296                         gig |= GTCR\_ADV\_1000TFDX | GTCR\_ADV\_1000THDX;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01297}01297                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_a489bd000b3f4fee2b3c6e3b8e83e21e9}{URE\_ADV\_2500TFDX}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01298}01298                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01299}01299                 \textcolor{keywordflow}{case} IFM\_2500\_T:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01300}01300                         anar |= ANAR\_TX\_FD | ANAR\_TX | ANAR\_10\_FD | ANAR\_10;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01301}01301                         gig |= GTCR\_ADV\_1000TFDX | GTCR\_ADV\_1000THDX;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01302}01302                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_a489bd000b3f4fee2b3c6e3b8e83e21e9}{URE\_ADV\_2500TFDX}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01303}01303                         ifp-\/>if\_baudrate = IF\_Mbps(2500);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01304}01304                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01305}01305                 \textcolor{keywordflow}{case} IFM\_1000\_T:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01306}01306                         anar |= ANAR\_TX\_FD | ANAR\_TX | ANAR\_10\_FD | ANAR\_10;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01307}01307                         gig |= GTCR\_ADV\_1000TFDX | GTCR\_ADV\_1000THDX;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01308}01308                         ifp-\/>if\_baudrate = IF\_Gbps(1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01309}01309                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01310}01310                 \textcolor{keywordflow}{case} IFM\_100\_TX:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01311}01311                         anar |= ANAR\_TX | ANAR\_TX\_FD;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01312}01312                         ifp-\/>if\_baudrate = IF\_Mbps(100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01313}01313                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01314}01314                 \textcolor{keywordflow}{case} IFM\_10\_T:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01315}01315                         anar |= ANAR\_10 | ANAR\_10\_FD;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01316}01316                         ifp-\/>if\_baudrate = IF\_Mbps(10);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01317}01317                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01318}01318                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01319}01319                         device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}unsupported media type\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01320}01320                         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01321}01321                                 \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01322}01322                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01323}01323                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01324}01324 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01325}01325                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_aff5c3080cfa1506f808947cc45b9ffc4}{URE\_OCP\_BASE\_MII}} + MII\_ANAR * 2,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01326}01326                     anar | ANAR\_PAUSE\_ASYM | ANAR\_FC);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01327}01327                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_aff5c3080cfa1506f808947cc45b9ffc4}{URE\_OCP\_BASE\_MII}} + MII\_100T2CR * 2, gig);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01328}01328                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, 0xa5d4, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01329}01329                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_aff5c3080cfa1506f808947cc45b9ffc4}{URE\_OCP\_BASE\_MII}} + MII\_BMCR,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01330}01330                     BMCR\_AUTOEN | BMCR\_STARTNEG);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01331}01331                 \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01332}01332                         \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01333}01333                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01334}01334         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01335}01335 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01336}01336         mii = \mbox{\hyperlink{if__auereg_8h_adb491f9d26e8663f329b26e167f5edde}{GET\_MII}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01337}01337 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01338}01338         \mbox{\hyperlink{if__urereg_8h_a0cda26e3d089d2d6c3cacbb656d71276}{URE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01339}01339         LIST\_FOREACH(miisc, \&mii-\/>mii\_phys, mii\_list)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01340}01340                 PHY\_RESET(miisc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01341}01341         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = mii\_mediachg(mii);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01342}01342         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01343}01343 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01344}01344 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01345}01345 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01346}01346 \textcolor{comment}{ * Report current media status.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01347}01347 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01348}01348 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01349}\mbox{\hyperlink{if__ure_8c_a8ffd694656eb5d37a03bb64a11955ff6}{01349}} \mbox{\hyperlink{if__ure_8c_a8ffd694656eb5d37a03bb64a11955ff6}{ure\_ifmedia\_sts}}(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keyword}{struct} ifmediareq *ifmr)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01350}01350 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01351}01351         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01352}01352         \textcolor{keyword}{struct }mii\_data *mii;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01353}01353         uint16\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01354}01354 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01355}01355         sc = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01356}01356         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01357}01357                 \mbox{\hyperlink{if__urereg_8h_a86b959b786b7d75ed325be926a3fd12f}{URE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01358}01358                 ifmr-\/>ifm\_status = IFM\_AVALID;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01359}01359                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a6ba32065af5a51dba287f7eb135357e7}{ure\_get\_link\_status}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01360}01360                         ifmr-\/>ifm\_status |= IFM\_ACTIVE;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01361}01361                         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a42b2781dbf36b3b5383487d6913801cd}{URE\_PLA\_PHYSTATUS}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01362}01362                             \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01363}01363                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__urereg_8h_a004166ec07c885c2b07ea4f899a6ac8a}{URE\_PHYSTATUS\_FDX}}) ||}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01364}01364                             (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__urereg_8h_a6840414d1744685bd75f2f0f5a269061}{URE\_PHYSTATUS\_2500MBPS}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01365}01365                                 ifmr-\/>ifm\_active |= IFM\_FDX;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01366}01366                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01367}01367                                 ifmr-\/>ifm\_active |= IFM\_HDX;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01368}01368                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__urereg_8h_a14a7f0dabdaa952729b0b812ef25bc5a}{URE\_PHYSTATUS\_10MBPS}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01369}01369                                 ifmr-\/>ifm\_active |= IFM\_10\_T;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01370}01370                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__urereg_8h_a084b0e129f0cfcc7389bf67417627749}{URE\_PHYSTATUS\_100MBPS}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01371}01371                                 ifmr-\/>ifm\_active |= IFM\_100\_TX;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01372}01372                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__urereg_8h_aa05633620a9ea2d5c80d0259a75a5e9c}{URE\_PHYSTATUS\_1000MBPS}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01373}01373                                 ifmr-\/>ifm\_active |= IFM\_1000\_T;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01374}01374                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__urereg_8h_a6840414d1744685bd75f2f0f5a269061}{URE\_PHYSTATUS\_2500MBPS}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01375}01375                                 ifmr-\/>ifm\_active |= IFM\_2500\_T;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01376}01376                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01377}01377                 \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01378}01378                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01379}01379         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01380}01380 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01381}01381         mii = \mbox{\hyperlink{if__auereg_8h_adb491f9d26e8663f329b26e167f5edde}{GET\_MII}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01382}01382 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01383}01383         \mbox{\hyperlink{if__urereg_8h_a86b959b786b7d75ed325be926a3fd12f}{URE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01384}01384         mii\_pollstat(mii);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01385}01385         ifmr-\/>ifm\_active = mii-\/>mii\_media\_active;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01386}01386         ifmr-\/>ifm\_status = mii-\/>mii\_media\_status;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01387}01387         \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01388}01388 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01389}01389 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01390}01390 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01391}\mbox{\hyperlink{if__ure_8c_a57bc32559858ebf8e97fef6dc44e9be0}{01391}} \mbox{\hyperlink{if__ure_8c_a57bc32559858ebf8e97fef6dc44e9be0}{ure\_add\_media\_types}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01392}01392 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01393}01393         ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_ETHER | IFM\_10\_T, 0, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01394}01394         ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_ETHER | IFM\_10\_T | IFM\_FDX, 0, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01395}01395         ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_ETHER | IFM\_100\_TX, 0, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01396}01396         ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_ETHER | IFM\_100\_TX | IFM\_FDX, 0, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01397}01397         ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_ETHER | IFM\_1000\_T | IFM\_FDX, 0, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01398}01398         ifmedia\_add(\&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, IFM\_ETHER | IFM\_2500\_T | IFM\_FDX, 0, NULL);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01399}01399 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01400}01400 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01401}01401 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01402}\mbox{\hyperlink{if__ure_8c_a1a3ca773941d7e908fe95b69cb728418}{01402}} \mbox{\hyperlink{if__ure_8c_a1a3ca773941d7e908fe95b69cb728418}{ure\_link\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01403}01403 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01404}01404         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01405}01405 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01406}01406         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a6ba32065af5a51dba287f7eb135357e7}{ure\_get\_link\_status}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01407}01407                 \textcolor{keywordflow}{if} (ifp-\/>if\_link\_state != LINK\_STATE\_UP) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01408}01408                         if\_link\_state\_change(ifp, LINK\_STATE\_UP);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01409}01409                         \textcolor{comment}{/* Enable transmit and receive. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01410}01410                         \mbox{\hyperlink{if__ure_8c_a6efe6fe5657863c4d057adf1078e58c6}{URE\_SETBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a0f44e45a77a1120a8245376bf27fcf68}{URE\_PLA\_CR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a6fb58daa60cf316176d446294e37859c}{URE\_CR\_RE}} | \mbox{\hyperlink{if__urereg_8h_adebb83710afbb5b900b7808581d7e6b5}{URE\_CR\_TE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01411}01411 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01412}01412                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a42b2781dbf36b3b5383487d6913801cd}{URE\_PLA\_PHYSTATUS}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01413}01413                             \mbox{\hyperlink{if__urereg_8h_a6840414d1744685bd75f2f0f5a269061}{URE\_PHYSTATUS\_2500MBPS}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01414}01414                                 \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a3d8437408d11ce7762fcd732bc427b52}{URE\_PLA\_MAC\_PWR\_CTRL4}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x40);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01415}01415                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01416}01416                                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a3d8437408d11ce7762fcd732bc427b52}{URE\_PLA\_MAC\_PWR\_CTRL4}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x40);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01417}01417                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01418}01418         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01419}01419                 \textcolor{keywordflow}{if} (ifp-\/>if\_link\_state != LINK\_STATE\_DOWN) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01420}01420                         if\_link\_state\_change(ifp, LINK\_STATE\_DOWN);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01421}01421                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01422}01422         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01423}01423 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01424}01424 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01425}01425 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01426}\mbox{\hyperlink{if__ure_8c_a6ba32065af5a51dba287f7eb135357e7}{01426}} \mbox{\hyperlink{if__ure_8c_a6ba32065af5a51dba287f7eb135357e7}{ure\_get\_link\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01427}01427 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01428}01428         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a42b2781dbf36b3b5383487d6913801cd}{URE\_PLA\_PHYSTATUS}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01429}01429             \mbox{\hyperlink{if__urereg_8h_afbb746ace0c04fbbe9af76c610ed9930}{URE\_PHYSTATUS\_LINK}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01430}01430                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} |= \mbox{\hyperlink{if__urereg_8h_a15f0ce3af47f0b03046f1335bfc5213c}{URE\_FLAG\_LINK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01431}01431                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01432}01432         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01433}01433                 sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \&= \string~URE\_FLAG\_LINK;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01434}01434                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01435}01435         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01436}01436 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01437}01437 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01438}01438 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01439}\mbox{\hyperlink{if__ure_8c_a51336eab590618e862cf89766c4923bd}{01439}} \mbox{\hyperlink{if__ure_8c_a51336eab590618e862cf89766c4923bd}{ure\_ioctl}}(\textcolor{keyword}{struct} ifnet *ifp, u\_long cmd, caddr\_t data)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01440}01440 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01441}01441         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01442}01442         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01443}01443         \textcolor{keyword}{struct }ifreq *ifr;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01444}01444         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, mask, reinit;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01445}01445 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01446}01446         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01447}01447         ifr = (\textcolor{keyword}{struct }ifreq *)data;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01448}01448         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01449}01449         reinit = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01450}01450         \textcolor{keywordflow}{switch} (cmd) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01451}01451         \textcolor{keywordflow}{case} SIOCSIFCAP:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01452}01452                 \mbox{\hyperlink{if__urereg_8h_a86b959b786b7d75ed325be926a3fd12f}{URE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01453}01453                 mask = ifr-\/>ifr\_reqcap \string^ ifp-\/>if\_capenable;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01454}01454                 \textcolor{keywordflow}{if} ((mask \& IFCAP\_VLAN\_HWTAGGING) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01455}01455                     (ifp-\/>if\_capabilities \& IFCAP\_VLAN\_HWTAGGING) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01456}01456                         ifp-\/>if\_capenable \string^= IFCAP\_VLAN\_HWTAGGING;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01457}01457                         reinit++;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01458}01458                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01459}01459                 \textcolor{keywordflow}{if} ((mask \& IFCAP\_TXCSUM) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01460}01460                     (ifp-\/>if\_capabilities \& IFCAP\_TXCSUM) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01461}01461                         ifp-\/>if\_capenable \string^= IFCAP\_TXCSUM;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01462}01462                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01463}01463                 \textcolor{keywordflow}{if} ((mask \& IFCAP\_RXCSUM) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01464}01464                     (ifp-\/>if\_capabilities \& IFCAP\_RXCSUM) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01465}01465                         ifp-\/>if\_capenable \string^= IFCAP\_RXCSUM;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01466}01466                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01467}01467                 \textcolor{keywordflow}{if} ((mask \& IFCAP\_TXCSUM\_IPV6) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01468}01468                     (ifp-\/>if\_capabilities \& IFCAP\_TXCSUM\_IPV6) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01469}01469                         ifp-\/>if\_capenable \string^= IFCAP\_TXCSUM\_IPV6;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01470}01470                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01471}01471                 \textcolor{keywordflow}{if} ((mask \& IFCAP\_RXCSUM\_IPV6) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01472}01472                     (ifp-\/>if\_capabilities \& IFCAP\_RXCSUM\_IPV6) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01473}01473                         ifp-\/>if\_capenable \string^= IFCAP\_RXCSUM\_IPV6;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01474}01474                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01475}01475                 \textcolor{keywordflow}{if} (reinit > 0 \&\& ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01476}01476                         ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01477}01477                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01478}01478                         reinit = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01479}01479                 \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01480}01480                 \textcolor{keywordflow}{if} (reinit > 0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01481}01481                         \mbox{\hyperlink{usb__ethernet_8c_aa635260c4b0cc1ae229343fdbb212aed}{uether\_init}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01482}01482                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01483}01483 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01484}01484         \textcolor{keywordflow}{case} SIOCSIFMTU:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01485}01485                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01486}01486 \textcolor{comment}{                 * in testing large MTUs "{}crashes"{} the device, it}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01487}01487 \textcolor{comment}{                 * leaves the device w/ a broken state where link}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01488}01488 \textcolor{comment}{                 * is in a bad state.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01489}01489 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01490}01490                 \textcolor{keywordflow}{if} (ifr-\/>ifr\_mtu < ETHERMIN ||}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01491}01491                     ifr-\/>ifr\_mtu > (4096 -\/ ETHER\_HDR\_LEN -\/}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01492}01492                     ETHER\_VLAN\_ENCAP\_LEN -\/ ETHER\_CRC\_LEN)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01493}01493                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EINVAL;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01494}01494                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01495}01495                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01496}01496                 \mbox{\hyperlink{if__urereg_8h_a86b959b786b7d75ed325be926a3fd12f}{URE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01497}01497                 \textcolor{keywordflow}{if} (if\_getmtu(ifp) != ifr-\/>ifr\_mtu)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01498}01498                         if\_setmtu(ifp, ifr-\/>ifr\_mtu);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01499}01499                 \mbox{\hyperlink{if__urereg_8h_ad0951bb7bbb3c1ed4484c990756b7c68}{URE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01500}01500                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01501}01501 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01502}01502         \textcolor{keywordflow}{case} SIOCGIFMEDIA:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01503}01503         \textcolor{keywordflow}{case} SIOCSIFMEDIA:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01504}01504                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01505}01505                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = ifmedia\_ioctl(ifp, ifr, \&sc-\/>\mbox{\hyperlink{structure__softc_ab95c31d20881c63b11ab4aa03263fd80}{sc\_ifmedia}}, cmd);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01506}01506                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01507}01507                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__ethernet_8c_ac15fe0cfbef442b384538aa41ad6a503}{uether\_ioctl}}(ifp, cmd, data);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01508}01508                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01509}01509 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01510}01510         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01511}01511                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__ethernet_8c_ac15fe0cfbef442b384538aa41ad6a503}{uether\_ioctl}}(ifp, cmd, data);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01512}01512                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01513}01513         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01514}01514 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01515}01515         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01516}01516 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01517}01517 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01518}01518 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01519}\mbox{\hyperlink{if__ure_8c_a24a94174cafdb5f291319df005cdec47}{01519}} \mbox{\hyperlink{if__ure_8c_a24a94174cafdb5f291319df005cdec47}{ure\_rtl8152\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01520}01520 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01521}01521         uint32\_t pwrctrl;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01522}01522 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01523}01523         \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(sc, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01524}01524 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01525}01525         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& \mbox{\hyperlink{if__urereg_8h_a717eb260e8ba580ee8e395062614f1d4}{URE\_CHIP\_VER\_4C00}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01526}01526                 \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ab8a64df0668a70de404603dd0fb641eb}{URE\_PLA\_LED\_FEATURE}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_adbaa3c4810aab901369da34ef19f19dc}{URE\_LED\_MODE\_MASK}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01527}01527         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01528}01528 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01529}01529         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a457cb20c5bb8b3adebe2d878ddfdc47d}{URE\_USB\_UPS\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a1a9f1ba77cd91c808018c1d893827967}{URE\_POWER\_CUT}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01530}01530 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01531}01531         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ad725022ea5f0850419e85a359bee499e}{URE\_USB\_PM\_CTRL\_STATUS}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a19699cc3129933eff0d27aec80c7b4b2}{URE\_RESUME\_INDICATE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01532}01532 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01533}01533         \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a59e209896e87a22aac6c75c00122088a}{URE\_PLA\_PHY\_PWR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a7d93bd4626a3ebb561dbe2322e6bfb4d}{URE\_TX\_10M\_IDLE\_EN}} | \mbox{\hyperlink{if__urereg_8h_af75ab56d2a99128db4ac1a2c8377a6cf}{URE\_PFM\_PWM\_SWITCH}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01534}01534 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01535}01535         pwrctrl = \mbox{\hyperlink{if__ure_8c_aa1481b9bce219ce2146ceb7d735215d6}{ure\_read\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a1c73d456dbddbe584aaf5a9c186b9691}{URE\_PLA\_MAC\_PWR\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01536}01536         pwrctrl \&= \string~URE\_MCU\_CLK\_RATIO\_MASK;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01537}01537         pwrctrl |= \mbox{\hyperlink{if__urereg_8h_adc0e96ebba46eb0d1ba7828e9353e4dd}{URE\_MCU\_CLK\_RATIO}} | \mbox{\hyperlink{if__urereg_8h_a1ec8ddeac632841e162fe1ea756252d5}{URE\_D3\_CLK\_GATED\_EN}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01538}01538         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a1c73d456dbddbe584aaf5a9c186b9691}{URE\_PLA\_MAC\_PWR\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, pwrctrl);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01539}01539         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af880673f82b562ceb026f7147dc8327c}{URE\_PLA\_GPHY\_INTR\_IMR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01540}01540             \mbox{\hyperlink{if__urereg_8h_aff9a467c391366bd3cd02bfbc5154f65}{URE\_GPHY\_STS\_MSK}} | \mbox{\hyperlink{if__urereg_8h_ae5fbc1d26a9cf9d4fd6994fd655bbe39}{URE\_SPEED\_DOWN\_MSK}} | \mbox{\hyperlink{if__urereg_8h_a21845ba6bbf1d89e4abb25e51268835a}{URE\_SPDWN\_RXDV\_MSK}} |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01541}01541             \mbox{\hyperlink{if__urereg_8h_a4ab058cf2264f3a36cfee1eb2ea93a73}{URE\_SPDWN\_LINKCHG\_MSK}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01542}01542 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01543}01543         \textcolor{comment}{/* Enable Rx aggregation. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01544}01544         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a92d22a1ee8dc98ebc9c308f80a1eb854}{URE\_USB\_USB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_af263f86f54daaff64cf58c4b3c9133d3}{URE\_RX\_AGG\_DISABLE}} | \mbox{\hyperlink{if__urereg_8h_ad231312facccaff3d00d1e2b52155c32}{URE\_RX\_ZERO\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01545}01545 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01546}01546         \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(sc, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01547}01547 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01548}01548         \mbox{\hyperlink{if__ure_8c_a432929462a103eba6dc31d3f715ccd9b}{ure\_rtl8152\_nic\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01549}01549 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01550}01550         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a9ea5fcab61dc795acacde0dba65a710e}{URE\_USB\_TX\_AGG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01551}01551             \mbox{\hyperlink{if__urereg_8h_a68ceef6fa38f0bf462248e9bb4073316}{URE\_TX\_AGG\_MAX\_THRESHOLD}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01552}01552         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a0fc7f755bc8f504f02620e6cbff56309}{URE\_USB\_RX\_BUF\_TH}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a74201bdacee3fa333973013730bebf93}{URE\_RX\_THR\_HIGH}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01553}01553         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_ab447bd66bbccf0d3e03b715549b25fc4}{URE\_USB\_TX\_DMA}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01554}01554             \mbox{\hyperlink{if__urereg_8h_ae54fe031095acda1f663d542b33b87be}{URE\_TEST\_MODE\_DISABLE}} | \mbox{\hyperlink{if__urereg_8h_a90c272461f040cd8f282b40a3b7f528a}{URE\_TX\_SIZE\_ADJUST1}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01555}01555 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01556}01556 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01557}01557 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01558}\mbox{\hyperlink{if__ure_8c_a62288668305be36fd0b0b4af54630b97}{01558}} \mbox{\hyperlink{if__ure_8c_a62288668305be36fd0b0b4af54630b97}{ure\_rtl8153\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01559}01559 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01560}01560         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01561}01561         uint8\_t u1u2[8];}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01562}01562         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01563}01563 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01564}01564         \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(sc, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01565}01565 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01566}01566         memset(u1u2, 0x00, \textcolor{keyword}{sizeof}(u1u2));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01567}01567         \mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(sc, \mbox{\hyperlink{if__urereg_8h_ad183fabde012cfe263c4940e9b12b05c}{URE\_USB\_TOLERANCE}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01568}01568             \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}} | \mbox{\hyperlink{if__urereg_8h_a1dfafcadd699f4836d48ecb7a2b55991}{URE\_BYTE\_EN\_SIX\_BYTES}}, u1u2, \textcolor{keyword}{sizeof}(u1u2));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01569}01569 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01570}01570         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01571}01571                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a9019a38d9e5bbd9416230794a67e7d68}{URE\_PLA\_BOOT\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01572}01572                     \mbox{\hyperlink{if__urereg_8h_a9248b76a1234dd0e8020bfef2dfb181a}{URE\_AUTOLOAD\_DONE}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01573}01573                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01574}01574                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01575}01575         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01576}01576         \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01577}01577                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01578}01578                     \textcolor{stringliteral}{"{}timeout waiting for chip autoload\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01579}01579 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01580}01580         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01581}01581                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_a5b6dc5c9153ad25e795c816c29082c79}{URE\_OCP\_PHY\_STATUS}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01582}01582                     \mbox{\hyperlink{if__urereg_8h_a5914aa3402f70d37f016e076a000390d}{URE\_PHY\_STAT\_MASK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01583}01583                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} == \mbox{\hyperlink{if__urereg_8h_a5cf92adbd3b51a9c479cab15897ac9a3}{URE\_PHY\_STAT\_LAN\_ON}} || \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} == \mbox{\hyperlink{if__urereg_8h_a5327801f5ae8199eba99fdb2e8734db3}{URE\_PHY\_STAT\_PWRDN}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01584}01584                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01585}01585                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01586}01586         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01587}01587         \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01588}01588                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01589}01589                     \textcolor{stringliteral}{"{}timeout waiting for phy to stabilize\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01590}01590 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01591}01591         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af11233063c858219011da967dc243c27}{URE\_USB\_U2P3\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_ac9585b93104f2092b44d83c486cb74ed}{URE\_U2P3\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01592}01592 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01593}01593         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& \mbox{\hyperlink{if__urereg_8h_a4ec379db57e1db2186e573607df75441}{URE\_CHIP\_VER\_5C10}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01594}01594                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a0f3d1b9bc381a5711ff654b9662d7ed6}{URE\_USB\_SSPHYLINK2}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01595}01595                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~URE\_PWD\_DN\_SCALE\_MASK;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01596}01596                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_a6703ed9733c39da674c04ba2f5e75c5b}{URE\_PWD\_DN\_SCALE}}(96);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01597}01597                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a0f3d1b9bc381a5711ff654b9662d7ed6}{URE\_USB\_SSPHYLINK2}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01598}01598 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01599}01599                 \mbox{\hyperlink{if__ure_8c_a6efe6fe5657863c4d057adf1078e58c6}{URE\_SETBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a506f519696cbde020fa0e641fed7443c}{URE\_USB\_USB2PHY}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a779132c18a418a4f535d342d4df37f3a}{URE\_USB2PHY\_L1}} | \mbox{\hyperlink{if__urereg_8h_ad68bb3901fdb1b2fab9d8af43b21b607}{URE\_USB2PHY\_SUSPEND}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01600}01600         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& \mbox{\hyperlink{if__urereg_8h_ae78e467f938a407f1a8d2ec3f43ba9f5}{URE\_CHIP\_VER\_5C20}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01601}01601                 \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a194076c57203a3422a522e9fd5c93fc0}{URE\_PLA\_DMY\_REG0}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_aed8095940a48075ed32625857b984151}{URE\_ECM\_ALDPS}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01602}01602 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01603}01603         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& (\mbox{\hyperlink{if__urereg_8h_ae78e467f938a407f1a8d2ec3f43ba9f5}{URE\_CHIP\_VER\_5C20}} | \mbox{\hyperlink{if__urereg_8h_aca19befbd6cf9ca85316c41705e478ac}{URE\_CHIP\_VER\_5C30}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01604}01604                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a67729119fca2301a694881f1c04990c6}{URE\_USB\_CSR\_DUMMY1}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01605}01605                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_aca0ed35f29c0434618255e37f389a5f4}{URE\_USB\_BURST\_SIZE}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}) ==}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01606}01606                     0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01607}01607                         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~URE\_DYNAMIC\_BURST;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01608}01608                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01609}01609                         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_a75c4d99ecdbd4bad1765ac9d53150e28}{URE\_DYNAMIC\_BURST}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01610}01610                 \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a67729119fca2301a694881f1c04990c6}{URE\_USB\_CSR\_DUMMY1}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01611}01611         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01612}01612 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01613}01613         \mbox{\hyperlink{if__ure_8c_a6efe6fe5657863c4d057adf1078e58c6}{URE\_SETBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a7274234a21aeb59022b73a8346f9b237}{URE\_USB\_CSR\_DUMMY2}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a9dd00b4865053283453f7f8d0bc03053}{URE\_EP4\_FULL\_FC}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01614}01614 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01615}01615         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a162c6fe664872ac37186ada89612a3b5}{URE\_USB\_WDT11\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a5ada484e5901084dc7b61607478984f5}{URE\_TIMER11\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01616}01616 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01617}01617         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ab8a64df0668a70de404603dd0fb641eb}{URE\_PLA\_LED\_FEATURE}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_adbaa3c4810aab901369da34ef19f19dc}{URE\_LED\_MODE\_MASK}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01618}01618 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01619}01619         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& \mbox{\hyperlink{if__urereg_8h_a4ec379db57e1db2186e573607df75441}{URE\_CHIP\_VER\_5C10}}) \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01620}01620             \mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}}) != \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffafeaa1573d94f4b3f0c4a4caa423eb81e}{USB\_SPEED\_SUPER}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01621}01621                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__urereg_8h_aa62dfc91c91a42f545fdb67c5d993551}{URE\_LPM\_TIMER\_500MS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01622}01622         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01623}01623                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__urereg_8h_a274a8bfc2ecd08fce4e0a52acfc50423}{URE\_LPM\_TIMER\_500US}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01624}01624         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a04f27cd202f8804de254a9f7bb0f3e5c}{URE\_USB\_LPM\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01625}01625             \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} | \mbox{\hyperlink{if__urereg_8h_ac5389ce83f9bb51ef8e727a27eff47d8}{URE\_FIFO\_EMPTY\_1FB}} | \mbox{\hyperlink{if__urereg_8h_affd2a8f6d01ed1b968352d92c8bb308b}{URE\_ROK\_EXIT\_LPM}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01626}01626 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01627}01627         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a30915a74f463a016c6551b5e498d2954}{URE\_USB\_AFE\_CTRL2}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01628}01628         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~URE\_SEN\_VAL\_MASK;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01629}01629         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_a0cf319e062dfd54d01db0a9c9cd8e7f8}{URE\_SEN\_VAL\_NORMAL}} | \mbox{\hyperlink{if__urereg_8h_a86fbd46754e8cf30ffea52db8daafd15}{URE\_SEL\_RXIDLE}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01630}01630         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a30915a74f463a016c6551b5e498d2954}{URE\_USB\_AFE\_CTRL2}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01631}01631 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01632}01632         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a8f814964ab8c26dced642b5f4d4d4915}{URE\_USB\_CONNECT\_TIMER}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x0001);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01633}01633 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01634}01634         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a8c40eeab08bf32a6319d2be8639e29da}{URE\_USB\_POWER\_CUT}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a64c603c5056160041edcd1d7bce18e60}{URE\_PWR\_EN}} | \mbox{\hyperlink{if__urereg_8h_a8122b26c604be5a366fc70dfc25234a4}{URE\_PHASE2\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01635}01635 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01636}01636         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a774dd2951672a9814737c6a25e3ebd7e}{URE\_USB\_MISC\_0}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a8a3c14d73f8b3efe2ae229b4643e71c2}{URE\_PCUT\_STATUS}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01637}01637 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01638}01638         memset(u1u2, 0xff, \textcolor{keyword}{sizeof}(u1u2));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01639}01639         \mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(sc, \mbox{\hyperlink{if__urereg_8h_ad183fabde012cfe263c4940e9b12b05c}{URE\_USB\_TOLERANCE}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01640}01640             \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}} | \mbox{\hyperlink{if__urereg_8h_a1dfafcadd699f4836d48ecb7a2b55991}{URE\_BYTE\_EN\_SIX\_BYTES}}, u1u2, \textcolor{keyword}{sizeof}(u1u2));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01641}01641 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01642}01642         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a1c73d456dbddbe584aaf5a9c186b9691}{URE\_PLA\_MAC\_PWR\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01643}01643             \mbox{\hyperlink{if__urereg_8h_ae01f0b62b12346ec712d62e9302c05b0}{URE\_ALDPS\_SPDWN\_RATIO}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01644}01644         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a3d7dfda6ec90c2fbcb9741de8136e981}{URE\_PLA\_MAC\_PWR\_CTRL2}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01645}01645             \mbox{\hyperlink{if__urereg_8h_ad4865c15c7f38e7968aa5bc597f18a50}{URE\_EEE\_SPDWN\_RATIO}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01646}01646         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ac99e2b1e96157b7e8502bb26ebf1d790}{URE\_PLA\_MAC\_PWR\_CTRL3}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01647}01647             \mbox{\hyperlink{if__urereg_8h_a0544389d2c8504680e5ef2bcdeb06cef}{URE\_PKT\_AVAIL\_SPDWN\_EN}} | \mbox{\hyperlink{if__urereg_8h_ab94db5de513ae068f1579df29b8a3e86}{URE\_SUSPEND\_SPDWN\_EN}} |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01648}01648             \mbox{\hyperlink{if__urereg_8h_a5898c1e1427937791dcda6c244c6c9f1}{URE\_U1U2\_SPDWN\_EN}} | \mbox{\hyperlink{if__urereg_8h_a6257412640bd7abc5aa8ecf0484ffa88}{URE\_L1\_SPDWN\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01649}01649         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a3d8437408d11ce7762fcd732bc427b52}{URE\_PLA\_MAC\_PWR\_CTRL4}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01650}01650             \mbox{\hyperlink{if__urereg_8h_ad4e3a3e653056f7dde1e5c84d0108a09}{URE\_PWRSAVE\_SPDWN\_EN}} | \mbox{\hyperlink{if__urereg_8h_afde39484e5feac240e7026ba644bd265}{URE\_RXDV\_SPDWN\_EN}} | \mbox{\hyperlink{if__urereg_8h_abcbd5e84de7925d51407b1fcc5464e1d}{URE\_TX10MIDLE\_EN}} |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01651}01651             \mbox{\hyperlink{if__urereg_8h_a368d0c9a2b9e20051b4aa21bdb2b7762}{URE\_TP100\_SPDWN\_EN}} | \mbox{\hyperlink{if__urereg_8h_a53430cfe69c3ccdb96720b96e4f06335}{URE\_TP500\_SPDWN\_EN}} | \mbox{\hyperlink{if__urereg_8h_a41f0b412bdc1080a95b3729375a48c37}{URE\_TP1000\_SPDWN\_EN}} |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01652}01652             \mbox{\hyperlink{if__urereg_8h_aa5d91efef96607358565e96054798693}{URE\_EEE\_SPDWN\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01653}01653 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01654}01654         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af11233063c858219011da967dc243c27}{URE\_USB\_U2P3\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01655}01655         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& (\mbox{\hyperlink{if__urereg_8h_a9cc26233f7974a36182f29e7c6c47aae}{URE\_CHIP\_VER\_5C00}} | \mbox{\hyperlink{if__urereg_8h_a4ec379db57e1db2186e573607df75441}{URE\_CHIP\_VER\_5C10}})))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01656}01656                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_ac9585b93104f2092b44d83c486cb74ed}{URE\_U2P3\_ENABLE}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01657}01657         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01658}01658                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~URE\_U2P3\_ENABLE;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01659}01659         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af11233063c858219011da967dc243c27}{URE\_USB\_U2P3\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01660}01660 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01661}01661         memset(u1u2, 0x00, \textcolor{keyword}{sizeof}(u1u2));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01662}01662         \mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(sc, \mbox{\hyperlink{if__urereg_8h_ad183fabde012cfe263c4940e9b12b05c}{URE\_USB\_TOLERANCE}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01663}01663             \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}} | \mbox{\hyperlink{if__urereg_8h_a1dfafcadd699f4836d48ecb7a2b55991}{URE\_BYTE\_EN\_SIX\_BYTES}}, u1u2, \textcolor{keyword}{sizeof}(u1u2));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01664}01664 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01665}01665         \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(sc, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01666}01666 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01667}01667         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& (\mbox{\hyperlink{if__urereg_8h_a9cc26233f7974a36182f29e7c6c47aae}{URE\_CHIP\_VER\_5C00}} | \mbox{\hyperlink{if__urereg_8h_a4ec379db57e1db2186e573607df75441}{URE\_CHIP\_VER\_5C10}} |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01668}01668             \mbox{\hyperlink{if__urereg_8h_ae78e467f938a407f1a8d2ec3f43ba9f5}{URE\_CHIP\_VER\_5C20}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01669}01669                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_ac82f95d0cbf1b53294758878be95d322}{URE\_OCP\_ADC\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01670}01670                     \mbox{\hyperlink{if__urereg_8h_ae65e4e8961eb42652ed264852d0dcc00}{URE\_CKADSEL\_L}} | \mbox{\hyperlink{if__urereg_8h_a9194b52cc3b1d0a3325f792a5e0a92e8}{URE\_ADC\_EN}} | \mbox{\hyperlink{if__urereg_8h_aaeb80cf85b52dce0a555afa169de358a}{URE\_EN\_EMI\_L}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01671}01671         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01672}01672         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& \mbox{\hyperlink{if__urereg_8h_a9cc26233f7974a36182f29e7c6c47aae}{URE\_CHIP\_VER\_5C00}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01673}01673                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a84ec52c76589e9c59f67f2615cfa21c8}{URE\_OCP\_EEE\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01674}01674                     \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_a84ec52c76589e9c59f67f2615cfa21c8}{URE\_OCP\_EEE\_CFG}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01675}01675                     \string~\mbox{\hyperlink{if__urereg_8h_a7e5e31536f13dad15491915906c70241}{URE\_CTAP\_SHORT\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01676}01676         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01677}01677         \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a7d0f1db30b5fab75cbcd06d697e6e6c2}{URE\_OCP\_POWER\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01678}01678             \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_a7d0f1db30b5fab75cbcd06d697e6e6c2}{URE\_OCP\_POWER\_CFG}}) |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01679}01679             \mbox{\hyperlink{if__urereg_8h_ab2810f7ce857600669fe2a6dc28501f9}{URE\_EEE\_CLKDIV\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01680}01680         \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a737da892b8dae4fc0c64eeec35aace44}{URE\_OCP\_DOWN\_SPEED}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01681}01681             \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_a737da892b8dae4fc0c64eeec35aace44}{URE\_OCP\_DOWN\_SPEED}}) |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01682}01682             \mbox{\hyperlink{if__urereg_8h_a45ee1a70d39a6d2557ffd2d2ad2901a6}{URE\_EN\_10M\_BGOFF}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01683}01683         \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a7d0f1db30b5fab75cbcd06d697e6e6c2}{URE\_OCP\_POWER\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01684}01684             \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_a7d0f1db30b5fab75cbcd06d697e6e6c2}{URE\_OCP\_POWER\_CFG}}) |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01685}01685             \mbox{\hyperlink{if__urereg_8h_acee3830b693c14d06edf09de9aa1cd18}{URE\_EN\_10M\_PLLOFF}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01686}01686         \mbox{\hyperlink{if__ure_8c_ae3631d2ed3eacbaed598730a5a27c6f3}{ure\_sram\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a6cffbc9d646567cc656f6baff53e7b58}{URE\_SRAM\_IMPEDANCE}}, 0x0b13);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01687}01687         \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a59e209896e87a22aac6c75c00122088a}{URE\_PLA\_PHY\_PWR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_af75ab56d2a99128db4ac1a2c8377a6cf}{URE\_PFM\_PWM\_SWITCH}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01688}01688 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01689}01689         \textcolor{comment}{/* Enable LPF corner auto tune. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01690}01690         \mbox{\hyperlink{if__ure_8c_ae3631d2ed3eacbaed598730a5a27c6f3}{ure\_sram\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_acc3ebfcbe30e1313d1016e4d4514b8f4}{URE\_SRAM\_LPF\_CFG}}, 0xf70f);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01691}01691 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01692}01692         \textcolor{comment}{/* Adjust 10M amplitude. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01693}01693         \mbox{\hyperlink{if__ure_8c_ae3631d2ed3eacbaed598730a5a27c6f3}{ure\_sram\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a57e6559dfbb57362580949e42b2a783e}{URE\_SRAM\_10M\_AMP1}}, 0x00af);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01694}01694         \mbox{\hyperlink{if__ure_8c_ae3631d2ed3eacbaed598730a5a27c6f3}{ure\_sram\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a0d9bfcfb09a72226e1ec263522611e31}{URE\_SRAM\_10M\_AMP2}}, 0x0208);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01695}01695 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01696}01696         \mbox{\hyperlink{if__ure_8c_a432929462a103eba6dc31d3f715ccd9b}{ure\_rtl8152\_nic\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01697}01697 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01698}01698         \textcolor{comment}{/* Enable Rx aggregation. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01699}01699         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a92d22a1ee8dc98ebc9c308f80a1eb854}{URE\_USB\_USB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_af263f86f54daaff64cf58c4b3c9133d3}{URE\_RX\_AGG\_DISABLE}} | \mbox{\hyperlink{if__urereg_8h_ad231312facccaff3d00d1e2b52155c32}{URE\_RX\_ZERO\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01700}01700 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01701}01701         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af11233063c858219011da967dc243c27}{URE\_USB\_U2P3\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01702}01702         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} \& (\mbox{\hyperlink{if__urereg_8h_a9cc26233f7974a36182f29e7c6c47aae}{URE\_CHIP\_VER\_5C00}} | \mbox{\hyperlink{if__urereg_8h_a4ec379db57e1db2186e573607df75441}{URE\_CHIP\_VER\_5C10}})))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01703}01703                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_ac9585b93104f2092b44d83c486cb74ed}{URE\_U2P3\_ENABLE}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01704}01704         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01705}01705                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~URE\_U2P3\_ENABLE;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01706}01706         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af11233063c858219011da967dc243c27}{URE\_USB\_U2P3\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01707}01707 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01708}01708         memset(u1u2, 0xff, \textcolor{keyword}{sizeof}(u1u2));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01709}01709         \mbox{\hyperlink{if__ure_8c_a6492b47e5ab6809b4539fe4d7baac9f4}{ure\_write\_mem}}(sc, \mbox{\hyperlink{if__urereg_8h_ad183fabde012cfe263c4940e9b12b05c}{URE\_USB\_TOLERANCE}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01710}01710             \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}} | \mbox{\hyperlink{if__urereg_8h_a1dfafcadd699f4836d48ecb7a2b55991}{URE\_BYTE\_EN\_SIX\_BYTES}}, u1u2, \textcolor{keyword}{sizeof}(u1u2));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01711}01711 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01712}01712 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01713}01713 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01714}\mbox{\hyperlink{if__ure_8c_abbfbc0652270b0a4e3beb410efea9650}{01714}} \mbox{\hyperlink{if__ure_8c_abbfbc0652270b0a4e3beb410efea9650}{ure\_rtl8153b\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01715}01715 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01716}01716         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01717}01717         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01718}01718 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01719}01719         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01720}01720                 \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, 0xd26b, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x01);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01721}01721                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, 0xd32a, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01722}01722                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, 0xcfee, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x0020);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01723}01723         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01724}01724 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01725}01725         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01726}01726                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, 0xb460, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x08);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01727}01727         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01728}01728 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01729}01729         \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(sc, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01730}01730 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01731}01731         \textcolor{comment}{/* Disable U1U2 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01732}01732         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a4ead3080582086b85a02d04f79c20ae5}{URE\_USB\_LPM\_CONFIG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a2418d85bfdc669623d4dc2d93a386978}{URE\_LPM\_U1U2\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01733}01733 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01734}01734         \textcolor{comment}{/* Wait loading flash */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01735}01735         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a8a06b37580a33e0a8a1e1ce3b17a1c0d}{sc\_chip}} == \mbox{\hyperlink{if__urereg_8h_afbaf885fad10adee034d44c952f35168}{URE\_CHIP\_VER\_7410}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01736}01736                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, 0xd3ae, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \& 0x0002) \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01737}01737                     !(\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, 0xd284, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}) \& 0x0020)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01738}01738                         \textcolor{keywordflow}{for} (i=0; i < 100; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01739}01739                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, 0xd284, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}) \& 0x0004)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01740}01740                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01741}01741                                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 1000);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01742}01742                         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01743}01743                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01744}01744         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01745}01745 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01746}01746         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01747}01747                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a9019a38d9e5bbd9416230794a67e7d68}{URE\_PLA\_BOOT\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01748}01748                     \mbox{\hyperlink{if__urereg_8h_a9248b76a1234dd0e8020bfef2dfb181a}{URE\_AUTOLOAD\_DONE}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01749}01749                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01750}01750                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01751}01751         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01752}01752         \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01753}01753                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01754}01754                     \textcolor{stringliteral}{"{}timeout waiting for chip autoload\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01755}01755 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01756}01756         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_abbc725fc5104d9ef52d92ea8734bd54d}{ure\_phy\_status}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01757}01757         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} == \mbox{\hyperlink{if__urereg_8h_ad834f9e731639d78d8051a71c8ce276e}{URE\_PHY\_STAT\_EXT\_INIT}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01758}01758             (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}))) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01759}01759                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, 0xa468,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01760}01760                     \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, 0xa468) \& \string~0x0a);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01761}01761                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01762}01762                         \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, 0xa466,}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01763}01763                                 \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, 0xa466) \& \string~0x01);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01764}01764         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01765}01765 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01766}01766         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_aff5c3080cfa1506f808947cc45b9ffc4}{URE\_OCP\_BASE\_MII}} + MII\_BMCR);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01767}01767         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& BMCR\_PDOWN) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01768}01768                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~BMCR\_PDOWN;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01769}01769                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_aff5c3080cfa1506f808947cc45b9ffc4}{URE\_OCP\_BASE\_MII}} + MII\_BMCR, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01770}01770         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01771}01771 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01772}01772         \mbox{\hyperlink{if__ure_8c_abbc725fc5104d9ef52d92ea8734bd54d}{ure\_phy\_status}}(sc, \mbox{\hyperlink{if__urereg_8h_a5cf92adbd3b51a9c479cab15897ac9a3}{URE\_PHY\_STAT\_LAN\_ON}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01773}01773 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01774}01774         \textcolor{comment}{/* Disable U2P3 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01775}01775         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af11233063c858219011da967dc243c27}{URE\_USB\_U2P3\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_ac9585b93104f2092b44d83c486cb74ed}{URE\_U2P3\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01776}01776 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01777}01777         \textcolor{comment}{/* MSC timer, 32760 ms. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01778}01778         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a4e75c735af68512c8e9c074ccdc73d2d}{URE\_USB\_MSC\_TIMER}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x0fff);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01779}01779 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01780}01780         \textcolor{comment}{/* U1/U2/L1 idle timer, 500 us. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01781}01781         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a03b6b0b5e6002db67319d66f69a4ab56}{URE\_USB\_U1U2\_TIMER}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 500);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01782}01782 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01783}01783         \textcolor{comment}{/* Disable power cut */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01784}01784         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a8c40eeab08bf32a6319d2be8639e29da}{URE\_USB\_POWER\_CUT}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a64c603c5056160041edcd1d7bce18e60}{URE\_PWR\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01785}01785         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a774dd2951672a9814737c6a25e3ebd7e}{URE\_USB\_MISC\_0}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a8a3c14d73f8b3efe2ae229b4643e71c2}{URE\_PCUT\_STATUS}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01786}01786 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01787}01787         \textcolor{comment}{/* Disable ups */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01788}01788         \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a8c40eeab08bf32a6319d2be8639e29da}{URE\_USB\_POWER\_CUT}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a5503585e3d57dfa2b656d13211399386}{URE\_UPS\_EN}} | \mbox{\hyperlink{if__urereg_8h_ac29ddb5bddfedc0ffcf8b1dc37f6cca3}{URE\_USP\_PREWAKE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01789}01789         \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, 0xcfff, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x01);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01790}01790 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01791}01791         \textcolor{comment}{/* Disable queue wake */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01792}01792         \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a369147f13cfb29028fd895712e5758dc}{URE\_PLA\_INDICATE\_FALG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a88409e55f3e2e1d428a6e31f75970389}{URE\_UPCOMING\_RUNTIME\_D3}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01793}01793         \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a4aef08160c70b3d2fbf9ab27ba6d3720}{URE\_PLA\_SUSPEND\_FLAG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_ae7134ff75fa347ac719d973158930dfc}{URE\_LINK\_CHG\_EVENT}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01794}01794         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_afed4bfbe07b7ac8967c772c399f01b99}{URE\_PLA\_EXTRA\_STATUS}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a70a0719f01c053e5f7ef32b347834896}{URE\_LINK\_CHANGE\_FLAG}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01795}01795 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01796}01796         \textcolor{comment}{/* Disable runtime suspend */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01797}01797         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a8bfbb1d7fb41408f1af9ad46f32b3c98}{URE\_PLA\_CRWECR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a48fb202c83000d8f71c2fc51c752a0d8}{URE\_CRWECR\_CONFIG}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01798}01798         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a990416d344f6b743c64976c9f76cf930}{URE\_PLA\_CONFIG34}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_aa5106be89585688e0748d3527db9f656}{URE\_LINK\_OFF\_WAKE\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01799}01799         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a8bfbb1d7fb41408f1af9ad46f32b3c98}{URE\_PLA\_CRWECR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_aba99e74ad9e071d89efc434e2f9e5afc}{URE\_CRWECR\_NORAML}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01800}01800 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01801}01801         \textcolor{comment}{/* Enable U1U2 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01802}01802         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}}) == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffafeaa1573d94f4b3f0c4a4caa423eb81e}{USB\_SPEED\_SUPER}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01803}01803                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a4ead3080582086b85a02d04f79c20ae5}{URE\_USB\_LPM\_CONFIG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a2418d85bfdc669623d4dc2d93a386978}{URE\_LPM\_U1U2\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01804}01804 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01805}01805         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01806}01806                 \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, 0xc010, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x0800);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01807}01807                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, 0xe854, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x0001);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01808}01808 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01809}01809                 \textcolor{comment}{/* enable fc timer and set timer to 600 ms. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01810}01810                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ad77e9ff0d75a35d736ece3af74626850}{URE\_USB\_FC\_TIMER}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a8230f7cc61e0038d96d50e1181980732}{URE\_CTRL\_TIMER\_EN}} | (600 / 8));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01811}01811 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01812}01812                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(sc, 0xdc6b, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \& 0x80)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01813}01813                         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a9302ccd10740ea005af3b6877de8d42a}{URE\_USB\_FW\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01814}01814                         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_add18b5b78fc4e9beb61b203a810fe400}{URE\_FLOW\_CTRL\_PATCH\_OPT}} | 0x0100;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01815}01815                         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~0x08;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01816}01816                         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a9302ccd10740ea005af3b6877de8d42a}{URE\_USB\_FW\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01817}01817                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01818}01818 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01819}01819                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a2e535fdb22fce4a239e532023a6f035f}{URE\_USB\_FW\_TASK}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a63b3cab35ecfcec3a1a6ab0342a6165f}{URE\_FC\_PATCH\_TASK}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01820}01820         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01821}01821 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01822}01822         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_afed4bfbe07b7ac8967c772c399f01b99}{URE\_PLA\_EXTRA\_STATUS}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01823}01823         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a6ba32065af5a51dba287f7eb135357e7}{ure\_get\_link\_status}}(sc))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01824}01824                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_aa8f527d7ed8ca235e2d87e2c3948bbf5}{URE\_CUR\_LINK\_OK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01825}01825         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01826}01826                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~URE\_CUR\_LINK\_OK;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01827}01827         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_a1b699732744606ba2d5c11e5f65f552b}{URE\_POLL\_LINK\_CHG}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01828}01828         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_afed4bfbe07b7ac8967c772c399f01b99}{URE\_PLA\_EXTRA\_STATUS}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01829}01829 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01830}01830         \textcolor{comment}{/* MAC clock speed down */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01831}01831         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01832}01832                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a1c73d456dbddbe584aaf5a9c186b9691}{URE\_PLA\_MAC\_PWR\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x0403);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01833}01833                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a3d7dfda6ec90c2fbcb9741de8136e981}{URE\_PLA\_MAC\_PWR\_CTRL2}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01834}01834                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~0xff;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01835}01835                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__urereg_8h_ae7983bb224e7529cf79afb64f7771fad}{URE\_MAC\_CLK\_SPDWN\_EN}} | 0x03;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01836}01836                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a3d7dfda6ec90c2fbcb9741de8136e981}{URE\_PLA\_MAC\_PWR\_CTRL2}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01837}01837         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01838}01838                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a3d7dfda6ec90c2fbcb9741de8136e981}{URE\_PLA\_MAC\_PWR\_CTRL2}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_ae7983bb224e7529cf79afb64f7771fad}{URE\_MAC\_CLK\_SPDWN\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01839}01839         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01840}01840         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ac99e2b1e96157b7e8502bb26ebf1d790}{URE\_PLA\_MAC\_PWR\_CTRL3}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a891e8a1b0866ff64bd07ffa19415bc94}{URE\_PLA\_MCU\_SPDWN\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01841}01841 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01842}01842         \textcolor{comment}{/* Enable Rx aggregation. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01843}01843         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a92d22a1ee8dc98ebc9c308f80a1eb854}{URE\_USB\_USB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_af263f86f54daaff64cf58c4b3c9133d3}{URE\_RX\_AGG\_DISABLE}} | \mbox{\hyperlink{if__urereg_8h_ad231312facccaff3d00d1e2b52155c32}{URE\_RX\_ZERO\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01844}01844 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01845}01845         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01846}01846                 \mbox{\hyperlink{if__ure_8c_a6efe6fe5657863c4d057adf1078e58c6}{URE\_SETBIT\_1}}(sc, 0xd4b4, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x02);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01847}01847 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01848}01848         \textcolor{comment}{/* Reset tally */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01849}01849         \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a564ca883f4fc220b69dc352f452fb84d}{URE\_PLA\_RSTTALLY}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a2145c658fc4fa59f58fadcb4285b0816}{URE\_TALLY\_RESET}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01850}01850 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01851}01851 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01852}01852 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01853}\mbox{\hyperlink{if__ure_8c_af131bb4131fabf0f015f05bfdb1b4b32}{01853}} \mbox{\hyperlink{if__ure_8c_af131bb4131fabf0f015f05bfdb1b4b32}{ure\_rtl8153b\_nic\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01854}01854 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01855}01855         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01856}01856         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01857}01857         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01858}01858 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01859}01859         \textcolor{comment}{/* Disable U1U2 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01860}01860         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a4ead3080582086b85a02d04f79c20ae5}{URE\_USB\_LPM\_CONFIG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a2418d85bfdc669623d4dc2d93a386978}{URE\_LPM\_U1U2\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01861}01861 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01862}01862         \textcolor{comment}{/* Disable U2P3 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01863}01863         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af11233063c858219011da967dc243c27}{URE\_USB\_U2P3\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_ac9585b93104f2092b44d83c486cb74ed}{URE\_U2P3\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01864}01864 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01865}01865         \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(sc, \textcolor{keyword}{false});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01866}01866 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01867}01867         \textcolor{comment}{/* Enable rxdy\_gated */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01868}01868         \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a2d405924e27d0d96ea809bc3fc04459f}{URE\_PLA\_MISC\_1}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a12e81780f4f37333f813e90569b508f4}{URE\_RXDY\_GATED\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01869}01869 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01870}01870         \textcolor{comment}{/* Disable teredo */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01871}01871         \mbox{\hyperlink{if__ure_8c_a32cf9bad386006ebbf7d9fb8dd1b3f5e}{ure\_disable\_teredo}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01872}01872 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01873}01873         \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(14, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}rtl8153b\_nic\_reset: RCR: \%\#x\(\backslash\)n"{}}, \mbox{\hyperlink{if__ure_8c_aa1481b9bce219ce2146ceb7d735215d6}{ure\_read\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a79c21b195c49533aa2e5adad2000249f}{URE\_PLA\_RCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01874}01874         \mbox{\hyperlink{if__ure_8c_a9832745d6519d1506fa0953b4ece8d1c}{URE\_CLRBIT\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a79c21b195c49533aa2e5adad2000249f}{URE\_PLA\_RCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a24d0055b99658737206888b08185cda6}{URE\_RCR\_ACPT\_ALL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01875}01875 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01876}01876         \mbox{\hyperlink{if__ure_8c_ab00be5b3fae45b4e1f2b50f555cdb6c8}{ure\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01877}01877 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01878}01878         \textcolor{comment}{/* Reset BMU */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01879}01879         \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a7567e5758d504b21e988c8b31a9e43a0}{URE\_USB\_BMU\_RESET}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a1bf3705afedd25b5759c1e88845d1d8b}{URE\_BMU\_RESET\_EP\_IN}} | \mbox{\hyperlink{if__urereg_8h_a9094a7fd8bcc3c7813ac0eaef286f07a}{URE\_BMU\_RESET\_EP\_OUT}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01880}01880         \mbox{\hyperlink{if__ure_8c_a6efe6fe5657863c4d057adf1078e58c6}{URE\_SETBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a7567e5758d504b21e988c8b31a9e43a0}{URE\_USB\_BMU\_RESET}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a1bf3705afedd25b5759c1e88845d1d8b}{URE\_BMU\_RESET\_EP\_IN}} | \mbox{\hyperlink{if__urereg_8h_a9094a7fd8bcc3c7813ac0eaef286f07a}{URE\_BMU\_RESET\_EP\_OUT}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01881}01881 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01882}01882         \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_ae045c058aed91e42b0c5f6c3cb8277e1}{URE\_PLA\_OOB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a75e6d636d5f19f6203a3f6f1d8e7b2fd}{URE\_NOW\_IS\_OOB}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01883}01883         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ab803a6054f28e4490ad41b7cdeb40221}{URE\_PLA\_SFF\_STS\_7}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_aa8a9d0357e950047f2d70c6b2971eb99}{URE\_MCU\_BORW\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01884}01884         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01885}01885                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01886}01886                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_ae045c058aed91e42b0c5f6c3cb8277e1}{URE\_PLA\_OOB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01887}01887                             \mbox{\hyperlink{if__urereg_8h_a59f0267165703cc42ac23cac5cf31c7d}{URE\_LINK\_LIST\_READY}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01888}01888                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01889}01889                         \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01890}01890                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01891}01891                 \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01892}01892                         device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01893}01893                             \textcolor{stringliteral}{"{}timeout waiting for OOB control\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01894}01894 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01895}01895                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ab803a6054f28e4490ad41b7cdeb40221}{URE\_PLA\_SFF\_STS\_7}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a9be4e4397720c445b6a933c458cb2f20}{URE\_RE\_INIT\_LL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01896}01896                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01897}01897                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_ae045c058aed91e42b0c5f6c3cb8277e1}{URE\_PLA\_OOB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01898}01898                             \mbox{\hyperlink{if__urereg_8h_a59f0267165703cc42ac23cac5cf31c7d}{URE\_LINK\_LIST\_READY}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01899}01899                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01900}01900                         \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01901}01901                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01902}01902                 \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01903}01903                         device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01904}01904                             \textcolor{stringliteral}{"{}timeout waiting for OOB control\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01905}01905         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01906}01906 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01907}01907         \textcolor{comment}{/* Configure rxvlan */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01908}01908         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, 0xc012, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01909}01909         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~0x00c0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01910}01910         \textcolor{keywordflow}{if} (ifp-\/>if\_capabilities \& IFCAP\_VLAN\_HWTAGGING)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01911}01911                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= 0x00c0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01912}01912         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, 0xc012, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01913}01913 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01914}01914         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = if\_getmtu(ifp);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01915}01915         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_afc949f99ef4f81270dba2a1d488264ae}{URE\_PLA\_RMS}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a1d2a122e266ab35d66cd476b4c721435}{URE\_FRAMELEN}}(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01916}01916         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a81fa51fd2003eca2de07312651308c90}{URE\_PLA\_MTPS}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_aeab79b19fcb6ee64d77d51df75e07b16}{URE\_MTPS\_JUMBO}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01917}01917 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01918}01918         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01919}01919                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a6b6976df128fae2b9f99654d793f122b}{URE\_PLA\_TCR0}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a2e7c1938caa265483a6122a99fefd99f}{URE\_TCR0\_AUTO\_FIFO}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01920}01920                 \mbox{\hyperlink{if__ure_8c_ab00be5b3fae45b4e1f2b50f555cdb6c8}{ure\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01921}01921         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01922}01922 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01923}01923         \textcolor{comment}{/* Configure fc parameter */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01924}01924         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01925}01925                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, 0xc0a6, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x0400);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01926}01926                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, 0xc0aa, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x0800);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01927}01927         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01928}01928                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, 0xc0a6, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x0200);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01929}01929                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, 0xc0aa, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x0400);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01930}01930         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01931}01931 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01932}01932         \textcolor{comment}{/* Configure Rx FIFO threshold. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01933}01933         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01934}01934                 \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_ae54f16df9277c1879c3dc2add34a7f89}{URE\_PLA\_RXFIFO\_CTRL0}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},  \mbox{\hyperlink{if__urereg_8h_adc4559de4cdfbb8cce92b50960797a0e}{URE\_RXFIFO\_THR1\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01935}01935                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a194b573a4c0f4891e94d9fd6de908de2}{URE\_PLA\_RXFIFO\_CTRL1}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a91403d9e6bb65f4ff93080947deadd0a}{URE\_RXFIFO\_THR2\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01936}01936                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a9197b40ef68d077e1859313c2457275e}{URE\_PLA\_RXFIFO\_CTRL2}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a35d8f0dd718fe8e4ecd01580bd78b7ec}{URE\_RXFIFO\_THR3\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01937}01937                 \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a0fc7f755bc8f504f02620e6cbff56309}{URE\_USB\_RX\_BUF\_TH}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a64daa0f881adffc1abd0405acb3bda33}{URE\_RX\_THR\_B}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01938}01938         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01939}01939                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, 0xc0a2, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01940}01940                     (\mbox{\hyperlink{if__ure_8c_a45e73c945fbdedde91e2299d1b01d416}{ure\_read\_2}}(sc, 0xc0a2, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \& \string~0xfff) | 0x08);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01941}01941                 \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a0fc7f755bc8f504f02620e6cbff56309}{URE\_USB\_RX\_BUF\_TH}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x00600400);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01942}01942         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01943}01943 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01944}01944         \textcolor{comment}{/* Configure Tx FIFO threshold. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01945}01945         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01946}01946                 \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a60a9341fe4015d5c541540898b6b9d74}{URE\_PLA\_TXFIFO\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_adbdfb5050d4419a0e144b6b54023fcf3}{URE\_TXFIFO\_THR\_NORMAL2}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01947}01947         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01948}01948                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a60a9341fe4015d5c541540898b6b9d74}{URE\_PLA\_TXFIFO\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_adbdfb5050d4419a0e144b6b54023fcf3}{URE\_TXFIFO\_THR\_NORMAL2}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01949}01949                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, 0xd4b4, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x0002);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01950}01950         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01951}01951                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a60a9341fe4015d5c541540898b6b9d74}{URE\_PLA\_TXFIFO\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0x0008);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01952}01952                 \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, 0xe61a, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01953}01953                     (\mbox{\hyperlink{if__urereg_8h_a1d2a122e266ab35d66cd476b4c721435}{URE\_FRAMELEN}}(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}) + 0x100) / 16 );}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01954}01954         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01955}01955 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01956}01956         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ac99e2b1e96157b7e8502bb26ebf1d790}{URE\_PLA\_MAC\_PWR\_CTRL3}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a891e8a1b0866ff64bd07ffa19415bc94}{URE\_PLA\_MCU\_SPDWN\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01957}01957 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01958}01958         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01959}01959                 \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, 0xd32a, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, 0x300);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01960}01960 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01961}01961         \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(sc, \textcolor{keyword}{true});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01962}01962 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01963}01963         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}})) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01964}01964                 \textcolor{comment}{/* Enable U2P3 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01965}01965                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_af11233063c858219011da967dc243c27}{URE\_USB\_U2P3\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_ac9585b93104f2092b44d83c486cb74ed}{URE\_U2P3\_ENABLE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01966}01966         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01967}01967 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01968}01968         \textcolor{comment}{/* Enable U1U2 */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01969}01969         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}}) == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffafeaa1573d94f4b3f0c4a4caa423eb81e}{USB\_SPEED\_SUPER}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01970}01970                 \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a4ead3080582086b85a02d04f79c20ae5}{URE\_USB\_LPM\_CONFIG}}, \mbox{\hyperlink{if__urereg_8h_a10b631569220ad809cb59a76e904a6d3}{URE\_MCU\_TYPE\_USB}}, \mbox{\hyperlink{if__urereg_8h_a2418d85bfdc669623d4dc2d93a386978}{URE\_LPM\_U1U2\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01971}01971 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01972}01972 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01973}01973 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01974}\mbox{\hyperlink{if__ure_8c_ad0981ca64da9c4af679512df9ac3d08e}{01974}} \mbox{\hyperlink{if__ure_8c_a2c2c805cc92f8d86e7eda677b5856382}{ure\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01975}01975 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01976}01976         \textcolor{keyword}{struct }\mbox{\hyperlink{structure__softc}{ure\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01977}01977         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01978}01978 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01979}01979         \mbox{\hyperlink{if__urereg_8h_a0cda26e3d089d2d6c3cacbb656d71276}{URE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01980}01980 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01981}01981         ifp-\/>if\_drv\_flags \&= \string~(IFF\_DRV\_RUNNING | IFF\_DRV\_OACTIVE);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01982}01982         sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \&= \string~URE\_FLAG\_LINK;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01983}01983         sc-\/>\mbox{\hyperlink{structure__softc_af737056460f49bef67e910567147d25a}{sc\_rxstarted}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01984}01984 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01985}01985         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01986}01986 \textcolor{comment}{         * stop all the transfers, if not already stopped:}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01987}01987 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01988}01988         \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < \mbox{\hyperlink{if__urereg_8h_ab66a8449759602f1cf0ae33dbe92a67c}{URE\_MAX\_RX}}; i++)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01989}01989                 \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structure__softc_ad357cf18ba65f8a44ca3b2db176a2500}{sc\_rx\_xfer}}[i]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01990}01990         \textcolor{keywordflow}{for} (\textcolor{keywordtype}{int} i = 0; i < \mbox{\hyperlink{if__urereg_8h_a9520e7de49fb3969ad4494e79957785d}{URE\_MAX\_TX}}; i++)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01991}01991                 \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structure__softc_afb29c37c85e8d3448848f764321774c4}{sc\_tx\_xfer}}[i]);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01992}01992 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01993}01993 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01994}01994 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01995}\mbox{\hyperlink{if__ure_8c_a32cf9bad386006ebbf7d9fb8dd1b3f5e}{01995}} \mbox{\hyperlink{if__ure_8c_a32cf9bad386006ebbf7d9fb8dd1b3f5e}{ure\_disable\_teredo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01996}01996 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01997}01997 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01998}01998         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structure__softc_a48736d1e63b0df402072ce93d7144112}{sc\_flags}} \& (\mbox{\hyperlink{if__urereg_8h_ab8037ee589bb07a76c940e137ca6f5b7}{URE\_FLAG\_8153B}} | \mbox{\hyperlink{if__urereg_8h_a39a1236c0661a81eebbaf7825f0f78b4}{URE\_FLAG\_8156}} | \mbox{\hyperlink{if__urereg_8h_a83d1387c2678244daa30a251d0c7b872}{URE\_FLAG\_8156B}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l01999}01999                 \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a639df33453a58e32e72d29c2df585ac7}{URE\_PLA\_TEREDO\_CFG}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0xff);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02000}02000         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02001}02001                 \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a639df33453a58e32e72d29c2df585ac7}{URE\_PLA\_TEREDO\_CFG}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02002}02002                     (\mbox{\hyperlink{if__urereg_8h_a368e6a24b985fddedb0f1cbc94a07bd6}{URE\_TEREDO\_SEL}} | \mbox{\hyperlink{if__urereg_8h_ad16af157d6b7c378b65252f964550e4f}{URE\_TEREDO\_RS\_EVENT\_MASK}} | \mbox{\hyperlink{if__urereg_8h_adeb29b43966f9daa277c842489b9f1e3}{URE\_OOB\_TEREDO\_EN}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02003}02003         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02004}02004         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_aedcdf4af1c01150e094da4b6fb666701}{URE\_PLA\_WDT6\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a289a370c724e78c1fce3ce2053e3afc7}{URE\_WDT6\_SET\_MODE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02005}02005         \mbox{\hyperlink{if__ure_8c_ae9223d76d96cdaae5417e7d5104ed3b5}{ure\_write\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ad821bfeac88430434e9ac1306299aa8e}{URE\_PLA\_REALWOW\_TIMER}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02006}02006         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a4576da0c28f7a38f52aa7cb642ff8649}{URE\_PLA\_TEREDO\_TIMER}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02007}02007 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02008}02008 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02009}02009 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02010}\mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{02010}} \mbox{\hyperlink{if__ure_8c_a6cd199019db59556405437d43769247c}{ure\_enable\_aldps}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, \textcolor{keywordtype}{bool} enable)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02011}02011 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02012}02012         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02013}02013 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02014}02014         \textcolor{keywordflow}{if} (enable) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02015}02015                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a7d0f1db30b5fab75cbcd06d697e6e6c2}{URE\_OCP\_POWER\_CFG}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02016}02016                         \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_a7d0f1db30b5fab75cbcd06d697e6e6c2}{URE\_OCP\_POWER\_CFG}}) | \mbox{\hyperlink{if__urereg_8h_a769a2bc683d0e9dd1f116ea0dfb0c881}{URE\_EN\_ALDPS}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02017}02017         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02018}02018                 \mbox{\hyperlink{if__ure_8c_aea222f22768b87388e9660ba11f63396}{ure\_ocp\_reg\_write}}(sc, \mbox{\hyperlink{if__urereg_8h_a261bae1856e92f2c68745cd3d9ba5af0}{URE\_OCP\_ALDPS\_CONFIG}}, \mbox{\hyperlink{if__urereg_8h_a545290bda99c5963c4b6646dc37a69c6}{URE\_ENPDNPS}} | \mbox{\hyperlink{if__urereg_8h_aebcf0d274199915c02a23299fa27d437}{URE\_LINKENA}} |}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02019}02019                         \mbox{\hyperlink{if__urereg_8h_a8cbb9f93e8c5ebfe70f35b2998a82510}{URE\_DIS\_SDSAVE}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02020}02020                 \textcolor{keywordflow}{for} (i = 0; i < 20; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02021}02021                         \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 1000);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02022}02022                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, 0xe000) \& 0x0100)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02023}02023                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02024}02024                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02025}02025         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02026}02026 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02027}02027 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02028}02028 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02029}\mbox{\hyperlink{if__ure_8c_abbc725fc5104d9ef52d92ea8734bd54d}{02029}} \mbox{\hyperlink{if__ure_8c_abbc725fc5104d9ef52d92ea8734bd54d}{ure\_phy\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc, uint16\_t desired)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02030}02030 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02031}02031         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02032}02032         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02033}02033 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02034}02034         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02035}02035                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__ure_8c_a3256ac2ba9154acb614200d4977890ff}{ure\_ocp\_reg\_read}}(sc, \mbox{\hyperlink{if__urereg_8h_a5b6dc5c9153ad25e795c816c29082c79}{URE\_OCP\_PHY\_STATUS}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02036}02036                     \mbox{\hyperlink{if__urereg_8h_a5914aa3402f70d37f016e076a000390d}{URE\_PHY\_STAT\_MASK}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02037}02037                 \textcolor{keywordflow}{if} (desired) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02038}02038                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} == desired)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02039}02039                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02040}02040                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02041}02041                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} == \mbox{\hyperlink{if__urereg_8h_a5cf92adbd3b51a9c479cab15897ac9a3}{URE\_PHY\_STAT\_LAN\_ON}} ||}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02042}02042                                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} == \mbox{\hyperlink{if__urereg_8h_a5327801f5ae8199eba99fdb2e8734db3}{URE\_PHY\_STAT\_PWRDN}} ||}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02043}02043                             \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} == \mbox{\hyperlink{if__urereg_8h_ad834f9e731639d78d8051a71c8ce276e}{URE\_PHY\_STAT\_EXT\_INIT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02044}02044                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02045}02045                 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02046}02046                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02047}02047         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02048}02048         \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02049}02049                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02050}02050                     \textcolor{stringliteral}{"{}timeout waiting for phy to stabilize\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02051}02051 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02052}02052         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02053}02053 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02054}02054 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02055}02055 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02056}\mbox{\hyperlink{if__ure_8c_a432929462a103eba6dc31d3f715ccd9b}{02056}} \mbox{\hyperlink{if__ure_8c_a432929462a103eba6dc31d3f715ccd9b}{ure\_rtl8152\_nic\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structure__softc}{ure\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02057}02057 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02058}02058         uint32\_t rx\_fifo1, rx\_fifo2;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02059}02059         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02060}02060 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02061}02061         \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a2d405924e27d0d96ea809bc3fc04459f}{URE\_PLA\_MISC\_1}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a12e81780f4f37333f813e90569b508f4}{URE\_RXDY\_GATED\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02062}02062 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02063}02063         \mbox{\hyperlink{if__ure_8c_a32cf9bad386006ebbf7d9fb8dd1b3f5e}{ure\_disable\_teredo}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02064}02064 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02065}02065         \mbox{\hyperlink{if__ure_8c_a913a0d090ca3f7968a5ee85ac9baf85a}{DEVPRINTFN}}(14, sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}rtl8152\_nic\_reset: RCR: \%\#x\(\backslash\)n"{}}, \mbox{\hyperlink{if__ure_8c_aa1481b9bce219ce2146ceb7d735215d6}{ure\_read\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a79c21b195c49533aa2e5adad2000249f}{URE\_PLA\_RCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}));}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02066}02066         \mbox{\hyperlink{if__ure_8c_a9832745d6519d1506fa0953b4ece8d1c}{URE\_CLRBIT\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a79c21b195c49533aa2e5adad2000249f}{URE\_PLA\_RCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a24d0055b99658737206888b08185cda6}{URE\_RCR\_ACPT\_ALL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02067}02067 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02068}02068         \mbox{\hyperlink{if__ure_8c_ab00be5b3fae45b4e1f2b50f555cdb6c8}{ure\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02069}02069 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02070}02070         \mbox{\hyperlink{if__ure_8c_a8e045dfbe4feaf414e313cbafd4e6cac}{ure\_write\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_a0f44e45a77a1120a8245376bf27fcf68}{URE\_PLA\_CR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, 0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02071}02071 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02072}02072         \mbox{\hyperlink{if__ure_8c_a7d61b0942e735d32437588b979816330}{URE\_CLRBIT\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_ae045c058aed91e42b0c5f6c3cb8277e1}{URE\_PLA\_OOB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a75e6d636d5f19f6203a3f6f1d8e7b2fd}{URE\_NOW\_IS\_OOB}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02073}02073 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02074}02074         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ab803a6054f28e4490ad41b7cdeb40221}{URE\_PLA\_SFF\_STS\_7}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_aa8a9d0357e950047f2d70c6b2971eb99}{URE\_MCU\_BORW\_EN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02075}02075         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02076}02076                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_ae045c058aed91e42b0c5f6c3cb8277e1}{URE\_PLA\_OOB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02077}02077                     \mbox{\hyperlink{if__urereg_8h_a59f0267165703cc42ac23cac5cf31c7d}{URE\_LINK\_LIST\_READY}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02078}02078                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02079}02079                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02080}02080         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02081}02081         \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02082}02082                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02083}02083                     \textcolor{stringliteral}{"{}timeout waiting for OOB control\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02084}02084         \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_ab803a6054f28e4490ad41b7cdeb40221}{URE\_PLA\_SFF\_STS\_7}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a9be4e4397720c445b6a933c458cb2f20}{URE\_RE\_INIT\_LL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02085}02085         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02086}02086                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__ure_8c_aa9b5ef506bb66d08fef718cae0acd3c2}{ure\_read\_1}}(sc, \mbox{\hyperlink{if__urereg_8h_ae045c058aed91e42b0c5f6c3cb8277e1}{URE\_PLA\_OOB\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}) \&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02087}02087                     \mbox{\hyperlink{if__urereg_8h_a59f0267165703cc42ac23cac5cf31c7d}{URE\_LINK\_LIST\_READY}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02088}02088                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02089}02089                 \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02090}02090         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02091}02091         \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{if__urereg_8h_ad7578905443573fba1276927f8835074}{URE\_TIMEOUT}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02092}02092                 device\_printf(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02093}02093                     \textcolor{stringliteral}{"{}timeout waiting for OOB control\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02094}02094 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02095}02095         \mbox{\hyperlink{if__ure_8c_a2dec3559b5f3c3b332fb876de578dcd4}{URE\_CLRBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a7b5e24db24de8ef40e872ad300d49e74}{URE\_PLA\_CPCR}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a8ff56cef84b01f140c432aea7d04021e}{URE\_CPCR\_RX\_VLAN}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02096}02096 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02097}02097         \mbox{\hyperlink{if__ure_8c_a0590ffde4befeb362ed6d4864666a765}{URE\_SETBIT\_2}}(sc, \mbox{\hyperlink{if__urereg_8h_a6b6976df128fae2b9f99654d793f122b}{URE\_PLA\_TCR0}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, \mbox{\hyperlink{if__urereg_8h_a2e7c1938caa265483a6122a99fefd99f}{URE\_TCR0\_AUTO\_FIFO}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02098}02098 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02099}02099         \textcolor{comment}{/* Configure Rx FIFO threshold. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02100}02100         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_ae54f16df9277c1879c3dc2add34a7f89}{URE\_PLA\_RXFIFO\_CTRL0}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02101}02101             \mbox{\hyperlink{if__urereg_8h_adc4559de4cdfbb8cce92b50960797a0e}{URE\_RXFIFO\_THR1\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02102}02102         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(sc-\/>\mbox{\hyperlink{structure__softc_aafcf6066ce91eb545ffec3a7d7b04917}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}}) == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa0f17d0b9928086c6114fea73e08f1780}{USB\_SPEED\_FULL}}) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02103}02103                 rx\_fifo1 = \mbox{\hyperlink{if__urereg_8h_ad992862dacf1fca59b657f31e83e1aa3}{URE\_RXFIFO\_THR2\_FULL}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02104}02104                 rx\_fifo2 = \mbox{\hyperlink{if__urereg_8h_af9091bde81dbe50a9dd4535859f1a6e1}{URE\_RXFIFO\_THR3\_FULL}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02105}02105         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02106}02106                 rx\_fifo1 = \mbox{\hyperlink{if__urereg_8h_a7bbf63388cdec68232e129b78def3a94}{URE\_RXFIFO\_THR2\_HIGH}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02107}02107                 rx\_fifo2 = \mbox{\hyperlink{if__urereg_8h_a3b3ad3b67de8ee196a7cf390381047d1}{URE\_RXFIFO\_THR3\_HIGH}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02108}02108         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02109}02109         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a194b573a4c0f4891e94d9fd6de908de2}{URE\_PLA\_RXFIFO\_CTRL1}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, rx\_fifo1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02110}02110         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a9197b40ef68d077e1859313c2457275e}{URE\_PLA\_RXFIFO\_CTRL2}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}}, rx\_fifo2);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02111}02111 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02112}02112         \textcolor{comment}{/* Configure Tx FIFO threshold. */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02113}02113         \mbox{\hyperlink{if__ure_8c_ac2f88184be0834d3e6b5737eb662000c}{ure\_write\_4}}(sc, \mbox{\hyperlink{if__urereg_8h_a60a9341fe4015d5c541540898b6b9d74}{URE\_PLA\_TXFIFO\_CTRL}}, \mbox{\hyperlink{if__urereg_8h_a88edd983ace827a0aa3f63dc17d7546a}{URE\_MCU\_TYPE\_PLA}},}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02114}02114             \mbox{\hyperlink{if__urereg_8h_a0e616163569a32ec882298a84c146c08}{URE\_TXFIFO\_THR\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02115}02115 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02116}02116 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02117}02117 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02118}02118 \textcolor{comment}{ * Update mbuf for rx checksum from hardware}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02119}02119 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02120}02120 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02121}\mbox{\hyperlink{if__ure_8c_a3dca4b12b0a5b2cdf3046f7d0a6ca371}{02121}} \mbox{\hyperlink{if__ure_8c_a3dca4b12b0a5b2cdf3046f7d0a6ca371}{ure\_rxcsum}}(\textcolor{keywordtype}{int} capenb, \textcolor{keyword}{struct} \mbox{\hyperlink{structure__rxpkt}{ure\_rxpkt}} *rp, \textcolor{keyword}{struct} mbuf *m)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02122}02122 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02123}02123         \textcolor{keywordtype}{int} flags;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02124}02124         uint32\_t csum, misc;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02125}02125         \textcolor{keywordtype}{int} tcp, udp;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02126}02126 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02127}02127         m-\/>m\_pkthdr.csum\_flags = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02128}02128 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02129}02129         \textcolor{keywordflow}{if} (!(capenb \& IFCAP\_RXCSUM))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02130}02130                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02131}02131 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02132}02132         csum = le32toh(rp-\/>\mbox{\hyperlink{structure__rxpkt_a3fbb214eaacc632bd2a5aa42422012c6}{ure\_csum}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02133}02133         misc = le32toh(rp-\/>\mbox{\hyperlink{structure__rxpkt_a05bf4a672230204faf79064a09d6207d}{ure\_misc}});}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02134}02134 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02135}02135         tcp = udp = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02136}02136 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02137}02137         flags = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02138}02138         \textcolor{keywordflow}{if} (csum \& \mbox{\hyperlink{if__urereg_8h_a1fe5952281f36219e64ccf4202dbfe87}{URE\_RXPKT\_IPV4\_CS}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02139}02139                 flags |= CSUM\_IP\_CHECKED;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02140}02140         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (csum \& \mbox{\hyperlink{if__urereg_8h_a86c159f45feba04ff9934048d65a28a6}{URE\_RXPKT\_IPV6\_CS}})}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02141}02141                 flags = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02142}02142 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02143}02143         tcp = rp-\/>\mbox{\hyperlink{structure__rxpkt_a3fbb214eaacc632bd2a5aa42422012c6}{ure\_csum}} \& \mbox{\hyperlink{if__urereg_8h_afd498c7cc1c9427add2a168f83c6e3df}{URE\_RXPKT\_TCP\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02144}02144         udp = rp-\/>\mbox{\hyperlink{structure__rxpkt_a3fbb214eaacc632bd2a5aa42422012c6}{ure\_csum}} \& \mbox{\hyperlink{if__urereg_8h_a56433b09f71b7112b044aba2cc65d941}{URE\_RXPKT\_UDP\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02145}02145 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02146}02146         \textcolor{keywordflow}{if} (\_\_predict\_true((flags \& CSUM\_IP\_CHECKED) \&\&}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02147}02147             !(misc \& \mbox{\hyperlink{if__urereg_8h_a6a03a549c84fc53866894165ca474d7f}{URE\_RXPKT\_IP\_F}}))) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02148}02148                 flags |= CSUM\_IP\_VALID;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02149}02149         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02150}02150         \textcolor{keywordflow}{if} (\_\_predict\_true(}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02151}02151             (tcp \&\& !(misc \& \mbox{\hyperlink{if__urereg_8h_a38c7c2744986dbdeb1a839c09bb65976}{URE\_RXPKT\_TCP\_F}})) ||}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02152}02152             (udp \&\& !(misc \& \mbox{\hyperlink{if__urereg_8h_abf8746292efca35ed171ec26037096c6}{URE\_RXPKT\_UDP\_F}})))) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02153}02153                 flags |= CSUM\_DATA\_VALID|CSUM\_PSEUDO\_HDR;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02154}02154                 m-\/>m\_pkthdr.csum\_data = 0xFFFF;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02155}02155         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02156}02156 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02157}02157         m-\/>m\_pkthdr.csum\_flags = flags;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02158}02158 \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02159}02159 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02160}02160 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02161}02161 \textcolor{comment}{ * If the L4 checksum offset is larger than 0x7ff (2047), return failure.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02162}02162 \textcolor{comment}{ * We currently restrict MTU such that it can't happen, and even if we}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02163}02163 \textcolor{comment}{ * did have a large enough MTU, only a very specially crafted IPv6 packet}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02164}02164 \textcolor{comment}{ * with MANY headers could possibly come close.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02165}02165 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02166}02166 \textcolor{comment}{ * Returns 0 for success, and 1 if the packet cannot be checksummed and}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02167}02167 \textcolor{comment}{ * should be dropped.}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02168}02168 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02169}02169 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02170}\mbox{\hyperlink{if__ure_8c_ac5f1e7f9c2e02e42d05b97d9cdea6f2a}{02170}} \mbox{\hyperlink{if__ure_8c_ac5f1e7f9c2e02e42d05b97d9cdea6f2a}{ure\_txcsum}}(\textcolor{keyword}{struct} mbuf *m, \textcolor{keywordtype}{int} caps, uint32\_t *regout)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02171}02171 \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02172}02172         \textcolor{keyword}{struct }ip ip;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02173}02173         \textcolor{keyword}{struct }ether\_header *eh;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02174}02174         \textcolor{keywordtype}{int} flags;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02175}02175         uint32\_t data;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02176}02176         uint32\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02177}02177         \textcolor{keywordtype}{int} l3off, l4off;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02178}02178         uint16\_t type;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02179}02179 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02180}02180         *regout = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02181}02181         flags = m-\/>m\_pkthdr.csum\_flags;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02182}02182         \textcolor{keywordflow}{if} (flags == 0)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02183}02183                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02184}02184 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02185}02185         \textcolor{keywordflow}{if} (\_\_predict\_true(m-\/>m\_len >= (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(*eh))) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02186}02186                 eh = mtod(m, \textcolor{keyword}{struct} ether\_header *);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02187}02187                 type = eh-\/>ether\_type;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02188}02188         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02189}02189                 m\_copydata(m, offsetof(\textcolor{keyword}{struct} ether\_header, ether\_type),}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02190}02190                     \textcolor{keyword}{sizeof}(type), (caddr\_t)\&type);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02191}02191 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02192}02192         \textcolor{keywordflow}{switch} (type = htons(type)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02193}02193         \textcolor{keywordflow}{case} ETHERTYPE\_IP:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02194}02194         \textcolor{keywordflow}{case} ETHERTYPE\_IPV6:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02195}02195                 l3off = ETHER\_HDR\_LEN;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02196}02196                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02197}02197         \textcolor{keywordflow}{case} ETHERTYPE\_VLAN:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02198}02198                 \textcolor{comment}{/* XXX -\/ what about QinQ? */}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02199}02199                 l3off = ETHER\_HDR\_LEN + ETHER\_VLAN\_ENCAP\_LEN;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02200}02200                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02201}02201         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02202}02202                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02203}02203         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02204}02204 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02205}02205         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} = 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02206}02206 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02207}02207         \textcolor{keywordflow}{if} (flags \& CSUM\_IP)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02208}02208                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_ab2938b7df541f88314e9a9a3aa67d593}{URE\_TXPKT\_IPV4\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02209}02209 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02210}02210         data = m-\/>m\_pkthdr.csum\_data;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02211}02211         \textcolor{keywordflow}{if} (flags \& (CSUM\_IP\_TCP | CSUM\_IP\_UDP)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02212}02212                 m\_copydata(m, l3off, \textcolor{keyword}{sizeof} ip, (caddr\_t)\&ip);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02213}02213                 l4off = l3off + (ip.ip\_hl << 2) + data;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02214}02214                 \textcolor{keywordflow}{if} (\_\_predict\_false(l4off > \mbox{\hyperlink{if__urereg_8h_a14a5163b349fb46154e4ad3a022ee59b}{URE\_L4\_OFFSET\_MAX}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02215}02215                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02216}02216 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02217}02217                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_ab2938b7df541f88314e9a9a3aa67d593}{URE\_TXPKT\_IPV4\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02218}02218                 \textcolor{keywordflow}{if} (flags \& CSUM\_IP\_TCP)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02219}02219                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_a0837d763daccbb663c4071fd3aa74aff}{URE\_TXPKT\_TCP\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02220}02220                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (flags \& CSUM\_IP\_UDP)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02221}02221                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_a541087c864b06ad9ce2ae487aacf97c2}{URE\_TXPKT\_UDP\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02222}02222                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= l4off << \mbox{\hyperlink{if__urereg_8h_aba3c6614de09103b618400f2c26ad585}{URE\_L4\_OFFSET\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02223}02223         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02224}02224 \textcolor{preprocessor}{\#ifdef INET6}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02225}02225         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (flags \& (CSUM\_IP6\_TCP | CSUM\_IP6\_UDP)) \{}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02226}02226                 l4off = l3off + data;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02227}02227                 \textcolor{keywordflow}{if} (\_\_predict\_false(l4off > \mbox{\hyperlink{if__urereg_8h_a14a5163b349fb46154e4ad3a022ee59b}{URE\_L4\_OFFSET\_MAX}}))}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02228}02228                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02229}02229 }
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02230}02230                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_ab26c06b25b3e7c90d253fb5f258d1f2a}{URE\_TXPKT\_IPV6\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02231}02231                 \textcolor{keywordflow}{if} (flags \& CSUM\_IP6\_TCP)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02232}02232                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_a0837d763daccbb663c4071fd3aa74aff}{URE\_TXPKT\_TCP\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02233}02233                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (flags \& CSUM\_IP6\_UDP)}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02234}02234                         \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= \mbox{\hyperlink{if__urereg_8h_a541087c864b06ad9ce2ae487aacf97c2}{URE\_TXPKT\_UDP\_CS}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02235}02235                 \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}} |= l4off << \mbox{\hyperlink{if__urereg_8h_aba3c6614de09103b618400f2c26ad585}{URE\_L4\_OFFSET\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02236}02236         \}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02237}02237 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02238}02238         *regout = \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}};}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02239}02239         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{if__ure_8c_source_l02240}02240 \}}

\end{DoxyCode}
