\hypertarget{if__kue_8c_source}{}\doxysection{if\+\_\+kue.\+c}
\label{if__kue_8c_source}\index{dev/usb/net/if\_kue.c@{dev/usb/net/if\_kue.c}}
\mbox{\hyperlink{if__kue_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/4-\/Clause}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1997, 1998, 1999, 2000}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00005}00005 \textcolor{comment}{ *      Bill Paul <wpaul@ee.columbia.edu>.  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00015}00015 \textcolor{comment}{ * 3. All advertising materials mentioning features or use of this software}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00016}00016 \textcolor{comment}{ *    must display the following acknowledgement:}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00017}00017 \textcolor{comment}{ *      This product includes software developed by Bill Paul.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00018}00018 \textcolor{comment}{ * 4. Neither the name of the author nor the names of any co-\/contributors}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00019}00019 \textcolor{comment}{ *    may be used to endorse or promote products derived from this software}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00020}00020 \textcolor{comment}{ *    without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00021}00021 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00022}00022 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00023}00023 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00024}00024 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00025}00025 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00026}00026 \textcolor{comment}{ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00027}00027 \textcolor{comment}{ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00028}00028 \textcolor{comment}{ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00029}00029 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00030}00030 \textcolor{comment}{ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00031}00031 \textcolor{comment}{ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00032}00032 \textcolor{comment}{ * THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00033}00033 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00036}\mbox{\hyperlink{if__kue_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00036}} \mbox{\hyperlink{if__kue_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00038}00038 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00039}00039 \textcolor{comment}{ * Kawasaki LSI KL5KUSB101B USB to ethernet adapter driver.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00040}00040 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00041}00041 \textcolor{comment}{ * Written by Bill Paul <wpaul@ee.columbia.edu>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00042}00042 \textcolor{comment}{ * Electrical Engineering Department}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00043}00043 \textcolor{comment}{ * Columbia University, New York City}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00044}00044 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00045}00045 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00046}00046 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00047}00047 \textcolor{comment}{ * The KLSI USB to ethernet adapter chip contains an USB serial interface,}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00048}00048 \textcolor{comment}{ * ethernet MAC and embedded microcontroller (called the QT Engine).}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00049}00049 \textcolor{comment}{ * The chip must have firmware loaded into it before it will operate.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00050}00050 \textcolor{comment}{ * Packets are passed between the chip and host via bulk transfers.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00051}00051 \textcolor{comment}{ * There is an interrupt endpoint mentioned in the software spec, however}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00052}00052 \textcolor{comment}{ * it's currently unused. This device is 10Mbps half-\/duplex only, hence}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00053}00053 \textcolor{comment}{ * there is no media selection logic. The MAC supports a 128 entry}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00054}00054 \textcolor{comment}{ * multicast filter, though the exact size of the filter can depend}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00055}00055 \textcolor{comment}{ * on the firmware. Curiously, while the software spec describes various}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00056}00056 \textcolor{comment}{ * ethernet statistics counters, my sample adapter and firmware combination}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00057}00057 \textcolor{comment}{ * claims not to support any statistics counters at all.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00058}00058 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00059}00059 \textcolor{comment}{ * Note that once we load the firmware in the device, we have to be}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00060}00060 \textcolor{comment}{ * careful not to load it again: if you restart your computer but}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00061}00061 \textcolor{comment}{ * leave the adapter attached to the USB controller, it may remain}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00062}00062 \textcolor{comment}{ * powered on and retain its firmware. In this case, we don't need}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00063}00063 \textcolor{comment}{ * to load the firmware a second time.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00064}00064 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00065}00065 \textcolor{comment}{ * Special thanks to Rob Furr for providing an ADS Technologies}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00066}00066 \textcolor{comment}{ * adapter for development and testing. No monkeys were harmed during}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00067}00067 \textcolor{comment}{ * the development of this driver.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00068}00068 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00073}00073 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00074}00074 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00075}00075 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00076}00076 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00078}00078 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00079}00079 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00080}00080 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00081}00081 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00082}00082 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00083}00083 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00084}00084 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00085}00085 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00086}00086 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00087}00087 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00088}00088 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00090}00090 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00091}00091 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00093}00093 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00094}00094 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00095}00095 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00096}00096 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00098}\mbox{\hyperlink{if__kue_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00098}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR kue\_debug}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00099}00099 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00100}00100 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00102}00102 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__ethernet_8h}{dev/usb/net/usb\_ethernet.h}}>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00103}00103 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__kuereg_8h}{dev/usb/net/if\_kuereg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00104}00104 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__kuefw_8h}{dev/usb/net/if\_kuefw.h}}>}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00106}00106 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00107}00107 \textcolor{comment}{ * Various supported device vendors/products.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00108}00108 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00109}\mbox{\hyperlink{if__kue_8c_a374901964fe50b401904cda453174e5e}{00109}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{if__kue_8c_a374901964fe50b401904cda453174e5e}{kue\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00110}00110 \textcolor{preprocessor}{\#define KUE\_DEV(v,p) \{ USB\_VP(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p) \}}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00111}00111         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(3COM, 3C19250),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00112}00112         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(3COM, 3C460),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00113}00113         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ABOCOM, URE450),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00114}00114         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ADS, UBS10BT),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00115}00115         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ADS, UBS10BTX),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00116}00116         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(AOX, USB101),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00117}00117         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ASANTE, EA),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00118}00118         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ATEN, DSB650C),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00119}00119         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ATEN, UC10T),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00120}00120         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(COREGA, ETHER\_USB\_T),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00121}00121         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(DLINK, DSB650C),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00122}00122         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ENTREGA, E45),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00123}00123         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ENTREGA, XX1),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00124}00124         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(ENTREGA, XX2),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00125}00125         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(IODATA, USBETT),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00126}00126         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(JATON, EDA),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00127}00127         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(KINGSTON, XX1),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00128}00128         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(KLSI, DUH3E10BT),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00129}00129         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(KLSI, DUH3E10BTN),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00130}00130         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(LINKSYS, USB10T),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00131}00131         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(MOBILITY, EA),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00132}00132         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(NETGEAR, EA101),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00133}00133         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(NETGEAR, EA101X),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00134}00134         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(PERACOM, ENET),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00135}00135         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(PERACOM, ENET2),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00136}00136         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(PERACOM, ENET3),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00137}00137         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(PORTGEAR, EA8),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00138}00138         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(PORTGEAR, EA9),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00139}00139         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(PORTSMITH, EEA),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00140}00140         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(SHARK, PA),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00141}00141         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(SILICOM, GPE),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00142}00142         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(SILICOM, U2E),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00143}00143         \mbox{\hyperlink{if__kue_8c_adc098fc187719dc43cc661e76950d130}{KUE\_DEV}}(SMC, 2102USB),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00144}00144 \textcolor{preprocessor}{\#undef KUE\_DEV}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00145}00145 \};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00146}00146 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00147}00147 \textcolor{comment}{/* prototypes */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00149}\mbox{\hyperlink{if__kue_8c_ae347f5a31fc0662d9ec19714846bd542}{00149}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{if__kue_8c_ae347f5a31fc0662d9ec19714846bd542}{kue\_probe}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00150}\mbox{\hyperlink{if__kue_8c_a503e8e7fed33e730760e2607414d2ac4}{00150}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{if__kue_8c_a503e8e7fed33e730760e2607414d2ac4}{kue\_attach}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00151}\mbox{\hyperlink{if__kue_8c_a614d1be04c932183cb0f7ba296b4dee4}{00151}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{if__kue_8c_a614d1be04c932183cb0f7ba296b4dee4}{kue\_detach}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00153}\mbox{\hyperlink{if__kue_8c_a7887e2e77a7f1d1804f66f3cf536e146}{00153}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__kue_8c_a7887e2e77a7f1d1804f66f3cf536e146}{kue\_bulk\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00154}\mbox{\hyperlink{if__kue_8c_ad6d7adac95fbb40658f524c077ccb22d}{00154}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__kue_8c_ad6d7adac95fbb40658f524c077ccb22d}{kue\_bulk\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00156}\mbox{\hyperlink{if__kue_8c_a2378448d32d78146a77765d28462d018}{00156}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__kue_8c_a2378448d32d78146a77765d28462d018}{kue\_attach\_post}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00157}\mbox{\hyperlink{if__kue_8c_a921a7d708380dbc6a69e8adea29c3005}{00157}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__kue_8c_a921a7d708380dbc6a69e8adea29c3005}{kue\_init}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00158}\mbox{\hyperlink{if__kue_8c_a86402129d46bf548485ea11b90044d69}{00158}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__kue_8c_a86402129d46bf548485ea11b90044d69}{kue\_stop}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00159}\mbox{\hyperlink{if__kue_8c_a2832b072580853ef98f21a36db83404b}{00159}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__kue_8c_a2832b072580853ef98f21a36db83404b}{kue\_start}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00160}\mbox{\hyperlink{if__kue_8c_a8e04214eb352727af3a4b9a83a25d525}{00160}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__kue_8c_a8e04214eb352727af3a4b9a83a25d525}{kue\_setmulti}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00161}\mbox{\hyperlink{if__kue_8c_a00874522537dc5a828cafdfe3f834c13}{00161}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__kue_8c_a00874522537dc5a828cafdfe3f834c13}{kue\_setpromisc}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00163}00163 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__kue_8c_ae48bdef4e418c31dc057429a01e4506f}{kue\_do\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *,}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00164}00164                     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00165}00165 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__kue_8c_acdc8b2bc756ac29f7cba8dc560172c11}{kue\_setword}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *, uint8\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00166}00166 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{kue\_ctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *, uint8\_t, uint8\_t, uint16\_t,}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00167}00167                     \textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00168}00168 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__kue_8c_a0e6fdd78ecc75c79f4d8b2607d288d7d}{kue\_load\_fw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__kue_8c_a8688a644482a85bd83f73e96b178dc05}{kue\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00171}00171 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00172}00172 \textcolor{keyword}{static} \textcolor{keywordtype}{int} kue\_debug = 0;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00173}00173 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00174}00174 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, kue, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00175}00175     \textcolor{stringliteral}{"{}USB kue"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00176}00176 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_kue, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN, \&kue\_debug, 0,}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00177}00177     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00178}00178 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00180}\mbox{\hyperlink{if__kue_8c_a62272f36a7ef5bde267797c12364aeb3}{00180}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{if__kue_8c_a62272f36a7ef5bde267797c12364aeb3}{kue\_config}}[\mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4aaebf14cd8506254452ea1c47ca594fd6}{KUE\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00181}00181         [\mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4a72c54992fcfb4d7221e1c0bbbac11fcf}{KUE\_BULK\_DT\_WR}}] = \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00182}00182                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00183}00183                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00184}00184                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00185}00185                 .bufsize = (MCLBYTES + 2 + 64),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00186}00186                 .\mbox{\hyperlink{structusb__config_a0e7feb3ff903ed490f21c1e5b128fc71}{flags}} = \{.\mbox{\hyperlink{structusb__xfer__flags_a1d8753add0a6492b5dc13e1fba50106c}{pipe\_bof}} = 1,\},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00187}00187                 .callback = \mbox{\hyperlink{if__kue_8c_ad6d7adac95fbb40658f524c077ccb22d}{kue\_bulk\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00188}00188                 .timeout = 10000,       \textcolor{comment}{/* 10 seconds */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00189}00189         \},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00190}00190 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00191}00191         [\mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4a7893432a5457c186730f555fc86077d1}{KUE\_BULK\_DT\_RD}}] = \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00192}00192                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00193}00193                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00194}00194                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00195}00195                 .bufsize = (MCLBYTES + 2),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00196}00196                 .\mbox{\hyperlink{structusb__config_a0e7feb3ff903ed490f21c1e5b128fc71}{flags}} = \{.\mbox{\hyperlink{structusb__xfer__flags_a1d8753add0a6492b5dc13e1fba50106c}{pipe\_bof}} = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00197}00197                 .callback = \mbox{\hyperlink{if__kue_8c_a7887e2e77a7f1d1804f66f3cf536e146}{kue\_bulk\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00198}00198                 .timeout = 0,   \textcolor{comment}{/* no timeout */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00199}00199         \},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00200}00200 \};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00202}\mbox{\hyperlink{if__kue_8c_a3107f570782bf1a4053868eb0aabc26f}{00202}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{if__kue_8c_a3107f570782bf1a4053868eb0aabc26f}{kue\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00203}00203         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00204}00204         DEVMETHOD(device\_probe, \mbox{\hyperlink{if__kue_8c_ae347f5a31fc0662d9ec19714846bd542}{kue\_probe}}),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00205}00205         DEVMETHOD(device\_attach, \mbox{\hyperlink{if__kue_8c_a503e8e7fed33e730760e2607414d2ac4}{kue\_attach}}),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00206}00206         DEVMETHOD(device\_detach, \mbox{\hyperlink{if__kue_8c_a614d1be04c932183cb0f7ba296b4dee4}{kue\_detach}}),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00207}00207 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00208}00208         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00209}00209 \};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00211}\mbox{\hyperlink{if__kue_8c_a3d8d045d086aad1185528a29385740a8}{00211}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{if__kue_8c_a3d8d045d086aad1185528a29385740a8}{kue\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00212}00212         .name = \textcolor{stringliteral}{"{}kue"{}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00213}00213         .methods = \mbox{\hyperlink{if__kue_8c_a3107f570782bf1a4053868eb0aabc26f}{kue\_methods}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00214}00214         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}}),}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00215}00215 \};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00217}\mbox{\hyperlink{if__kue_8c_a993120770421e50b88c7f0ce9c16934d}{00217}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{if__kue_8c_a993120770421e50b88c7f0ce9c16934d}{kue\_devclass}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00219}\mbox{\hyperlink{if__kue_8c_ad08428ae9f1e8e5db11cee0172caa40b}{00219}} \mbox{\hyperlink{if__kue_8c_ad08428ae9f1e8e5db11cee0172caa40b}{DRIVER\_MODULE}}(kue, uhub, \mbox{\hyperlink{if__kue_8c_a3d8d045d086aad1185528a29385740a8}{kue\_driver}}, \mbox{\hyperlink{if__kue_8c_a993120770421e50b88c7f0ce9c16934d}{kue\_devclass}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00220}\mbox{\hyperlink{if__kue_8c_a112f29cd79cbe2ab9133e1a25cf10541}{00220}} \mbox{\hyperlink{if__kue_8c_a112f29cd79cbe2ab9133e1a25cf10541}{MODULE\_DEPEND}}(kue, uether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00221}\mbox{\hyperlink{if__kue_8c_aeb75ef65143773bdf7d0b0af84d470d8}{00221}} \mbox{\hyperlink{if__kue_8c_a112f29cd79cbe2ab9133e1a25cf10541}{MODULE\_DEPEND}}(kue, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00222}\mbox{\hyperlink{if__kue_8c_a39f800eed9244a60a59ecece78ae0159}{00222}} \mbox{\hyperlink{if__kue_8c_a112f29cd79cbe2ab9133e1a25cf10541}{MODULE\_DEPEND}}(kue, ether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00223}\mbox{\hyperlink{if__kue_8c_a350592c7b2eddb2879eb9ac9816c2b16}{00223}} \mbox{\hyperlink{if__kue_8c_a350592c7b2eddb2879eb9ac9816c2b16}{MODULE\_VERSION}}(kue, 1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00224}\mbox{\hyperlink{if__kue_8c_aefc2e85117a55c9f965865e2fe888867}{00224}} \mbox{\hyperlink{if__kue_8c_aefc2e85117a55c9f965865e2fe888867}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{if__kue_8c_a374901964fe50b401904cda453174e5e}{kue\_devs}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00226}\mbox{\hyperlink{if__kue_8c_a0c1f9c975cfd936746257bf94a9898de}{00226}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether__methods}{usb\_ether\_methods}} \mbox{\hyperlink{if__kue_8c_a0c1f9c975cfd936746257bf94a9898de}{kue\_ue\_methods}} = \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00227}00227         .\mbox{\hyperlink{structusb__ether__methods_a9568a90d86c68824b84eb6e5ccc7ebfc}{ue\_attach\_post}} = \mbox{\hyperlink{if__kue_8c_a2378448d32d78146a77765d28462d018}{kue\_attach\_post}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00228}00228         .ue\_start = \mbox{\hyperlink{if__kue_8c_a2832b072580853ef98f21a36db83404b}{kue\_start}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00229}00229         .ue\_init = \mbox{\hyperlink{if__kue_8c_a921a7d708380dbc6a69e8adea29c3005}{kue\_init}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00230}00230         .ue\_stop = \mbox{\hyperlink{if__kue_8c_a86402129d46bf548485ea11b90044d69}{kue\_stop}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00231}00231         .ue\_setmulti = \mbox{\hyperlink{if__kue_8c_a8e04214eb352727af3a4b9a83a25d525}{kue\_setmulti}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00232}00232         .ue\_setpromisc = \mbox{\hyperlink{if__kue_8c_a00874522537dc5a828cafdfe3f834c13}{kue\_setpromisc}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00233}00233 \};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00235}00235 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00236}00236 \textcolor{comment}{ * We have a custom do\_request function which is almost like the}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00237}00237 \textcolor{comment}{ * regular do\_request function, except it has a much longer timeout.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00238}00238 \textcolor{comment}{ * Why? Because we need to make requests over the control endpoint}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00239}00239 \textcolor{comment}{ * to download the firmware to the device, which can take longer}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00240}00240 \textcolor{comment}{ * than the default timeout.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00241}00241 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00242}00242 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00243}\mbox{\hyperlink{if__kue_8c_ae48bdef4e418c31dc057429a01e4506f}{00243}} \mbox{\hyperlink{if__kue_8c_ae48bdef4e418c31dc057429a01e4506f}{kue\_do\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00244}00244     \textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00245}00245 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00246}00246         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00248}00248         err = \mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}, \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, data, 60000);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00249}00249 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00250}00250         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00251}00251 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00252}00252 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00253}00253 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00254}\mbox{\hyperlink{if__kue_8c_acdc8b2bc756ac29f7cba8dc560172c11}{00254}} \mbox{\hyperlink{if__kue_8c_acdc8b2bc756ac29f7cba8dc560172c11}{kue\_setword}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc, uint8\_t breq, uint16\_t word)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00255}00255 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00256}00256         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00258}00258         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00259}00259         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = breq;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00260}00260         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, word);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00261}00261         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00262}00262         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00264}00264         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__kue_8c_ae48bdef4e418c31dc057429a01e4506f}{kue\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00265}00265 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00267}00267 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00268}\mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{00268}} \mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{kue\_ctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc, uint8\_t rw, uint8\_t breq,}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00269}00269     uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, \textcolor{keywordtype}{void} *data, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00270}00270 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00271}00271         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00272}00272 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00273}00273         \textcolor{keywordflow}{if} (rw == \mbox{\hyperlink{if__kuereg_8h_a6d569ef80e61c692b1f889ca2a973b46}{KUE\_CTL\_WRITE}})}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00274}00274                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00275}00275         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00276}00276                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00278}00278         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = breq;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00279}00279         \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__kue_8c_source_l00280}00280         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00281}00281         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00282}00282 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00283}00283         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__kue_8c_ae48bdef4e418c31dc057429a01e4506f}{kue\_do\_request}}(sc, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, data));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00284}00284 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00286}00286 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00287}\mbox{\hyperlink{if__kue_8c_a0e6fdd78ecc75c79f4d8b2607d288d7d}{00287}} \mbox{\hyperlink{if__kue_8c_a0e6fdd78ecc75c79f4d8b2607d288d7d}{kue\_load\_fw}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00288}00288 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00289}00289         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__descriptor}{usb\_device\_descriptor}} *dd;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00290}00290         uint16\_t hwrev;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00291}00291         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00293}00293         dd = \mbox{\hyperlink{usb__device_8c_a8f67d00d4e9d051fd220f7a1562654d2}{usbd\_get\_device\_descriptor}}(sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00294}00294         hwrev = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(dd-\/>\mbox{\hyperlink{structusb__device__descriptor_a47583f19747579599678e8543fd652f8}{bcdDevice}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00295}00295 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00296}00296         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00297}00297 \textcolor{comment}{         * First, check if we even need to load the firmware.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00298}00298 \textcolor{comment}{         * If the device was still attached when the system was}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00299}00299 \textcolor{comment}{         * rebooted, it may already have firmware loaded in it.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00300}00300 \textcolor{comment}{         * If this is the case, we don't need to do it again.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00301}00301 \textcolor{comment}{         * And in fact, if we try to load it again, we'll hang,}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00302}00302 \textcolor{comment}{         * so we have to avoid this condition if we don't want}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00303}00303 \textcolor{comment}{         * to look stupid.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00304}00304 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00305}00305 \textcolor{comment}{         * We can test this quickly by checking the bcdRevision}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00306}00306 \textcolor{comment}{         * code. The NIC will return a different revision code if}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00307}00307 \textcolor{comment}{         * it's probed while the firmware is still loaded and}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00308}00308 \textcolor{comment}{         * running.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00309}00309 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00310}00310         \textcolor{keywordflow}{if} (hwrev == 0x0202)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00311}00311                 \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00313}00313         \textcolor{comment}{/* Load code segment */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00314}00314         err = \mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{kue\_ctl}}(sc, \mbox{\hyperlink{if__kuereg_8h_a6d569ef80e61c692b1f889ca2a973b46}{KUE\_CTL\_WRITE}}, \mbox{\hyperlink{if__kuereg_8h_a9b5f3c87bc3a5163fc75bbcc180cb936}{KUE\_CMD\_SEND\_SCAN}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00315}00315             0, \mbox{\hyperlink{if__kuefw_8h_a3a7ddf69b84879b85301267ec812b2aa}{kue\_code\_seg}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__kuefw_8h_a3a7ddf69b84879b85301267ec812b2aa}{kue\_code\_seg}}));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00316}00316         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00317}00317                 device\_printf(sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}failed to load code segment: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00318}00318                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00319}00319                 \textcolor{keywordflow}{return}(ENXIO);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00320}00320         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00322}00322         \textcolor{comment}{/* Load fixup segment */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00323}00323         err = \mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{kue\_ctl}}(sc, \mbox{\hyperlink{if__kuereg_8h_a6d569ef80e61c692b1f889ca2a973b46}{KUE\_CTL\_WRITE}}, \mbox{\hyperlink{if__kuereg_8h_a9b5f3c87bc3a5163fc75bbcc180cb936}{KUE\_CMD\_SEND\_SCAN}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00324}00324             0, \mbox{\hyperlink{if__kuefw_8h_ab0c60987a41ac841dda2522c9248c121}{kue\_fix\_seg}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__kuefw_8h_ab0c60987a41ac841dda2522c9248c121}{kue\_fix\_seg}}));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00325}00325         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00326}00326                 device\_printf(sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}failed to load fixup segment: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00327}00327                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00328}00328                 \textcolor{keywordflow}{return}(ENXIO);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00329}00329         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00331}00331         \textcolor{comment}{/* Send trigger command. */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00332}00332         err = \mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{kue\_ctl}}(sc, \mbox{\hyperlink{if__kuereg_8h_a6d569ef80e61c692b1f889ca2a973b46}{KUE\_CTL\_WRITE}}, \mbox{\hyperlink{if__kuereg_8h_a9b5f3c87bc3a5163fc75bbcc180cb936}{KUE\_CMD\_SEND\_SCAN}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00333}00333             0, \mbox{\hyperlink{if__kuefw_8h_ab7f267a501773e5a536991943bc23c65}{kue\_trig\_seg}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__kuefw_8h_ab7f267a501773e5a536991943bc23c65}{kue\_trig\_seg}}));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00334}00334         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00335}00335                 device\_printf(sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}failed to load trigger segment: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00336}00336                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00337}00337                 \textcolor{keywordflow}{return}(ENXIO);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00338}00338         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00340}00340         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00341}00341 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00342}00342 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00343}00343 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00344}\mbox{\hyperlink{if__kue_8c_a6ee9bde46b01e2ada5e6acb46da862d2}{00344}} \mbox{\hyperlink{if__kue_8c_a00874522537dc5a828cafdfe3f834c13}{kue\_setpromisc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00345}00345 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00346}00346         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00347}00347         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00349}00349         \mbox{\hyperlink{if__kuereg_8h_aaef6c8ac4c868b51f9f25397ea03369f}{KUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00351}00351         \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_PROMISC)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00352}00352                 sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}} |= \mbox{\hyperlink{if__kuereg_8h_a9edcf51257283c2b761917d6217d0992}{KUE\_RXFILT\_PROMISC}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00353}00353         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00354}00354                 sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}} \&= \string~KUE\_RXFILT\_PROMISC;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00355}00355 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00356}00356         \mbox{\hyperlink{if__kue_8c_acdc8b2bc756ac29f7cba8dc560172c11}{kue\_setword}}(sc, \mbox{\hyperlink{if__kuereg_8h_a81bb357acecfcfd09dbd52ef1c16b620}{KUE\_CMD\_SET\_PKT\_FILTER}}, sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00357}00357 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00359}00359 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00360}\mbox{\hyperlink{if__kue_8c_af49c54c36515f601604aa394fdbddff3}{00360}} \mbox{\hyperlink{if__kue_8c_af49c54c36515f601604aa394fdbddff3}{kue\_copy\_maddr}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} sockaddr\_dl *sdl, u\_int cnt)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00361}00361 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00362}00362         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00363}00363 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00364}00364         \textcolor{keywordflow}{if} (cnt >= \mbox{\hyperlink{if__kuereg_8h_a8fa04cd8c9f8bac569a797c9187ebe65}{KUE\_MCFILTCNT}}(sc))}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00365}00365                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00366}00366 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00367}00367         memcpy(\mbox{\hyperlink{if__kuereg_8h_a29039e03ec234bb141c3e299efdc2454}{KUE\_MCFILT}}(sc, cnt), LLADDR(sdl), ETHER\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00368}00368 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00369}00369         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00370}00370 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00372}00372 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00373}\mbox{\hyperlink{if__kue_8c_ad99e46ff6533e5e3ad9d0641362377f6}{00373}} \mbox{\hyperlink{if__kue_8c_a8e04214eb352727af3a4b9a83a25d525}{kue\_setmulti}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00374}00374 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00375}00375         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00376}00376         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00377}00377         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00378}00378 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00379}00379         \mbox{\hyperlink{if__kuereg_8h_aaef6c8ac4c868b51f9f25397ea03369f}{KUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00380}00380 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00381}00381         \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_ALLMULTI || ifp-\/>if\_flags \& IFF\_PROMISC) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00382}00382                 sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}} |= \mbox{\hyperlink{if__kuereg_8h_ae63900d4bf03fe562b87d5b82fdf8e47}{KUE\_RXFILT\_ALLMULTI}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00383}00383                 sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}} \&= \string~KUE\_RXFILT\_MULTICAST;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00384}00384                 \mbox{\hyperlink{if__kue_8c_acdc8b2bc756ac29f7cba8dc560172c11}{kue\_setword}}(sc, \mbox{\hyperlink{if__kuereg_8h_a81bb357acecfcfd09dbd52ef1c16b620}{KUE\_CMD\_SET\_PKT\_FILTER}}, sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00385}00385                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00386}00386         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00387}00387 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00388}00388         sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}} \&= \string~KUE\_RXFILT\_ALLMULTI;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00390}00390         i = if\_foreach\_llmaddr(ifp, \mbox{\hyperlink{if__kue_8c_af49c54c36515f601604aa394fdbddff3}{kue\_copy\_maddr}}, sc);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00392}00392         \textcolor{keywordflow}{if} (i >= \mbox{\hyperlink{if__kuereg_8h_a8fa04cd8c9f8bac569a797c9187ebe65}{KUE\_MCFILTCNT}}(sc))}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00393}00393                 sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}} |= \mbox{\hyperlink{if__kuereg_8h_ae63900d4bf03fe562b87d5b82fdf8e47}{KUE\_RXFILT\_ALLMULTI}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00394}00394         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00395}00395                 sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}} |= \mbox{\hyperlink{if__kuereg_8h_ad5fdc5e3f15bda09c3986bd8e987e9d6}{KUE\_RXFILT\_MULTICAST}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00396}00396                 \mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{kue\_ctl}}(sc, \mbox{\hyperlink{if__kuereg_8h_a6d569ef80e61c692b1f889ca2a973b46}{KUE\_CTL\_WRITE}}, \mbox{\hyperlink{if__kuereg_8h_ac89f76d174e887948a3f1ea4edab7a57}{KUE\_CMD\_SET\_MCAST\_FILTERS}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00397}00397                     i, sc-\/>\mbox{\hyperlink{structkue__softc_ae68420a91c698baefac72e31654ae014}{sc\_mcfilters}}, i * ETHER\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00398}00398         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00399}00399 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00400}00400         \mbox{\hyperlink{if__kue_8c_acdc8b2bc756ac29f7cba8dc560172c11}{kue\_setword}}(sc, \mbox{\hyperlink{if__kuereg_8h_a81bb357acecfcfd09dbd52ef1c16b620}{KUE\_CMD\_SET\_PKT\_FILTER}}, sc-\/>\mbox{\hyperlink{structkue__softc_abde8c5ea43457a952f9c4adcb309778e}{sc\_rxfilt}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00401}00401 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00402}00402 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00403}00403 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00404}00404 \textcolor{comment}{ * Issue a SET\_CONFIGURATION command to reset the MAC. This should be}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00405}00405 \textcolor{comment}{ * done after the firmware is loaded into the adapter in order to}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00406}00406 \textcolor{comment}{ * bring it into proper operation.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00407}00407 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00408}00408 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00409}\mbox{\hyperlink{if__kue_8c_a8688a644482a85bd83f73e96b178dc05}{00409}} \mbox{\hyperlink{if__kue_8c_a8688a644482a85bd83f73e96b178dc05}{kue\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00410}00410 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00411}00411         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config__descriptor}{usb\_config\_descriptor}} *cd;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00412}00412         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00413}00413 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00414}00414         cd = \mbox{\hyperlink{usb__device_8c_a5833d02ea7d69fb84106d7b97391431a}{usbd\_get\_config\_descriptor}}(sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00415}00415 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00416}00416         err = \mbox{\hyperlink{usb__request_8c_a41406cc7a17f599c5c3faea9c6b703ff}{usbd\_req\_set\_config}}(sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}}, \&sc-\/>\mbox{\hyperlink{structkue__softc_ad4bd691d19f96100ed5dab40ef6a789c}{sc\_mtx}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00417}00417             cd-\/>\mbox{\hyperlink{structusb__config__descriptor_affc7816579932817c36478f630b7b7a1}{bConfigurationValue}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00418}00418         \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00419}00419                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}reset failed (ignored)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00421}00421         \textcolor{comment}{/* wait a little while for the chip to get its brains in order */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00422}00422         \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00423}00423 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00425}00425 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00426}\mbox{\hyperlink{if__kue_8c_a6b7413b09bcc85d1adfbf7dd9013f4dd}{00426}} \mbox{\hyperlink{if__kue_8c_a2378448d32d78146a77765d28462d018}{kue\_attach\_post}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00427}00427 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00428}00428         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00429}00429         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00430}00430 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00431}00431         \textcolor{comment}{/* load the firmware into the NIC */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00432}00432         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{if__kue_8c_a0e6fdd78ecc75c79f4d8b2607d288d7d}{kue\_load\_fw}}(sc);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00433}00433         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00434}00434                 device\_printf(sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}}.\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}}, \textcolor{stringliteral}{"{}could not load firmware\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00435}00435                 \textcolor{comment}{/* ignore the error */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00436}00436         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00437}00437 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00438}00438         \textcolor{comment}{/* reset the adapter */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00439}00439         \mbox{\hyperlink{if__kue_8c_a8688a644482a85bd83f73e96b178dc05}{kue\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00440}00440 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00441}00441         \textcolor{comment}{/* read ethernet descriptor */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00442}00442         \mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{kue\_ctl}}(sc, \mbox{\hyperlink{if__kuereg_8h_aacf1e9fdf175a01ac25f70a94b3723f5}{KUE\_CTL\_READ}}, \mbox{\hyperlink{if__kuereg_8h_a2d5d111e1e2147014c9a3ae271c804c2}{KUE\_CMD\_GET\_ETHER\_DESCRIPTOR}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00443}00443             0, \&sc-\/>\mbox{\hyperlink{structkue__softc_a12632288f0a3072d5df5ccceb9666c40}{sc\_desc}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structkue__softc_a12632288f0a3072d5df5ccceb9666c40}{sc\_desc}}));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00444}00444 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00445}00445         \textcolor{comment}{/* copy in ethernet address */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00446}00446         memcpy(ue-\/>\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}}, sc-\/>\mbox{\hyperlink{structkue__softc_a12632288f0a3072d5df5ccceb9666c40}{sc\_desc}}.\mbox{\hyperlink{structkue__ether__desc_a57bd9009bdc333ec3230062a44c790ef}{kue\_macaddr}}, \textcolor{keyword}{sizeof}(ue-\/>\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}}));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00447}00447 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00448}00448 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00449}00449 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00450}00450 \textcolor{comment}{ * Probe for a KLSI chip.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00451}00451 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00452}00452 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00453}\mbox{\hyperlink{if__kue_8c_a3b31b89c4945e837ed4e2daba4edb6d0}{00453}} \mbox{\hyperlink{if__kue_8c_ae347f5a31fc0662d9ec19714846bd542}{kue\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00454}00454 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00455}00455         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00456}00456 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00457}00457         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}})}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00458}00458                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00459}00459         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a9e2af2c9a58f0df11559c7679185b0e8}{bConfigIndex}} != \mbox{\hyperlink{if__kuereg_8h_a184faed4e42eb8e6741a94ccc92417a3}{KUE\_CONFIG\_IDX}})}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00460}00460                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00461}00461         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} != \mbox{\hyperlink{if__kuereg_8h_a735f9bb5fd63b00d19abbb5824a5e27e}{KUE\_IFACE\_IDX}})}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00462}00462                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00463}00463 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00464}00464         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{if__kue_8c_a374901964fe50b401904cda453174e5e}{kue\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__kue_8c_a374901964fe50b401904cda453174e5e}{kue\_devs}}), uaa));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00465}00465 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00467}00467 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00468}00468 \textcolor{comment}{ * Attach the interface. Allocate softc structures, do}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00469}00469 \textcolor{comment}{ * setup and ethernet/BPF attach.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00470}00470 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00471}00471 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00472}\mbox{\hyperlink{if__kue_8c_ab59dea8fff42ed6a7f72cdf488fd4c9d}{00472}} \mbox{\hyperlink{if__kue_8c_a503e8e7fed33e730760e2607414d2ac4}{kue\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00473}00473 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00474}00474         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00475}00475         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00476}00476         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00477}00477         uint8\_t iface\_index;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00478}00478         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00480}00480         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00481}00481         mtx\_init(\&sc-\/>\mbox{\hyperlink{structkue__softc_ad4bd691d19f96100ed5dab40ef6a789c}{sc\_mtx}}, device\_get\_nameunit(dev), NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00482}00482 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00483}00483         iface\_index = \mbox{\hyperlink{if__kuereg_8h_a735f9bb5fd63b00d19abbb5824a5e27e}{KUE\_IFACE\_IDX}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00484}00484         \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__kue_8c_source_l00485}00485             sc-\/>\mbox{\hyperlink{structkue__softc_ac450ed0b2c6471311db9c344c356c24d}{sc\_xfer}}, \mbox{\hyperlink{if__kue_8c_a62272f36a7ef5bde267797c12364aeb3}{kue\_config}}, \mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4aaebf14cd8506254452ea1c47ca594fd6}{KUE\_N\_TRANSFER}}, sc, \&sc-\/>\mbox{\hyperlink{structkue__softc_ad4bd691d19f96100ed5dab40ef6a789c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00486}00486         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00487}00487                 device\_printf(dev, \textcolor{stringliteral}{"{}allocating USB transfers failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00488}00488                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00489}00489         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00490}00490 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00491}00491         sc-\/>\mbox{\hyperlink{structkue__softc_ae68420a91c698baefac72e31654ae014}{sc\_mcfilters}} = malloc(\mbox{\hyperlink{if__kuereg_8h_a8fa04cd8c9f8bac569a797c9187ebe65}{KUE\_MCFILTCNT}}(sc) * ETHER\_ADDR\_LEN,}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00492}00492             M\_USBDEV, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00493}00493         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structkue__softc_ae68420a91c698baefac72e31654ae014}{sc\_mcfilters}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00494}00494                 device\_printf(dev, \textcolor{stringliteral}{"{}failed allocating USB memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00495}00495                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00496}00496         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00498}00498         ue-\/>\mbox{\hyperlink{structusb__ether_af979047fbf844a27c7f2266c87fd03a4}{ue\_sc}} = sc;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00499}00499         ue-\/>\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}} = dev;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00500}00500         ue-\/>\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00501}00501         ue-\/>\mbox{\hyperlink{structusb__ether_af390d8b75a7bd2d9f347f808f0c15a4f}{ue\_mtx}} = \&sc-\/>\mbox{\hyperlink{structkue__softc_ad4bd691d19f96100ed5dab40ef6a789c}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00502}00502         ue-\/>\mbox{\hyperlink{structusb__ether_a2b787f8aab7c5db729211c3a1c3bc141}{ue\_methods}} = \&\mbox{\hyperlink{if__kue_8c_a0c1f9c975cfd936746257bf94a9898de}{kue\_ue\_methods}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00503}00503 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00504}00504         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__ethernet_8c_ad75ada74935d33849a41ff3448d1f291}{uether\_ifattach}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00505}00505         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00506}00506                 device\_printf(dev, \textcolor{stringliteral}{"{}could not attach interface\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00507}00507                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00508}00508         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00509}00509         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00510}00510 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00511}00511 detach:}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00512}00512         \mbox{\hyperlink{if__kue_8c_a614d1be04c932183cb0f7ba296b4dee4}{kue\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00513}00513         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00514}00514 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00515}00515 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00516}00516 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00517}\mbox{\hyperlink{if__kue_8c_a1763888c3d33fa22ff65acef96ff4f3c}{00517}} \mbox{\hyperlink{if__kue_8c_a614d1be04c932183cb0f7ba296b4dee4}{kue\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00518}00518 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00519}00519         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00520}00520         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00521}00521 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00522}00522         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structkue__softc_ac450ed0b2c6471311db9c344c356c24d}{sc\_xfer}}, \mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4aaebf14cd8506254452ea1c47ca594fd6}{KUE\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00523}00523         \mbox{\hyperlink{usb__ethernet_8c_a15f91b3474535af40e16b2c05d023e99}{uether\_ifdetach}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00524}00524         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structkue__softc_ad4bd691d19f96100ed5dab40ef6a789c}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00525}00525         free(sc-\/>\mbox{\hyperlink{structkue__softc_ae68420a91c698baefac72e31654ae014}{sc\_mcfilters}}, M\_USBDEV);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00526}00526 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00527}00527         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00528}00528 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00529}00529 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00530}00530 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00531}00531 \textcolor{comment}{ * A frame has been uploaded: pass the resulting mbuf chain up to}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00532}00532 \textcolor{comment}{ * the higher level protocols.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00533}00533 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00534}00534 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00535}\mbox{\hyperlink{if__kue_8c_a02a53fcd95d550127cc3c7e4d1909da7}{00535}} \mbox{\hyperlink{if__kue_8c_a7887e2e77a7f1d1804f66f3cf536e146}{kue\_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__kue_8c_source_l00536}00536 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00537}00537         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00538}00538         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00539}00539         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00540}00540         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00541}00541         uint8\_t buf[2];}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00542}00542         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00543}00543         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00544}00544 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00545}00545         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00546}00546 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00547}00547         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00548}00548         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00549}00549 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00550}00550                 \textcolor{keywordflow}{if} (actlen <= (\textcolor{keywordtype}{int})(2 + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} ether\_header))) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00551}00551                         if\_inc\_counter(ifp, IFCOUNTER\_IERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00552}00552                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00553}00553                 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00554}00554                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00555}00555                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, 0, buf, 2);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00556}00556                 actlen -\/= 2;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00557}00557                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = buf[0] | (buf[1] << 8);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00558}00558                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = min(actlen, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00559}00559 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00560}00560                 \mbox{\hyperlink{usb__ethernet_8c_a5604159981a8d90f457c503a8123072d}{uether\_rxbuf}}(ue, pc, 2, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00561}00561                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00562}00562         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00563}00563 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00564}00564                 \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__kue_8c_source_l00565}00565                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00566}00566                 \mbox{\hyperlink{usb__ethernet_8c_a007aff306fb41573661e03ac71e45966}{uether\_rxflush}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00567}00567                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00569}00569         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00570}00570                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}bulk read error, \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00571}00571                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00572}00572 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00573}00573                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00574}00574                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00575}00575                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00576}00576                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00577}00577                 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00578}00578                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00579}00579         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00580}00580 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00581}00581 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00582}00582 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00583}\mbox{\hyperlink{if__kue_8c_a7ffeff9c38105f35b6c9692dfb37291b}{00583}} \mbox{\hyperlink{if__kue_8c_ad6d7adac95fbb40658f524c077ccb22d}{kue\_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__kue_8c_source_l00584}00584 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00585}00585         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00586}00586         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(\&sc-\/>\mbox{\hyperlink{structkue__softc_a027b16457b838ceb6cc6ea97d0cc4b50}{sc\_ue}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00587}00587         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00588}00588         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00589}00589         \textcolor{keywordtype}{int} total\_len;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00590}00590         \textcolor{keywordtype}{int} temp\_len;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00591}00591         uint8\_t buf[2];}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00592}00592 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00593}00593         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00594}00594         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00595}00595                 DPRINTFN(11, \textcolor{stringliteral}{"{}transfer complete\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00596}00596                 if\_inc\_counter(ifp, IFCOUNTER\_OPACKETS, 1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00597}00597 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00598}00598                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00599}00599         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00600}00600 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00601}00601                 IFQ\_DRV\_DEQUEUE(\&ifp-\/>if\_snd, m);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00602}00602 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00603}00603                 \textcolor{keywordflow}{if} (m == NULL)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00604}00604                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00605}00605                 \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.len > MCLBYTES)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00606}00606                         m-\/>m\_pkthdr.len = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00607}00607                 temp\_len = (m-\/>m\_pkthdr.len + 2);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00608}00608                 total\_len = (temp\_len + (64 -\/ (temp\_len \% 64)));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00609}00609 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00610}00610                 \textcolor{comment}{/* the first two bytes are the frame length */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00611}00611 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00612}00612                 buf[0] = (uint8\_t)(m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00613}00613                 buf[1] = (uint8\_t)(m-\/>m\_pkthdr.len >> 8);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00614}00614 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00615}00615                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00616}00616                 \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, buf, 2);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00617}00617                 \mbox{\hyperlink{usbdi_8h_a9696aa8bcb25b1adcf45e8387a13897a}{usbd\_m\_copy\_in}}(pc, 2, m, 0, m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00618}00618 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00619}00619                 \mbox{\hyperlink{usb__busdma_8c_a462a55c3d98d29504f946ac3882f2961}{usbd\_frame\_zero}}(pc, temp\_len, total\_len -\/ temp\_len);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00620}00620                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, total\_len);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00621}00621 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00622}00622                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00623}00623 \textcolor{comment}{                 * if there's a BPF listener, bounce a copy}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00624}00624 \textcolor{comment}{                 * of this frame to him:}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00625}00625 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00626}00626                 BPF\_MTAP(ifp, m);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00627}00627 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00628}00628                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00629}00629 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00630}00630                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00631}00631 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00632}00632                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00633}00633 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00634}00634         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00635}00635                 DPRINTFN(11, \textcolor{stringliteral}{"{}transfer error, \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00636}00636                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00637}00637 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00638}00638                 if\_inc\_counter(ifp, IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00639}00639 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00640}00640                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00641}00641                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00642}00642                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00643}00643                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00644}00644                 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00645}00645                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00646}00646         \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00647}00647 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00648}00648 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00649}00649 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00650}\mbox{\hyperlink{if__kue_8c_a6995833b9971744ed762e78efb5195af}{00650}} \mbox{\hyperlink{if__kue_8c_a2832b072580853ef98f21a36db83404b}{kue\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00651}00651 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00652}00652         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00653}00653 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00654}00654         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00655}00655 \textcolor{comment}{         * start the USB transfers, if not already started:}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00656}00656 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00657}00657         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structkue__softc_ac450ed0b2c6471311db9c344c356c24d}{sc\_xfer}}[\mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4a7893432a5457c186730f555fc86077d1}{KUE\_BULK\_DT\_RD}}]);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00658}00658         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structkue__softc_ac450ed0b2c6471311db9c344c356c24d}{sc\_xfer}}[\mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4a72c54992fcfb4d7221e1c0bbbac11fcf}{KUE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00659}00659 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00660}00660 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00661}00661 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00662}\mbox{\hyperlink{if__kue_8c_a593bd6d1b0c183a58191c4b49a496cee}{00662}} \mbox{\hyperlink{if__kue_8c_a921a7d708380dbc6a69e8adea29c3005}{kue\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00663}00663 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00664}00664         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00665}00665         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00666}00666 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00667}00667         \mbox{\hyperlink{if__kuereg_8h_aaef6c8ac4c868b51f9f25397ea03369f}{KUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00668}00668 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00669}00669         \textcolor{comment}{/* set MAC address */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00670}00670         \mbox{\hyperlink{if__kue_8c_a1d19f4b4baefdcc564334c8cebda852f}{kue\_ctl}}(sc, \mbox{\hyperlink{if__kuereg_8h_a6d569ef80e61c692b1f889ca2a973b46}{KUE\_CTL\_WRITE}}, \mbox{\hyperlink{if__kuereg_8h_a91c68fac7c1e70286bde17115d184921}{KUE\_CMD\_SET\_MAC}},}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00671}00671             0, IF\_LLADDR(ifp), ETHER\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00672}00672 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00673}00673         \textcolor{comment}{/* I'm not sure how to tune these. */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00674}00674 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00675}00675         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00676}00676 \textcolor{comment}{         * Leave this one alone for now; setting it}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00677}00677 \textcolor{comment}{         * wrong causes lockups on some machines/controllers.}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00678}00678 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00679}00679         \mbox{\hyperlink{if__kue_8c_acdc8b2bc756ac29f7cba8dc560172c11}{kue\_setword}}(sc, \mbox{\hyperlink{if__kuereg_8h_ad19d9ce256efd6ea1d5da602f3f681a5}{KUE\_CMD\_SET\_SOFS}}, 1);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00680}00680 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00681}00681         \mbox{\hyperlink{if__kue_8c_acdc8b2bc756ac29f7cba8dc560172c11}{kue\_setword}}(sc, \mbox{\hyperlink{if__kuereg_8h_a5fb836e288a08fb4495ed6bdc7014e16}{KUE\_CMD\_SET\_URB\_SIZE}}, 64);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00682}00682 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00683}00683         \textcolor{comment}{/* load the multicast filter */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00684}00684         \mbox{\hyperlink{if__kue_8c_a00874522537dc5a828cafdfe3f834c13}{kue\_setpromisc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00686}00686         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(sc-\/>\mbox{\hyperlink{structkue__softc_ac450ed0b2c6471311db9c344c356c24d}{sc\_xfer}}[\mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4a72c54992fcfb4d7221e1c0bbbac11fcf}{KUE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00687}00687 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00688}00688         ifp-\/>if\_drv\_flags |= IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00689}00689         \mbox{\hyperlink{if__kue_8c_a2832b072580853ef98f21a36db83404b}{kue\_start}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00690}00690 \}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00691}00691 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00692}00692 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00693}\mbox{\hyperlink{if__kue_8c_a8aad03e7fe4a74417c6c6898add77063}{00693}} \mbox{\hyperlink{if__kue_8c_a86402129d46bf548485ea11b90044d69}{kue\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00694}00694 \{}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00695}00695         \textcolor{keyword}{struct }\mbox{\hyperlink{structkue__softc}{kue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00696}00696         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00697}00697 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00698}00698         \mbox{\hyperlink{if__kuereg_8h_aaef6c8ac4c868b51f9f25397ea03369f}{KUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00699}00699 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00700}00700         ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00701}00701 }
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00702}00702         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00703}00703 \textcolor{comment}{         * stop all the transfers, if not already stopped:}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00704}00704 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00705}00705         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structkue__softc_ac450ed0b2c6471311db9c344c356c24d}{sc\_xfer}}[\mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4a72c54992fcfb4d7221e1c0bbbac11fcf}{KUE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00706}00706         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structkue__softc_ac450ed0b2c6471311db9c344c356c24d}{sc\_xfer}}[\mbox{\hyperlink{if__kuereg_8h_a4caf8d8f829279fba122163d961608a4a7893432a5457c186730f555fc86077d1}{KUE\_BULK\_DT\_RD}}]);}
\DoxyCodeLine{\Hypertarget{if__kue_8c_source_l00707}00707 \}}

\end{DoxyCode}
