\hypertarget{if__cue_8c_source}{}\doxysection{if\+\_\+cue.\+c}
\label{if__cue_8c_source}\index{dev/usb/net/if\_cue.c@{dev/usb/net/if\_cue.c}}
\mbox{\hyperlink{if__cue_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/4-\/Clause}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1997, 1998, 1999, 2000}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00005}00005 \textcolor{comment}{ *      Bill Paul <wpaul@ee.columbia.edu>.  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00015}00015 \textcolor{comment}{ * 3. All advertising materials mentioning features or use of this software}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00016}00016 \textcolor{comment}{ *    must display the following acknowledgement:}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00017}00017 \textcolor{comment}{ *      This product includes software developed by Bill Paul.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00018}00018 \textcolor{comment}{ * 4. Neither the name of the author nor the names of any co-\/contributors}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00019}00019 \textcolor{comment}{ *    may be used to endorse or promote products derived from this software}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00020}00020 \textcolor{comment}{ *    without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00021}00021 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00022}00022 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00023}00023 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00024}00024 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00025}00025 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00026}00026 \textcolor{comment}{ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00027}00027 \textcolor{comment}{ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00028}00028 \textcolor{comment}{ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00029}00029 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00030}00030 \textcolor{comment}{ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00031}00031 \textcolor{comment}{ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00032}00032 \textcolor{comment}{ * THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00033}00033 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00036}\mbox{\hyperlink{if__cue_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00036}} \mbox{\hyperlink{if__cue_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00038}00038 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00039}00039 \textcolor{comment}{ * CATC USB-\/EL1210A USB to ethernet driver. Used in the CATC Netmate}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00040}00040 \textcolor{comment}{ * adapters and others.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00041}00041 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00042}00042 \textcolor{comment}{ * Written by Bill Paul <wpaul@ee.columbia.edu>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00043}00043 \textcolor{comment}{ * Electrical Engineering Department}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00044}00044 \textcolor{comment}{ * Columbia University, New York City}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00045}00045 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00047}00047 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00048}00048 \textcolor{comment}{ * The CATC USB-\/EL1210A provides USB ethernet support at 10Mbps. The}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00049}00049 \textcolor{comment}{ * RX filter uses a 512-\/bit multicast hash table, single perfect entry}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00050}00050 \textcolor{comment}{ * for the station address, and promiscuous mode. Unlike the ADMtek}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00051}00051 \textcolor{comment}{ * and KLSI chips, the CATC ASIC supports read and write combining}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00052}00052 \textcolor{comment}{ * mode where multiple packets can be transferred using a single bulk}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00053}00053 \textcolor{comment}{ * transaction, which helps performance a great deal.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00054}00054 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00073}00073 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00074}00074 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00076}00076 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00079}00079 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00080}00080 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00081}00081 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00082}00082 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00084}\mbox{\hyperlink{if__cue_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00084}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR cue\_debug}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00085}00085 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00086}00086 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00088}00088 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__ethernet_8h}{dev/usb/net/usb\_ethernet.h}}>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00089}00089 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{if__cuereg_8h}{dev/usb/net/if\_cuereg.h}}>}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00091}00091 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00092}00092 \textcolor{comment}{ * Various supported device vendors/products.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00093}00093 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00095}00095 \textcolor{comment}{/* Belkin F5U111 adapter covered by NETMATE entry */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00097}\mbox{\hyperlink{if__cue_8c_a036aa7a46e24334be9113877c669b434}{00097}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{if__cue_8c_a036aa7a46e24334be9113877c669b434}{cue\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00098}00098 \textcolor{preprocessor}{\#define CUE\_DEV(v,p) \{ USB\_VP(USB\_VENDOR\_\#\#v, USB\_PRODUCT\_\#\#v\#\#\_\#\#p) \}}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00099}00099         \mbox{\hyperlink{if__cue_8c_a60303f099dd7c3c15cf586f107a7e227}{CUE\_DEV}}(CATC, NETMATE),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00100}00100         \mbox{\hyperlink{if__cue_8c_a60303f099dd7c3c15cf586f107a7e227}{CUE\_DEV}}(CATC, NETMATE2),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00101}00101         \mbox{\hyperlink{if__cue_8c_a60303f099dd7c3c15cf586f107a7e227}{CUE\_DEV}}(SMARTBRIDGES, SMARTLINK),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00102}00102 \textcolor{preprocessor}{\#undef CUE\_DEV}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00103}00103 \};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00105}00105 \textcolor{comment}{/* prototypes */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00107}\mbox{\hyperlink{if__cue_8c_a6ceccade7843f1f81565ce55d5881e54}{00107}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{if__cue_8c_a6ceccade7843f1f81565ce55d5881e54}{cue\_probe}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00108}\mbox{\hyperlink{if__cue_8c_a21ce5c25b5b121983e58ce9e418763a8}{00108}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{if__cue_8c_a21ce5c25b5b121983e58ce9e418763a8}{cue\_attach}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00109}\mbox{\hyperlink{if__cue_8c_a392db21423f1dbb9c562b04ab1fbf2b8}{00109}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{if__cue_8c_a392db21423f1dbb9c562b04ab1fbf2b8}{cue\_detach}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00111}\mbox{\hyperlink{if__cue_8c_afe27136121eac306a7ecf01aba0ac7b4}{00111}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__cue_8c_afe27136121eac306a7ecf01aba0ac7b4}{cue\_bulk\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00112}\mbox{\hyperlink{if__cue_8c_a9d5a7e56100a24a02744b325705a21e3}{00112}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{if__cue_8c_a9d5a7e56100a24a02744b325705a21e3}{cue\_bulk\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00114}\mbox{\hyperlink{if__cue_8c_a889aa30e785da5edb4310aae496e0666}{00114}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__cue_8c_a889aa30e785da5edb4310aae496e0666}{cue\_attach\_post}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00115}\mbox{\hyperlink{if__cue_8c_a5a9c8ac8bb54dd6d8af42b575dfeaf26}{00115}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__cue_8c_a5a9c8ac8bb54dd6d8af42b575dfeaf26}{cue\_init}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00116}\mbox{\hyperlink{if__cue_8c_a80e5fdeb3ad648f7053927433ae21b69}{00116}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__cue_8c_a80e5fdeb3ad648f7053927433ae21b69}{cue\_stop}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00117}\mbox{\hyperlink{if__cue_8c_a7e17666f91f883275332d0716feef4bb}{00117}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__cue_8c_a7e17666f91f883275332d0716feef4bb}{cue\_start}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00118}\mbox{\hyperlink{if__cue_8c_a8caa267fb811d1763cf1e30c013f1240}{00118}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__cue_8c_a8caa267fb811d1763cf1e30c013f1240}{cue\_tick}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00119}\mbox{\hyperlink{if__cue_8c_afae08e181887f80f1c0e8452bad5d20a}{00119}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__cue_8c_afae08e181887f80f1c0e8452bad5d20a}{cue\_setmulti}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00120}\mbox{\hyperlink{if__cue_8c_a47f4e53bd7b7147e5c969d5ae7eef535}{00120}} \textcolor{keyword}{static} \mbox{\hyperlink{usb__ethernet_8h_ac29bf5775f723e7b7a1f7a29c906b93d}{uether\_fn\_t}} \mbox{\hyperlink{if__cue_8c_a47f4e53bd7b7147e5c969d5ae7eef535}{cue\_setpromisc}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00121}00121 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00122}00122 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{if__cue_8c_a555c3cc96a521894e7db3aa5004b8263}{cue\_csr\_read\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00123}00123 \textcolor{keyword}{static} uint16\_t \mbox{\hyperlink{if__cue_8c_a95a888db6d72d99649dda254c4b24e7c}{cue\_csr\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00124}00124 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *, uint16\_t, uint16\_t);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00125}00125 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__cue_8c_a63e1567202222c184bd840fc83753714}{cue\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *, uint8\_t, uint16\_t, \textcolor{keywordtype}{void} *, \textcolor{keywordtype}{int});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00126}00126 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{if__cue_8c_af601786bf15bd9c8d4e7d075303fe01e}{cue\_getmac}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *, \textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00127}00127 \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{if__cue_8c_aa7ead4ef0d17aa187fe2027d240e9121}{cue\_mchash}}(\textcolor{keyword}{const} uint8\_t *);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00128}00128 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{if__cue_8c_a560499b0c44c1a5c7a1a96f4946f159b}{cue\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00129}00129 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00130}00130 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00131}00131 \textcolor{keyword}{static} \textcolor{keywordtype}{int} cue\_debug = 0;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00133}00133 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, cue, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00134}00134     \textcolor{stringliteral}{"{}USB cue"{}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00135}00135 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_cue, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN, \&cue\_debug, 0,}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00136}00136     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00137}00137 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00139}\mbox{\hyperlink{if__cue_8c_ab93d5cde8eda52203845ff791e222270}{00139}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{if__cue_8c_ab93d5cde8eda52203845ff791e222270}{cue\_config}}[\mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291da0e15f6703e5fc315ba110dc632e5f326}{CUE\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00140}00140         [\mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291da293e415cdb0cc80aab163e26aff08417}{CUE\_BULK\_DT\_WR}}] = \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00141}00141                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00142}00142                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00143}00143                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00144}00144                 .bufsize = (MCLBYTES + 2),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00145}00145                 .\mbox{\hyperlink{structusb__config_a0e7feb3ff903ed490f21c1e5b128fc71}{flags}} = \{.\mbox{\hyperlink{structusb__xfer__flags_a1d8753add0a6492b5dc13e1fba50106c}{pipe\_bof}} = 1,\},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00146}00146                 .callback = \mbox{\hyperlink{if__cue_8c_a9d5a7e56100a24a02744b325705a21e3}{cue\_bulk\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00147}00147                 .timeout = 10000,       \textcolor{comment}{/* 10 seconds */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00148}00148         \},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00150}00150         [\mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291dac526af14b6ca7a4012341623a2b0475e}{CUE\_BULK\_DT\_RD}}] = \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00151}00151                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00152}00152                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00153}00153                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00154}00154                 .bufsize = (MCLBYTES + 2),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00155}00155                 .\mbox{\hyperlink{structusb__config_a0e7feb3ff903ed490f21c1e5b128fc71}{flags}} = \{.\mbox{\hyperlink{structusb__xfer__flags_a1d8753add0a6492b5dc13e1fba50106c}{pipe\_bof}} = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00156}00156                 .callback = \mbox{\hyperlink{if__cue_8c_afe27136121eac306a7ecf01aba0ac7b4}{cue\_bulk\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00157}00157         \},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00158}00158 \};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00160}\mbox{\hyperlink{if__cue_8c_a74061abeeea8e7bac6bb491bd3720f20}{00160}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{if__cue_8c_a74061abeeea8e7bac6bb491bd3720f20}{cue\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00161}00161         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00162}00162         DEVMETHOD(device\_probe, \mbox{\hyperlink{if__cue_8c_a6ceccade7843f1f81565ce55d5881e54}{cue\_probe}}),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00163}00163         DEVMETHOD(device\_attach, \mbox{\hyperlink{if__cue_8c_a21ce5c25b5b121983e58ce9e418763a8}{cue\_attach}}),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00164}00164         DEVMETHOD(device\_detach, \mbox{\hyperlink{if__cue_8c_a392db21423f1dbb9c562b04ab1fbf2b8}{cue\_detach}}),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00166}00166         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00167}00167 \};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00169}\mbox{\hyperlink{if__cue_8c_a552f477fb62ba5434d6e9bc728ca16fb}{00169}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{if__cue_8c_a552f477fb62ba5434d6e9bc728ca16fb}{cue\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00170}00170         .name = \textcolor{stringliteral}{"{}cue"{}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00171}00171         .methods = \mbox{\hyperlink{if__cue_8c_a74061abeeea8e7bac6bb491bd3720f20}{cue\_methods}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00172}00172         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}}),}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00173}00173 \};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00175}\mbox{\hyperlink{if__cue_8c_ab2e0e190ac97a619ca586201925df58e}{00175}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{if__cue_8c_ab2e0e190ac97a619ca586201925df58e}{cue\_devclass}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00177}\mbox{\hyperlink{if__cue_8c_a19d57df19abda83e540b7cdc9ac19ef4}{00177}} \mbox{\hyperlink{if__cue_8c_a19d57df19abda83e540b7cdc9ac19ef4}{DRIVER\_MODULE}}(cue, uhub, \mbox{\hyperlink{if__cue_8c_a552f477fb62ba5434d6e9bc728ca16fb}{cue\_driver}}, \mbox{\hyperlink{if__cue_8c_ab2e0e190ac97a619ca586201925df58e}{cue\_devclass}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00178}\mbox{\hyperlink{if__cue_8c_a26a95829d2134491014caf3f14ef0eeb}{00178}} \mbox{\hyperlink{if__cue_8c_a26a95829d2134491014caf3f14ef0eeb}{MODULE\_DEPEND}}(cue, uether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00179}\mbox{\hyperlink{if__cue_8c_a49432b1aa8480ccda92c7c3fc25f532c}{00179}} \mbox{\hyperlink{if__cue_8c_a26a95829d2134491014caf3f14ef0eeb}{MODULE\_DEPEND}}(cue, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00180}\mbox{\hyperlink{if__cue_8c_a6e936d36c4cd8e1c2b028d7fdbc28a45}{00180}} \mbox{\hyperlink{if__cue_8c_a26a95829d2134491014caf3f14ef0eeb}{MODULE\_DEPEND}}(cue, ether, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00181}\mbox{\hyperlink{if__cue_8c_a75593bf67d581375870ce65a9f04de2d}{00181}} \mbox{\hyperlink{if__cue_8c_a75593bf67d581375870ce65a9f04de2d}{MODULE\_VERSION}}(cue, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00182}\mbox{\hyperlink{if__cue_8c_a9f78e939675a075f39985bf768b1cf8d}{00182}} \mbox{\hyperlink{if__cue_8c_a9f78e939675a075f39985bf768b1cf8d}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{if__cue_8c_a036aa7a46e24334be9113877c669b434}{cue\_devs}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00184}\mbox{\hyperlink{if__cue_8c_a6f5e84eede5f769ad660371741ca74e9}{00184}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether__methods}{usb\_ether\_methods}} \mbox{\hyperlink{if__cue_8c_a6f5e84eede5f769ad660371741ca74e9}{cue\_ue\_methods}} = \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00185}00185         .\mbox{\hyperlink{structusb__ether__methods_a9568a90d86c68824b84eb6e5ccc7ebfc}{ue\_attach\_post}} = \mbox{\hyperlink{if__cue_8c_a889aa30e785da5edb4310aae496e0666}{cue\_attach\_post}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00186}00186         .ue\_start = \mbox{\hyperlink{if__cue_8c_a7e17666f91f883275332d0716feef4bb}{cue\_start}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00187}00187         .ue\_init = \mbox{\hyperlink{if__cue_8c_a5a9c8ac8bb54dd6d8af42b575dfeaf26}{cue\_init}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00188}00188         .ue\_stop = \mbox{\hyperlink{if__cue_8c_a80e5fdeb3ad648f7053927433ae21b69}{cue\_stop}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00189}00189         .ue\_tick = \mbox{\hyperlink{if__cue_8c_a8caa267fb811d1763cf1e30c013f1240}{cue\_tick}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00190}00190         .ue\_setmulti = \mbox{\hyperlink{if__cue_8c_afae08e181887f80f1c0e8452bad5d20a}{cue\_setmulti}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00191}00191         .ue\_setpromisc = \mbox{\hyperlink{if__cue_8c_a47f4e53bd7b7147e5c969d5ae7eef535}{cue\_setpromisc}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00192}00192 \};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00194}\mbox{\hyperlink{if__cue_8c_a862c66c18eebd7e1ca144fd3cf35ea6f}{00194}} \textcolor{preprocessor}{\#define CUE\_SETBIT(sc, reg, x)                          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00195}00195 \textcolor{preprocessor}{        cue\_csr\_write\_1(sc, reg, cue\_csr\_read\_1(sc, reg) | (x))}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00197}\mbox{\hyperlink{if__cue_8c_aff28beac6281baede87cfdc8c739df88}{00197}} \textcolor{preprocessor}{\#define CUE\_CLRBIT(sc, reg, x)                          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00198}00198 \textcolor{preprocessor}{        cue\_csr\_write\_1(sc, reg, cue\_csr\_read\_1(sc, reg) \& \string~(x))}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00200}00200 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00201}\mbox{\hyperlink{if__cue_8c_a555c3cc96a521894e7db3aa5004b8263}{00201}} \mbox{\hyperlink{if__cue_8c_a555c3cc96a521894e7db3aa5004b8263}{cue\_csr\_read\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}})}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00202}00202 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00203}00203         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00204}00204         uint8\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00206}00206         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00207}00207         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__cuereg_8h_ac08d39e577f671405a17a2099990811b}{CUE\_CMD\_READREG}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00208}00208         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00209}00209         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00210}00210         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00211}00211 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00212}00212         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1000)) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00213}00213                 \textcolor{comment}{/* ignore any errors */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00214}00214         \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00215}00215         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00216}00216 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00218}00218 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00219}\mbox{\hyperlink{if__cue_8c_a95a888db6d72d99649dda254c4b24e7c}{00219}} \mbox{\hyperlink{if__cue_8c_a95a888db6d72d99649dda254c4b24e7c}{cue\_csr\_read\_2}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}})}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00220}00220 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00221}00221         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00222}00222         uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00224}00224         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00225}00225         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__cuereg_8h_ac08d39e577f671405a17a2099990811b}{CUE\_CMD\_READREG}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00226}00226         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00227}00227         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00228}00228         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 2);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00230}00230         (void)\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \&\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1000);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00231}00231         \textcolor{keywordflow}{return} (le16toh(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00232}00232 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00234}00234 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00235}\mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{00235}} \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc, uint16\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, uint16\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}})}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00236}00236 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00237}00237         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00239}00239         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00240}00240         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__cuereg_8h_a192413d6f0fdbc608432f7753a840356}{CUE\_CMD\_WRITEREG}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00241}00241         \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__cue_8c_source_l00242}00242         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00243}00243         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00244}00244 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00245}00245         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL, 1000));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00246}00246 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00248}00248 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00249}\mbox{\hyperlink{if__cue_8c_a63e1567202222c184bd840fc83753714}{00249}} \mbox{\hyperlink{if__cue_8c_a63e1567202222c184bd840fc83753714}{cue\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc, uint8\_t cmd, uint16\_t addr, \textcolor{keywordtype}{void} *buf, \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00250}00250 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00251}00251         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00252}00252 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00253}00253         \textcolor{keywordflow}{if} (cmd == \mbox{\hyperlink{if__cuereg_8h_a94dbee4f0955bfef185765dd4b596c57}{CUE\_CMD\_READSRAM}})}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00254}00254                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00255}00255         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00256}00256                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00257}00257         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = cmd;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00258}00258         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00259}00259         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, addr);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00260}00260         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00262}00262         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf, 1000));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00263}00263 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00264}00264 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00265}00265 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00266}\mbox{\hyperlink{if__cue_8c_af601786bf15bd9c8d4e7d075303fe01e}{00266}} \mbox{\hyperlink{if__cue_8c_af601786bf15bd9c8d4e7d075303fe01e}{cue\_getmac}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc, \textcolor{keywordtype}{void} *buf)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00267}00267 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00268}00268         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00270}00270         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00271}00271         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__cuereg_8h_a53586517690df639afe2e8de7d62539d}{CUE\_CMD\_GET\_MACADDR}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00272}00272         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00273}00273         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00274}00274         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, ETHER\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00276}00276         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf, 1000));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00277}00277 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00279}\mbox{\hyperlink{if__cue_8c_a094715b7aec6b6d8b2e06ad2f4de53f9}{00279}} \textcolor{preprocessor}{\#define CUE\_BITS 9}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00281}00281 \textcolor{keyword}{static} uint32\_t}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00282}\mbox{\hyperlink{if__cue_8c_aa7ead4ef0d17aa187fe2027d240e9121}{00282}} \mbox{\hyperlink{if__cue_8c_aa7ead4ef0d17aa187fe2027d240e9121}{cue\_mchash}}(\textcolor{keyword}{const} uint8\_t *addr)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00283}00283 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00284}00284         uint32\_t crc;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00286}00286         \textcolor{comment}{/* Compute CRC for the address value. */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00287}00287         crc = ether\_crc32\_le(addr, ETHER\_ADDR\_LEN);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00289}00289         \textcolor{keywordflow}{return} (crc \& ((1 << \mbox{\hyperlink{if__cue_8c_a094715b7aec6b6d8b2e06ad2f4de53f9}{CUE\_BITS}}) -\/ 1));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00290}00290 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00291}00291 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00292}00292 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00293}\mbox{\hyperlink{if__cue_8c_ae78f54e5d4884ed8065bf537963bdf36}{00293}} \mbox{\hyperlink{if__cue_8c_a47f4e53bd7b7147e5c969d5ae7eef535}{cue\_setpromisc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00294}00294 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00295}00295         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00296}00296         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00298}00298         \mbox{\hyperlink{if__cuereg_8h_a238609746d5fcaf70d7d83eeab281d80}{CUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00300}00300         \textcolor{comment}{/* if we want promiscuous mode, set the allframes bit */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00301}00301         \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_PROMISC)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00302}00302                 \mbox{\hyperlink{if__cue_8c_a862c66c18eebd7e1ca144fd3cf35ea6f}{CUE\_SETBIT}}(sc, \mbox{\hyperlink{if__cuereg_8h_a4a494b8facc1da72c5918b62a8fb79b7}{CUE\_ETHCTL}}, \mbox{\hyperlink{if__cuereg_8h_a93ffc3c90464197cc98d8ef981e919af}{CUE\_ETHCTL\_PROMISC}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00303}00303         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00304}00304                 \mbox{\hyperlink{if__cue_8c_aff28beac6281baede87cfdc8c739df88}{CUE\_CLRBIT}}(sc, \mbox{\hyperlink{if__cuereg_8h_a4a494b8facc1da72c5918b62a8fb79b7}{CUE\_ETHCTL}}, \mbox{\hyperlink{if__cuereg_8h_a93ffc3c90464197cc98d8ef981e919af}{CUE\_ETHCTL\_PROMISC}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00306}00306         \textcolor{comment}{/* write multicast hash-\/bits */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00307}00307         \mbox{\hyperlink{if__cue_8c_afae08e181887f80f1c0e8452bad5d20a}{cue\_setmulti}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00308}00308 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00310}00310 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00311}\mbox{\hyperlink{if__cue_8c_a7c6098f5c2a0af6172b3888645207dfc}{00311}} \mbox{\hyperlink{if__cue_8c_a7c6098f5c2a0af6172b3888645207dfc}{cue\_hash\_maddr}}(\textcolor{keywordtype}{void} *arg, \textcolor{keyword}{struct} sockaddr\_dl *sdl, u\_int cnt)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00312}00312 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00313}00313         uint8\_t *hashtbl = arg;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00314}00314         uint32\_t h;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00315}00315 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00316}00316         h = \mbox{\hyperlink{if__cue_8c_aa7ead4ef0d17aa187fe2027d240e9121}{cue\_mchash}}(LLADDR(sdl));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00317}00317         hashtbl[h >> 3] |= 1 << (h \& 0x7);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00318}00318 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00319}00319         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00320}00320 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00322}00322 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00323}\mbox{\hyperlink{if__cue_8c_a2eaad288fca7a15863b241817ce86db8}{00323}} \mbox{\hyperlink{if__cue_8c_afae08e181887f80f1c0e8452bad5d20a}{cue\_setmulti}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00324}00324 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00325}00325         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00326}00326         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00327}00327         uint32\_t h, i;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00328}00328         uint8\_t hashtbl[8] = \{ 0, 0, 0, 0, 0, 0, 0, 0 \};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00329}00329 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00330}00330         \mbox{\hyperlink{if__cuereg_8h_a238609746d5fcaf70d7d83eeab281d80}{CUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00331}00331 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00332}00332         \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_ALLMULTI || ifp-\/>if\_flags \& IFF\_PROMISC) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00333}00333                 \textcolor{keywordflow}{for} (i = 0; i < 8; i++)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00334}00334                         hashtbl[i] = 0xff;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00335}00335                 \mbox{\hyperlink{if__cue_8c_a63e1567202222c184bd840fc83753714}{cue\_mem}}(sc, \mbox{\hyperlink{if__cuereg_8h_aac482b31b582cb8eb290b51a3ef45f4f}{CUE\_CMD\_WRITESRAM}}, \mbox{\hyperlink{if__cuereg_8h_af803349653400b2944d1ff823fdb5351}{CUE\_MCAST\_TABLE\_ADDR}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00336}00336                     \&hashtbl, 8);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00337}00337                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00338}00338         \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00340}00340         \textcolor{comment}{/* now program new ones */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00341}00341         if\_foreach\_llmaddr(ifp, \mbox{\hyperlink{if__cue_8c_a7c6098f5c2a0af6172b3888645207dfc}{cue\_hash\_maddr}}, hashtbl);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00342}00342 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00343}00343         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00344}00344 \textcolor{comment}{         * Also include the broadcast address in the filter}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00345}00345 \textcolor{comment}{         * so we can receive broadcast frames.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00346}00346 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00347}00347         \textcolor{keywordflow}{if} (ifp-\/>if\_flags \& IFF\_BROADCAST) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00348}00348                 h = \mbox{\hyperlink{if__cue_8c_aa7ead4ef0d17aa187fe2027d240e9121}{cue\_mchash}}(ifp-\/>if\_broadcastaddr);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00349}00349                 hashtbl[h >> 3] |= 1 << (h \& 0x7);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00350}00350         \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00351}00351 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00352}00352         \mbox{\hyperlink{if__cue_8c_a63e1567202222c184bd840fc83753714}{cue\_mem}}(sc, \mbox{\hyperlink{if__cuereg_8h_aac482b31b582cb8eb290b51a3ef45f4f}{CUE\_CMD\_WRITESRAM}}, \mbox{\hyperlink{if__cuereg_8h_af803349653400b2944d1ff823fdb5351}{CUE\_MCAST\_TABLE\_ADDR}}, \&hashtbl, 8);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00353}00353 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00354}00354 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00355}00355 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00356}\mbox{\hyperlink{if__cue_8c_a560499b0c44c1a5c7a1a96f4946f159b}{00356}} \mbox{\hyperlink{if__cue_8c_a560499b0c44c1a5c7a1a96f4946f159b}{cue\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00357}00357 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00358}00358         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00360}00360         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6aafebff48631e00449299005c4a858c}{UT\_WRITE\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00361}00361         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{if__cuereg_8h_a1410faface3fcf89486f5777c1d282ae}{CUE\_CMD\_RESET}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00362}00362         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00363}00363         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00364}00364         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00365}00365 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00366}00366         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__ethernet_8h_a273a1683cef752bf3069d84f08f1925d}{uether\_do\_request}}(\&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL, 1000)) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00367}00367                 \textcolor{comment}{/* ignore any errors */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00368}00368         \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00370}00370         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00371}00371 \textcolor{comment}{         * wait a little while for the chip to get its brains in order:}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00372}00372 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00373}00373         \mbox{\hyperlink{usb__ethernet_8c_a6dfcae805d33efd0daf6deb1ae48c165}{uether\_pause}}(\&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00374}00374 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00375}00375 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00376}00376 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00377}\mbox{\hyperlink{if__cue_8c_ab78710d36f3081a08cde4afebe227166}{00377}} \mbox{\hyperlink{if__cue_8c_a889aa30e785da5edb4310aae496e0666}{cue\_attach\_post}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00378}00378 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00379}00379         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00380}00380 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00381}00381         \mbox{\hyperlink{if__cue_8c_af601786bf15bd9c8d4e7d075303fe01e}{cue\_getmac}}(sc, ue-\/>\mbox{\hyperlink{structusb__ether_ad1e7ad3609b27b7adab9d6086a20059a}{ue\_eaddr}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00382}00382 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00384}00384 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00385}\mbox{\hyperlink{if__cue_8c_aa630d2d7228db52d71790aa6f03b4059}{00385}} \mbox{\hyperlink{if__cue_8c_a6ceccade7843f1f81565ce55d5881e54}{cue\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00386}00386 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00387}00387         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00388}00388 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00389}00389         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}})}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00390}00390                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00391}00391         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a9e2af2c9a58f0df11559c7679185b0e8}{bConfigIndex}} != \mbox{\hyperlink{if__cuereg_8h_a4e1dddcb6d31b6ffb0dff81e354544b9}{CUE\_CONFIG\_IDX}})}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00392}00392                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00393}00393         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} != \mbox{\hyperlink{if__cuereg_8h_ad169fcabf57c9524c5adf5da7fc34160}{CUE\_IFACE\_IDX}})}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00394}00394                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00395}00395 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00396}00396         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{if__cue_8c_a036aa7a46e24334be9113877c669b434}{cue\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{if__cue_8c_a036aa7a46e24334be9113877c669b434}{cue\_devs}}), uaa));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00397}00397 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00398}00398 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00399}00399 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00400}00400 \textcolor{comment}{ * Attach the interface. Allocate softc structures, do ifmedia}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00401}00401 \textcolor{comment}{ * setup and ethernet/BPF attach.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00402}00402 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00403}00403 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00404}\mbox{\hyperlink{if__cue_8c_a3b65509f7ea01d130fec66730f010b3a}{00404}} \mbox{\hyperlink{if__cue_8c_a21ce5c25b5b121983e58ce9e418763a8}{cue\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00405}00405 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00406}00406         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00407}00407         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00408}00408         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00409}00409         uint8\_t iface\_index;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00410}00410         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00411}00411 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00412}00412         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00413}00413         mtx\_init(\&sc-\/>\mbox{\hyperlink{structcue__softc_a9371aadcab62fba8ebaa15a23ff1ad2b}{sc\_mtx}}, device\_get\_nameunit(dev), NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00414}00414 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00415}00415         iface\_index = \mbox{\hyperlink{if__cuereg_8h_ad169fcabf57c9524c5adf5da7fc34160}{CUE\_IFACE\_IDX}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00416}00416         \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__cue_8c_source_l00417}00417             sc-\/>\mbox{\hyperlink{structcue__softc_a38e8f255539e4827814be4ec8238792c}{sc\_xfer}}, \mbox{\hyperlink{if__cue_8c_ab93d5cde8eda52203845ff791e222270}{cue\_config}}, \mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291da0e15f6703e5fc315ba110dc632e5f326}{CUE\_N\_TRANSFER}}, sc, \&sc-\/>\mbox{\hyperlink{structcue__softc_a9371aadcab62fba8ebaa15a23ff1ad2b}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00418}00418         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00419}00419                 device\_printf(dev, \textcolor{stringliteral}{"{}allocating USB transfers failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00420}00420                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00421}00421         \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00422}00422 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00423}00423         ue-\/>\mbox{\hyperlink{structusb__ether_af979047fbf844a27c7f2266c87fd03a4}{ue\_sc}} = sc;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00424}00424         ue-\/>\mbox{\hyperlink{structusb__ether_ade8818fa2f6daf9addc42c3e39027515}{ue\_dev}} = dev;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00425}00425         ue-\/>\mbox{\hyperlink{structusb__ether_a9038cbb427aa5dfd094db8d183f909cc}{ue\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00426}00426         ue-\/>\mbox{\hyperlink{structusb__ether_af390d8b75a7bd2d9f347f808f0c15a4f}{ue\_mtx}} = \&sc-\/>\mbox{\hyperlink{structcue__softc_a9371aadcab62fba8ebaa15a23ff1ad2b}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00427}00427         ue-\/>\mbox{\hyperlink{structusb__ether_a2b787f8aab7c5db729211c3a1c3bc141}{ue\_methods}} = \&\mbox{\hyperlink{if__cue_8c_a6f5e84eede5f769ad660371741ca74e9}{cue\_ue\_methods}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00429}00429         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__ethernet_8c_ad75ada74935d33849a41ff3448d1f291}{uether\_ifattach}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00430}00430         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00431}00431                 device\_printf(dev, \textcolor{stringliteral}{"{}could not attach interface\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00432}00432                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00433}00433         \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00434}00434         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00435}00435 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00436}00436 detach:}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00437}00437         \mbox{\hyperlink{if__cue_8c_a392db21423f1dbb9c562b04ab1fbf2b8}{cue\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00438}00438         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00439}00439 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00440}00440 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00441}00441 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00442}\mbox{\hyperlink{if__cue_8c_a57f54ae7308c49400e03998703071407}{00442}} \mbox{\hyperlink{if__cue_8c_a392db21423f1dbb9c562b04ab1fbf2b8}{cue\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00443}00443 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00444}00444         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00445}00445         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00447}00447         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structcue__softc_a38e8f255539e4827814be4ec8238792c}{sc\_xfer}}, \mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291da0e15f6703e5fc315ba110dc632e5f326}{CUE\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00448}00448         \mbox{\hyperlink{usb__ethernet_8c_a15f91b3474535af40e16b2c05d023e99}{uether\_ifdetach}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00449}00449         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structcue__softc_a9371aadcab62fba8ebaa15a23ff1ad2b}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00450}00450 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00451}00451         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00452}00452 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00454}00454 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00455}\mbox{\hyperlink{if__cue_8c_a13227848725ef4c95481c970b1ebe2ef}{00455}} \mbox{\hyperlink{if__cue_8c_afe27136121eac306a7ecf01aba0ac7b4}{cue\_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__cue_8c_source_l00456}00456 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00457}00457         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00458}00458         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue = \&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00459}00459         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00460}00460         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00461}00461         uint8\_t buf[2];}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00462}00462         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00463}00463         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00465}00465         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00467}00467         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00468}00468         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00469}00469 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00470}00470                 \textcolor{keywordflow}{if} (actlen <= (\textcolor{keywordtype}{int})(2 + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} ether\_header))) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00471}00471                         if\_inc\_counter(ifp, IFCOUNTER\_IERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00472}00472                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00473}00473                 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00474}00474                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00475}00475                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, 0, buf, 2);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00476}00476                 actlen -\/= 2;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00477}00477                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = buf[0] | (buf[1] << 8);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00478}00478                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = min(actlen, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00480}00480                 \mbox{\hyperlink{usb__ethernet_8c_a5604159981a8d90f457c503a8123072d}{uether\_rxbuf}}(ue, pc, 2, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00481}00481                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00482}00482         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00483}00483 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00484}00484                 \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__cue_8c_source_l00485}00485                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00486}00486                 \mbox{\hyperlink{usb__ethernet_8c_a007aff306fb41573661e03ac71e45966}{uether\_rxflush}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00487}00487                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00488}00488 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00489}00489         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00490}00490                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}bulk read error, \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00491}00491                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00492}00492 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00493}00493                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00494}00494                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00495}00495                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00496}00496                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00497}00497                 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00498}00498                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00499}00499         \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00500}00500 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00501}00501 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00502}00502 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00503}\mbox{\hyperlink{if__cue_8c_a2700d4dcefdc7cef307662e696d1b727}{00503}} \mbox{\hyperlink{if__cue_8c_a9d5a7e56100a24a02744b325705a21e3}{cue\_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__cue_8c_source_l00504}00504 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00505}00505         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00506}00506         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(\&sc-\/>\mbox{\hyperlink{structcue__softc_aead1272fcbd51254c1cb3bed9cba6639}{sc\_ue}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00507}00507         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00508}00508         \textcolor{keyword}{struct }mbuf *m;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00509}00509         uint8\_t buf[2];}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00510}00510 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00511}00511         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00512}00512         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00513}00513                 DPRINTFN(11, \textcolor{stringliteral}{"{}transfer complete\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00514}00514                 if\_inc\_counter(ifp, IFCOUNTER\_OPACKETS, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00515}00515 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00516}00516                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00517}00517         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00518}00518 tr\_setup:}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00519}00519                 IFQ\_DRV\_DEQUEUE(\&ifp-\/>if\_snd, m);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00520}00520 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00521}00521                 \textcolor{keywordflow}{if} (m == NULL)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00522}00522                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00523}00523                 \textcolor{keywordflow}{if} (m-\/>m\_pkthdr.len > MCLBYTES)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00524}00524                         m-\/>m\_pkthdr.len = MCLBYTES;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00525}00525                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, (m-\/>m\_pkthdr.len + 2));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00526}00526 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00527}00527                 \textcolor{comment}{/* the first two bytes are the frame length */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00528}00528 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00529}00529                 buf[0] = (uint8\_t)(m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00530}00530                 buf[1] = (uint8\_t)(m-\/>m\_pkthdr.len >> 8);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00532}00532                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00533}00533                 \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, buf, 2);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00534}00534                 \mbox{\hyperlink{usbdi_8h_a9696aa8bcb25b1adcf45e8387a13897a}{usbd\_m\_copy\_in}}(pc, 2, m, 0, m-\/>m\_pkthdr.len);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00535}00535 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00536}00536                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00537}00537 \textcolor{comment}{                 * If there's a BPF listener, bounce a copy of this frame}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00538}00538 \textcolor{comment}{                 * to him.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00539}00539 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00540}00540                 BPF\_MTAP(ifp, m);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00541}00541 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00542}00542                 m\_freem(m);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00543}00543 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00544}00544                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00545}00545 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00546}00546                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00547}00547 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00548}00548         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00549}00549                 DPRINTFN(11, \textcolor{stringliteral}{"{}transfer error, \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00550}00550                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00551}00551 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00552}00552                 if\_inc\_counter(ifp, IFCOUNTER\_OERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00553}00553 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00554}00554                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00555}00555                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00556}00556                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00557}00557                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00558}00558                 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00559}00559                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00560}00560         \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00561}00561 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00562}00562 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00563}00563 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00564}\mbox{\hyperlink{if__cue_8c_a6c0f93817d64514d25cb300297d958a2}{00564}} \mbox{\hyperlink{if__cue_8c_a8caa267fb811d1763cf1e30c013f1240}{cue\_tick}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00565}00565 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00566}00566         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00567}00567         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00569}00569         \mbox{\hyperlink{if__cuereg_8h_a238609746d5fcaf70d7d83eeab281d80}{CUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00570}00570 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00571}00571         if\_inc\_counter(ifp, IFCOUNTER\_COLLISIONS, \mbox{\hyperlink{if__cue_8c_a95a888db6d72d99649dda254c4b24e7c}{cue\_csr\_read\_2}}(sc, \mbox{\hyperlink{if__cuereg_8h_a5c972948e27badcf661c1a37cabea130}{CUE\_TX\_SINGLECOLL}}));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00572}00572         if\_inc\_counter(ifp, IFCOUNTER\_COLLISIONS, \mbox{\hyperlink{if__cue_8c_a95a888db6d72d99649dda254c4b24e7c}{cue\_csr\_read\_2}}(sc, \mbox{\hyperlink{if__cuereg_8h_a52e4db4610fc06020d392565dd25533f}{CUE\_TX\_MULTICOLL}}));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00573}00573         if\_inc\_counter(ifp, IFCOUNTER\_COLLISIONS, \mbox{\hyperlink{if__cue_8c_a95a888db6d72d99649dda254c4b24e7c}{cue\_csr\_read\_2}}(sc, \mbox{\hyperlink{if__cuereg_8h_a154b8a0926f7e445594be1f99f6178e6}{CUE\_TX\_EXCESSCOLL}}));}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00574}00574 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00575}00575         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__cue_8c_a95a888db6d72d99649dda254c4b24e7c}{cue\_csr\_read\_2}}(sc, \mbox{\hyperlink{if__cuereg_8h_aba631b689809806a8c7ca6a67cfc2a9d}{CUE\_RX\_FRAMEERR}}))}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00576}00576                 if\_inc\_counter(ifp, IFCOUNTER\_IERRORS, 1);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00577}00577 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00578}00578 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00579}00579 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00580}\mbox{\hyperlink{if__cue_8c_a615c0634d77ebdcb040db022143394ad}{00580}} \mbox{\hyperlink{if__cue_8c_a7e17666f91f883275332d0716feef4bb}{cue\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00581}00581 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00582}00582         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00583}00583 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00584}00584         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00585}00585 \textcolor{comment}{         * start the USB transfers, if not already started:}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00586}00586 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00587}00587         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structcue__softc_a38e8f255539e4827814be4ec8238792c}{sc\_xfer}}[\mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291dac526af14b6ca7a4012341623a2b0475e}{CUE\_BULK\_DT\_RD}}]);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00588}00588         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structcue__softc_a38e8f255539e4827814be4ec8238792c}{sc\_xfer}}[\mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291da293e415cdb0cc80aab163e26aff08417}{CUE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00589}00589 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00590}00590 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00591}00591 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00592}\mbox{\hyperlink{if__cue_8c_a8439aaa0bb98f199fb262bfb52817c71}{00592}} \mbox{\hyperlink{if__cue_8c_a5a9c8ac8bb54dd6d8af42b575dfeaf26}{cue\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00593}00593 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00594}00594         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00595}00595         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00596}00596         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00597}00597 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00598}00598         \mbox{\hyperlink{if__cuereg_8h_a238609746d5fcaf70d7d83eeab281d80}{CUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00599}00599 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00600}00600         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00601}00601 \textcolor{comment}{         * Cancel pending I/O and free all RX/TX buffers.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00602}00602 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00603}00603         \mbox{\hyperlink{if__cue_8c_a80e5fdeb3ad648f7053927433ae21b69}{cue\_stop}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00604}00604 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00605}00605         \mbox{\hyperlink{if__cue_8c_a560499b0c44c1a5c7a1a96f4946f159b}{cue\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00606}00606 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00607}00607         \textcolor{comment}{/* Set MAC address */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00608}00608         \textcolor{keywordflow}{for} (i = 0; i < ETHER\_ADDR\_LEN; i++)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00609}00609                 \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(sc, \mbox{\hyperlink{if__cuereg_8h_a3aa7acb6ff91974a068340be98b54a16}{CUE\_PAR0}} -\/ i, IF\_LLADDR(ifp)[i]);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00610}00610 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00611}00611         \textcolor{comment}{/* Enable RX logic. */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00612}00612         \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(sc, \mbox{\hyperlink{if__cuereg_8h_a4a494b8facc1da72c5918b62a8fb79b7}{CUE\_ETHCTL}}, \mbox{\hyperlink{if__cuereg_8h_a62b8c789c4bd7c973d3f8cf8c277975c}{CUE\_ETHCTL\_RX\_ON}} | \mbox{\hyperlink{if__cuereg_8h_a57d0f390a859806e9473c2b12c01fb24}{CUE\_ETHCTL\_MCAST\_ON}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00613}00613 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00614}00614         \textcolor{comment}{/* Load the multicast filter */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00615}00615         \mbox{\hyperlink{if__cue_8c_a47f4e53bd7b7147e5c969d5ae7eef535}{cue\_setpromisc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00616}00616 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00617}00617         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00618}00618 \textcolor{comment}{         * Set the number of RX and TX buffers that we want}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00619}00619 \textcolor{comment}{         * to reserve inside the ASIC.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00620}00620 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00621}00621         \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(sc, \mbox{\hyperlink{if__cuereg_8h_a98ebe05dfc9e0378896337d788d31c0e}{CUE\_RX\_BUFPKTS}}, \mbox{\hyperlink{if__cuereg_8h_a2043f9b3baaa63c84aa577c1469c76c8}{CUE\_RX\_FRAMES}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00622}00622         \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(sc, \mbox{\hyperlink{if__cuereg_8h_a30ead6eb885f60e3dd62b7266163574b}{CUE\_TX\_BUFPKTS}}, \mbox{\hyperlink{if__cuereg_8h_a7be34fd6d13216a2e2852a44cb74939c}{CUE\_TX\_FRAMES}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00623}00623 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00624}00624         \textcolor{comment}{/* Set advanced operation modes. */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00625}00625         \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(sc, \mbox{\hyperlink{if__cuereg_8h_abe7c2ac6fcb8f1f083527953357b4276}{CUE\_ADVANCED\_OPMODES}},}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00626}00626             \mbox{\hyperlink{if__cuereg_8h_a835f75a3c73233903ed3ec4cc57abd28}{CUE\_AOP\_EMBED\_RXLEN}} | 0x01);\textcolor{comment}{/* 1 wait state */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00627}00627 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00628}00628         \textcolor{comment}{/* Program the LED operation. */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00629}00629         \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(sc, \mbox{\hyperlink{if__cuereg_8h_a3b10540301f3155959e85ee8de3fc241}{CUE\_LEDCTL}}, \mbox{\hyperlink{if__cuereg_8h_a6a3469942910b7c3035b8f343146dc73}{CUE\_LEDCTL\_FOLLOW\_LINK}});}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00631}00631         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(sc-\/>\mbox{\hyperlink{structcue__softc_a38e8f255539e4827814be4ec8238792c}{sc\_xfer}}[\mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291da293e415cdb0cc80aab163e26aff08417}{CUE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00632}00632 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00633}00633         ifp-\/>if\_drv\_flags |= IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00634}00634         \mbox{\hyperlink{if__cue_8c_a7e17666f91f883275332d0716feef4bb}{cue\_start}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00635}00635 \}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00636}00636 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00637}00637 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00638}00638 \textcolor{comment}{ * Stop the adapter and free any mbufs allocated to the}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00639}00639 \textcolor{comment}{ * RX and TX lists.}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00640}00640 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00641}00641 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00642}\mbox{\hyperlink{if__cue_8c_a26f2a44b7ae8ec30bc18523760dbed5e}{00642}} \mbox{\hyperlink{if__cue_8c_a80e5fdeb3ad648f7053927433ae21b69}{cue\_stop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__ether}{usb\_ether}} *ue)}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00643}00643 \{}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00644}00644         \textcolor{keyword}{struct }\mbox{\hyperlink{structcue__softc}{cue\_softc}} *sc = \mbox{\hyperlink{usb__ethernet_8c_a2909b68b692c9927da7458ac0fe8c987}{uether\_getsc}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00645}00645         \textcolor{keyword}{struct }ifnet *ifp = \mbox{\hyperlink{usb__ethernet_8c_a577186dbc54db90bca2eb053432d932d}{uether\_getifp}}(ue);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00646}00646 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00647}00647         \mbox{\hyperlink{if__cuereg_8h_a238609746d5fcaf70d7d83eeab281d80}{CUE\_LOCK\_ASSERT}}(sc, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00648}00648 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00649}00649         ifp-\/>if\_drv\_flags \&= \string~IFF\_DRV\_RUNNING;}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00650}00650 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00651}00651         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00652}00652 \textcolor{comment}{         * stop all the transfers, if not already stopped:}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00653}00653 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00654}00654         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structcue__softc_a38e8f255539e4827814be4ec8238792c}{sc\_xfer}}[\mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291da293e415cdb0cc80aab163e26aff08417}{CUE\_BULK\_DT\_WR}}]);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00655}00655         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structcue__softc_a38e8f255539e4827814be4ec8238792c}{sc\_xfer}}[\mbox{\hyperlink{if__cuereg_8h_a0944a4353780132eeab7b06e3e42291dac526af14b6ca7a4012341623a2b0475e}{CUE\_BULK\_DT\_RD}}]);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00656}00656 }
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00657}00657         \mbox{\hyperlink{if__cue_8c_a7432ca3ff985dfc89ce9fe701091b6d6}{cue\_csr\_write\_1}}(sc, \mbox{\hyperlink{if__cuereg_8h_a4a494b8facc1da72c5918b62a8fb79b7}{CUE\_ETHCTL}}, 0);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00658}00658         \mbox{\hyperlink{if__cue_8c_a560499b0c44c1a5c7a1a96f4946f159b}{cue\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{if__cue_8c_source_l00659}00659 \}}

\end{DoxyCode}
