\hypertarget{if__axge_8c_source}{}\doxysection{if\+\_\+axge.\+c}
\label{if__axge_8c_source}\index{dev/usb/net/if\_axge.c@{dev/usb/net/if\_axge.c}}
\mbox{\hyperlink{if__axge_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2013-\/2014 Kevin Lo}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00030}\mbox{\hyperlink{if__axge_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{if__axge_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00032}00032 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00033}00033 \textcolor{comment}{ * ASIX Electronics AX88178A/AX88179 USB 2.0/3.0 gigabit ethernet driver.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00034}00034 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <dev/mii/mii.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <dev/mii/miivar.h>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00059}00059 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00061}\mbox{\hyperlink{if__axge_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00061}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR   axge\_debug}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__ethernet_8h}{dev/usb/net/usb\_ethernet.h}}>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__axgereg_8h}{dev/usb/net/if\_axgereg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00068}00068 \textcolor{preprocessor}{\#include "{}miibus\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00070}00070 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00071}00071 \textcolor{comment}{ * Various supported device vendors/products.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00072}00072 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00074}\mbox{\hyperlink{if__axge_8c_aa8737fb45d8a852de50be58c18ec99d3}{00074}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{if__axge_8c_aa8737fb45d8a852de50be58c18ec99d3}{axge\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00075}00075 \textcolor{preprocessor}{\#define AXGE\_DEV(v,p) \{ USB\_VP(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p) \}}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00076}00076         \mbox{\hyperlink{if__axge_8c_a613f6aa4c24aad020f34118cee529f82}{AXGE\_DEV}}(ASIX, AX88178A),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00077}00077         \mbox{\hyperlink{if__axge_8c_a613f6aa4c24aad020f34118cee529f82}{AXGE\_DEV}}(ASIX, AX88179),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00078}00078         \mbox{\hyperlink{if__axge_8c_a613f6aa4c24aad020f34118cee529f82}{AXGE\_DEV}}(BELKIN, B2B128),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00079}00079         \mbox{\hyperlink{if__axge_8c_a613f6aa4c24aad020f34118cee529f82}{AXGE\_DEV}}(DLINK, DUB1312),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00080}00080         \mbox{\hyperlink{if__axge_8c_a613f6aa4c24aad020f34118cee529f82}{AXGE\_DEV}}(LENOVO, GIGALAN),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00081}00081         \mbox{\hyperlink{if__axge_8c_a613f6aa4c24aad020f34118cee529f82}{AXGE\_DEV}}(SITECOMEU, LN032),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00082}00082 \textcolor{preprocessor}{\#undef AXGE\_DEV}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00083}00083 \};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00085}00085 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00086}\mbox{\hyperlink{if__axge_8c_a4c56f2979393f841cffb950a90315e82}{00086}}         uint8\_t \mbox{\hyperlink{if__axge_8c_a4c56f2979393f841cffb950a90315e82}{ctrl}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00087}\mbox{\hyperlink{if__axge_8c_a507135190ab9dcba854db93ce8ccede6}{00087}}         uint8\_t \mbox{\hyperlink{if__axge_8c_a507135190ab9dcba854db93ce8ccede6}{timer\_l}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00088}\mbox{\hyperlink{if__axge_8c_a008918cce16c7db4001e03180371e016}{00088}}         uint8\_t \mbox{\hyperlink{if__axge_8c_a008918cce16c7db4001e03180371e016}{timer\_h}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00089}\mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{00089}}         uint8\_t \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00090}\mbox{\hyperlink{if__axge_8c_a9a9757012660da997600df62655c9a8a}{00090}}         uint8\_t \mbox{\hyperlink{if__axge_8c_a9a9757012660da997600df62655c9a8a}{ifg}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00091}00091 \} \mbox{\hyperlink{struct____packed}{\_\_packed}} \mbox{\hyperlink{if__axge_8c_a9792c3fdd0cd4d4beca6399d7f311cf4}{axge\_bulk\_size}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00092}00092         \{ 7, 0x4f, 0x00, 0x12, 0xff \},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00093}00093         \{ 7, 0x20, 0x03, 0x16, 0xff \},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00094}00094         \{ 7, 0xae, 0x07, 0x18, 0xff \},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00095}00095         \{ 7, 0xcc, 0x4c, 0x18, 0x08 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00096}\mbox{\hyperlink{if__axge_8c_a9792c3fdd0cd4d4beca6399d7f311cf4}{00096}} \};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00098}00098 \textcolor{comment}{/* prototypes */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00100}\mbox{\hyperlink{if__axge_8c_a85589d81e42d4e080e785ba7fa61789b}{00100}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{if__axge_8c_a85589d81e42d4e080e785ba7fa61789b}{axge\_probe}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00101}\mbox{\hyperlink{if__axge_8c_ab0cae50eb23fac346ae6084de0da562b}{00101}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{if__axge_8c_ab0cae50eb23fac346ae6084de0da562b}{axge\_attach}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00102}\mbox{\hyperlink{if__axge_8c_a86a6f60c433f4bf983212c117628e028}{00102}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{if__axge_8c_a86a6f60c433f4bf983212c117628e028}{axge\_detach}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00104}\mbox{\hyperlink{if__axge_8c_ac1f0a59329164c2de345493b8f42e40d}{00104}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__axge_8c_ac1f0a59329164c2de345493b8f42e40d}{axge\_bulk\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00105}\mbox{\hyperlink{if__axge_8c_a1316858337f2b006982c408b778a04b8}{00105}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__axge_8c_a1316858337f2b006982c408b778a04b8}{axge\_bulk\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00107}\mbox{\hyperlink{if__axge_8c_aad4662d7b50026da0ee10015cdf7c752}{00107}} \textcolor{keyword}{static} miibus\_readreg\_t \mbox{\hyperlink{if__axge_8c_aad4662d7b50026da0ee10015cdf7c752}{axge\_miibus\_readreg}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00108}\mbox{\hyperlink{if__axge_8c_a38319a994bc0dff99c2fefb905fadb3c}{00108}} \textcolor{keyword}{static} miibus\_writereg\_t \mbox{\hyperlink{if__axge_8c_a38319a994bc0dff99c2fefb905fadb3c}{axge\_miibus\_writereg}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00109}\mbox{\hyperlink{if__axge_8c_ad2ac3a33dcecc2669fc316e5dec87800}{00109}} \textcolor{keyword}{static} miibus\_statchg\_t \mbox{\hyperlink{if__axge_8c_ad2ac3a33dcecc2669fc316e5dec87800}{axge\_miibus\_statchg}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00111}\mbox{\hyperlink{if__axge_8c_abf7ab0a7841f5db93e73c686544dfd07}{00111}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__axge_8c_abf7ab0a7841f5db93e73c686544dfd07}{axge\_attach\_post}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00112}\mbox{\hyperlink{if__axge_8c_a64e90842434e21a47826252107809940}{00112}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__axge_8c_a64e90842434e21a47826252107809940}{axge\_init}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00113}\mbox{\hyperlink{if__axge_8c_a5c25b4497a8c97b7819feb7f254d2f8f}{00113}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__axge_8c_a5c25b4497a8c97b7819feb7f254d2f8f}{axge\_stop}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00114}\mbox{\hyperlink{if__axge_8c_a3c1f9f95e8e21a81ff2c8e374f60eb1f}{00114}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__axge_8c_a3c1f9f95e8e21a81ff2c8e374f60eb1f}{axge\_start}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00115}\mbox{\hyperlink{if__axge_8c_a7f3c8948e776ec88feca53993e4f57db}{00115}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__axge_8c_a7f3c8948e776ec88feca53993e4f57db}{axge\_tick}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00116}\mbox{\hyperlink{if__axge_8c_a3b3b79a0c0127e37e5ea222e15524d5a}{00116}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__axge_8c_a3b3b79a0c0127e37e5ea222e15524d5a}{axge\_rxfilter}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00118}00118 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__axge_8c_aacce82bae6bdd425f4a53253b7f6bfda}{axge\_read\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *, uint8\_t, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00119}00119                     uint16\_t, \textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00120}00120 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_ac9fc4d76ee467e036365b195599b2817}{axge\_write\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *, uint8\_t, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00121}00121                     uint16\_t, \textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00122}00122 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{if__axge_8c_a452d327f3e7bf2871f9698146868902f}{axge\_read\_cmd\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *, uint8\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00123}00123 \textcolor{keyword}{static} uint16\_t \mbox{\hyperlink{if__axge_8c_a6f02dca0f2e019e9343ade16c60752e4}{axge\_read\_cmd\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *, uint8\_t, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00124}00124                     uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00125}00125 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *, uint8\_t, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00126}00126                     uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00127}00127 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *, uint8\_t, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00128}00128                     uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00129}00129 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_afdfd08f2f22b1ded583e562ed4ff9b55}{axge\_chip\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00130}00130 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_ac6c7c4b18b995ecb2c094bb218dfd321}{axge\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00132}00132 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__axge_8c_a590eb46b5d24dc140871228c7a6382fd}{axge\_attach\_post\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00133}00133 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__axge_8c_a473a954a767b74691f9531199290d9ee}{axge\_ifmedia\_upd}}(\textcolor{keyword}{struct} ifnet *);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00134}00134 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_a22c2b283300ffac25d0ff4ea5b34f151}{axge\_ifmedia\_sts}}(\textcolor{keyword}{struct} ifnet *, \textcolor{keyword}{struct} ifmediareq *);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00135}00135 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__axge_8c_a6a90d2f40ba72d4b82b761bed06bd61f}{axge\_ioctl}}(\textcolor{keyword}{struct} ifnet *, u\_long, caddr\_t);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00136}00136 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_a12754d96dee773ff7d996b30036e3005}{axge\_rx\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00137}00137 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_a0a8e1b62c2d59babc4f14f2f80ff0527}{axge\_rxeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00138}00138                     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int}, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int}, uint32\_t);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00139}00139 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__axge_8c_a3551550c969dfaee2be55e43b20f6d78}{axge\_csum\_cfg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00141}\mbox{\hyperlink{if__axge_8c_a9d8a034ffed765d99894bdaae4ae4677}{00141}} \textcolor{preprocessor}{\#define AXGE\_CSUM\_FEATURES      (CSUM\_IP | CSUM\_TCP | CSUM\_UDP)}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00143}00143 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00144}00144 \textcolor{keyword}{static} \textcolor{keywordtype}{int} axge\_debug = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00146}00146 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, axge, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00147}00147     \textcolor{stringliteral}{"{}USB axge"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00148}00148 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_axge, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN, \&axge\_debug, 0,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00149}00149     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00150}00150 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00151}00151 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00152}\mbox{\hyperlink{if__axge_8c_a465ce39593bad0051e81e327589cf24f}{00152}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{if__axge_8c_a465ce39593bad0051e81e327589cf24f}{axge\_config}}[\mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181faa6c5203b78381b98a8bed51afd3c030e}{AXGE\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00153}00153         [\mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181facc5ebf4d3322615805e307e2168eb7a3}{AXGE\_BULK\_DT\_WR}}] = \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00154}00154                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00155}00155                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00156}00156                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00157}00157                 .frames = \mbox{\hyperlink{if__axgereg_8h_a3287a0bb58580824a4bd6c38d77c23d8}{AXGE\_N\_FRAMES}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00158}00158                 .bufsize = \mbox{\hyperlink{if__axgereg_8h_a3287a0bb58580824a4bd6c38d77c23d8}{AXGE\_N\_FRAMES}} * MCLBYTES,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00159}00159                 .flags = \{.pipe\_bof = 1,.force\_short\_xfer = 1,\},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00160}00160                 .callback = \mbox{\hyperlink{if__axge_8c_a1316858337f2b006982c408b778a04b8}{axge\_bulk\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00161}00161                 .timeout = 10000,       \textcolor{comment}{/* 10 seconds */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00162}00162         \},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00163}00163         [\mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181faa608bb2fc61c9e57a53ed9752670a206}{AXGE\_BULK\_DT\_RD}}] = \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00164}00164                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00165}00165                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00166}00166                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00167}00167                 .bufsize = 65536,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00168}00168                 .flags = \{.pipe\_bof = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00169}00169                 .callback = \mbox{\hyperlink{if__axge_8c_ac1f0a59329164c2de345493b8f42e40d}{axge\_bulk\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00170}00170                 .timeout = 0,           \textcolor{comment}{/* no timeout */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00171}00171         \},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00172}00172 \};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00173}00173 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00174}\mbox{\hyperlink{if__axge_8c_a13ebbbbb85bf9394336db7663b3952c8}{00174}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{if__axge_8c_a13ebbbbb85bf9394336db7663b3952c8}{axge\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00175}00175         \textcolor{comment}{/* Device interface. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00176}00176         DEVMETHOD(device\_probe,         \mbox{\hyperlink{if__axge_8c_a85589d81e42d4e080e785ba7fa61789b}{axge\_probe}}),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00177}00177         DEVMETHOD(device\_attach,        \mbox{\hyperlink{if__axge_8c_ab0cae50eb23fac346ae6084de0da562b}{axge\_attach}}),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00178}00178         DEVMETHOD(device\_detach,        \mbox{\hyperlink{if__axge_8c_a86a6f60c433f4bf983212c117628e028}{axge\_detach}}),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00180}00180         \textcolor{comment}{/* MII interface. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00181}00181         DEVMETHOD(miibus\_readreg,       \mbox{\hyperlink{if__axge_8c_aad4662d7b50026da0ee10015cdf7c752}{axge\_miibus\_readreg}}),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00182}00182         DEVMETHOD(miibus\_writereg,      \mbox{\hyperlink{if__axge_8c_a38319a994bc0dff99c2fefb905fadb3c}{axge\_miibus\_writereg}}),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00183}00183         DEVMETHOD(miibus\_statchg,       \mbox{\hyperlink{if__axge_8c_ad2ac3a33dcecc2669fc316e5dec87800}{axge\_miibus\_statchg}}),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00185}00185         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00186}00186 \};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00188}\mbox{\hyperlink{if__axge_8c_a6ad71966cec5cf6642ac725c5e756985}{00188}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{if__axge_8c_a6ad71966cec5cf6642ac725c5e756985}{axge\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00189}00189         .name = \textcolor{stringliteral}{"{}axge"{}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00190}00190         .methods = \mbox{\hyperlink{if__axge_8c_a13ebbbbb85bf9394336db7663b3952c8}{axge\_methods}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00191}00191         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}}),}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00192}00192 \};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00194}\mbox{\hyperlink{if__axge_8c_aec8ec1abda8056c5a73131036cb9f054}{00194}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{if__axge_8c_aec8ec1abda8056c5a73131036cb9f054}{axge\_devclass}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00195}00195 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00196}\mbox{\hyperlink{if__axge_8c_a81eb9665d31b09a9ff4cda0f0e9dbb8f}{00196}} \mbox{\hyperlink{if__axge_8c_a81eb9665d31b09a9ff4cda0f0e9dbb8f}{DRIVER\_MODULE}}(axge, uhub, \mbox{\hyperlink{if__axge_8c_a6ad71966cec5cf6642ac725c5e756985}{axge\_driver}}, \mbox{\hyperlink{if__axge_8c_aec8ec1abda8056c5a73131036cb9f054}{axge\_devclass}}, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00197}\mbox{\hyperlink{if__axge_8c_a22a3eb8b52795d34051b238266540afb}{00197}} \mbox{\hyperlink{if__axge_8c_a81eb9665d31b09a9ff4cda0f0e9dbb8f}{DRIVER\_MODULE}}(miibus, axge, miibus\_driver, miibus\_devclass, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00198}\mbox{\hyperlink{if__axge_8c_a769c66093bac4902b2c9dd7a209d7bbd}{00198}} \mbox{\hyperlink{if__axge_8c_a769c66093bac4902b2c9dd7a209d7bbd}{MODULE\_DEPEND}}(axge, uether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00199}\mbox{\hyperlink{if__axge_8c_a351337d0f251381591f26ba0c79876c5}{00199}} \mbox{\hyperlink{if__axge_8c_a769c66093bac4902b2c9dd7a209d7bbd}{MODULE\_DEPEND}}(axge, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00200}\mbox{\hyperlink{if__axge_8c_aeedfee957f7d7abe9e8eda7d792bc04e}{00200}} \mbox{\hyperlink{if__axge_8c_a769c66093bac4902b2c9dd7a209d7bbd}{MODULE\_DEPEND}}(axge, ether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00201}\mbox{\hyperlink{if__axge_8c_a100cbfb833f242d0767df424b631515d}{00201}} \mbox{\hyperlink{if__axge_8c_a769c66093bac4902b2c9dd7a209d7bbd}{MODULE\_DEPEND}}(axge, miibus, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00202}\mbox{\hyperlink{if__axge_8c_aa9509206396889a9107bd1778db82e9a}{00202}} \mbox{\hyperlink{if__axge_8c_aa9509206396889a9107bd1778db82e9a}{MODULE\_VERSION}}(axge, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00203}\mbox{\hyperlink{if__axge_8c_a9242c929a847e7a90dbd3cea1c01021b}{00203}} \mbox{\hyperlink{if__axge_8c_a9242c929a847e7a90dbd3cea1c01021b}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{if__axge_8c_aa8737fb45d8a852de50be58c18ec99d3}{axge\_devs}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00205}\mbox{\hyperlink{if__axge_8c_a57e00a9ebc13df3214d63898303f832e}{00205}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether__methods}{usb\_ether\_methods}} \mbox{\hyperlink{if__axge_8c_a57e00a9ebc13df3214d63898303f832e}{axge\_ue\_methods}} = \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00206}00206         .\mbox{\hyperlink{structusb__ether__methods_a9568a90d86c68824b84eb6e5ccc7ebfc}{ue\_attach\_post}} = \mbox{\hyperlink{if__axge_8c_abf7ab0a7841f5db93e73c686544dfd07}{axge\_attach\_post}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00207}00207         .ue\_attach\_post\_sub = \mbox{\hyperlink{if__axge_8c_a590eb46b5d24dc140871228c7a6382fd}{axge\_attach\_post\_sub}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00208}00208         .ue\_start = \mbox{\hyperlink{if__axge_8c_a3c1f9f95e8e21a81ff2c8e374f60eb1f}{axge\_start}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00209}00209         .ue\_init = \mbox{\hyperlink{if__axge_8c_a64e90842434e21a47826252107809940}{axge\_init}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00210}00210         .ue\_stop = \mbox{\hyperlink{if__axge_8c_a5c25b4497a8c97b7819feb7f254d2f8f}{axge\_stop}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00211}00211         .ue\_tick = \mbox{\hyperlink{if__axge_8c_a7f3c8948e776ec88feca53993e4f57db}{axge\_tick}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00212}00212         .ue\_setmulti = \mbox{\hyperlink{if__axge_8c_a3b3b79a0c0127e37e5ea222e15524d5a}{axge\_rxfilter}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00213}00213         .ue\_setpromisc = \mbox{\hyperlink{if__axge_8c_a3b3b79a0c0127e37e5ea222e15524d5a}{axge\_rxfilter}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00214}00214         .ue\_mii\_upd = \mbox{\hyperlink{if__axge_8c_a473a954a767b74691f9531199290d9ee}{axge\_ifmedia\_upd}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00215}00215         .ue\_mii\_sts = \mbox{\hyperlink{if__axge_8c_a22c2b283300ffac25d0ff4ea5b34f151}{axge\_ifmedia\_sts}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00216}00216 \};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00218}00218 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00219}\mbox{\hyperlink{if__axge_8c_aacce82bae6bdd425f4a53253b7f6bfda}{00219}} \mbox{\hyperlink{if__axge_8c_aacce82bae6bdd425f4a53253b7f6bfda}{axge\_read\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc, uint8\_t cmd, uint16\_t index,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00220}00220     uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00221}00221 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00222}00222         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00224}00224         \mbox{\hyperlink{if__axgereg_8h_a678ac0daeee9d6575a8d651cdc8964c7}{AXGE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00226}00226         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00227}00227         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = cmd;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00228}00228         \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__axge_8c_source_l00229}00229         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, index);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00230}00230         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00232}00232         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf, 1000));}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00233}00233 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00235}00235 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00236}\mbox{\hyperlink{if__axge_8c_ac9fc4d76ee467e036365b195599b2817}{00236}} \mbox{\hyperlink{if__axge_8c_ac9fc4d76ee467e036365b195599b2817}{axge\_write\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc, uint8\_t cmd, uint16\_t index,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00237}00237     uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00238}00238 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00239}00239         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00241}00241         \mbox{\hyperlink{if__axgereg_8h_a678ac0daeee9d6575a8d651cdc8964c7}{AXGE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00243}00243         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00244}00244         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = cmd;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00245}00245         \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__axge_8c_source_l00246}00246         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, index);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00247}00247         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00249}00249         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf, 1000)) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00250}00250                 \textcolor{comment}{/* Error ignored. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00251}00251         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00252}00252 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00254}00254 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00255}\mbox{\hyperlink{if__axge_8c_a452d327f3e7bf2871f9698146868902f}{00255}} \mbox{\hyperlink{if__axge_8c_a452d327f3e7bf2871f9698146868902f}{axge\_read\_cmd\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc, uint8\_t cmd, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00256}00256 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00257}00257         uint8\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00259}00259         \mbox{\hyperlink{if__axge_8c_aacce82bae6bdd425f4a53253b7f6bfda}{axge\_read\_mem}}(sc, cmd, 1, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00260}00260         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00261}00261 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00263}00263 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00264}\mbox{\hyperlink{if__axge_8c_a6f02dca0f2e019e9343ade16c60752e4}{00264}} \mbox{\hyperlink{if__axge_8c_a6f02dca0f2e019e9343ade16c60752e4}{axge\_read\_cmd\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc, uint8\_t cmd, uint16\_t index,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00265}00265     uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00266}00266 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00267}00267         uint8\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}[2];}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00269}00269         \mbox{\hyperlink{if__axge_8c_aacce82bae6bdd425f4a53253b7f6bfda}{axge\_read\_mem}}(sc, cmd, index, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 2);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00270}00270         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}));}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00271}00271 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00272}00272 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00273}00273 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00274}\mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{00274}} \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc, uint8\_t cmd, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint8\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00275}00275 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00276}00276         \mbox{\hyperlink{if__axge_8c_ac9fc4d76ee467e036365b195599b2817}{axge\_write\_mem}}(sc, cmd, 1, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00277}00277 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00279}00279 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00280}\mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{00280}} \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc, uint8\_t cmd, uint16\_t index,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00281}00281     uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00282}00282 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00283}00283         uint8\_t temp[2];}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00285}00285         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(temp, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00286}00286         \mbox{\hyperlink{if__axge_8c_ac9fc4d76ee467e036365b195599b2817}{axge\_write\_mem}}(sc, cmd, index, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, \&temp, 2);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00287}00287 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00289}00289 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00290}\mbox{\hyperlink{if__axge_8c_a05a937cdbdd3ec39160828706619c06c}{00290}} \mbox{\hyperlink{if__axge_8c_aad4662d7b50026da0ee10015cdf7c752}{axge\_miibus\_readreg}}(device\_t dev, \textcolor{keywordtype}{int} phy, \textcolor{keywordtype}{int} \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00291}00291 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00292}00292         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00293}00293         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00294}00294         \textcolor{keywordtype}{int} locked;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00295}00295 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00296}00296         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00297}00297         locked = mtx\_owned(\&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00298}00298         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00299}00299                 \mbox{\hyperlink{if__axgereg_8h_a47c4ba899aa43c6fa7f4b8125194a5c6}{AXGE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00301}00301         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__axge_8c_a6f02dca0f2e019e9343ade16c60752e4}{axge\_read\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_a4542c7d7296fb284b9626277a0d2ccda}{AXGE\_ACCESS\_PHY}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, phy);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00302}00302 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00303}00303         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00304}00304                 \mbox{\hyperlink{if__axgereg_8h_a13ab3680a1b3e5a7d803d83449ae4e57}{AXGE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00306}00306         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00307}00307 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00309}00309 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00310}\mbox{\hyperlink{if__axge_8c_a2cd83f12d575186cdc839080ee5bed24}{00310}} \mbox{\hyperlink{if__axge_8c_a38319a994bc0dff99c2fefb905fadb3c}{axge\_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__axge_8c_source_l00311}00311 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00312}00312         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00313}00313         \textcolor{keywordtype}{int} locked;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00314}00314 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00315}00315         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00316}00316         locked = mtx\_owned(\&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00317}00317         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00318}00318                 \mbox{\hyperlink{if__axgereg_8h_a47c4ba899aa43c6fa7f4b8125194a5c6}{AXGE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00320}00320         \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_a4542c7d7296fb284b9626277a0d2ccda}{AXGE\_ACCESS\_PHY}}, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, phy, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00322}00322         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00323}00323                 \mbox{\hyperlink{if__axgereg_8h_a13ab3680a1b3e5a7d803d83449ae4e57}{AXGE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00324}00324 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00325}00325         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00326}00326 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00327}00327 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00328}00328 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00329}\mbox{\hyperlink{if__axge_8c_a739a62ad3424e812cfa0fc7d0800a1cd}{00329}} \mbox{\hyperlink{if__axge_8c_ad2ac3a33dcecc2669fc316e5dec87800}{axge\_miibus\_statchg}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00330}00330 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00331}00331         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00332}00332         \textcolor{keyword}{struct }mii\_data *mii;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00333}00333         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00334}00334         uint8\_t link\_status, tmp[5];}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00335}00335         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00336}00336         \textcolor{keywordtype}{int} locked;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00337}00337 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00338}00338         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00339}00339         mii = \mbox{\hyperlink{if__auereg_8h_adb491f9d26e8663f329b26e167f5edde}{GET\_MII}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00340}00340         locked = mtx\_owned(\&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00341}00341         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00342}00342                 \mbox{\hyperlink{if__axgereg_8h_a47c4ba899aa43c6fa7f4b8125194a5c6}{AXGE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00343}00343 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00344}00344         ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(\&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00345}00345         \textcolor{keywordflow}{if} (mii == NULL || ifp == NULL ||}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00346}00346             (ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING) == 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00347}00347                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00349}00349         sc-\/>\mbox{\hyperlink{structaxge__softc_ab0356c4f613f29eb4e3b9659b2bb18ba}{sc\_flags}} \&= \string~AXGE\_FLAG\_LINK;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00350}00350         \textcolor{keywordflow}{if} ((mii-\/>mii\_media\_status \& (IFM\_ACTIVE | IFM\_AVALID)) ==}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00351}00351             (IFM\_ACTIVE | IFM\_AVALID)) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00352}00352                 \textcolor{keywordflow}{switch} (IFM\_SUBTYPE(mii-\/>mii\_media\_active)) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00353}00353                 \textcolor{keywordflow}{case} IFM\_10\_T:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00354}00354                 \textcolor{keywordflow}{case} IFM\_100\_TX:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00355}00355                 \textcolor{keywordflow}{case} IFM\_1000\_T:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00356}00356                         sc-\/>\mbox{\hyperlink{structaxge__softc_ab0356c4f613f29eb4e3b9659b2bb18ba}{sc\_flags}} |= \mbox{\hyperlink{if__axgereg_8h_a7799793acb0cb0e9a16c24de71777373}{AXGE\_FLAG\_LINK}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00357}00357                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00358}00358                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00359}00359                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00360}00360                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00361}00361         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00362}00362 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00363}00363         \textcolor{comment}{/* Lost link, do nothing. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00364}00364         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structaxge__softc_ab0356c4f613f29eb4e3b9659b2bb18ba}{sc\_flags}} \& \mbox{\hyperlink{if__axgereg_8h_a7799793acb0cb0e9a16c24de71777373}{AXGE\_FLAG\_LINK}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00365}00365                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00366}00366 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00367}00367         link\_status = \mbox{\hyperlink{if__axge_8c_a452d327f3e7bf2871f9698146868902f}{axge\_read\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_aa570e9a8d30e6faa187b23d78b0496b3}{AXGE\_PLSR}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00368}00368 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00369}00369         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00370}00370         \textcolor{keywordflow}{if} ((IFM\_OPTIONS(mii-\/>mii\_media\_active) \& IFM\_FDX) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00371}00371                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__axgereg_8h_a28a2da59f3df3e8d8102984255f96564}{MSR\_FD}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00372}00372                 \textcolor{keywordflow}{if} ((IFM\_OPTIONS(mii-\/>mii\_media\_active) \& IFM\_ETH\_TXPAUSE) != 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00373}00373                         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__axgereg_8h_ac21c88aa29261c351277eb0b3ee776b3}{MSR\_TFC}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00374}00374                 \textcolor{keywordflow}{if} ((IFM\_OPTIONS(mii-\/>mii\_media\_active) \& IFM\_ETH\_RXPAUSE) != 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00375}00375                         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__axgereg_8h_a1770fb6e50fdd9de0e3cd5b5526509a9}{MSR\_RFC}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00376}00376         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00377}00377         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |=  \mbox{\hyperlink{if__axgereg_8h_a41e4e6c8f65bf3b74b8d3616a28f2249}{MSR\_RE}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00378}00378         \textcolor{keywordflow}{switch} (IFM\_SUBTYPE(mii-\/>mii\_media\_active)) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00379}00379         \textcolor{keywordflow}{case} IFM\_1000\_T:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00380}00380                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__axgereg_8h_a93767af6d9449097aaac018cf512a7aa}{MSR\_GM}} | \mbox{\hyperlink{if__axgereg_8h_a0b4e805ac0c2377eb1cc51139efb3d7c}{MSR\_EN\_125MHZ}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00381}00381                 \textcolor{keywordflow}{if} (link\_status \& \mbox{\hyperlink{if__axgereg_8h_a17c23fe2d7c60400e98e99c334a4e493}{PLSR\_USB\_SS}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00382}00382                         memcpy(tmp, \&\mbox{\hyperlink{if__axge_8c_a9792c3fdd0cd4d4beca6399d7f311cf4}{axge\_bulk\_size}}[0], 5);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00383}00383                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (link\_status \& \mbox{\hyperlink{if__axgereg_8h_a7181c80fb47b7ee67e9571a652ae5180}{PLSR\_USB\_HS}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00384}00384                         memcpy(tmp, \&\mbox{\hyperlink{if__axge_8c_a9792c3fdd0cd4d4beca6399d7f311cf4}{axge\_bulk\_size}}[1], 5);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00385}00385                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00386}00386                         memcpy(tmp, \&\mbox{\hyperlink{if__axge_8c_a9792c3fdd0cd4d4beca6399d7f311cf4}{axge\_bulk\_size}}[3], 5);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00387}00387                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00388}00388         \textcolor{keywordflow}{case} IFM\_100\_TX:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00389}00389                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__axgereg_8h_a327ae3ca8de7e11c2143bce78fa0c4b8}{MSR\_PS}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00390}00390                 \textcolor{keywordflow}{if} (link\_status \& (\mbox{\hyperlink{if__axgereg_8h_a17c23fe2d7c60400e98e99c334a4e493}{PLSR\_USB\_SS}} | \mbox{\hyperlink{if__axgereg_8h_a7181c80fb47b7ee67e9571a652ae5180}{PLSR\_USB\_HS}}))}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00391}00391                         memcpy(tmp, \&\mbox{\hyperlink{if__axge_8c_a9792c3fdd0cd4d4beca6399d7f311cf4}{axge\_bulk\_size}}[2], 5);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00392}00392                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00393}00393                         memcpy(tmp, \&\mbox{\hyperlink{if__axge_8c_a9792c3fdd0cd4d4beca6399d7f311cf4}{axge\_bulk\_size}}[3], 5);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00394}00394                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00395}00395         \textcolor{keywordflow}{case} IFM\_10\_T:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00396}00396                 memcpy(tmp, \&\mbox{\hyperlink{if__axge_8c_a9792c3fdd0cd4d4beca6399d7f311cf4}{axge\_bulk\_size}}[3], 5);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00397}00397                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00398}00398         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00399}00399         \textcolor{comment}{/* Rx bulk configuration. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00400}00400         \mbox{\hyperlink{if__axge_8c_ac9fc4d76ee467e036365b195599b2817}{axge\_write\_mem}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 5, \mbox{\hyperlink{if__axgereg_8h_a8ee2183cd83ab34e85bc0a461a1d40bc}{AXGE\_RX\_BULKIN\_QCTRL}}, tmp, 5);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00401}00401         \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_a4fb4a2a8ce590de9b2496e82cceaaf4c}{AXGE\_MSR}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00402}00402 done:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00403}00403         \textcolor{keywordflow}{if} (!locked)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00404}00404                 \mbox{\hyperlink{if__axgereg_8h_a13ab3680a1b3e5a7d803d83449ae4e57}{AXGE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00405}00405 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00407}00407 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00408}\mbox{\hyperlink{if__axge_8c_afdfd08f2f22b1ded583e562ed4ff9b55}{00408}} \mbox{\hyperlink{if__axge_8c_afdfd08f2f22b1ded583e562ed4ff9b55}{axge\_chip\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00409}00409 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00410}00410         \textcolor{comment}{/* Power up ethernet PHY. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00411}00411         \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_ada97b3d615284dd9ca9c332e0d24b704}{AXGE\_EPPRCR}}, 0);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00412}00412         \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_ada97b3d615284dd9ca9c332e0d24b704}{AXGE\_EPPRCR}}, \mbox{\hyperlink{if__axgereg_8h_adc66d876441dd66620e6e62a8641fe67}{EPPRCR\_IPRL}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00413}00413         \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}}, hz / 4);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00414}00414         \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_ae8c89aaa1520531e45fe524cc5f7c2e6}{AXGE\_CLK\_SELECT}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00415}00415             \mbox{\hyperlink{if__axgereg_8h_a3ea404d2d2768b5908874ed908e289df}{AXGE\_CLK\_SELECT\_ACS}} | \mbox{\hyperlink{if__axgereg_8h_a8c4c54bed572122b5a88d4d0bf0fb2d0}{AXGE\_CLK\_SELECT\_BCS}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00416}00416         \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}}, hz / 10);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00417}00417 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00418}00418 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00419}00419 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00420}\mbox{\hyperlink{if__axge_8c_ac6c7c4b18b995ecb2c094bb218dfd321}{00420}} \mbox{\hyperlink{if__axge_8c_ac6c7c4b18b995ecb2c094bb218dfd321}{axge\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00421}00421 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00422}00422         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config__descriptor}{usb\_config\_descriptor}} *cd;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00423}00423         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00425}00425         cd = \mbox{\hyperlink{usb__device_8c_a5833d02ea7d69fb84106d7b97391431a}{usbd\_get\_config\_descriptor}}(sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00427}00427         err = \mbox{\hyperlink{usb__request_8c_a41406cc7a17f599c5c3faea9c6b703ff}{usbd\_req\_set\_config}}(sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}}, \&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00428}00428             cd-\/>\mbox{\hyperlink{structusb__config__descriptor_affc7816579932817c36478f630b7b7a1}{bConfigurationValue}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00429}00429         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00430}00430                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}reset failed (ignored)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00431}00431 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00432}00432         \textcolor{comment}{/* Wait a little while for the chip to get its brains in order. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00433}00433         \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00434}00434 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00435}00435         \textcolor{comment}{/* Reinitialize controller to achieve full reset. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00436}00436         \mbox{\hyperlink{if__axge_8c_afdfd08f2f22b1ded583e562ed4ff9b55}{axge\_chip\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00437}00437 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00438}00438 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00439}00439 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00440}\mbox{\hyperlink{if__axge_8c_a0832fc8678dc549cd0602566c2c4389a}{00440}} \mbox{\hyperlink{if__axge_8c_abf7ab0a7841f5db93e73c686544dfd07}{axge\_attach\_post}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00441}00441 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00442}00442         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00444}00444         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00445}00445 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00446}00446         \textcolor{comment}{/* Initialize controller and get station address. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00447}00447         \mbox{\hyperlink{if__axge_8c_afdfd08f2f22b1ded583e562ed4ff9b55}{axge\_chip\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00448}00448         \mbox{\hyperlink{if__axge_8c_aacce82bae6bdd425f4a53253b7f6bfda}{axge\_read\_mem}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, ETHER\_ADDR\_LEN, \mbox{\hyperlink{if__axgereg_8h_a9ef0d1fb8cc76c4d641598d21fd0c6ff}{AXGE\_NIDR}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00449}00449             ue-\/>\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}}, ETHER\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00450}00450 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00451}00451 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00452}00452 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00453}\mbox{\hyperlink{if__axge_8c_a590eb46b5d24dc140871228c7a6382fd}{00453}} \mbox{\hyperlink{if__axge_8c_a590eb46b5d24dc140871228c7a6382fd}{axge\_attach\_post\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00454}00454 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00455}00455         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00456}00456         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00457}00457 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00458}00458         ifp = ue-\/>\mbox{\hyperlink{structusb__ether_a71587f92772527f72d98bfe0753ecb59}{ue\_ifp}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00459}00459         ifp-\/>if\_flags = IFF\_BROADCAST | IFF\_SIMPLEX | IFF\_MULTICAST;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00460}00460         ifp-\/>if\_start = \mbox{\hyperlink{usb__ethernet_8c_af7cfd4fe0b46839cf9f541bd19a572aa}{uether\_start}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00461}00461         ifp-\/>if\_ioctl = \mbox{\hyperlink{if__axge_8c_a6a90d2f40ba72d4b82b761bed06bd61f}{axge\_ioctl}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00462}00462         ifp-\/>if\_init = \mbox{\hyperlink{usb__ethernet_8c_aa635260c4b0cc1ae229343fdbb212aed}{uether\_init}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00463}00463         IFQ\_SET\_MAXLEN(\&ifp-\/>if\_snd, ifqmaxlen);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00464}00464         ifp-\/>if\_snd.ifq\_drv\_maxlen = ifqmaxlen;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00465}00465         IFQ\_SET\_READY(\&ifp-\/>if\_snd);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00467}00467         ifp-\/>if\_capabilities |= IFCAP\_VLAN\_MTU | IFCAP\_TXCSUM | IFCAP\_RXCSUM;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00468}00468         ifp-\/>if\_hwassist = \mbox{\hyperlink{if__axge_8c_a9d8a034ffed765d99894bdaae4ae4677}{AXGE\_CSUM\_FEATURES}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00469}00469         ifp-\/>if\_capenable = ifp-\/>if\_capabilities;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00470}00470 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00471}00471         bus\_topo\_lock();}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00472}00472         \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__axge_8c_source_l00473}00473             \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__axge_8c_source_l00474}00474             BMSR\_DEFCAPMASK, \mbox{\hyperlink{if__axgereg_8h_a63f05c0206f4602b7b806524596e5f7a}{AXGE\_PHY\_ADDR}}, MII\_OFFSET\_ANY, MIIF\_DOPAUSE);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00475}00475         bus\_topo\_unlock();}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00476}00476 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00477}00477         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00478}00478 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00480}00480 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00481}00481 \textcolor{comment}{ * Set media options.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00482}00482 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00483}00483 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00484}\mbox{\hyperlink{if__axge_8c_a473a954a767b74691f9531199290d9ee}{00484}} \mbox{\hyperlink{if__axge_8c_a473a954a767b74691f9531199290d9ee}{axge\_ifmedia\_upd}}(\textcolor{keyword}{struct} ifnet *ifp)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00485}00485 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00486}00486         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00487}00487         \textcolor{keyword}{struct }mii\_data *mii;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00488}00488         \textcolor{keyword}{struct }mii\_softc *miisc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00489}00489         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00490}00490 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00491}00491         sc = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00492}00492         mii = \mbox{\hyperlink{if__auereg_8h_adb491f9d26e8663f329b26e167f5edde}{GET\_MII}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00493}00493         \mbox{\hyperlink{if__axgereg_8h_a678ac0daeee9d6575a8d651cdc8964c7}{AXGE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00494}00494 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00495}00495         LIST\_FOREACH(miisc, \&mii-\/>mii\_phys, mii\_list)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00496}00496             PHY\_RESET(miisc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00497}00497         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = mii\_mediachg(mii);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00498}00498 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00499}00499         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00500}00500 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00501}00501 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00502}00502 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00503}00503 \textcolor{comment}{ * Report current media status.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00504}00504 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00505}00505 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00506}\mbox{\hyperlink{if__axge_8c_a22c2b283300ffac25d0ff4ea5b34f151}{00506}} \mbox{\hyperlink{if__axge_8c_a22c2b283300ffac25d0ff4ea5b34f151}{axge\_ifmedia\_sts}}(\textcolor{keyword}{struct} ifnet *ifp, \textcolor{keyword}{struct} ifmediareq *ifmr)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00507}00507 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00508}00508         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00509}00509         \textcolor{keyword}{struct }mii\_data *mii;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00510}00510 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00511}00511         sc = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00512}00512         mii = \mbox{\hyperlink{if__auereg_8h_adb491f9d26e8663f329b26e167f5edde}{GET\_MII}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00513}00513         \mbox{\hyperlink{if__axgereg_8h_a47c4ba899aa43c6fa7f4b8125194a5c6}{AXGE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00514}00514         mii\_pollstat(mii);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00515}00515         ifmr-\/>ifm\_active = mii-\/>mii\_media\_active;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00516}00516         ifmr-\/>ifm\_status = mii-\/>mii\_media\_status;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00517}00517         \mbox{\hyperlink{if__axgereg_8h_a13ab3680a1b3e5a7d803d83449ae4e57}{AXGE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00518}00518 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00519}00519 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00520}00520 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00521}00521 \textcolor{comment}{ * Probe for a AX88179 chip.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00522}00522 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00523}00523 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00524}\mbox{\hyperlink{if__axge_8c_aafea2788264879e3868f66dd7b5263bd}{00524}} \mbox{\hyperlink{if__axge_8c_a85589d81e42d4e080e785ba7fa61789b}{axge\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00525}00525 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00526}00526         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00528}00528         uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00529}00529         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00530}00530                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00531}00531         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a9e2af2c9a58f0df11559c7679185b0e8}{bConfigIndex}} != \mbox{\hyperlink{if__axgereg_8h_a5243fab31c7f42a541e9999cf8db407b}{AXGE\_CONFIG\_IDX}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00532}00532                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00533}00533         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} != \mbox{\hyperlink{if__axgereg_8h_a619cb761659290c371f341c2ea3bd650}{AXGE\_IFACE\_IDX}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00534}00534                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00535}00535 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00536}00536         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{if__axge_8c_aa8737fb45d8a852de50be58c18ec99d3}{axge\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__axge_8c_aa8737fb45d8a852de50be58c18ec99d3}{axge\_devs}}), uaa));}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00537}00537 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00538}00538 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00539}00539 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00540}00540 \textcolor{comment}{ * Attach the interface. Allocate softc structures, do ifmedia}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00541}00541 \textcolor{comment}{ * setup and ethernet/BPF attach.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00542}00542 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00543}00543 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00544}\mbox{\hyperlink{if__axge_8c_ac5f31cf3f7b60ccb6160a60a87dc59fa}{00544}} \mbox{\hyperlink{if__axge_8c_ab0cae50eb23fac346ae6084de0da562b}{axge\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00545}00545 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00546}00546         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00547}00547         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00548}00548         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00549}00549         uint8\_t iface\_index;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00550}00550         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00551}00551 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00552}00552         uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00553}00553         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00554}00554         ue = \&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00555}00555 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00556}00556         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00557}00557         mtx\_init(\&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}}, device\_get\_nameunit(dev), NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00558}00558 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00559}00559         iface\_index = \mbox{\hyperlink{if__axgereg_8h_a619cb761659290c371f341c2ea3bd650}{AXGE\_IFACE\_IDX}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00560}00560         \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,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00561}00561             sc-\/>\mbox{\hyperlink{structaxge__softc_aa368d2dfac0cf92cda0ba4a45ce3d4d5}{sc\_xfer}}, \mbox{\hyperlink{if__axge_8c_a465ce39593bad0051e81e327589cf24f}{axge\_config}}, \mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181faa6c5203b78381b98a8bed51afd3c030e}{AXGE\_N\_TRANSFER}}, sc, \&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00562}00562         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00563}00563                 device\_printf(dev, \textcolor{stringliteral}{"{}allocating USB transfers failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00564}00564                 mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00565}00565                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00566}00566         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00567}00567 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00568}00568         ue-\/>\mbox{\hyperlink{structusb__ether_af979047fbf844a27c7f2266c87fd03a4}{ue\_sc}} = sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00569}00569         ue-\/>\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}} = dev;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00570}00570         ue-\/>\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00571}00571         ue-\/>\mbox{\hyperlink{structusb__ether_af390d8b75a7bd2d9f347f808f0c15a4f}{ue\_mtx}} = \&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00572}00572         ue-\/>\mbox{\hyperlink{structusb__ether_a2b787f8aab7c5db729211c3a1c3bc141}{ue\_methods}} = \&\mbox{\hyperlink{if__axge_8c_a57e00a9ebc13df3214d63898303f832e}{axge\_ue\_methods}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00573}00573 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00574}00574         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__ethernet_8c_ad75ada74935d33849a41ff3448d1f291}{uether\_ifattach}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00575}00575         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00576}00576                 device\_printf(dev, \textcolor{stringliteral}{"{}could not attach interface\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00577}00577                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00578}00578         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00579}00579         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00580}00580 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00581}00581 detach:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00582}00582         \mbox{\hyperlink{if__axge_8c_a86a6f60c433f4bf983212c117628e028}{axge\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00583}00583         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00584}00584 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00585}00585 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00586}00586 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00587}\mbox{\hyperlink{if__axge_8c_a5e2db0a7918b2ee4ef263cd528e33ffe}{00587}} \mbox{\hyperlink{if__axge_8c_a86a6f60c433f4bf983212c117628e028}{axge\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00588}00588 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00589}00589         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00590}00590         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00591}00591         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00592}00592 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00593}00593         sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00594}00594         ue = \&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00595}00595         \textcolor{keywordflow}{if} (device\_is\_attached(dev)) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00596}00596                 \textcolor{comment}{/* wait for any post attach or other command to complete */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00597}00597                 \mbox{\hyperlink{usb__process_8c_a6a9d8fe536d20afd846c2a3d1a03271d}{usb\_proc\_drain}}(\&ue-\/>\mbox{\hyperlink{structusb__ether_acb21d7c9097f0394fab7b5c81ffea344}{ue\_tq}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00599}00599                 \mbox{\hyperlink{if__axgereg_8h_a47c4ba899aa43c6fa7f4b8125194a5c6}{AXGE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00600}00600                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00601}00601 \textcolor{comment}{                 * XXX}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00602}00602 \textcolor{comment}{                 * ether\_ifdetach(9) should be called first.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00603}00603 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00604}00604                 \mbox{\hyperlink{if__axge_8c_a5c25b4497a8c97b7819feb7f254d2f8f}{axge\_stop}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00605}00605                 \textcolor{comment}{/* Force bulk-\/in to return a zero-\/length USB packet. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00606}00606                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__axge_8c_a6f02dca0f2e019e9343ade16c60752e4}{axge\_read\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_ada97b3d615284dd9ca9c332e0d24b704}{AXGE\_EPPRCR}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00607}00607                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= \mbox{\hyperlink{if__axgereg_8h_a91091db866faf677655e2167a04c1da9}{EPPRCR\_BZ}} | \mbox{\hyperlink{if__axgereg_8h_adc66d876441dd66620e6e62a8641fe67}{EPPRCR\_IPRL}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00608}00608                 \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_ada97b3d615284dd9ca9c332e0d24b704}{AXGE\_EPPRCR}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00609}00609                 \textcolor{comment}{/* Change clock. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00610}00610                 \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_ae8c89aaa1520531e45fe524cc5f7c2e6}{AXGE\_CLK\_SELECT}}, 0);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00611}00611                 \textcolor{comment}{/* Disable MAC. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00612}00612                 \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_a6f7e6fd0b71af8fd1f16d3d897b831d6}{AXGE\_RCR}}, 0);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00613}00613                 \mbox{\hyperlink{if__axgereg_8h_a13ab3680a1b3e5a7d803d83449ae4e57}{AXGE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00614}00614         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00615}00615         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structaxge__softc_aa368d2dfac0cf92cda0ba4a45ce3d4d5}{sc\_xfer}}, \mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181faa6c5203b78381b98a8bed51afd3c030e}{AXGE\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00616}00616         \mbox{\hyperlink{usb__ethernet_8c_a15f91b3474535af40e16b2c05d023e99}{uether\_ifdetach}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00617}00617         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structaxge__softc_af1314a11307504ddcab8a900e9c67171}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00618}00618 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00619}00619         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00620}00620 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00621}00621 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00622}00622 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00623}\mbox{\hyperlink{if__axge_8c_a18e7f17d30d1f9af5e3d065f92a704a7}{00623}} \mbox{\hyperlink{if__axge_8c_ac1f0a59329164c2de345493b8f42e40d}{axge\_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__axge_8c_source_l00624}00624 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00625}00625         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00626}00626         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00627}00627         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00628}00628         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00629}00629 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00630}00630         sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00631}00631         ue = \&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00632}00632         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00633}00633 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00634}00634         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00635}00635         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00636}00636                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00637}00637                 \mbox{\hyperlink{if__axge_8c_a12754d96dee773ff7d996b30036e3005}{axge\_rx\_frame}}(ue, pc, actlen);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00638}00638 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00639}00639                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00640}00640         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00641}00641 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00642}00642                 \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__axge_8c_source_l00643}00643                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00644}00644                 \mbox{\hyperlink{usb__ethernet_8c_a007aff306fb41573661e03ac71e45966}{uether\_rxflush}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00645}00645                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00646}00646 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00647}00647         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00648}00648                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00649}00649                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00650}00650                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00651}00651                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00652}00652                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00653}00653         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00654}00654 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00655}00655 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00656}00656 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00657}\mbox{\hyperlink{if__axge_8c_af7fa3f1b509b9b25f71d41d48ef63a92}{00657}} \mbox{\hyperlink{if__axge_8c_a1316858337f2b006982c408b778a04b8}{axge\_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__axge_8c_source_l00658}00658 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00659}00659         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00660}00660         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00661}00661         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00662}00662         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00663}00663         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__frame__txhdr}{axge\_frame\_txhdr}} txhdr;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00664}00664         \textcolor{keywordtype}{int} nframes, pos;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00665}00665 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00666}00666         sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00667}00667         ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(\&sc-\/>\mbox{\hyperlink{structaxge__softc_a3f9376a534b6f6d4b831c0bdaad27096}{sc\_ue}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00668}00668 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00669}00669         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00670}00670         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00671}00671                 ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_OACTIVE;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00672}00672                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00673}00673         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00674}00674 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00675}00675                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structaxge__softc_ab0356c4f613f29eb4e3b9659b2bb18ba}{sc\_flags}} \& \mbox{\hyperlink{if__axgereg_8h_a7799793acb0cb0e9a16c24de71777373}{AXGE\_FLAG\_LINK}}) == 0 ||}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00676}00676                     (ifp-\/>if\_drv\_flags \& IFF\_DRV\_OACTIVE) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00677}00677                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00678}00678 \textcolor{comment}{                         * Don't send anything if there is no link or}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00679}00679 \textcolor{comment}{                         * controller is busy.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00680}00680 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00681}00681                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00682}00682                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00683}00683 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00684}00684                 \textcolor{keywordflow}{for} (nframes = 0; nframes < \mbox{\hyperlink{if__axgereg_8h_a3287a0bb58580824a4bd6c38d77c23d8}{AXGE\_N\_FRAMES}} \&\&}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00685}00685                     !IFQ\_DRV\_IS\_EMPTY(\&ifp-\/>if\_snd); nframes++) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00686}00686                         IFQ\_DRV\_DEQUEUE(\&ifp-\/>if\_snd, m);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00687}00687                         \textcolor{keywordflow}{if} (m == NULL)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00688}00688                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00689}00689                         \mbox{\hyperlink{usb__transfer_8c_aa9f706e03ede8468e81331de474aebb4}{usbd\_xfer\_set\_frame\_offset}}(xfer, nframes * MCLBYTES,}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00690}00690                             nframes);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00691}00691                         pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, nframes);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00692}00692                         txhdr.\mbox{\hyperlink{structaxge__frame__txhdr_a12ea78036b1e9953e790f4d9412bd1ce}{mss}} = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00693}00693                         txhdr.\mbox{\hyperlink{structaxge__frame__txhdr_a53c45264fcd3d08c002d794f07c0c793}{len}} = htole32(\mbox{\hyperlink{if__axgereg_8h_ac7c24b162dc41da9a042dce36f10328b}{AXGE\_TXBYTES}}(m-\/>m\_pkthdr.len));}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00694}00694                         \textcolor{keywordflow}{if} ((ifp-\/>if\_capenable \& IFCAP\_TXCSUM) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00695}00695                             (m-\/>m\_pkthdr.csum\_flags \& \mbox{\hyperlink{if__axge_8c_a9d8a034ffed765d99894bdaae4ae4677}{AXGE\_CSUM\_FEATURES}}) == 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00696}00696                                 txhdr.\mbox{\hyperlink{structaxge__frame__txhdr_a53c45264fcd3d08c002d794f07c0c793}{len}} |= htole32(\mbox{\hyperlink{if__axgereg_8h_af2839d7617ac9749057b34090a999a10}{AXGE\_CSUM\_DISABLE}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00697}00697 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00698}00698                         pos = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00699}00699                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, pos, \&txhdr, \textcolor{keyword}{sizeof}(txhdr));}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00700}00700                         pos += \textcolor{keyword}{sizeof}(txhdr);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00701}00701                         \mbox{\hyperlink{usbdi_8h_a9696aa8bcb25b1adcf45e8387a13897a}{usbd\_m\_copy\_in}}(pc, pos, m, 0, m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00702}00702                         pos += m-\/>m\_pkthdr.len;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00703}00703 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00704}00704                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00705}00705 \textcolor{comment}{                         * if there's a BPF listener, bounce a copy}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00706}00706 \textcolor{comment}{                         * of this frame to him:}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00707}00707 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00708}00708                         BPF\_MTAP(ifp, m);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00709}00709 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00710}00710                         m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00711}00711 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00712}00712                         \textcolor{comment}{/* Set frame length. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00713}00713                         \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, nframes, pos);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00714}00714                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00715}00715                 \textcolor{keywordflow}{if} (nframes != 0) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00716}00716                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00717}00717 \textcolor{comment}{                         * XXX}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00718}00718 \textcolor{comment}{                         * Update TX packet counter here. This is not}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00719}00719 \textcolor{comment}{                         * correct way but it seems that there is no way}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00720}00720 \textcolor{comment}{                         * to know how many packets are sent at the end}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00721}00721 \textcolor{comment}{                         * of transfer because controller combines}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00722}00722 \textcolor{comment}{                         * multiple writes into single one if there is}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00723}00723 \textcolor{comment}{                         * room in TX buffer of controller.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00724}00724 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00725}00725                         if\_inc\_counter(ifp, IFCOUNTER\_OPACKETS, nframes);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00726}00726                         \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer, nframes);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00727}00727                         \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00728}00728                         ifp-\/>if\_drv\_flags |= IFF\_DRV\_OACTIVE;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00729}00729                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00730}00730                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00731}00731                 \textcolor{comment}{/* NOTREACHED */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00732}00732         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00733}00733                 if\_inc\_counter(ifp, IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00734}00734                 ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_OACTIVE;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00735}00735 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00736}00736                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00737}00737                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00738}00738                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00739}00739                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00740}00740                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00741}00741         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00742}00742 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00743}00743 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00744}00744 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00745}\mbox{\hyperlink{if__axge_8c_a40eb090fdb6288e3444fced2490d84e4}{00745}} \mbox{\hyperlink{if__axge_8c_a7f3c8948e776ec88feca53993e4f57db}{axge\_tick}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00746}00746 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00747}00747         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00748}00748         \textcolor{keyword}{struct }mii\_data *mii;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00749}00749 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00750}00750         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00751}00751         mii = \mbox{\hyperlink{if__auereg_8h_adb491f9d26e8663f329b26e167f5edde}{GET\_MII}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00752}00752         \mbox{\hyperlink{if__axgereg_8h_a678ac0daeee9d6575a8d651cdc8964c7}{AXGE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00753}00753 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00754}00754         mii\_tick(mii);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00755}00755 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00756}00756 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00757}00757 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00758}\mbox{\hyperlink{if__axge_8c_a02744f9ea0e67e10fb992b6c612c0f91}{00758}} \mbox{\hyperlink{if__axge_8c_a02744f9ea0e67e10fb992b6c612c0f91}{axge\_hash\_maddr}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} sockaddr\_dl *sdl, u\_int cnt)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00759}00759 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00760}00760         uint8\_t *hashtbl = arg;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00761}00761         uint32\_t h;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00763}00763         h = ether\_crc32\_be(LLADDR(sdl), ETHER\_ADDR\_LEN) >> 26;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00764}00764         hashtbl[h / 8] |= 1 << (h \% 8);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00765}00765 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00766}00766         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00767}00767 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00768}00768 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00769}00769 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00770}\mbox{\hyperlink{if__axge_8c_ab45d3bbe70ce3952705eedf1820ba761}{00770}} \mbox{\hyperlink{if__axge_8c_a3b3b79a0c0127e37e5ea222e15524d5a}{axge\_rxfilter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00771}00771 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00772}00772         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00773}00773         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00774}00774         uint16\_t rxmode;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00775}00775         uint8\_t hashtbl[8] = \{ 0, 0, 0, 0, 0, 0, 0, 0 \};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00776}00776 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00777}00777         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00778}00778         ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00779}00779         \mbox{\hyperlink{if__axgereg_8h_a678ac0daeee9d6575a8d651cdc8964c7}{AXGE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00780}00780 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00781}00781         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00782}00782 \textcolor{comment}{         * Configure RX settings.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00783}00783 \textcolor{comment}{         * Don't set RCR\_IPE(IP header alignment on 32bit boundary) to disable}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00784}00784 \textcolor{comment}{         * inserting extra padding bytes.  This wastes ethernet to USB host}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00785}00785 \textcolor{comment}{         * bandwidth as well as complicating RX handling logic.  Current USB}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00786}00786 \textcolor{comment}{         * framework requires copying RX frames to mbufs so there is no need}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00787}00787 \textcolor{comment}{         * to worry about alignment.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00788}00788 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00789}00789         rxmode = \mbox{\hyperlink{if__axgereg_8h_ae39a16aae7d33b13d25c87584161e334}{RCR\_DROP\_CRCERR}} | \mbox{\hyperlink{if__axgereg_8h_a169f3753cd88a3613a15a431424dfb76}{RCR\_START}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00790}00790         \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_BROADCAST)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00791}00791                 rxmode |= \mbox{\hyperlink{if__axgereg_8h_ad6d62d2a3c72e0256432fb8b96c73972}{RCR\_ACPT\_BCAST}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00792}00792         \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& (IFF\_ALLMULTI | IFF\_PROMISC)) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00793}00793                 \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_PROMISC)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00794}00794                         rxmode |= \mbox{\hyperlink{if__axgereg_8h_a3d85426a02e8c0695d41b1a525765833}{RCR\_PROMISC}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00795}00795                 rxmode |= \mbox{\hyperlink{if__axgereg_8h_af1dc4bfb3d8b3f96f165ef2b02722e59}{RCR\_ACPT\_ALL\_MCAST}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00796}00796                 \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_a6f7e6fd0b71af8fd1f16d3d897b831d6}{AXGE\_RCR}}, rxmode);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00797}00797                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00798}00798         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00799}00799 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00800}00800         rxmode |= \mbox{\hyperlink{if__axgereg_8h_a8f93c208fa4d5c3f5b2964dfcd5b1b2a}{RCR\_ACPT\_MCAST}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00801}00801         if\_foreach\_llmaddr(ifp, \mbox{\hyperlink{if__axge_8c_a02744f9ea0e67e10fb992b6c612c0f91}{axge\_hash\_maddr}}, \&hashtbl);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00802}00802 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00803}00803         \mbox{\hyperlink{if__axge_8c_ac9fc4d76ee467e036365b195599b2817}{axge\_write\_mem}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 8, \mbox{\hyperlink{if__axgereg_8h_ae246cd573968e99c5fa7feb3bd66ac97}{AXGE\_MFA}}, (\textcolor{keywordtype}{void} *)\&hashtbl, 8);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00804}00804         \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_a6f7e6fd0b71af8fd1f16d3d897b831d6}{AXGE\_RCR}}, rxmode);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00805}00805 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00806}00806 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00807}00807 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00808}\mbox{\hyperlink{if__axge_8c_a87a6040b278f480fa7db602639caae68}{00808}} \mbox{\hyperlink{if__axge_8c_a3c1f9f95e8e21a81ff2c8e374f60eb1f}{axge\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00809}00809 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00810}00810         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00811}00811 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00812}00812         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00813}00813         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00814}00814 \textcolor{comment}{         * Start the USB transfers, if not already started.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00815}00815 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00816}00816         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structaxge__softc_aa368d2dfac0cf92cda0ba4a45ce3d4d5}{sc\_xfer}}[\mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181faa608bb2fc61c9e57a53ed9752670a206}{AXGE\_BULK\_DT\_RD}}]);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00817}00817         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structaxge__softc_aa368d2dfac0cf92cda0ba4a45ce3d4d5}{sc\_xfer}}[\mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181facc5ebf4d3322615805e307e2168eb7a3}{AXGE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00818}00818 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00819}00819 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00820}00820 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00821}\mbox{\hyperlink{if__axge_8c_a91c21616ca01895b335a20672cb35e80}{00821}} \mbox{\hyperlink{if__axge_8c_a64e90842434e21a47826252107809940}{axge\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00822}00822 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00823}00823         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00824}00824         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00826}00826         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00827}00827         ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00828}00828         \mbox{\hyperlink{if__axgereg_8h_a678ac0daeee9d6575a8d651cdc8964c7}{AXGE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00829}00829 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00830}00830         \textcolor{keywordflow}{if} ((ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING) != 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00831}00831                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00832}00832 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00833}00833         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00834}00834 \textcolor{comment}{         * Cancel pending I/O and free all RX/TX buffers.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00835}00835 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00836}00836         \mbox{\hyperlink{if__axge_8c_a5c25b4497a8c97b7819feb7f254d2f8f}{axge\_stop}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00837}00837 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00838}00838         \mbox{\hyperlink{if__axge_8c_ac6c7c4b18b995ecb2c094bb218dfd321}{axge\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00839}00839 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00840}00840         \textcolor{comment}{/* Set MAC address. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00841}00841         \mbox{\hyperlink{if__axge_8c_ac9fc4d76ee467e036365b195599b2817}{axge\_write\_mem}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, ETHER\_ADDR\_LEN, \mbox{\hyperlink{if__axgereg_8h_a9ef0d1fb8cc76c4d641598d21fd0c6ff}{AXGE\_NIDR}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00842}00842             IF\_LLADDR(ifp), ETHER\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00843}00843 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00844}00844         \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_a5aee88f22f4d7f369fbccc11bb083b23}{AXGE\_PWLLR}}, 0x34);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00845}00845         \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_afc4e6c70d8dc173cdff9e76c092e01b6}{AXGE\_PWLHR}}, 0x52);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00846}00846 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00847}00847         \textcolor{comment}{/* Configure TX/RX checksum offloading. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00848}00848         \mbox{\hyperlink{if__axge_8c_a3551550c969dfaee2be55e43b20f6d78}{axge\_csum\_cfg}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00849}00849 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00850}00850         \textcolor{comment}{/*  Configure RX filters. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00851}00851         \mbox{\hyperlink{if__axge_8c_a3b3b79a0c0127e37e5ea222e15524d5a}{axge\_rxfilter}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00852}00852 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00853}00853         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00854}00854 \textcolor{comment}{         * XXX}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00855}00855 \textcolor{comment}{         * Controller supports wakeup on link change detection,}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00856}00856 \textcolor{comment}{         * magic packet and wakeup frame recpetion.  But it seems}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00857}00857 \textcolor{comment}{         * there is no framework for USB ethernet suspend/wakeup.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00858}00858 \textcolor{comment}{         * Disable all wakeup functions.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00859}00859 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00860}00860         \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_a7ad0107d3eec4e08d612da34ed9161ab}{AXGE\_MMSR}}, 0);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00861}00861         (void)\mbox{\hyperlink{if__axge_8c_a452d327f3e7bf2871f9698146868902f}{axge\_read\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_a7ad0107d3eec4e08d612da34ed9161ab}{AXGE\_MMSR}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00862}00862 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00863}00863         \textcolor{comment}{/* Configure default medium type. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00864}00864         \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_a4fb4a2a8ce590de9b2496e82cceaaf4c}{AXGE\_MSR}}, \mbox{\hyperlink{if__axgereg_8h_a93767af6d9449097aaac018cf512a7aa}{MSR\_GM}} | \mbox{\hyperlink{if__axgereg_8h_a28a2da59f3df3e8d8102984255f96564}{MSR\_FD}} |}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00865}00865             \mbox{\hyperlink{if__axgereg_8h_a1770fb6e50fdd9de0e3cd5b5526509a9}{MSR\_RFC}} | \mbox{\hyperlink{if__axgereg_8h_ac21c88aa29261c351277eb0b3ee776b3}{MSR\_TFC}} | \mbox{\hyperlink{if__axgereg_8h_a41e4e6c8f65bf3b74b8d3616a28f2249}{MSR\_RE}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00866}00866 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00867}00867         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(sc-\/>\mbox{\hyperlink{structaxge__softc_aa368d2dfac0cf92cda0ba4a45ce3d4d5}{sc\_xfer}}[\mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181facc5ebf4d3322615805e307e2168eb7a3}{AXGE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00868}00868 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00869}00869         ifp-\/>if\_drv\_flags |= IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00870}00870         \textcolor{comment}{/* Switch to selected media. */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00871}00871         \mbox{\hyperlink{if__axge_8c_a473a954a767b74691f9531199290d9ee}{axge\_ifmedia\_upd}}(ifp);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00872}00872 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00873}00873 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00874}00874 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00875}\mbox{\hyperlink{if__axge_8c_ad482718d45a15c3ebc54e15b9529b14c}{00875}} \mbox{\hyperlink{if__axge_8c_a5c25b4497a8c97b7819feb7f254d2f8f}{axge\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00876}00876 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00877}00877         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00878}00878         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00879}00879         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00880}00880 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00881}00881         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00882}00882         ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00883}00883 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00884}00884         \mbox{\hyperlink{if__axgereg_8h_a678ac0daeee9d6575a8d651cdc8964c7}{AXGE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00885}00885 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00886}00886         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = \mbox{\hyperlink{if__axge_8c_a6f02dca0f2e019e9343ade16c60752e4}{axge\_read\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_a4fb4a2a8ce590de9b2496e82cceaaf4c}{AXGE\_MSR}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00887}00887         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \&= \string~MSR\_RE;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00888}00888         \mbox{\hyperlink{if__axge_8c_a6eda913107a46fd250e947bae003c7c6}{axge\_write\_cmd\_2}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, 2, \mbox{\hyperlink{if__axgereg_8h_a4fb4a2a8ce590de9b2496e82cceaaf4c}{AXGE\_MSR}}, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00889}00889 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00890}00890         \textcolor{keywordflow}{if} (ifp != NULL)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00891}00891                 ifp-\/>if\_drv\_flags \&= \string~(IFF\_DRV\_RUNNING | IFF\_DRV\_OACTIVE);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00892}00892         sc-\/>\mbox{\hyperlink{structaxge__softc_ab0356c4f613f29eb4e3b9659b2bb18ba}{sc\_flags}} \&= \string~AXGE\_FLAG\_LINK;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00893}00893 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00894}00894         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00895}00895 \textcolor{comment}{         * Stop all the transfers, if not already stopped:}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00896}00896 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00897}00897         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structaxge__softc_aa368d2dfac0cf92cda0ba4a45ce3d4d5}{sc\_xfer}}[\mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181facc5ebf4d3322615805e307e2168eb7a3}{AXGE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00898}00898         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structaxge__softc_aa368d2dfac0cf92cda0ba4a45ce3d4d5}{sc\_xfer}}[\mbox{\hyperlink{if__axgereg_8h_a5d76b81b0ad4c19007a781d4edb8181faa608bb2fc61c9e57a53ed9752670a206}{AXGE\_BULK\_DT\_RD}}]);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00899}00899 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00900}00900 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00901}00901 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00902}\mbox{\hyperlink{if__axge_8c_a6a90d2f40ba72d4b82b761bed06bd61f}{00902}} \mbox{\hyperlink{if__axge_8c_a6a90d2f40ba72d4b82b761bed06bd61f}{axge\_ioctl}}(\textcolor{keyword}{struct} ifnet *ifp, u\_long cmd, caddr\_t data)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00903}00903 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00904}00904         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00905}00905         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00906}00906         \textcolor{keyword}{struct }ifreq *ifr;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00907}00907         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, mask, reinit;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00908}00908 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00909}00909         ue = ifp-\/>if\_softc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00910}00910         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00911}00911         ifr = (\textcolor{keyword}{struct }ifreq *)data;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00912}00912         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00913}00913         reinit = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00914}00914         \textcolor{keywordflow}{if} (cmd == SIOCSIFCAP) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00915}00915                 \mbox{\hyperlink{if__axgereg_8h_a47c4ba899aa43c6fa7f4b8125194a5c6}{AXGE\_LOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00916}00916                 mask = ifr-\/>ifr\_reqcap \string^ ifp-\/>if\_capenable;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00917}00917                 \textcolor{keywordflow}{if} ((mask \& IFCAP\_TXCSUM) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00918}00918                     (ifp-\/>if\_capabilities \& IFCAP\_TXCSUM) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00919}00919                         ifp-\/>if\_capenable \string^= IFCAP\_TXCSUM;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00920}00920                         \textcolor{keywordflow}{if} ((ifp-\/>if\_capenable \& IFCAP\_TXCSUM) != 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00921}00921                                 ifp-\/>if\_hwassist |= \mbox{\hyperlink{if__axge_8c_a9d8a034ffed765d99894bdaae4ae4677}{AXGE\_CSUM\_FEATURES}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00922}00922                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00923}00923                                 ifp-\/>if\_hwassist \&= \string~AXGE\_CSUM\_FEATURES;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00924}00924                         reinit++;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00925}00925                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00926}00926                 \textcolor{keywordflow}{if} ((mask \& IFCAP\_RXCSUM) != 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00927}00927                     (ifp-\/>if\_capabilities \& IFCAP\_RXCSUM) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00928}00928                         ifp-\/>if\_capenable \string^= IFCAP\_RXCSUM;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00929}00929                         reinit++;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00930}00930                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00931}00931                 \textcolor{keywordflow}{if} (reinit > 0 \&\& ifp-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00932}00932                         ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00933}00933                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00934}00934                         reinit = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00935}00935                 \mbox{\hyperlink{if__axgereg_8h_a13ab3680a1b3e5a7d803d83449ae4e57}{AXGE\_UNLOCK}}(sc);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00936}00936                 \textcolor{keywordflow}{if} (reinit > 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00937}00937                         \mbox{\hyperlink{usb__ethernet_8c_aa635260c4b0cc1ae229343fdbb212aed}{uether\_init}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00938}00938         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00939}00939                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__ethernet_8c_ac15fe0cfbef442b384538aa41ad6a503}{uether\_ioctl}}(ifp, cmd, data);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00940}00940 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00941}00941         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00942}00942 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00943}00943 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00944}00944 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00945}\mbox{\hyperlink{if__axge_8c_a12754d96dee773ff7d996b30036e3005}{00945}} \mbox{\hyperlink{if__axge_8c_a12754d96dee773ff7d996b30036e3005}{axge\_rx\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc, \textcolor{keywordtype}{int} actlen)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00946}00946 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00947}00947         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__frame__rxhdr}{axge\_frame\_rxhdr}} pkt\_hdr;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00948}00948         uint32\_t rxhdr;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00949}00949         uint32\_t pos;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00950}00950         uint32\_t pkt\_cnt, pkt\_end;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00951}00951         uint32\_t hdr\_off;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00952}00952         uint32\_t pktlen;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00953}00953 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00954}00954         \textcolor{comment}{/* verify we have enough data */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00955}00955         \textcolor{keywordflow}{if} (actlen < (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(rxhdr))}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00956}00956                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00957}00957 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00958}00958         pos = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00959}00959 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00960}00960         \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, actlen -\/ \textcolor{keyword}{sizeof}(rxhdr), \&rxhdr, \textcolor{keyword}{sizeof}(rxhdr));}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00961}00961         rxhdr = le32toh(rxhdr);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00962}00962 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00963}00963         pkt\_cnt = rxhdr \& 0xFFFF;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00964}00964         hdr\_off = pkt\_end = (rxhdr >> 16) \& 0xFFFF;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00965}00965 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00966}00966         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00967}00967 \textcolor{comment}{         * <-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/ actlen -\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/>}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00968}00968 \textcolor{comment}{         * [frame \#0]...[frame \#N][pkt\_hdr \#0]...[pkt\_hdr \#N][rxhdr]}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00969}00969 \textcolor{comment}{         * Each RX frame would be aligned on 8 bytes boundary. If}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00970}00970 \textcolor{comment}{         * RCR\_IPE bit is set in AXGE\_RCR register, there would be 2}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00971}00971 \textcolor{comment}{         * padding bytes and 6 dummy bytes(as the padding also should}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00972}00972 \textcolor{comment}{         * be aligned on 8 bytes boundary) for each RX frame to align}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00973}00973 \textcolor{comment}{         * IP header on 32bits boundary.  Driver don't set RCR\_IPE bit}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00974}00974 \textcolor{comment}{         * of AXGE\_RCR register, so there should be no padding bytes}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00975}00975 \textcolor{comment}{         * which simplifies RX logic a lot.}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00976}00976 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00977}00977         \textcolor{keywordflow}{while} (pkt\_cnt-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00978}00978                 \textcolor{comment}{/* verify the header offset */}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00979}00979                 \textcolor{keywordflow}{if} ((\textcolor{keywordtype}{int})(hdr\_off + \textcolor{keyword}{sizeof}(pkt\_hdr)) > actlen) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00980}00980                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}End of packet headers\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00981}00981                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00982}00982                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00983}00983                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, hdr\_off, \&pkt\_hdr, \textcolor{keyword}{sizeof}(pkt\_hdr));}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00984}00984                 pkt\_hdr.\mbox{\hyperlink{structaxge__frame__rxhdr_ac3da298a945e8225f49aeb2f8e85137a}{status}} = le32toh(pkt\_hdr.\mbox{\hyperlink{structaxge__frame__rxhdr_ac3da298a945e8225f49aeb2f8e85137a}{status}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00985}00985                 pktlen = \mbox{\hyperlink{if__axgereg_8h_af8a971b4b36fe5763aed9241a3f680c7}{AXGE\_RXBYTES}}(pkt\_hdr.\mbox{\hyperlink{structaxge__frame__rxhdr_ac3da298a945e8225f49aeb2f8e85137a}{status}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00986}00986                 \textcolor{keywordflow}{if} (pos + pktlen > pkt\_end) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00987}00987                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}Data position reached end\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00988}00988                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00989}00989                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00990}00990 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00991}00991                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__axgereg_8h_a3724b24c825e9059fef97151d5db600f}{AXGE\_RX\_ERR}}(pkt\_hdr.\mbox{\hyperlink{structaxge__frame__rxhdr_ac3da298a945e8225f49aeb2f8e85137a}{status}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00992}00992                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}Dropped a packet\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00993}00993                         if\_inc\_counter(ue-\/>\mbox{\hyperlink{structusb__ether_a71587f92772527f72d98bfe0753ecb59}{ue\_ifp}}, IFCOUNTER\_IERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00994}00994                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00995}00995                         \mbox{\hyperlink{if__axge_8c_a0a8e1b62c2d59babc4f14f2f80ff0527}{axge\_rxeof}}(ue, pc, pos, pktlen, pkt\_hdr.\mbox{\hyperlink{structaxge__frame__rxhdr_ac3da298a945e8225f49aeb2f8e85137a}{status}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00996}00996                 pos += (pktlen + 7) \& \string~7;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00997}00997                 hdr\_off += \textcolor{keyword}{sizeof}(pkt\_hdr);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00998}00998         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l00999}00999 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01000}01000 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01001}01001 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01002}\mbox{\hyperlink{if__axge_8c_a0a8e1b62c2d59babc4f14f2f80ff0527}{01002}} \mbox{\hyperlink{if__axge_8c_a0a8e1b62c2d59babc4f14f2f80ff0527}{axge\_rxeof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}},}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01003}01003     \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, uint32\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01004}01004 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01005}01005         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01006}01006         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01007}01007 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01008}01008         ifp = ue-\/>\mbox{\hyperlink{structusb__ether_a71587f92772527f72d98bfe0753ecb59}{ue\_ifp}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01009}01009         \textcolor{keywordflow}{if} (len < ETHER\_HDR\_LEN || len > MCLBYTES -\/ ETHER\_ALIGN) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01010}01010                 if\_inc\_counter(ifp, IFCOUNTER\_IERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01011}01011                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01012}01012         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01013}01013 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01014}01014         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > MHLEN -\/ ETHER\_ALIGN)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01015}01015                 m = m\_getcl(M\_NOWAIT, MT\_DATA, M\_PKTHDR);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01016}01016         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01017}01017                 m = m\_gethdr(M\_NOWAIT, MT\_DATA);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01018}01018         \textcolor{keywordflow}{if} (m == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01019}01019                 if\_inc\_counter(ifp, IFCOUNTER\_IQDROPS, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01020}01020                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01021}01021         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01022}01022         m-\/>m\_pkthdr.rcvif = ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01023}01023         m-\/>m\_len = m-\/>m\_pkthdr.len = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01024}01024         m-\/>m\_data += ETHER\_ALIGN;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01025}01025 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01026}01026         \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}}, mtod(m, uint8\_t *), \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01027}01027 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01028}01028         \textcolor{keywordflow}{if} ((ifp-\/>if\_capenable \& IFCAP\_RXCSUM) != 0) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01029}01029                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__axgereg_8h_a3fffc80f268c97a81882af4ac57ce9ab}{AXGE\_RX\_L3\_CSUM\_ERR}}) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01030}01030                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__axgereg_8h_a6ed3b17679a6506161428e47170dd890}{AXGE\_RX\_L3\_TYPE\_MASK}}) == \mbox{\hyperlink{if__axgereg_8h_a0cd9c5668918f499a1d3fc7b2e531005}{AXGE\_RX\_L3\_TYPE\_IPV4}})}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01031}01031                         m-\/>m\_pkthdr.csum\_flags |= CSUM\_IP\_CHECKED |}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01032}01032                             CSUM\_IP\_VALID;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01033}01033                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__axgereg_8h_a800632df79f5c81ba7e34333bb8fe7a0}{AXGE\_RX\_L4\_CSUM\_ERR}}) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01034}01034                     ((\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__axgereg_8h_a023462d9b198d58f295cb24459a9795f}{AXGE\_RX\_L4\_TYPE\_MASK}}) == \mbox{\hyperlink{if__axgereg_8h_adc6e0dec9ad734543f6ec730b93c70e1}{AXGE\_RX\_L4\_TYPE\_UDP}} ||}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01035}01035                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{if__axgereg_8h_a023462d9b198d58f295cb24459a9795f}{AXGE\_RX\_L4\_TYPE\_MASK}}) == \mbox{\hyperlink{if__axgereg_8h_ab01887e590297abdf57632f085debe55}{AXGE\_RX\_L4\_TYPE\_TCP}})) \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01036}01036                         m-\/>m\_pkthdr.csum\_flags |= CSUM\_DATA\_VALID |}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01037}01037                             CSUM\_PSEUDO\_HDR;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01038}01038                         m-\/>m\_pkthdr.csum\_data = 0xffff;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01039}01039                 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01040}01040         \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01041}01041         if\_inc\_counter(ifp, IFCOUNTER\_IPACKETS, 1);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01042}01042 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01043}01043         (void)mbufq\_enqueue(\&ue-\/>\mbox{\hyperlink{structusb__ether_a9cc7c7d26fbb8aa9ff4c8f334a4a62bc}{ue\_rxq}}, m);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01044}01044 \}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01045}01045 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01046}01046 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01047}\mbox{\hyperlink{if__axge_8c_a3551550c969dfaee2be55e43b20f6d78}{01047}} \mbox{\hyperlink{if__axge_8c_a3551550c969dfaee2be55e43b20f6d78}{axge\_csum\_cfg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01048}01048 \{}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01049}01049         \textcolor{keyword}{struct }\mbox{\hyperlink{structaxge__softc}{axge\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01050}01050         \textcolor{keyword}{struct }ifnet *ifp;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01051}01051         uint8\_t csum;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01052}01052 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01053}01053         sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01054}01054         \mbox{\hyperlink{if__axgereg_8h_a678ac0daeee9d6575a8d651cdc8964c7}{AXGE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01055}01055         ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01056}01056 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01057}01057         csum = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01058}01058         \textcolor{keywordflow}{if} ((ifp-\/>if\_capenable \& IFCAP\_TXCSUM) != 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01059}01059                 csum |= \mbox{\hyperlink{if__axgereg_8h_ac5598fb367d5f8f3b39e933ad6c9475c}{CTCR\_IP}} | \mbox{\hyperlink{if__axgereg_8h_a626b8e95061a6b974b50c84a14b38240}{CTCR\_TCP}} | \mbox{\hyperlink{if__axgereg_8h_ae1b85464344ff7cd5d2afe61778d6cab}{CTCR\_UDP}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01060}01060         \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_aa2571916e895d6418f8185b6dc176f15}{AXGE\_CTCR}}, csum);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01061}01061 }
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01062}01062         csum = 0;}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01063}01063         \textcolor{keywordflow}{if} ((ifp-\/>if\_capenable \& IFCAP\_RXCSUM) != 0)}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01064}01064                 csum |= \mbox{\hyperlink{if__axgereg_8h_a1b9b78959e84824dd9894bcb3f58f34e}{CRCR\_IP}} | \mbox{\hyperlink{if__axgereg_8h_ac71cd8f3307bdacc07c4b22316271f77}{CRCR\_TCP}} | \mbox{\hyperlink{if__axgereg_8h_ae06a918c860e5a0ab0910979ee2ab09e}{CRCR\_UDP}};}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01065}01065         \mbox{\hyperlink{if__axge_8c_af2121231e4ff6aec6af0b80992ab4b97}{axge\_write\_cmd\_1}}(sc, \mbox{\hyperlink{if__axgereg_8h_abce5f7ff2c4346c6bf84a87771f29c3f}{AXGE\_ACCESS\_MAC}}, \mbox{\hyperlink{if__axgereg_8h_a64aaa9f897822726be864369f533fe47}{AXGE\_CRCR}}, csum);}
\DoxyCodeLine{\Hypertarget{if__axge_8c_source_l01066}01066 \}}

\end{DoxyCode}
