\hypertarget{ehci_8c_source}{}\doxysection{ehci.\+c}
\label{ehci_8c_source}\index{dev/usb/controller/ehci.c@{dev/usb/controller/ehci.c}}
\mbox{\hyperlink{ehci_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00001}00001 \textcolor{comment}{/* \$FreeBSD\$ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00002}00002 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00003}00003 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00006}00006 \textcolor{comment}{ * Copyright (c) 2004 The NetBSD Foundation, Inc. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00007}00007 \textcolor{comment}{ * Copyright (c) 2004 Lennart Augustsson. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00008}00008 \textcolor{comment}{ * Copyright (c) 2004 Charles M. Hannum. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00010}00010 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00011}00011 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00012}00012 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00013}00013 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00015}00015 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00016}00016 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00017}00017 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00018}00018 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00019}00019 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00020}00020 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00021}00021 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00022}00022 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00023}00023 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00024}00024 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00025}00025 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00026}00026 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00027}00027 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00028}00028 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00029}00029 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00030}00030 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00032}00032 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00033}00033 \textcolor{comment}{ * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00034}00034 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00035}00035 \textcolor{comment}{ * The EHCI 0.96 spec can be found at}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00036}00036 \textcolor{comment}{ * http://developer.intel.com/technology/usb/download/ehci-\/r096.pdf}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00037}00037 \textcolor{comment}{ * The EHCI 1.0 spec can be found at}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00038}00038 \textcolor{comment}{ * http://developer.intel.com/technology/usb/download/ehci-\/r10.pdf}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00039}00039 \textcolor{comment}{ * and the USB 2.0 spec at}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00040}00040 \textcolor{comment}{ * http://www.usb.org/developers/docs/usb\_20.zip}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00041}00041 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00042}00042 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00044}00044 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00045}00045 \textcolor{comment}{ * TODO: }}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00046}00046 \textcolor{comment}{ * 1) command failures are not recovered correctly}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00047}00047 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00049}00049 \textcolor{preprocessor}{\#ifdef USB\_GLOBAL\_INCLUDE\_FILE}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00050}00050 \textcolor{preprocessor}{\#include USB\_GLOBAL\_INCLUDE\_FILE}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00051}00051 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00074}\mbox{\hyperlink{ehci_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00074}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR ehcidebug}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00076}00076 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__core_8h}{dev/usb/usb\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00078}00078 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__busdma_8h}{dev/usb/usb\_busdma.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00079}00079 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00080}00080 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__transfer_8h}{dev/usb/usb\_transfer.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00081}00081 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__device_8h}{dev/usb/usb\_device.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00082}00082 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__hub_8h}{dev/usb/usb\_hub.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00083}00083 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__util_8h}{dev/usb/usb\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00085}00085 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__controller_8h}{dev/usb/usb\_controller.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00086}00086 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__bus_8h}{dev/usb/usb\_bus.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00087}00087 \textcolor{preprocessor}{\#endif                  }\textcolor{comment}{/* USB\_GLOBAL\_INCLUDE\_FILE */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00089}00089 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ehci_8h}{dev/usb/controller/ehci.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00090}00090 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ehcireg_8h}{dev/usb/controller/ehcireg.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00092}\mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{00092}} \textcolor{preprocessor}{\#define EHCI\_BUS2SC(bus) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00093}00093 \textcolor{preprocessor}{        \_\_containerof(bus, ehci\_softc\_t, sc\_bus)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00095}00095 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00096}00096 \textcolor{keyword}{static} \textcolor{keywordtype}{int} ehcidebug = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00097}00097 \textcolor{keyword}{static} \textcolor{keywordtype}{int} ehcinohighspeed = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00098}00098 \textcolor{keyword}{static} \textcolor{keywordtype}{int} ehciiaadbug = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00099}00099 \textcolor{keyword}{static} \textcolor{keywordtype}{int} ehcilostintrbug = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00101}00101 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, ehci, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00102}00102     \textcolor{stringliteral}{"{}USB ehci"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00103}00103 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_ehci, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00104}00104     \&ehcidebug, 0, \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00105}00105 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_ehci, OID\_AUTO, no\_hs, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00106}00106     \&ehcinohighspeed, 0, \textcolor{stringliteral}{"{}Disable High Speed USB"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00107}00107 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_ehci, OID\_AUTO, iaadbug, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00108}00108     \&ehciiaadbug, 0, \textcolor{stringliteral}{"{}Enable doorbell bug workaround"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00109}00109 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_ehci, OID\_AUTO, lostintrbug, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00110}00110     \&ehcilostintrbug, 0, \textcolor{stringliteral}{"{}Enable lost interrupt bug workaround"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00112}00112 \textcolor{keyword}{static} \textcolor{keywordtype}{void} ehci\_dump\_regs(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00113}00113 \textcolor{keyword}{static} \textcolor{keywordtype}{void} ehci\_dump\_sqh(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *sqh);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00115}00115 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00117}\mbox{\hyperlink{ehci_8c_ac1c85c866ebbef098a77326450737459}{00117}} \textcolor{preprocessor}{\#define EHCI\_INTR\_ENDPT 1}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00119}\mbox{\hyperlink{ehci_8c_a2d22ecb44872d6fa3da65fdc05dcc5ee}{00119}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__bus__methods}{usb\_bus\_methods}} \mbox{\hyperlink{ehci_8c_a2d22ecb44872d6fa3da65fdc05dcc5ee}{ehci\_bus\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00120}\mbox{\hyperlink{ehci_8c_a0efb2bbc6c35dd56ec1567a58a97abc6}{00120}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_a0efb2bbc6c35dd56ec1567a58a97abc6}{ehci\_device\_bulk\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00121}\mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{00121}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{ehci\_device\_ctrl\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00122}\mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{00122}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00123}\mbox{\hyperlink{ehci_8c_a605b50f00523b535ba3cb4dae1f39f53}{00123}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_a605b50f00523b535ba3cb4dae1f39f53}{ehci\_device\_isoc\_fs\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00124}\mbox{\hyperlink{ehci_8c_a83093b23a8bd6627d8b114499c0f6408}{00124}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_a83093b23a8bd6627d8b114499c0f6408}{ehci\_device\_isoc\_hs\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00126}00126 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{ehci_8c_a8eb9464d1edfb384fddd19ec438187e4}{ehci\_do\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00127}00127 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00128}00128 \textcolor{keyword}{static} uint8\_t \mbox{\hyperlink{ehci_8c_a17b21ed52a6c51e31de15b51591ce9a6}{ehci\_check\_transfer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00129}00129 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{ehci_8c_a7b311d9572708adf5e6bee81bd0538cc}{ehci\_timeout}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00130}00130 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{ehci_8c_af46a8684508034b58dc8a76d584cdbec}{ehci\_poll\_timeout}}(\textcolor{keywordtype}{void} *);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00131}00131 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00132}00132 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{ehci_8c_a3dfcb758acdc04a3081ee5cffb97d05d}{ehci\_root\_intr}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00134}\mbox{\hyperlink{structehci__std__temp}{00134}} \textcolor{keyword}{struct }\mbox{\hyperlink{structehci__std__temp}{ehci\_std\_temp}} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00135}\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{00135}}         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00136}\mbox{\hyperlink{structehci__std__temp_a886658eee349a98cf4e11123a094841f}{00136}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *\mbox{\hyperlink{structehci__std__temp_a886658eee349a98cf4e11123a094841f}{pc}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00137}\mbox{\hyperlink{structehci__std__temp_a8162977e9ecffb7edab28138e1ec082c}{00137}}         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *\mbox{\hyperlink{structehci__std__temp_a8162977e9ecffb7edab28138e1ec082c}{td}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00138}\mbox{\hyperlink{structehci__std__temp_a5ee39af5d9e66016061541ebafeccaa7}{00138}}         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *\mbox{\hyperlink{structehci__std__temp_a5ee39af5d9e66016061541ebafeccaa7}{td\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00139}\mbox{\hyperlink{structehci__std__temp_af7a390d29746bf480822a521f81269a0}{00139}}         uint32\_t \mbox{\hyperlink{structehci__std__temp_af7a390d29746bf480822a521f81269a0}{average}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00140}\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{00140}}         uint32\_t \mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00141}\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{00141}}         uint32\_t \mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00142}\mbox{\hyperlink{structehci__std__temp_a3194585bdefc36973a4ebd58e1302481}{00142}}         uint16\_t \mbox{\hyperlink{structehci__std__temp_a3194585bdefc36973a4ebd58e1302481}{max\_frame\_size}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00143}\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{00143}}         uint8\_t \mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00144}\mbox{\hyperlink{structehci__std__temp_a587c0616dc969bb8a3196611e91e19f2}{00144}}         uint8\_t \mbox{\hyperlink{structehci__std__temp_a587c0616dc969bb8a3196611e91e19f2}{auto\_data\_toggle}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00145}\mbox{\hyperlink{structehci__std__temp_a9046082bbe81037ee6a7749bf572a4dc}{00145}}         uint8\_t \mbox{\hyperlink{structehci__std__temp_a9046082bbe81037ee6a7749bf572a4dc}{setup\_alt\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00146}\mbox{\hyperlink{structehci__std__temp_a947657403fc087e5058f69cca22358ad}{00146}}         uint8\_t \mbox{\hyperlink{structehci__std__temp_a947657403fc087e5058f69cca22358ad}{last\_frame}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00147}00147 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00149}00149 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00150}\mbox{\hyperlink{ehci_8c_a79b0849b460880fa4070c604e80e57da}{00150}} \mbox{\hyperlink{ehci_8c_a79b0849b460880fa4070c604e80e57da}{ehci\_iterate\_hw\_softc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *bus, \mbox{\hyperlink{usb__controller_8h_ab49538f4f3e99cbc0f4537570b1dd7bb}{usb\_bus\_mem\_sub\_cb\_t}} *cb)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00151}00151 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00152}00152         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(bus);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00153}00153         uint32\_t i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00155}00155         cb(bus, \&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a7d118195455899d9ebf497e0c1d6644f}{pframes\_pc}}, \&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a830e3b3308dc2b09ad6ca25c678ffa45}{pframes\_pg}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00156}00156             \textcolor{keyword}{sizeof}(uint32\_t) * \mbox{\hyperlink{ehci_8h_a04e5ace814df6d4e6243c4e5f3ebd741}{EHCI\_FRAMELIST\_COUNT}}, \mbox{\hyperlink{ehci_8h_ad5f0a730aa147733c9b9963e258bb285}{EHCI\_FRAMELIST\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00158}00158         cb(bus, \&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a16347532cc85ba390820f8d33bd62423}{terminate\_pc}}, \&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_aec4aea6b35fbc33d932e3b6b31b72014}{terminate\_pg}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00159}00159             \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structehci__qh__sub}{ehci\_qh\_sub}}), \mbox{\hyperlink{ehci_8h_a83440792117b721e819f9ce867f40906}{EHCI\_QH\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00161}00161         cb(bus, \&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a95fb699ab9aae75e87d7307ef08e3855}{async\_start\_pc}}, \&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a2c6ca5318c557807618ec5c4be26bdf1}{async\_start\_pg}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00162}00162             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}}), \mbox{\hyperlink{ehci_8h_a83440792117b721e819f9ce867f40906}{EHCI\_QH\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00163}00163 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00164}00164         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00165}00165                 cb(bus, sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_afef0e1068e91d0b9ad53d1df6c6d7023}{intr\_start\_pc}} + i,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00166}00166                     sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a84efb13f1f8cab848bc2d833b8ec4144}{intr\_start\_pg}} + i,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00167}00167                     \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}}), \mbox{\hyperlink{ehci_8h_a83440792117b721e819f9ce867f40906}{EHCI\_QH\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00168}00168         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00170}00170         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00171}00171                 cb(bus, sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_acd026398a4c037e0c20f12bb67bd328b}{isoc\_hs\_start\_pc}} + i,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00172}00172                     sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a54fc753f1303d7337db7a19ce815f549}{isoc\_hs\_start\_pg}} + i,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00173}00173                     \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}}), \mbox{\hyperlink{ehci_8h_aa0d7fd2c5c7a524b5aa1b586725db925}{EHCI\_ITD\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00174}00174         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00176}00176         \textcolor{keywordflow}{for} (i = 0; i != \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00177}00177                 cb(bus, sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_ab1bd362aa41b471efacf4aedd58db809}{isoc\_fs\_start\_pc}} + i,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00178}00178                     sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a720f238e0278855abc9aa1458668b948}{isoc\_fs\_start\_pg}} + i,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00179}00179                     \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}}), \mbox{\hyperlink{ehci_8h_a5ea56785fab153bd7adb6af42c9026c3}{EHCI\_SITD\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00180}00180         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00181}00181 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00182}00182 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00183}00183 \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00184}\mbox{\hyperlink{ehci_8c_a9beac7de580716c453b2ff7265fd3806}{00184}} \mbox{\hyperlink{ehci_8c_a9beac7de580716c453b2ff7265fd3806}{ehci\_reset}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00185}00185 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00186}00186         uint32\_t hcr;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00187}00187         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00189}00189         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}}, \mbox{\hyperlink{ehcireg_8h_a187af12cd38ba0ac037533374d6e1edc}{EHCI\_CMD\_HCRESET}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00190}00190         \textcolor{keywordflow}{for} (i = 0; i < 100; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00191}00191                 \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(NULL, hz / 128);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00192}00192                 hcr = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}}) \& \mbox{\hyperlink{ehcireg_8h_a187af12cd38ba0ac037533374d6e1edc}{EHCI\_CMD\_HCRESET}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00193}00193                 \textcolor{keywordflow}{if} (!hcr) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00194}00194                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a55a05d052f6b5eb40d3c6f90d3213cb5}{sc\_vendor\_post\_reset}} != NULL)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00195}00195                                 sc-\/>\mbox{\hyperlink{structehci__softc_a55a05d052f6b5eb40d3c6f90d3213cb5}{sc\_vendor\_post\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00196}00196                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00197}00197                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00198}00198         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00199}00199         device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \textcolor{stringliteral}{"{}reset timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00200}00200         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00201}00201 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00202}00202 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00203}00203 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00204}\mbox{\hyperlink{ehci_8c_a1ff5772cb771dacee38ee1e85ccfe685}{00204}} \mbox{\hyperlink{ehci_8c_a1ff5772cb771dacee38ee1e85ccfe685}{ehci\_hcreset}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00205}00205 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00206}00206         uint32\_t hcr;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00207}00207         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00208}00208 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00209}00209         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}}, 0);        \textcolor{comment}{/* Halt controller */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00210}00210         \textcolor{keywordflow}{for} (i = 0; i < 100; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00211}00211                 \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(NULL, hz / 128);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00212}00212                 hcr = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a2c4e5bf311cee85bade409433c97d63e}{EHCI\_USBSTS}}) \& \mbox{\hyperlink{ehcireg_8h_a8a1e2ca4916c9db2335bb7bc96c75bcc}{EHCI\_STS\_HCH}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00213}00213                 \textcolor{keywordflow}{if} (hcr)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00214}00214                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00215}00215         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00216}00216         \textcolor{keywordflow}{if} (!hcr)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00217}00217                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00218}00218 \textcolor{comment}{                 * Fall through and try reset anyway even though}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00219}00219 \textcolor{comment}{                 * Table 2-\/9 in the EHCI spec says this will result}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00220}00220 \textcolor{comment}{                 * in undefined behavior.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00221}00221 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00222}00222                 device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \textcolor{stringliteral}{"{}stop timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00224}00224         \textcolor{keywordflow}{return} (\mbox{\hyperlink{ehci_8c_a9beac7de580716c453b2ff7265fd3806}{ehci\_reset}}(sc));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00227}00227 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00228}\mbox{\hyperlink{ehci_8c_a3268055b699fd97a0cb59a6f4da54082}{00228}} \mbox{\hyperlink{ehci_8c_a3268055b699fd97a0cb59a6f4da54082}{ehci\_init\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structehci__softc}{ehci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00229}00229 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00230}00230         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00231}00231         uint32\_t cparams;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00232}00232         uint32\_t hcr;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00233}00233         uint8\_t i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00235}00235         cparams = \mbox{\hyperlink{ehci_8h_aca8562aa9c2b4bfcc55f66c00c0c1110}{EREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a01f0888bf280756a9c106294b4195034}{EHCI\_HCCPARAMS}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00237}00237         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}cparams=0x\%x\(\backslash\)n"{}}, cparams);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00239}00239         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehcireg_8h_a6dd5e6cc077d1ad25f1ea37ae41d00d9}{EHCI\_HCC\_64BIT}}(cparams)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00240}00240                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}HCC uses 64-\/bit structures\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00242}00242                 \textcolor{comment}{/* MUST clear segment register if 64 bit capable */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00243}00243                 \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a27f11a304e0161cf05be85018480fbd0}{EHCI\_CTRLDSSEGMENT}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00244}00244         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00246}00246         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a7d118195455899d9ebf497e0c1d6644f}{pframes\_pc}}, 0, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00247}00247         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_acf9db176ede948c9f56a55913e07fd25}{EHCI\_PERIODICLISTBASE}}, buf\_res.physaddr);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00249}00249         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a95fb699ab9aae75e87d7307ef08e3855}{async\_start\_pc}}, 0, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00250}00250         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_af56a34eb7d2e7aa6f8cf6cf5a9a450d1}{EHCI\_ASYNCLISTADDR}}, buf\_res.physaddr | \mbox{\hyperlink{ehci_8h_abbd91c57691fc9a2df99abf25c56d828}{EHCI\_LINK\_QH}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00252}00252         \textcolor{comment}{/* enable interrupts */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00253}00253         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a917d02ce7a170b169127cccc026a3a5e}{EHCI\_USBINTR}}, sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00255}00255         \textcolor{comment}{/* turn on controller */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00256}00256         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00257}00257             \mbox{\hyperlink{ehcireg_8h_a43858fc789a9b39738b9a91c5c69ff6a}{EHCI\_CMD\_ITC\_1}} |              \textcolor{comment}{/* 1 microframes interrupt delay */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00258}00258             (\mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}}) \& \mbox{\hyperlink{ehcireg_8h_ad88ce105c6cc2436b1eabd5e66abd8a6}{EHCI\_CMD\_FLS\_M}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00259}00259             \mbox{\hyperlink{ehcireg_8h_a8901ac4dd9b1aca389afdaa052ed9163}{EHCI\_CMD\_ASE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00260}00260             \mbox{\hyperlink{ehcireg_8h_a6d5c9057bcdf77576e6b931e4c2e2ba8}{EHCI\_CMD\_PSE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00261}00261             \mbox{\hyperlink{ehcireg_8h_a5b4bb7e6a2f6a52cfa013d789d1ff655}{EHCI\_CMD\_RS}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00263}00263         \textcolor{comment}{/* Take over port ownership */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00264}00264         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a96f6d25fccc0a8e8c4614f44581b9c42}{EHCI\_CONFIGFLAG}}, \mbox{\hyperlink{ehcireg_8h_af4172ae049e56bccff60a2910d172a1c}{EHCI\_CONF\_CF}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00266}00266         \textcolor{keywordflow}{for} (i = 0; i < 100; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00267}00267                 \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(NULL, hz / 128);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00268}00268                 hcr = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a2c4e5bf311cee85bade409433c97d63e}{EHCI\_USBSTS}}) \& \mbox{\hyperlink{ehcireg_8h_a8a1e2ca4916c9db2335bb7bc96c75bcc}{EHCI\_STS\_HCH}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00269}00269                 \textcolor{keywordflow}{if} (!hcr) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00270}00270                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00271}00271                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00272}00272         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00273}00273         \textcolor{keywordflow}{if} (hcr) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00274}00274                 device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \textcolor{stringliteral}{"{}run timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00275}00275                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00276}00276         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00277}00277         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a01e440e0629669433dd14bc477757c74}{USB\_ERR\_NORMAL\_COMPLETION}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00278}00278 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00279}00279 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00280}00280 \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00281}\mbox{\hyperlink{ehci_8c_ae09cd35aac92ce20149a1714a7109613}{00281}} \mbox{\hyperlink{ehci_8c_ae09cd35aac92ce20149a1714a7109613}{ehci\_init}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00282}00282 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00283}00283         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00284}00284         uint32\_t version;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00285}00285         uint32\_t sparams;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00286}00286         uint16\_t i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00287}00287         uint16\_t x;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00288}00288         uint16\_t y;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00289}00289         uint16\_t bit;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00290}00290         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00291}00291 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00292}00292         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}start\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00293}00293 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00294}00294         \mbox{\hyperlink{usbdi_8h_a1f241362056f1ed3d4c4b5cfb63ce8e5}{usb\_callout\_init\_mtx}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a0fc4500c4d3e6ea59ca9b4ce660744b3}{sc\_tmo\_pcd}}, \&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00295}00295         \mbox{\hyperlink{usbdi_8h_a1f241362056f1ed3d4c4b5cfb63ce8e5}{usb\_callout\_init\_mtx}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a1f53d867a0921586ff1229dfb55bf030}{sc\_tmo\_poll}}, \&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00297}00297         sc-\/>\mbox{\hyperlink{structehci__softc_ae638ec5c9e08604075664e0e8f2b066f}{sc\_offs}} = \mbox{\hyperlink{ehcireg_8h_a0a49e6b4219925b451d12fdad1b509f1}{EHCI\_CAPLENGTH}}(\mbox{\hyperlink{ehci_8h_aca8562aa9c2b4bfcc55f66c00c0c1110}{EREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a9eabcdfbe4f06756f207614f9d05e100}{EHCI\_CAPLEN\_HCIVERSION}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00299}00299 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00300}00300         \textcolor{keywordflow}{if} (ehciiaadbug)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00301}00301                 sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} |= \mbox{\hyperlink{ehci_8h_a87ced3e6ffe3c50a405c8a85d5fc9c25}{EHCI\_SCFLG\_IAADBUG}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00302}00302         \textcolor{keywordflow}{if} (ehcilostintrbug)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00303}00303                 sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} |= \mbox{\hyperlink{ehci_8h_ae189d5093f1c6486b3fe8acebbffb033}{EHCI\_SCFLG\_LOSTINTRBUG}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00304}00304         \textcolor{keywordflow}{if} (ehcidebug > 2) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00305}00305                 ehci\_dump\_regs(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00306}00306         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00307}00307 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00309}00309         version = \mbox{\hyperlink{ehcireg_8h_a343316a5ce707dec67556c99ab206a83}{EHCI\_HCIVERSION}}(\mbox{\hyperlink{ehci_8h_aca8562aa9c2b4bfcc55f66c00c0c1110}{EREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a9eabcdfbe4f06756f207614f9d05e100}{EHCI\_CAPLEN\_HCIVERSION}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00310}00310         device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \textcolor{stringliteral}{"{}EHCI version \%x.\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00311}00311             version >> 8, version \& 0xff);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00313}00313         sparams = \mbox{\hyperlink{ehci_8h_aca8562aa9c2b4bfcc55f66c00c0c1110}{EREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a04e7378999a0b9facc9cc3f616eb6858}{EHCI\_HCSPARAMS}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00314}00314         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}sparams=0x\%x\(\backslash\)n"{}}, sparams);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00315}00315 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00316}00316         sc-\/>\mbox{\hyperlink{structehci__softc_a446d88d1433cc2cbd34fd98091ad312d}{sc\_noport}} = \mbox{\hyperlink{ehcireg_8h_a5efbe247f84c23ef58bfcd3a5a8347bd}{EHCI\_HCS\_N\_PORTS}}(sparams);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00317}00317         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a333d9234cb56ddeb93ac0625c3d48252}{usbrev}} = \mbox{\hyperlink{usb_8h_ad11f3f35a7768f59a4f69ad460a7661fa44b977075893b69debe934afe09c963e}{USB\_REV\_2\_0}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00318}00318 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00319}00319         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} \& \mbox{\hyperlink{ehci_8h_a7d0e722d85d1d13427c78c8c005625a9}{EHCI\_SCFLG\_DONTRESET}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00320}00320                 \textcolor{comment}{/* Reset the controller */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00321}00321                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\%s: resetting\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00322}00322                     device\_get\_nameunit(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00323}00323 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00324}00324                 err = \mbox{\hyperlink{ehci_8c_a1ff5772cb771dacee38ee1e85ccfe685}{ehci\_hcreset}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00325}00325                 \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00326}00326                         device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \textcolor{stringliteral}{"{}reset timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00327}00327                         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00328}00328                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00329}00329         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00331}00331         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00332}00332 \textcolor{comment}{         * use current frame-\/list-\/size selection 0: 1024*4 bytes 1:  512*4}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00333}00333 \textcolor{comment}{         * bytes 2:  256*4 bytes 3:      unknown}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00334}00334 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00335}00335         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehcireg_8h_a2ad32343fe4930800e19c34e07401fe6}{EHCI\_CMD\_FLS}}(\mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}})) == 3) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00336}00336                 device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \textcolor{stringliteral}{"{}invalid frame-\/list-\/size\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00337}00337                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00338}00338         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00339}00339         \textcolor{comment}{/* set up the bus struct */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00340}00340         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a81450db76aab5d75bdc5a8a67b2d0939}{methods}} = \&\mbox{\hyperlink{ehci_8c_a2d22ecb44872d6fa3da65fdc05dcc5ee}{ehci\_bus\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00342}00342         sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}} = \mbox{\hyperlink{ehcireg_8h_af14e84ca9ce99619d9a523ec68ea8b78}{EHCI\_NORMAL\_INTRS}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00343}00343 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00344}00344         \textcolor{keywordflow}{if} (1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00345}00345                 \textcolor{keyword}{struct }\mbox{\hyperlink{structehci__qh__sub}{ehci\_qh\_sub}} *qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00347}00347                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a16347532cc85ba390820f8d33bd62423}{terminate\_pc}}, 0, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00349}00349                 qh = buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00351}00351                 sc-\/>\mbox{\hyperlink{structehci__softc_a5aba043eb66e6977b23125d3cbb85cd9}{sc\_terminate\_self}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, buf\_res.physaddr);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00352}00352 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00353}00353                 \textcolor{comment}{/* init terminate TD */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00354}00354                 qh-\/>\mbox{\hyperlink{structehci__qh__sub_abb7d944f1bd8a9fc076c2e3c8179fa2f}{qtd\_next}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00355}00355                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00356}00356                 qh-\/>\mbox{\hyperlink{structehci__qh__sub_a93f7b8e4574db36b5a54a8372f6edf05}{qtd\_altnext}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00357}00357                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00358}00358                 qh-\/>\mbox{\hyperlink{structehci__qh__sub_a12d01f66b40289b2377a5578e52fd05e}{qtd\_status}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00359}00359                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00360}00360         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00362}00362         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00363}00363                 \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00364}00364 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00365}00365                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_afef0e1068e91d0b9ad53d1df6c6d7023}{intr\_start\_pc}} + i, 0, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00366}00366 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00367}00367                 qh = buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00368}00368 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00369}00369                 \textcolor{comment}{/* initialize page cache pointer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00370}00370 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00371}00371                 qh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}} = sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_afef0e1068e91d0b9ad53d1df6c6d7023}{intr\_start\_pc}} + i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00372}00372 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00373}00373                 \textcolor{comment}{/* store a pointer to queue head */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00374}00374 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00375}00375                 sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[i] = qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00377}00377                 qh-\/>\mbox{\hyperlink{structehci__qh_a40588373ecdf3a8e81b63ffb63960ac3}{qh\_self}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00378}00378                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, buf\_res.physaddr) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00379}00379                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_abbd91c57691fc9a2df99abf25c56d828}{EHCI\_LINK\_QH}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00380}00380 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00381}00381                 qh-\/>\mbox{\hyperlink{structehci__qh_a7e9e9cc3d850a73326fdf1dfd9a7ca54}{qh\_endp}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00382}00382                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a8ab2afde2d463206c0a96cc1d58e6532}{EHCI\_QH\_SET\_EPS}}(\mbox{\hyperlink{ehci_8h_a2a756b35bb9fc234bbf694fe97e72b86}{EHCI\_QH\_SPEED\_HIGH}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00383}00383                 qh-\/>\mbox{\hyperlink{structehci__qh_ade077b1974e33d9ab12bcfdc3b658664}{qh\_endphub}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00384}00384                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_aeb44a81bef1fa52853f79288c00c777f}{EHCI\_QH\_SET\_MULT}}(1));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00385}00385                 qh-\/>\mbox{\hyperlink{structehci__qh_abe761005d92d9161de84780c366d6752}{qh\_curqtd}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00386}00386 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00387}00387                 qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_abb7d944f1bd8a9fc076c2e3c8179fa2f}{qtd\_next}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00388}00388                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00389}00389                 qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a93f7b8e4574db36b5a54a8372f6edf05}{qtd\_altnext}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00390}00390                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00391}00391                 qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a12d01f66b40289b2377a5578e52fd05e}{qtd\_status}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00392}00392                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00393}00393         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00394}00394 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00395}00395         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00396}00396 \textcolor{comment}{         * the QHs are arranged to give poll intervals that are}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00397}00397 \textcolor{comment}{         * powers of 2 times 1ms}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00398}00398 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00399}00399         bit = \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}} / 2;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00400}00400         \textcolor{keywordflow}{while} (bit) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00401}00401                 x = bit;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00402}00402                 \textcolor{keywordflow}{while} (x \& bit) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00403}00403                         \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh\_x;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00404}00404                         \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh\_y;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00405}00405 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00406}00406                         y = (x \string^ bit) | (bit / 2);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00408}00408                         qh\_x = sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[x];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00409}00409                         qh\_y = sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[y];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00410}00410 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00411}00411                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00412}00412 \textcolor{comment}{                         * the next QH has half the poll interval}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00413}00413 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00414}00414                         qh\_x-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}} = qh\_y-\/>\mbox{\hyperlink{structehci__qh_a40588373ecdf3a8e81b63ffb63960ac3}{qh\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00415}00415 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00416}00416                         x++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00417}00417                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00418}00418                 bit >>= 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00419}00419         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00421}00421         \textcolor{keywordflow}{if} (1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00422}00422                 \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00423}00423 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00424}00424                 qh = sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[0];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00426}00426                 \textcolor{comment}{/* the last (1ms) QH terminates */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00427}00427                 qh-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00428}00428         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00429}00429         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00430}00430                 \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *sitd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00431}00431                 \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *itd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00432}00432 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00433}00433                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_ab1bd362aa41b471efacf4aedd58db809}{isoc\_fs\_start\_pc}} + i, 0, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00434}00434 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00435}00435                 sitd = buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00436}00436 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00437}00437                 \textcolor{comment}{/* initialize page cache pointer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00438}00438 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00439}00439                 sitd-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}} = sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_ab1bd362aa41b471efacf4aedd58db809}{isoc\_fs\_start\_pc}} + i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00440}00440 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00441}00441                 \textcolor{comment}{/* store a pointer to the transfer descriptor */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00443}00443                 sc-\/>\mbox{\hyperlink{structehci__softc_aa252ae2bf17b592b3557161a16784cfe}{sc\_isoc\_fs\_p\_last}}[i] = sitd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00444}00444 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00445}00445                 \textcolor{comment}{/* initialize full speed isochronous */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00447}00447                 sitd-\/>\mbox{\hyperlink{structehci__sitd_abc1501540073a2ba23de370a1ffd9144}{sitd\_self}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00448}00448                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, buf\_res.physaddr) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00449}00449                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_abee70435c4f025bcf2758303fff5a49a}{EHCI\_LINK\_SITD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00450}00450 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00451}00451                 sitd-\/>\mbox{\hyperlink{structehci__sitd_a1f267c4d34d92dedb4b5a7b28285158b}{sitd\_back}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00452}00452                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00454}00454                 sitd-\/>\mbox{\hyperlink{structehci__sitd_aa1984bf244b981686ed63020477173cd}{sitd\_next}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00455}00455                     sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[i | (\mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}} / 2)]-\/>\mbox{\hyperlink{ehci_8h_a76bebd4bac306c81ec24158225e70520}{qh\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00456}00456 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00457}00457                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_acd026398a4c037e0c20f12bb67bd328b}{isoc\_hs\_start\_pc}} + i, 0, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00458}00458 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00459}00459                 itd = buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00460}00460 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00461}00461                 \textcolor{comment}{/* initialize page cache pointer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00462}00462 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00463}00463                 itd-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}} = sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_acd026398a4c037e0c20f12bb67bd328b}{isoc\_hs\_start\_pc}} + i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00465}00465                 \textcolor{comment}{/* store a pointer to the transfer descriptor */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00467}00467                 sc-\/>\mbox{\hyperlink{structehci__softc_a8837d4f4648d7efb6950b73386cef215}{sc\_isoc\_hs\_p\_last}}[i] = itd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00469}00469                 \textcolor{comment}{/* initialize high speed isochronous */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00470}00470 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00471}00471                 itd-\/>\mbox{\hyperlink{structehci__itd_a07b1a769eb0233951a2271041ff04176}{itd\_self}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00472}00472                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, buf\_res.physaddr) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00473}00473                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_ade331918140106b69244c3600f1b4841}{EHCI\_LINK\_ITD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00474}00474 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00475}00475                 itd-\/>\mbox{\hyperlink{structehci__itd_a23949ef5c8e5559d0333c3dc2fae7106}{itd\_next}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00476}00476                     sitd-\/>\mbox{\hyperlink{structehci__sitd_abc1501540073a2ba23de370a1ffd9144}{sitd\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00477}00477         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00479}00479         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a7d118195455899d9ebf497e0c1d6644f}{pframes\_pc}}, 0, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00480}00480 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00481}00481         \textcolor{keywordflow}{if} (1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00482}00482                 uint32\_t *pframes;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00483}00483 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00484}00484                 pframes = buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00486}00486                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00487}00487 \textcolor{comment}{                 * execution order:}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00488}00488 \textcolor{comment}{                 * pframes -\/> high speed isochronous -\/>}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00489}00489 \textcolor{comment}{                 *    full speed isochronous -\/> interrupt QH's}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00490}00490 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00491}00491                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{ehci_8h_a04e5ace814df6d4e6243c4e5f3ebd741}{EHCI\_FRAMELIST\_COUNT}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00492}00492                         pframes[i] = sc-\/>\mbox{\hyperlink{structehci__softc_a8837d4f4648d7efb6950b73386cef215}{sc\_isoc\_hs\_p\_last}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00493}00493                             [i \& (\mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}} -\/ 1)]-\/>\mbox{\hyperlink{ehci_8h_a4eb4f83751f58ffe952cee00c0f7bb00}{itd\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00494}00494                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00495}00495         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00496}00496         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a95fb699ab9aae75e87d7307ef08e3855}{async\_start\_pc}}, 0, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00498}00498         \textcolor{keywordflow}{if} (1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00499}00499                 \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00500}00500 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00501}00501                 qh = buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00502}00502 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00503}00503                 \textcolor{comment}{/* initialize page cache pointer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00504}00504 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00505}00505                 qh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}} = \&sc-\/>\mbox{\hyperlink{structehci__softc_a7675a157763927eaf2d59099194471f5}{sc\_hw}}.\mbox{\hyperlink{structehci__hw__softc_a95fb699ab9aae75e87d7307ef08e3855}{async\_start\_pc}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00506}00506 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00507}00507                 \textcolor{comment}{/* store a pointer to the queue head */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00508}00508 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00509}00509                 sc-\/>\mbox{\hyperlink{structehci__softc_a3599f5c0b5f8dac01c770ace13fba03e}{sc\_async\_p\_last}} = qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00510}00510 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00511}00511                 \textcolor{comment}{/* init dummy QH that starts the async list */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00512}00512 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00513}00513                 qh-\/>\mbox{\hyperlink{structehci__qh_a40588373ecdf3a8e81b63ffb63960ac3}{qh\_self}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00514}00514                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, buf\_res.physaddr) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00515}00515                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_abbd91c57691fc9a2df99abf25c56d828}{EHCI\_LINK\_QH}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00516}00516 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00517}00517                 \textcolor{comment}{/* fill the QH */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00518}00518                 qh-\/>\mbox{\hyperlink{structehci__qh_a7e9e9cc3d850a73326fdf1dfd9a7ca54}{qh\_endp}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00519}00519                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a8ab2afde2d463206c0a96cc1d58e6532}{EHCI\_QH\_SET\_EPS}}(\mbox{\hyperlink{ehci_8h_a2a756b35bb9fc234bbf694fe97e72b86}{EHCI\_QH\_SPEED\_HIGH}}) | \mbox{\hyperlink{ehci_8h_a1d21aa4751a8c5d4868182f335633530}{EHCI\_QH\_HRECL}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00520}00520                 qh-\/>\mbox{\hyperlink{structehci__qh_ade077b1974e33d9ab12bcfdc3b658664}{qh\_endphub}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_aeb44a81bef1fa52853f79288c00c777f}{EHCI\_QH\_SET\_MULT}}(1));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00521}00521                 qh-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}} = qh-\/>\mbox{\hyperlink{structehci__qh_a40588373ecdf3a8e81b63ffb63960ac3}{qh\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00522}00522                 qh-\/>\mbox{\hyperlink{structehci__qh_abe761005d92d9161de84780c366d6752}{qh\_curqtd}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00523}00523 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00524}00524                 \textcolor{comment}{/* fill the overlay qTD */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00525}00525                 qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_abb7d944f1bd8a9fc076c2e3c8179fa2f}{qtd\_next}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00526}00526                 qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a93f7b8e4574db36b5a54a8372f6edf05}{qtd\_altnext}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00527}00527                 qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a12d01f66b40289b2377a5578e52fd05e}{qtd\_status}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00528}00528         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00529}00529         \textcolor{comment}{/* flush all cache into memory */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00531}00531         \mbox{\hyperlink{usb__controller_8h_a2f3049b04c9d56b9434a65011f382b44}{usb\_bus\_mem\_flush\_all}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}, \&\mbox{\hyperlink{ehci_8c_a79b0849b460880fa4070c604e80e57da}{ehci\_iterate\_hw\_softc}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00532}00532 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00533}00533 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00534}00534         \textcolor{keywordflow}{if} (ehcidebug) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00535}00535                 ehci\_dump\_sqh(sc, sc-\/>\mbox{\hyperlink{structehci__softc_a3599f5c0b5f8dac01c770ace13fba03e}{sc\_async\_p\_last}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00536}00536         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00537}00537 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00538}00538 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00539}00539         \textcolor{comment}{/* finial setup */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00540}00540         err = \mbox{\hyperlink{ehci_8c_a3268055b699fd97a0cb59a6f4da54082}{ehci\_init\_sub}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00541}00541 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00542}00542         \textcolor{keywordflow}{if} (!err) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00543}00543                 \textcolor{comment}{/* catch any lost interrupts */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00544}00544                 \mbox{\hyperlink{ehci_8c_a8eb9464d1edfb384fddd19ec438187e4}{ehci\_do\_poll}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00545}00545         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00546}00546         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00547}00547 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00548}00548 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00549}00549 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00550}00550 \textcolor{comment}{ * shut down the controller when the system is going down}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00551}00551 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00552}00552 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00553}\mbox{\hyperlink{ehci_8c_a4d9677740a3aa048c4b03e13bdafe43a}{00553}} \mbox{\hyperlink{ehci_8c_a4d9677740a3aa048c4b03e13bdafe43a}{ehci\_detach}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00554}00554 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00555}00555         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00556}00556 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00557}00557         \mbox{\hyperlink{usbdi_8h_ad74dd2f25febf2ba5083574711e4101a}{usb\_callout\_stop}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a0fc4500c4d3e6ea59ca9b4ce660744b3}{sc\_tmo\_pcd}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00558}00558         \mbox{\hyperlink{usbdi_8h_ad74dd2f25febf2ba5083574711e4101a}{usb\_callout\_stop}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a1f53d867a0921586ff1229dfb55bf030}{sc\_tmo\_poll}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00559}00559 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00560}00560         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a917d02ce7a170b169127cccc026a3a5e}{EHCI\_USBINTR}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00561}00561         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00562}00562 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00563}00563         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8c_a1ff5772cb771dacee38ee1e85ccfe685}{ehci\_hcreset}}(sc)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00564}00564                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}reset failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00565}00565         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00566}00566 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00567}00567         \textcolor{comment}{/* XXX let stray task complete */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00568}00568         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(NULL, hz / 20);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00569}00569 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00570}00570         \mbox{\hyperlink{usbdi_8h_a828c4d79b0d9b11c8dcb77899a2bffda}{usb\_callout\_drain}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a0fc4500c4d3e6ea59ca9b4ce660744b3}{sc\_tmo\_pcd}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00571}00571         \mbox{\hyperlink{usbdi_8h_a828c4d79b0d9b11c8dcb77899a2bffda}{usb\_callout\_drain}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a1f53d867a0921586ff1229dfb55bf030}{sc\_tmo\_poll}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00572}00572 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00573}00573 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00574}00574 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00575}\mbox{\hyperlink{ehci_8c_aecd9c3db72f17bc4740e40418119415e}{00575}} \mbox{\hyperlink{ehci_8c_aecd9c3db72f17bc4740e40418119415e}{ehci\_suspend}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00576}00576 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00577}00577         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}stopping the HC\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00578}00578 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00579}00579         \textcolor{comment}{/* reset HC */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00580}00580         \mbox{\hyperlink{ehci_8c_a1ff5772cb771dacee38ee1e85ccfe685}{ehci\_hcreset}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00581}00581 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00582}00582 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00583}00583 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00584}\mbox{\hyperlink{ehci_8c_af2a1af8a3892f20d7e58859abf49a827}{00584}} \mbox{\hyperlink{ehci_8c_af2a1af8a3892f20d7e58859abf49a827}{ehci\_resume}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00585}00585 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00586}00586         \textcolor{comment}{/* reset HC */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00587}00587         \mbox{\hyperlink{ehci_8c_a1ff5772cb771dacee38ee1e85ccfe685}{ehci\_hcreset}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00588}00588 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00589}00589         \textcolor{comment}{/* setup HC */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00590}00590         \mbox{\hyperlink{ehci_8c_a3268055b699fd97a0cb59a6f4da54082}{ehci\_init\_sub}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00591}00591 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00592}00592         \textcolor{comment}{/* catch any lost interrupts */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00593}00593         \mbox{\hyperlink{ehci_8c_a8eb9464d1edfb384fddd19ec438187e4}{ehci\_do\_poll}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00594}00594 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00595}00595 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00596}00596 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00597}00597 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00598}00598 ehci\_dump\_regs(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00599}00599 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00600}00600         uint32\_t i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00601}00601 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00602}00602         i = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00603}00603         printf(\textcolor{stringliteral}{"{}cmd=0x\%08x\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00604}00604 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00605}00605         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a43858fc789a9b39738b9a91c5c69ff6a}{EHCI\_CMD\_ITC\_1}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00606}00606                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ITC\_1\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00607}00607         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a5f02df4f9805a826eddde06f167fe594}{EHCI\_CMD\_ITC\_2}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00608}00608                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ITC\_2\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00609}00609         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_ab1008601aedf50a837b47ea3306c2234}{EHCI\_CMD\_ITC\_4}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00610}00610                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ITC\_4\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00611}00611         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a699821cd3438a970e1591cbf8985b38c}{EHCI\_CMD\_ITC\_8}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00612}00612                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ITC\_8\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00613}00613         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_ab340c056cf9e86b64442288fce1e1a62}{EHCI\_CMD\_ITC\_16}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00614}00614                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ITC\_16\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00615}00615         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a3c40a2af2246476497fff9b6bdb5aec4}{EHCI\_CMD\_ITC\_32}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00616}00616                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ITC\_32\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00617}00617         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_ad0e88d75d71ef7ca0dda3838ccba9c0d}{EHCI\_CMD\_ITC\_64}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00618}00618                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ITC\_64\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00619}00619         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a47f9e400d03aaafc333e57544e611231}{EHCI\_CMD\_ASPME}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00620}00620                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ASPME\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00621}00621         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a3259e833a3c4e38b40f320e1b2f93fdb}{EHCI\_CMD\_ASPMC}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00622}00622                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ASPMC\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00623}00623         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a25fd95a30309c69cc49f2ce6f97222cb}{EHCI\_CMD\_LHCR}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00624}00624                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_LHCR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00625}00625         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a757fb25327457f2262bceb80984e646c}{EHCI\_CMD\_IAAD}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00626}00626                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_IAAD\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00627}00627         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a8901ac4dd9b1aca389afdaa052ed9163}{EHCI\_CMD\_ASE}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00628}00628                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_ASE\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00629}00629         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a6d5c9057bcdf77576e6b931e4c2e2ba8}{EHCI\_CMD\_PSE}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00630}00630                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_PSE\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00631}00631         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_ad88ce105c6cc2436b1eabd5e66abd8a6}{EHCI\_CMD\_FLS\_M}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00632}00632                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_FLS\_M\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00633}00633         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a187af12cd38ba0ac037533374d6e1edc}{EHCI\_CMD\_HCRESET}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00634}00634                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_HCRESET\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00635}00635         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a5b4bb7e6a2f6a52cfa013d789d1ff655}{EHCI\_CMD\_RS}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00636}00636                 printf(\textcolor{stringliteral}{"{} EHCI\_CMD\_RS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00637}00637 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00638}00638         i = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a2c4e5bf311cee85bade409433c97d63e}{EHCI\_USBSTS}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00639}00639 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00640}00640         printf(\textcolor{stringliteral}{"{}sts=0x\%08x\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00641}00641 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00642}00642         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_abf3fb862f916987474335a4410561ffe}{EHCI\_STS\_ASS}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00643}00643                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_ASS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00644}00644         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a6536fa5e46c166f1019d621a7e84e527}{EHCI\_STS\_PSS}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00645}00645                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_PSS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00646}00646         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a34a209c059e810ff55af6cdeab92e842}{EHCI\_STS\_REC}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00647}00647                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_REC\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00648}00648         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a8a1e2ca4916c9db2335bb7bc96c75bcc}{EHCI\_STS\_HCH}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00649}00649                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_HCH\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00650}00650         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a4dd6cb2a0d3d2ac39c47b7c69288eb0b}{EHCI\_STS\_IAA}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00651}00651                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_IAA\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00652}00652         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_aae45791be083bd7ce49f0448176614fd}{EHCI\_STS\_HSE}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00653}00653                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_HSE\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00654}00654         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a6baa3f6db96ac120e592b1342d9e2d7e}{EHCI\_STS\_FLR}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00655}00655                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_FLR\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00656}00656         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_abe8026476addbad77dc001cd7e18c852}{EHCI\_STS\_PCD}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00657}00657                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_PCD\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00658}00658         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_abd1e5ba801d567001ce853ebe6982007}{EHCI\_STS\_ERRINT}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00659}00659                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_ERRINT\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00660}00660         \textcolor{keywordflow}{if} (i \& \mbox{\hyperlink{ehcireg_8h_a073029544fa5c9bddabb5cc640d9ce96}{EHCI\_STS\_INT}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00661}00661                 printf(\textcolor{stringliteral}{"{} EHCI\_STS\_INT\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00662}00662 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00663}00663         printf(\textcolor{stringliteral}{"{}ien=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00664}00664             \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a917d02ce7a170b169127cccc026a3a5e}{EHCI\_USBINTR}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00665}00665         printf(\textcolor{stringliteral}{"{}frindex=0x\%08x ctrdsegm=0x\%08x periodic=0x\%08x async=0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00666}00666             \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a53ea75b3eebcb6fd476b9fba72904731}{EHCI\_FRINDEX}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00667}00667             \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a27f11a304e0161cf05be85018480fbd0}{EHCI\_CTRLDSSEGMENT}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00668}00668             \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_acf9db176ede948c9f56a55913e07fd25}{EHCI\_PERIODICLISTBASE}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00669}00669             \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_af56a34eb7d2e7aa6f8cf6cf5a9a450d1}{EHCI\_ASYNCLISTADDR}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00670}00670         \textcolor{keywordflow}{for} (i = 1; i <= sc-\/>\mbox{\hyperlink{structehci__softc_a446d88d1433cc2cbd34fd98091ad312d}{sc\_noport}}; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00671}00671                 printf(\textcolor{stringliteral}{"{}port \%d status=0x\%08x\(\backslash\)n"{}}, i,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00672}00672                     \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a682de74a3ce1559d704aac0d01a876ca}{EHCI\_PORTSC}}(i)));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00673}00673         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00674}00674 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00675}00675 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00676}00676 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00677}00677 ehci\_dump\_link(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, uint32\_t link, \textcolor{keywordtype}{int} type)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00678}00678 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00679}00679         link = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, link);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00680}00680         printf(\textcolor{stringliteral}{"{}0x\%08x"{}}, link);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00681}00681         \textcolor{keywordflow}{if} (link \& \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00682}00682                 printf(\textcolor{stringliteral}{"{}<T>"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00683}00683         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00684}00684                 printf(\textcolor{stringliteral}{"{}<"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00685}00685                 \textcolor{keywordflow}{if} (type) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00686}00686                         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{ehci_8h_ab9d3d7316ff1a4c2085a832731911c7d}{EHCI\_LINK\_TYPE}}(link)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00687}00687                         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8h_ade331918140106b69244c3600f1b4841}{EHCI\_LINK\_ITD}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00688}00688                                 printf(\textcolor{stringliteral}{"{}ITD"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00689}00689                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00690}00690                         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8h_abbd91c57691fc9a2df99abf25c56d828}{EHCI\_LINK\_QH}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00691}00691                                 printf(\textcolor{stringliteral}{"{}QH"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00692}00692                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00693}00693                         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8h_abee70435c4f025bcf2758303fff5a49a}{EHCI\_LINK\_SITD}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00694}00694                                 printf(\textcolor{stringliteral}{"{}SITD"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00695}00695                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00696}00696                         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8h_a9b156ae18d9b6fdcc6dabf87acc8d134}{EHCI\_LINK\_FSTN}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00697}00697                                 printf(\textcolor{stringliteral}{"{}FSTN"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00698}00698                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00699}00699                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00700}00700                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00701}00701                 printf(\textcolor{stringliteral}{"{}>"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00702}00702         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00703}00703 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00704}00704 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00705}00705 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00706}00706 ehci\_dump\_qtd(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *qtd)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00707}00707 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00708}00708         uint32\_t s;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00709}00709 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00710}00710         printf(\textcolor{stringliteral}{"{}  next="{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00711}00711         ehci\_dump\_link(sc, qtd-\/>\mbox{\hyperlink{structehci__qtd_ad691234a0831866daa0c56de953aed25}{qtd\_next}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00712}00712         printf(\textcolor{stringliteral}{"{} altnext="{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00713}00713         ehci\_dump\_link(sc, qtd-\/>\mbox{\hyperlink{structehci__qtd_a3f478ea53f8e5863b33d887eb8b074a2}{qtd\_altnext}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00714}00714         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00715}00715         s = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, qtd-\/>\mbox{\hyperlink{structehci__qtd_a39e32864cb9fca59b2b665955169afd2}{qtd\_status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00716}00716         printf(\textcolor{stringliteral}{"{}  status=0x\%08x: toggle=\%d bytes=0x\%x ioc=\%d c\_page=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00717}00717             s, \mbox{\hyperlink{ehci_8h_a6cdd8bb105ca3b6a2a6a3c83fc5d2bdc}{EHCI\_QTD\_GET\_TOGGLE}}(s), \mbox{\hyperlink{ehci_8h_aeb480e670af1131f1f9d76ea2e87cbbe}{EHCI\_QTD\_GET\_BYTES}}(s),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00718}00718             \mbox{\hyperlink{ehci_8h_a649299a00c95cf78255ddd7292d75625}{EHCI\_QTD\_GET\_IOC}}(s), \mbox{\hyperlink{ehci_8h_a10657ee746d9f4329fb27d5bfcc863e1}{EHCI\_QTD\_GET\_C\_PAGE}}(s));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00719}00719         printf(\textcolor{stringliteral}{"{}    cerr=\%d pid=\%d stat=\%s\%s\%s\%s\%s\%s\%s\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00720}00720             \mbox{\hyperlink{ehci_8h_a03d0c1ce3ef020f8caf6dcee28020e83}{EHCI\_QTD\_GET\_CERR}}(s), \mbox{\hyperlink{ehci_8h_a9bce4e9e15de5180aad842f6f406aaa1}{EHCI\_QTD\_GET\_PID}}(s),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00721}00721             (s \& \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}}) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}NOT\_ACTIVE"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00722}00722             (s \& \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}}) ? \textcolor{stringliteral}{"{}-\/HALTED"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00723}00723             (s \& \mbox{\hyperlink{ehci_8h_a02aff75503c74a202d8650f5b9fc84cf}{EHCI\_QTD\_BUFERR}}) ? \textcolor{stringliteral}{"{}-\/BUFERR"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00724}00724             (s \& \mbox{\hyperlink{ehci_8h_a4199a033269cf1698a706de36b7bc9d1}{EHCI\_QTD\_BABBLE}}) ? \textcolor{stringliteral}{"{}-\/BABBLE"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00725}00725             (s \& \mbox{\hyperlink{ehci_8h_a9133c74bc4b28a859f4bc262389f779e}{EHCI\_QTD\_XACTERR}}) ? \textcolor{stringliteral}{"{}-\/XACTERR"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00726}00726             (s \& \mbox{\hyperlink{ehci_8h_ad81898fe31ca2df5ec582f3c4f4ce8cb}{EHCI\_QTD\_MISSEDMICRO}}) ? \textcolor{stringliteral}{"{}-\/MISSED"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00727}00727             (s \& \mbox{\hyperlink{ehci_8h_a1aaa219da68fbdd3da1b20e28c259c72}{EHCI\_QTD\_SPLITXSTATE}}) ? \textcolor{stringliteral}{"{}-\/SPLIT"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00728}00728             (s \& \mbox{\hyperlink{ehci_8h_adfc5838393934b18d81bad80ad3a6ebb}{EHCI\_QTD\_PINGSTATE}}) ? \textcolor{stringliteral}{"{}-\/PING"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00729}00729 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00730}00730         \textcolor{keywordflow}{for} (s = 0; s < 5; s++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00731}00731                 printf(\textcolor{stringliteral}{"{}  buffer[\%d]=0x\%08x\(\backslash\)n"{}}, s,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00732}00732                     \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, qtd-\/>\mbox{\hyperlink{structehci__qtd_a8133b7d2bc57953e002395e01ed11707}{qtd\_buffer}}[s]));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00733}00733         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00734}00734         \textcolor{keywordflow}{for} (s = 0; s < 5; s++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00735}00735                 printf(\textcolor{stringliteral}{"{}  buffer\_hi[\%d]=0x\%08x\(\backslash\)n"{}}, s,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00736}00736                     \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, qtd-\/>\mbox{\hyperlink{structehci__qtd_a0f5f0103a954fd2edb24f9ae204e2b6a}{qtd\_buffer\_hi}}[s]));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00737}00737         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00738}00738 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00739}00739 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00740}00740 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00741}00741 ehci\_dump\_sqtd(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *sqtd)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00742}00742 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00743}00743         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00744}00744 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00745}00745         \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(sqtd-\/>\mbox{\hyperlink{structehci__qtd_a289476501a408aebdcdc070300d568eb}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00746}00746         printf(\textcolor{stringliteral}{"{}QTD(\%p) at 0x\%08x:\(\backslash\)n"{}}, sqtd, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sqtd-\/>\mbox{\hyperlink{structehci__qtd_aa899ed20b306e054d077e9db46764e80}{qtd\_self}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00747}00747         ehci\_dump\_qtd(sc, sqtd);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00748}00748         temp = (sqtd-\/>\mbox{\hyperlink{structehci__qtd_ad691234a0831866daa0c56de953aed25}{qtd\_next}} \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}})) ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00749}00749         \textcolor{keywordflow}{return} (temp);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00750}00750 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00751}00751 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00752}00752 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00753}00753 ehci\_dump\_sqtds(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *sqtd)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00754}00754 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00755}00755         uint16\_t i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00756}00756         uint8\_t stop;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00757}00757 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00758}00758         stop = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00759}00759         \textcolor{keywordflow}{for} (i = 0; sqtd \&\& (i < 20) \&\& !stop; sqtd = sqtd-\/>\mbox{\hyperlink{structehci__qtd_a9c320a3ea8cc4a59163f0651fb4d1738}{obj\_next}}, i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00760}00760                 stop = ehci\_dump\_sqtd(sc, sqtd);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00761}00761         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00762}00762         \textcolor{keywordflow}{if} (sqtd) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00763}00763                 printf(\textcolor{stringliteral}{"{}dump aborted, too many TDs\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00764}00764         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00765}00765 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00766}00766 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00767}00767 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00768}00768 ehci\_dump\_sqh(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00769}00769 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00770}00770         uint32\_t endp;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00771}00771         uint32\_t endphub;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00772}00772 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00773}00773         \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(qh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00774}00774         printf(\textcolor{stringliteral}{"{}QH(\%p) at 0x\%08x:\(\backslash\)n"{}}, qh, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, qh-\/>\mbox{\hyperlink{structehci__qh_a40588373ecdf3a8e81b63ffb63960ac3}{qh\_self}}) \& \string~0x1F);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00775}00775         printf(\textcolor{stringliteral}{"{}  link="{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00776}00776         ehci\_dump\_link(sc, qh-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}}, 1);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00777}00777         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00778}00778         endp = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, qh-\/>\mbox{\hyperlink{structehci__qh_a7e9e9cc3d850a73326fdf1dfd9a7ca54}{qh\_endp}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00779}00779         printf(\textcolor{stringliteral}{"{}  endp=0x\%08x\(\backslash\)n"{}}, endp);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00780}00780         printf(\textcolor{stringliteral}{"{}    addr=0x\%02x inact=\%d endpt=\%d eps=\%d dtc=\%d hrecl=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00781}00781             \mbox{\hyperlink{ehci_8h_afa34db0e2d1b930f004b8366fac491db}{EHCI\_QH\_GET\_ADDR}}(endp), \mbox{\hyperlink{ehci_8h_ad3f3c54273b169b41d58eccccd52623b}{EHCI\_QH\_GET\_INACT}}(endp),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00782}00782             \mbox{\hyperlink{ehci_8h_a5f995a627a8055595fd640c6dbeaeb3a}{EHCI\_QH\_GET\_ENDPT}}(endp), \mbox{\hyperlink{ehci_8h_a3c78f76d123dbda89a99d9fd42ea9db2}{EHCI\_QH\_GET\_EPS}}(endp),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00783}00783             \mbox{\hyperlink{ehci_8h_a1b15185f6ced90c09c18864f1ac029da}{EHCI\_QH\_GET\_DTC}}(endp), \mbox{\hyperlink{ehci_8h_ab30d52b51fe9d134f220a8b1c7c32ab3}{EHCI\_QH\_GET\_HRECL}}(endp));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00784}00784         printf(\textcolor{stringliteral}{"{}    mpl=0x\%x ctl=\%d nrl=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00785}00785             \mbox{\hyperlink{ehci_8h_a4255c0159484489a752c4feb2b1afdab}{EHCI\_QH\_GET\_MPL}}(endp), \mbox{\hyperlink{ehci_8h_afaf8c40a5ad9e678f58e000abe2ba226}{EHCI\_QH\_GET\_CTL}}(endp),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00786}00786             \mbox{\hyperlink{ehci_8h_a944664948eefb814b28a165f8872e360}{EHCI\_QH\_GET\_NRL}}(endp));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00787}00787         endphub = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, qh-\/>\mbox{\hyperlink{structehci__qh_ade077b1974e33d9ab12bcfdc3b658664}{qh\_endphub}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00788}00788         printf(\textcolor{stringliteral}{"{}  endphub=0x\%08x\(\backslash\)n"{}}, endphub);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00789}00789         printf(\textcolor{stringliteral}{"{}    smask=0x\%02x cmask=0x\%02x huba=0x\%02x port=\%d mult=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00790}00790             \mbox{\hyperlink{ehci_8h_a98efb5ffa0b8a5cddbb9a6f77b6a5a3c}{EHCI\_QH\_GET\_SMASK}}(endphub), \mbox{\hyperlink{ehci_8h_afaf99765daf17d9f2b15a9f61adbdb4f}{EHCI\_QH\_GET\_CMASK}}(endphub),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00791}00791             \mbox{\hyperlink{ehci_8h_a7b44d720bd01b7f89f25656ba42401c8}{EHCI\_QH\_GET\_HUBA}}(endphub), \mbox{\hyperlink{ehci_8h_a48f49160a64172dbfa7021419186718f}{EHCI\_QH\_GET\_PORT}}(endphub),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00792}00792             \mbox{\hyperlink{ehci_8h_acba09a11641b0aa360a3e973b4133d2b}{EHCI\_QH\_GET\_MULT}}(endphub));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00793}00793         printf(\textcolor{stringliteral}{"{}  curqtd="{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00794}00794         ehci\_dump\_link(sc, qh-\/>\mbox{\hyperlink{structehci__qh_abe761005d92d9161de84780c366d6752}{qh\_curqtd}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00795}00795         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00796}00796         printf(\textcolor{stringliteral}{"{}Overlay qTD:\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00797}00797         ehci\_dump\_qtd(sc, (\textcolor{keywordtype}{void} *)\&qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00798}00798 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00799}00799 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00800}00800 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00801}00801 ehci\_dump\_sitd(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *sitd)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00802}00802 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00803}00803         \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(sitd-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00804}00804         printf(\textcolor{stringliteral}{"{}SITD(\%p) at 0x\%08x\(\backslash\)n"{}}, sitd, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_abc1501540073a2ba23de370a1ffd9144}{sitd\_self}}) \& \string~0x1F);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00805}00805         printf(\textcolor{stringliteral}{"{} next=0x\%08x\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_aa1984bf244b981686ed63020477173cd}{sitd\_next}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00806}00806         printf(\textcolor{stringliteral}{"{} portaddr=0x\%08x dir=\%s addr=\%d endpt=0x\%x port=0x\%x huba=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00807}00807             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_aa05535423522f78016bff1d0b6013820}{sitd\_portaddr}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00808}00808             (sitd-\/>\mbox{\hyperlink{structehci__sitd_aa05535423522f78016bff1d0b6013820}{sitd\_portaddr}} \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a37606c223fc7c318464292186cc7f4ed}{EHCI\_SITD\_SET\_DIR\_IN}}))}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00809}00809             ? \textcolor{stringliteral}{"{}in"{}} : \textcolor{stringliteral}{"{}out"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00810}00810             \mbox{\hyperlink{ehci_8h_a1b5eade4d7bc2c1c1628788250f2f216}{EHCI\_SITD\_GET\_ADDR}}(\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_aa05535423522f78016bff1d0b6013820}{sitd\_portaddr}})),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00811}00811             \mbox{\hyperlink{ehci_8h_a52b8020a77801899c20c3f0152a8cbed}{EHCI\_SITD\_GET\_ENDPT}}(\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_aa05535423522f78016bff1d0b6013820}{sitd\_portaddr}})),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00812}00812             \mbox{\hyperlink{ehci_8h_a1f2cf3d2981775fa7bfc6e6214563ba4}{EHCI\_SITD\_GET\_PORT}}(\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_aa05535423522f78016bff1d0b6013820}{sitd\_portaddr}})),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00813}00813             \mbox{\hyperlink{ehci_8h_ad859e821e034ccd97c5182a92d6127d5}{EHCI\_SITD\_GET\_HUBA}}(\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_aa05535423522f78016bff1d0b6013820}{sitd\_portaddr}})));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00814}00814         printf(\textcolor{stringliteral}{"{} mask=0x\%08x\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_ab1ccf261127e730ff5f298580a94dbd6}{sitd\_mask}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00815}00815         printf(\textcolor{stringliteral}{"{} status=0x\%08x <\%s> len=0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_aedc14aca108bc105d25c85ff496050bd}{sitd\_status}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00816}00816             (sitd-\/>\mbox{\hyperlink{structehci__sitd_aedc14aca108bc105d25c85ff496050bd}{sitd\_status}} \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a13dd6228ac7a8e7547b2dd659e23c23f}{EHCI\_SITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00817}00817             \mbox{\hyperlink{ehci_8h_a6beff0e0c1cf58e308a7e2768bca457b}{EHCI\_SITD\_GET\_LEN}}(\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_aedc14aca108bc105d25c85ff496050bd}{sitd\_status}})));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00818}00818         printf(\textcolor{stringliteral}{"{} back=0x\%08x, bp=0x\%08x,0x\%08x,0x\%08x,0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00819}00819             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_a1f267c4d34d92dedb4b5a7b28285158b}{sitd\_back}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00820}00820             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_a913e70b0fc2ae51d0da7fee4f8050641}{sitd\_bp}}[0]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00821}00821             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_a913e70b0fc2ae51d0da7fee4f8050641}{sitd\_bp}}[1]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00822}00822             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_a35eeeb2b9e09a1d69bcb8135282f0108}{sitd\_bp\_hi}}[0]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00823}00823             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, sitd-\/>\mbox{\hyperlink{structehci__sitd_a35eeeb2b9e09a1d69bcb8135282f0108}{sitd\_bp\_hi}}[1]));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00824}00824 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00826}00826 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00827}00827 ehci\_dump\_itd(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *itd)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00828}00828 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00829}00829         \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(itd-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00830}00830         printf(\textcolor{stringliteral}{"{}ITD(\%p) at 0x\%08x\(\backslash\)n"{}}, itd, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a07b1a769eb0233951a2271041ff04176}{itd\_self}}) \& \string~0x1F);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00831}00831         printf(\textcolor{stringliteral}{"{} next=0x\%08x\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a23949ef5c8e5559d0333c3dc2fae7106}{itd\_next}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00832}00832         printf(\textcolor{stringliteral}{"{} status[0]=0x\%08x; <\%s>\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[0]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00833}00833             (itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[0] \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00834}00834         printf(\textcolor{stringliteral}{"{} status[1]=0x\%08x; <\%s>\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[1]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00835}00835             (itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[1] \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00836}00836         printf(\textcolor{stringliteral}{"{} status[2]=0x\%08x; <\%s>\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[2]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00837}00837             (itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[2] \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00838}00838         printf(\textcolor{stringliteral}{"{} status[3]=0x\%08x; <\%s>\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[3]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00839}00839             (itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[3] \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00840}00840         printf(\textcolor{stringliteral}{"{} status[4]=0x\%08x; <\%s>\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[4]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00841}00841             (itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[4] \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00842}00842         printf(\textcolor{stringliteral}{"{} status[5]=0x\%08x; <\%s>\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[5]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00843}00843             (itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[5] \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00844}00844         printf(\textcolor{stringliteral}{"{} status[6]=0x\%08x; <\%s>\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[6]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00845}00845             (itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[6] \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00846}00846         printf(\textcolor{stringliteral}{"{} status[7]=0x\%08x; <\%s>\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[7]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00847}00847             (itd-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[7] \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}})) ? \textcolor{stringliteral}{"{}ACTIVE"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00848}00848         printf(\textcolor{stringliteral}{"{} bp[0]=0x\%08x\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[0]));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00849}00849         printf(\textcolor{stringliteral}{"{}  addr=0x\%02x; endpt=0x\%01x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00850}00850             \mbox{\hyperlink{ehci_8h_acd2e84cbdff9d951c8543345a61f073a}{EHCI\_ITD\_GET\_ADDR}}(\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[0])),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00851}00851             \mbox{\hyperlink{ehci_8h_a325d495cc31765ecb351160555681430}{EHCI\_ITD\_GET\_ENDPT}}(\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[0])));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00852}00852         printf(\textcolor{stringliteral}{"{} bp[1]=0x\%08x\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[1]));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00853}00853         printf(\textcolor{stringliteral}{"{} dir=\%s; mpl=0x\%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00854}00854             (\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[1]) \& \mbox{\hyperlink{ehci_8h_ac64ad7852de2c707ca95232b9e83399b}{EHCI\_ITD\_SET\_DIR\_IN}}) ? \textcolor{stringliteral}{"{}in"{}} : \textcolor{stringliteral}{"{}out"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00855}00855             \mbox{\hyperlink{ehci_8h_aec3f30df56132ea0e26bac71b9524366}{EHCI\_ITD\_GET\_MPL}}(\mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[1])));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00856}00856         printf(\textcolor{stringliteral}{"{} bp[2..6]=0x\%08x,0x\%08x,0x\%08x,0x\%08x,0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00857}00857             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[2]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00858}00858             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[3]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00859}00859             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[4]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00860}00860             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[5]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00861}00861             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[6]));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00862}00862         printf(\textcolor{stringliteral}{"{} bp\_hi=0x\%08x,0x\%08x,0x\%08x,0x\%08x,\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00863}00863             \textcolor{stringliteral}{"{}       0x\%08x,0x\%08x,0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00864}00864             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a213b5199f95be6ee106c49c3a59ef94f}{itd\_bp\_hi}}[0]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00865}00865             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a213b5199f95be6ee106c49c3a59ef94f}{itd\_bp\_hi}}[1]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00866}00866             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a213b5199f95be6ee106c49c3a59ef94f}{itd\_bp\_hi}}[2]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00867}00867             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a213b5199f95be6ee106c49c3a59ef94f}{itd\_bp\_hi}}[3]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00868}00868             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a213b5199f95be6ee106c49c3a59ef94f}{itd\_bp\_hi}}[4]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00869}00869             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a213b5199f95be6ee106c49c3a59ef94f}{itd\_bp\_hi}}[5]),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00870}00870             \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, itd-\/>\mbox{\hyperlink{structehci__itd_a213b5199f95be6ee106c49c3a59ef94f}{itd\_bp\_hi}}[6]));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00871}00871 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00872}00872 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00873}00873 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00874}00874 ehci\_dump\_isoc(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00875}00875 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00876}00876         \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *itd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00877}00877         \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *sitd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00878}00878         uint16\_t max = 1000;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00879}00879         uint16\_t pos;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00880}00880 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00881}00881         pos = (\mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a53ea75b3eebcb6fd476b9fba72904731}{EHCI\_FRINDEX}}) / 8) \&}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00882}00882             (\mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00883}00883 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00884}00884         printf(\textcolor{stringliteral}{"{}\%s: isochronous dump from frame 0x\%03x:\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00885}00885             \_\_FUNCTION\_\_, pos);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00886}00886 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00887}00887         itd = sc-\/>\mbox{\hyperlink{structehci__softc_a8837d4f4648d7efb6950b73386cef215}{sc\_isoc\_hs\_p\_last}}[pos];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00888}00888         sitd = sc-\/>\mbox{\hyperlink{structehci__softc_aa252ae2bf17b592b3557161a16784cfe}{sc\_isoc\_fs\_p\_last}}[pos];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00889}00889 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00890}00890         \textcolor{keywordflow}{while} (itd \&\& max \&\& max-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00891}00891                 ehci\_dump\_itd(sc, itd);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00892}00892                 itd = itd-\/>\mbox{\hyperlink{structehci__itd_a22f521e24ba6204e1ed734bc4d870dc9}{prev}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00893}00893         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00894}00894 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00895}00895         \textcolor{keywordflow}{while} (sitd \&\& max \&\& max-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00896}00896                 ehci\_dump\_sitd(sc, sitd);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00897}00897                 sitd = sitd-\/>\mbox{\hyperlink{structehci__sitd_a15fb358fa9da0d9d9e329afc0cb6aa10}{prev}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00898}00898         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00899}00899 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00900}00900 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00901}00901 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00902}00902 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00903}00903 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00904}\mbox{\hyperlink{ehci_8c_abd83555480de41de55c5839f102418d5}{00904}} \mbox{\hyperlink{ehci_8c_abd83555480de41de55c5839f102418d5}{ehci\_transfer\_intr\_enqueue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00905}00905 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00906}00906         \textcolor{comment}{/* check for early completion */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00907}00907         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8c_a17b21ed52a6c51e31de15b51591ce9a6}{ehci\_check\_transfer}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00908}00908                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00909}00909         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00910}00910         \textcolor{comment}{/* put transfer on interrupt queue */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00911}00911         \mbox{\hyperlink{usb__transfer_8c_abfdcc46256df403f3f4d1b02db7ccb16}{usbd\_transfer\_enqueue}}(\&xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}}-\/>\mbox{\hyperlink{structusb__bus_afe87bf7e25fe7284a87d14ca231bc818}{intr\_q}}, xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00912}00912 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00913}00913         \textcolor{comment}{/* start timeout, if any */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00914}00914         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a766f3db3d34b816ff819212c11f27ad3}{timeout}} != 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00915}00915                 \mbox{\hyperlink{usb__transfer_8c_ad2a08e4791c74765a0ecc20d5894ab36}{usbd\_transfer\_timeout\_ms}}(xfer, \&\mbox{\hyperlink{ehci_8c_a7b311d9572708adf5e6bee81bd0538cc}{ehci\_timeout}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a766f3db3d34b816ff819212c11f27ad3}{timeout}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00916}00916         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00917}00917 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00918}00918 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00919}\mbox{\hyperlink{ehci_8c_ab9ba44ba9573b8448942dd7358e69084}{00919}} \textcolor{preprocessor}{\#define EHCI\_APPEND\_FS\_TD(std,last) (last) = \_ehci\_append\_fs\_td(std,last)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00920}00920 \textcolor{keyword}{static} \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00921}\mbox{\hyperlink{ehci_8c_abb8ded01a3345f74aa938a847e4e3713}{00921}} \mbox{\hyperlink{ehci_8c_abb8ded01a3345f74aa938a847e4e3713}{\_ehci\_append\_fs\_td}}(\mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *std, \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *last)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00922}00922 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00923}00923         DPRINTFN(11, \textcolor{stringliteral}{"{}\%p to \%p\(\backslash\)n"{}}, std, last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00924}00924 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00925}00925         \textcolor{comment}{/* (sc-\/>sc\_bus.mtx) must be locked */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00926}00926 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00927}00927         std-\/>\mbox{\hyperlink{structehci__sitd_a5bc7cfb4fbe7b01274df4c4eee219092}{next}} = last-\/>\mbox{\hyperlink{structehci__sitd_a5bc7cfb4fbe7b01274df4c4eee219092}{next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00928}00928         std-\/>\mbox{\hyperlink{structehci__sitd_aa1984bf244b981686ed63020477173cd}{sitd\_next}} = last-\/>\mbox{\hyperlink{structehci__sitd_aa1984bf244b981686ed63020477173cd}{sitd\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00929}00929 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00930}00930         std-\/>\mbox{\hyperlink{structehci__sitd_a15fb358fa9da0d9d9e329afc0cb6aa10}{prev}} = last;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00931}00931 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00932}00932         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(std-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00933}00933 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00934}00934         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00935}00935 \textcolor{comment}{         * the last-\/>next-\/>prev is never followed: std-\/>next-\/>prev = std;}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00936}00936 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00937}00937         last-\/>\mbox{\hyperlink{structehci__sitd_a5bc7cfb4fbe7b01274df4c4eee219092}{next}} = std;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00938}00938         last-\/>\mbox{\hyperlink{structehci__sitd_aa1984bf244b981686ed63020477173cd}{sitd\_next}} = std-\/>\mbox{\hyperlink{structehci__sitd_abc1501540073a2ba23de370a1ffd9144}{sitd\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00939}00939 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00940}00940         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(last-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00941}00941 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00942}00942         \textcolor{keywordflow}{return} (std);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00943}00943 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00944}00944 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00945}\mbox{\hyperlink{ehci_8c_a038b205aa738528b9d4eed732b3fa651}{00945}} \textcolor{preprocessor}{\#define EHCI\_APPEND\_HS\_TD(std,last) (last) = \_ehci\_append\_hs\_td(std,last)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00946}00946 \textcolor{keyword}{static} \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00947}\mbox{\hyperlink{ehci_8c_a2d2e5b17ca2c12c6ce3b4a6d4fae11be}{00947}} \mbox{\hyperlink{ehci_8c_a2d2e5b17ca2c12c6ce3b4a6d4fae11be}{\_ehci\_append\_hs\_td}}(\mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *std, \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *last)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00948}00948 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00949}00949         DPRINTFN(11, \textcolor{stringliteral}{"{}\%p to \%p\(\backslash\)n"{}}, std, last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00950}00950 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00951}00951         \textcolor{comment}{/* (sc-\/>sc\_bus.mtx) must be locked */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00952}00952 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00953}00953         std-\/>\mbox{\hyperlink{structehci__itd_a7db5b27da1364113efcbf66a8cb8ff90}{next}} = last-\/>\mbox{\hyperlink{structehci__itd_a7db5b27da1364113efcbf66a8cb8ff90}{next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00954}00954         std-\/>\mbox{\hyperlink{structehci__itd_a23949ef5c8e5559d0333c3dc2fae7106}{itd\_next}} = last-\/>\mbox{\hyperlink{structehci__itd_a23949ef5c8e5559d0333c3dc2fae7106}{itd\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00955}00955 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00956}00956         std-\/>\mbox{\hyperlink{structehci__itd_a22f521e24ba6204e1ed734bc4d870dc9}{prev}} = last;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00957}00957 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00958}00958         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(std-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00959}00959 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00960}00960         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00961}00961 \textcolor{comment}{         * the last-\/>next-\/>prev is never followed: std-\/>next-\/>prev = std;}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00962}00962 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00963}00963         last-\/>\mbox{\hyperlink{structehci__itd_a7db5b27da1364113efcbf66a8cb8ff90}{next}} = std;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00964}00964         last-\/>\mbox{\hyperlink{structehci__itd_a23949ef5c8e5559d0333c3dc2fae7106}{itd\_next}} = std-\/>\mbox{\hyperlink{structehci__itd_a07b1a769eb0233951a2271041ff04176}{itd\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00965}00965 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00966}00966         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(last-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00967}00967 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00968}00968         \textcolor{keywordflow}{return} (std);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00969}00969 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00971}\mbox{\hyperlink{ehci_8c_a1bdc1e85de6a5fd2df9d6aaac5535d08}{00971}} \textcolor{preprocessor}{\#define EHCI\_APPEND\_QH(sqh,last) (last) = \_ehci\_append\_qh(sqh,last)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00972}00972 \textcolor{keyword}{static} \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00973}\mbox{\hyperlink{ehci_8c_ac3ee870449add2cb524b6ee9d548b4ab}{00973}} \mbox{\hyperlink{ehci_8c_ac3ee870449add2cb524b6ee9d548b4ab}{\_ehci\_append\_qh}}(\mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *sqh, \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *last)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00974}00974 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00975}00975         DPRINTFN(11, \textcolor{stringliteral}{"{}\%p to \%p\(\backslash\)n"{}}, sqh, last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00976}00976 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00977}00977         \textcolor{keywordflow}{if} (sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00978}00978                 \textcolor{comment}{/* should not happen */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00979}00979                 DPRINTFN(0, \textcolor{stringliteral}{"{}QH already linked!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00980}00980                 \textcolor{keywordflow}{return} (last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00981}00981         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00982}00982         \textcolor{comment}{/* (sc-\/>sc\_bus.mtx) must be locked */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00983}00983 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00984}00984         sqh-\/>\mbox{\hyperlink{structehci__qh_a7ffd82af74a64368e67db8efbf2841d0}{next}} = last-\/>\mbox{\hyperlink{structehci__qh_a7ffd82af74a64368e67db8efbf2841d0}{next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00985}00985         sqh-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}} = last-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00986}00986 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00987}00987         sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}} = last;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00988}00988 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00989}00989         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(sqh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00990}00990 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00991}00991         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00992}00992 \textcolor{comment}{         * the last-\/>next-\/>prev is never followed: sqh-\/>next-\/>prev = sqh;}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00993}00993 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00994}00994 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00995}00995         last-\/>\mbox{\hyperlink{structehci__qh_a7ffd82af74a64368e67db8efbf2841d0}{next}} = sqh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00996}00996         last-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}} = sqh-\/>\mbox{\hyperlink{structehci__qh_a40588373ecdf3a8e81b63ffb63960ac3}{qh\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00997}00997 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00998}00998         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(last-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l00999}00999 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01000}01000         \textcolor{keywordflow}{return} (sqh);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01001}01001 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01002}01002 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01003}\mbox{\hyperlink{ehci_8c_ad613740b870d634d212a6ff718ef545e}{01003}} \textcolor{preprocessor}{\#define EHCI\_REMOVE\_FS\_TD(std,last) (last) = \_ehci\_remove\_fs\_td(std,last)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01004}01004 \textcolor{keyword}{static} \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01005}\mbox{\hyperlink{ehci_8c_a10389642f3a166dc037f2fd54a447bea}{01005}} \mbox{\hyperlink{ehci_8c_a10389642f3a166dc037f2fd54a447bea}{\_ehci\_remove\_fs\_td}}(\mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *std, \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *last)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01006}01006 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01007}01007         DPRINTFN(11, \textcolor{stringliteral}{"{}\%p from \%p\(\backslash\)n"{}}, std, last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01008}01008 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01009}01009         \textcolor{comment}{/* (sc-\/>sc\_bus.mtx) must be locked */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01010}01010 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01011}01011         std-\/>\mbox{\hyperlink{structehci__sitd_a15fb358fa9da0d9d9e329afc0cb6aa10}{prev}}-\/>\mbox{\hyperlink{structehci__sitd_a5bc7cfb4fbe7b01274df4c4eee219092}{next}} = std-\/>\mbox{\hyperlink{structehci__sitd_a5bc7cfb4fbe7b01274df4c4eee219092}{next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01012}01012         std-\/>\mbox{\hyperlink{structehci__sitd_a15fb358fa9da0d9d9e329afc0cb6aa10}{prev}}-\/>\mbox{\hyperlink{structehci__sitd_aa1984bf244b981686ed63020477173cd}{sitd\_next}} = std-\/>\mbox{\hyperlink{structehci__sitd_aa1984bf244b981686ed63020477173cd}{sitd\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01013}01013 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01014}01014         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(std-\/>\mbox{\hyperlink{structehci__sitd_a15fb358fa9da0d9d9e329afc0cb6aa10}{prev}}-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01015}01015 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01016}01016         \textcolor{keywordflow}{if} (std-\/>\mbox{\hyperlink{structehci__sitd_a5bc7cfb4fbe7b01274df4c4eee219092}{next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01017}01017                 std-\/>\mbox{\hyperlink{structehci__sitd_a5bc7cfb4fbe7b01274df4c4eee219092}{next}}-\/>\mbox{\hyperlink{structehci__sitd_a15fb358fa9da0d9d9e329afc0cb6aa10}{prev}} = std-\/>\mbox{\hyperlink{structehci__sitd_a15fb358fa9da0d9d9e329afc0cb6aa10}{prev}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01018}01018                 \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(std-\/>\mbox{\hyperlink{structehci__sitd_a5bc7cfb4fbe7b01274df4c4eee219092}{next}}-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01019}01019         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01020}01020         \textcolor{keywordflow}{return} ((last == std) ? std-\/>\mbox{\hyperlink{structehci__sitd_a15fb358fa9da0d9d9e329afc0cb6aa10}{prev}} : last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01021}01021 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01022}01022 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01023}\mbox{\hyperlink{ehci_8c_a9fac4909be400d255fb85207b3eaa32d}{01023}} \textcolor{preprocessor}{\#define EHCI\_REMOVE\_HS\_TD(std,last) (last) = \_ehci\_remove\_hs\_td(std,last)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01024}01024 \textcolor{keyword}{static} \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01025}\mbox{\hyperlink{ehci_8c_a3f52170a2f4a732209af727141213229}{01025}} \mbox{\hyperlink{ehci_8c_a3f52170a2f4a732209af727141213229}{\_ehci\_remove\_hs\_td}}(\mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *std, \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *last)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01026}01026 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01027}01027         DPRINTFN(11, \textcolor{stringliteral}{"{}\%p from \%p\(\backslash\)n"{}}, std, last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01028}01028 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01029}01029         \textcolor{comment}{/* (sc-\/>sc\_bus.mtx) must be locked */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01030}01030 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01031}01031         std-\/>\mbox{\hyperlink{structehci__itd_a22f521e24ba6204e1ed734bc4d870dc9}{prev}}-\/>\mbox{\hyperlink{structehci__itd_a7db5b27da1364113efcbf66a8cb8ff90}{next}} = std-\/>\mbox{\hyperlink{structehci__itd_a7db5b27da1364113efcbf66a8cb8ff90}{next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01032}01032         std-\/>\mbox{\hyperlink{structehci__itd_a22f521e24ba6204e1ed734bc4d870dc9}{prev}}-\/>\mbox{\hyperlink{structehci__itd_a23949ef5c8e5559d0333c3dc2fae7106}{itd\_next}} = std-\/>\mbox{\hyperlink{structehci__itd_a23949ef5c8e5559d0333c3dc2fae7106}{itd\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01033}01033 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01034}01034         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(std-\/>\mbox{\hyperlink{structehci__itd_a22f521e24ba6204e1ed734bc4d870dc9}{prev}}-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01036}01036         \textcolor{keywordflow}{if} (std-\/>\mbox{\hyperlink{structehci__itd_a7db5b27da1364113efcbf66a8cb8ff90}{next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01037}01037                 std-\/>\mbox{\hyperlink{structehci__itd_a7db5b27da1364113efcbf66a8cb8ff90}{next}}-\/>\mbox{\hyperlink{structehci__itd_a22f521e24ba6204e1ed734bc4d870dc9}{prev}} = std-\/>\mbox{\hyperlink{structehci__itd_a22f521e24ba6204e1ed734bc4d870dc9}{prev}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01038}01038                 \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(std-\/>\mbox{\hyperlink{structehci__itd_a7db5b27da1364113efcbf66a8cb8ff90}{next}}-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01039}01039         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01040}01040         \textcolor{keywordflow}{return} ((last == std) ? std-\/>\mbox{\hyperlink{structehci__itd_a22f521e24ba6204e1ed734bc4d870dc9}{prev}} : last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01041}01041 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01042}01042 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01043}\mbox{\hyperlink{ehci_8c_a09c874474813a492d66865631bac6029}{01043}} \textcolor{preprocessor}{\#define EHCI\_REMOVE\_QH(sqh,last) (last) = \_ehci\_remove\_qh(sqh,last)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01044}01044 \textcolor{keyword}{static} \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01045}\mbox{\hyperlink{ehci_8c_a2ae4a7d2fe8db0074fdd7c8635c40e28}{01045}} \mbox{\hyperlink{ehci_8c_a2ae4a7d2fe8db0074fdd7c8635c40e28}{\_ehci\_remove\_qh}}(\mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *sqh, \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *last)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01046}01046 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01047}01047         DPRINTFN(11, \textcolor{stringliteral}{"{}\%p from \%p\(\backslash\)n"{}}, sqh, last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01048}01048 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01049}01049         \textcolor{comment}{/* (sc-\/>sc\_bus.mtx) must be locked */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01050}01050 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01051}01051         \textcolor{comment}{/* only remove if not removed from a queue */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01052}01052         \textcolor{keywordflow}{if} (sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01053}01053                 sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}}-\/>\mbox{\hyperlink{structehci__qh_a7ffd82af74a64368e67db8efbf2841d0}{next}} = sqh-\/>\mbox{\hyperlink{structehci__qh_a7ffd82af74a64368e67db8efbf2841d0}{next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01054}01054                 sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}}-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}} = sqh-\/>\mbox{\hyperlink{structehci__qh_a66a3e9c0f7b2d90a874d82a1096e9f81}{qh\_link}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01055}01055 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01056}01056                 \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}}-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01057}01057 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01058}01058                 \textcolor{keywordflow}{if} (sqh-\/>\mbox{\hyperlink{structehci__qh_a7ffd82af74a64368e67db8efbf2841d0}{next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01059}01059                         sqh-\/>\mbox{\hyperlink{structehci__qh_a7ffd82af74a64368e67db8efbf2841d0}{next}}-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}} = sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01060}01060                         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(sqh-\/>\mbox{\hyperlink{structehci__qh_a7ffd82af74a64368e67db8efbf2841d0}{next}}-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01061}01061                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01062}01062                 last = ((last == sqh) ? sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}} : last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01063}01063 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01064}01064                 sqh-\/>\mbox{\hyperlink{structehci__qh_a826b5b8b1f728cb2cf726783347925d8}{prev}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01065}01065 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01066}01066                 \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(sqh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01067}01067         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01068}01068         \textcolor{keywordflow}{return} (last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01069}01069 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01070}01070 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01071}01071 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01072}\mbox{\hyperlink{ehci_8c_a966cb063f54616d23be5b195f4b01110}{01072}} \mbox{\hyperlink{ehci_8c_a966cb063f54616d23be5b195f4b01110}{ehci\_data\_toggle\_update}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, uint16\_t actlen, uint16\_t xlen)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01073}01073 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01074}01074         uint16\_t rem;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01075}01075         uint8\_t dt;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01076}01076 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01077}01077         \textcolor{comment}{/* count number of full packets */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01078}01078         dt = (actlen / xfer-\/>\mbox{\hyperlink{structusb__xfer_aefcde8a630b7adefe68cc72e7e7a5bb5}{max\_packet\_size}}) \& 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01079}01079 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01080}01080         \textcolor{comment}{/* compute remainder */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01081}01081         rem = actlen \% xfer-\/>\mbox{\hyperlink{structusb__xfer_aefcde8a630b7adefe68cc72e7e7a5bb5}{max\_packet\_size}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01082}01082 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01083}01083         \textcolor{keywordflow}{if} (rem > 0)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01084}01084                 dt \string^= 1;        \textcolor{comment}{/* short packet at the end */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01085}01085         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (actlen != xlen)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01086}01086                 dt \string^= 1;        \textcolor{comment}{/* zero length packet at the end */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01087}01087         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (xlen == 0)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01088}01088                 dt \string^= 1;        \textcolor{comment}{/* zero length transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01089}01089 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01090}01090         xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a23e80980572fb57b1a6097114e92cfbc}{toggle\_next}} \string^= dt;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01091}01091 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01092}01092 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01093}01093 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01094}\mbox{\hyperlink{ehci_8c_a86daab56ff8df4710f231e6227cae2a4}{01094}} \mbox{\hyperlink{ehci_8c_a86daab56ff8df4710f231e6227cae2a4}{ehci\_non\_isoc\_done\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01095}01095 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01096}01096         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01097}01097         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01098}01098         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *td\_alt\_next;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01099}01099         uint32\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01100}01100         uint16\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01101}01101 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01102}01102         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01103}01103         td\_alt\_next = td-\/>\mbox{\hyperlink{structehci__qtd_a849bb7d04b48cb308be920c044ac2954}{alt\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01104}01104 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01105}01105         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01106}01106                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01107}01107         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01108}01108         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01109}01109                 \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(td-\/>\mbox{\hyperlink{structehci__qtd_a289476501a408aebdcdc070300d568eb}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01110}01110                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, td-\/>\mbox{\hyperlink{structehci__qtd_a39e32864cb9fca59b2b665955169afd2}{qtd\_status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01111}01111 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01112}01112                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \mbox{\hyperlink{ehci_8h_aeb480e670af1131f1f9d76ea2e87cbbe}{EHCI\_QTD\_GET\_BYTES}}(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01113}01113 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01114}01114                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01115}01115 \textcolor{comment}{                 * Verify the status length and}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01116}01116 \textcolor{comment}{                 * add the length to "{}frlengths[]"{}:}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01117}01117 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01118}01118                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > td-\/>\mbox{\hyperlink{structehci__qtd_af60a74af7e7809a20c9d66c912882bba}{len}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01119}01119                         \textcolor{comment}{/* should not happen */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01120}01120                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}Invalid status length, "{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01121}01121                             \textcolor{stringliteral}{"{}0x\%04x/0x\%04x bytes\(\backslash\)n"{}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, td-\/>\mbox{\hyperlink{structehci__qtd_af60a74af7e7809a20c9d66c912882bba}{len}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01122}01122                         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01123}01123                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01124}01124                         xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}}] += td-\/>\mbox{\hyperlink{structehci__qtd_af60a74af7e7809a20c9d66c912882bba}{len}} -\/ \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01125}01125                         \textcolor{comment}{/* manually update data toggle */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01126}01126                         \mbox{\hyperlink{ehci_8c_a966cb063f54616d23be5b195f4b01110}{ehci\_data\_toggle\_update}}(xfer, td-\/>\mbox{\hyperlink{structehci__qtd_af60a74af7e7809a20c9d66c912882bba}{len}} -\/ \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, td-\/>\mbox{\hyperlink{structehci__qtd_af60a74af7e7809a20c9d66c912882bba}{len}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01127}01127                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01128}01128 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01129}01129                 \textcolor{comment}{/* Check for last transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01130}01130                 \textcolor{keywordflow}{if} (((\textcolor{keywordtype}{void} *)td) == xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01131}01131                         td = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01132}01132                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01133}01133                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01134}01134                 \textcolor{comment}{/* Check for transfer error */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01135}01135                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01136}01136                         \textcolor{comment}{/* the transfer is finished */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01137}01137                         td = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01138}01138                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01139}01139                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01140}01140                 \textcolor{comment}{/* Check for short transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01141}01141                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01142}01142                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a1023a81a83c7acfbe3134100363e7fde}{short\_frames\_ok}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01143}01143                                 \textcolor{comment}{/* follow alt next */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01144}01144                                 td = td-\/>alt\_next;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01145}01145                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01146}01146                                 \textcolor{comment}{/* the transfer is finished */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01147}01147                                 td = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01148}01148                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01149}01149                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01150}01150                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01151}01151                 td = td-\/>obj\_next;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01152}01152 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01153}01153                 \textcolor{keywordflow}{if} (td-\/>alt\_next != td\_alt\_next) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01154}01154                         \textcolor{comment}{/* this USB frame is complete */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01155}01155                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01156}01156                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01157}01157         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01158}01158 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01159}01159         \textcolor{comment}{/* update transfer cache */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01160}01160 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01161}01161         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01162}01162 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01163}01163 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01164}01164         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_aa5454c36f6a069e3e8442b1cefd39ea4}{EHCI\_QTD\_STATERRS}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01165}01165                 DPRINTFN(11, \textcolor{stringliteral}{"{}error, addr=\%d, endpt=0x\%02x, frame=0x\%02x"{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01166}01166                     \textcolor{stringliteral}{"{}status=\%s\%s\%s\%s\%s\%s\%s\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01167}01167                     xfer-\/>\mbox{\hyperlink{structusb__xfer_a8ff4ea2a405466a9ce1d9a154a535f0b}{address}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01168}01168                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}}) ? \textcolor{stringliteral}{"{}[ACTIVE]"{}} : \textcolor{stringliteral}{"{}[NOT\_ACTIVE]"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01169}01169                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}}) ? \textcolor{stringliteral}{"{}[HALTED]"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01170}01170                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a02aff75503c74a202d8650f5b9fc84cf}{EHCI\_QTD\_BUFERR}}) ? \textcolor{stringliteral}{"{}[BUFERR]"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01171}01171                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a4199a033269cf1698a706de36b7bc9d1}{EHCI\_QTD\_BABBLE}}) ? \textcolor{stringliteral}{"{}[BABBLE]"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01172}01172                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a9133c74bc4b28a859f4bc262389f779e}{EHCI\_QTD\_XACTERR}}) ? \textcolor{stringliteral}{"{}[XACTERR]"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01173}01173                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_ad81898fe31ca2df5ec582f3c4f4ce8cb}{EHCI\_QTD\_MISSEDMICRO}}) ? \textcolor{stringliteral}{"{}[MISSED]"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01174}01174                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a1aaa219da68fbdd3da1b20e28c259c72}{EHCI\_QTD\_SPLITXSTATE}}) ? \textcolor{stringliteral}{"{}[SPLIT]"{}} : \textcolor{stringliteral}{"{}"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01175}01175                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_adfc5838393934b18d81bad80ad3a6ebb}{EHCI\_QTD\_PINGSTATE}}) ? \textcolor{stringliteral}{"{}[PING]"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01176}01176         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01177}01177 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01178}01178         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01179}01179                 \textcolor{keywordflow}{if} ((xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_a1d9147ffd9af6572cbfff03475f5a5e9}{parent\_hs\_hub}} != NULL) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01180}01180                     (xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_ab9873df4422a53f4fa2d7c17460b11a1}{address}} != 0)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01181}01181                         \textcolor{comment}{/* try to separate I/O errors from STALL */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01182}01182                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a03d0c1ce3ef020f8caf6dcee28020e83}{EHCI\_QTD\_GET\_CERR}}(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}) == 0)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01183}01183                                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01184}01184                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01185}01185                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01186}01186         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01187}01187         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a01e440e0629669433dd14bc477757c74}{USB\_ERR\_NORMAL\_COMPLETION}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01188}01188 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01189}01189 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01190}01190 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01191}\mbox{\hyperlink{ehci_8c_a57c7053d99c5de50a782746c76752625}{01191}} \mbox{\hyperlink{ehci_8c_a57c7053d99c5de50a782746c76752625}{ehci\_non\_isoc\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01192}01192 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01193}01193         \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01194}01194         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01195}01195 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01196}01196         DPRINTFN(13, \textcolor{stringliteral}{"{}xfer=\%p endpoint=\%p transfer done\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01197}01197             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01198}01198 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01199}01199 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01200}01200         \textcolor{keywordflow}{if} (ehcidebug > 10) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01201}01201                 \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01202}01202 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01203}01203                 ehci\_dump\_sqtds(sc, xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01204}01204         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01205}01205 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01206}01206 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01207}01207         \textcolor{comment}{/* extract data toggle directly from the QH's overlay area */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01208}01208 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01209}01209         qh = xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01210}01210 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01211}01211         \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(qh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01212}01212 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01213}01213         \textcolor{comment}{/* reset scanner */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01214}01214 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01215}01215         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01216}01216 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01217}01217         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01218}01218                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a0add2c86d09b768df5f354746b8fe16f}{control\_hdr}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01219}01219                         err = \mbox{\hyperlink{ehci_8c_a86daab56ff8df4710f231e6227cae2a4}{ehci\_non\_isoc\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01220}01220                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01221}01221                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01222}01222 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01223}01223                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01224}01224                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01225}01225                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01226}01226         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01227}01227         \textcolor{keywordflow}{while} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01228}01228                 err = \mbox{\hyperlink{ehci_8c_a86daab56ff8df4710f231e6227cae2a4}{ehci\_non\_isoc\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01229}01229                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}}++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01230}01230 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01231}01231                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01232}01232                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01233}01233                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01234}01234         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01235}01235 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01236}01236         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}} \&\&}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01237}01237             !xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01238}01238                 err = \mbox{\hyperlink{ehci_8c_a86daab56ff8df4710f231e6227cae2a4}{ehci\_non\_isoc\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01239}01239         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01240}01240 done:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01241}01241         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, err);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01242}01242 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01243}01243 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01244}01244 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01245}01245 \textcolor{comment}{ *      ehci\_check\_transfer}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01246}01246 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01247}01247 \textcolor{comment}{ * Return values:}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01248}01248 \textcolor{comment}{ *    0: USB transfer is not finished}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01249}01249 \textcolor{comment}{ * Else: USB transfer is finished}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01250}01250 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01251}01251 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01252}\mbox{\hyperlink{ehci_8c_a17b21ed52a6c51e31de15b51591ce9a6}{01252}} \mbox{\hyperlink{ehci_8c_a17b21ed52a6c51e31de15b51591ce9a6}{ehci\_check\_transfer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01253}01253 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01254}01254         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} *methods = xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01255}01255         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01256}01256 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01257}01257         uint32\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01258}01258 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01259}01259         DPRINTFN(13, \textcolor{stringliteral}{"{}xfer=\%p checking transfer\(\backslash\)n"{}}, xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01260}01260 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01261}01261         \textcolor{keywordflow}{if} (methods == \&\mbox{\hyperlink{ehci_8c_a605b50f00523b535ba3cb4dae1f39f53}{ehci\_device\_isoc\_fs\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01262}01262                 \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01263}01263 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01264}01264                 \textcolor{comment}{/* isochronous full speed transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01265}01265 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01266}01266                 td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01267}01267                 \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(td-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01268}01268                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, td-\/>\mbox{\hyperlink{structehci__sitd_aedc14aca108bc105d25c85ff496050bd}{sitd\_status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01269}01269 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01270}01270                 \textcolor{comment}{/* also check if first is complete */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01272}01272                 td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01273}01273                 \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(td-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01274}01274                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, td-\/>\mbox{\hyperlink{structehci__sitd_aedc14aca108bc105d25c85ff496050bd}{sitd\_status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01275}01275 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01276}01276                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a13dd6228ac7a8e7547b2dd659e23c23f}{EHCI\_SITD\_ACTIVE}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01277}01277                         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a01e440e0629669433dd14bc477757c74}{USB\_ERR\_NORMAL\_COMPLETION}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01278}01278                         \textcolor{keywordflow}{goto} transferred;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01279}01279                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01280}01280         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (methods == \&\mbox{\hyperlink{ehci_8c_a83093b23a8bd6627d8b114499c0f6408}{ehci\_device\_isoc\_hs\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01281}01281                 \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01282}01282 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01283}01283                 \textcolor{comment}{/* isochronous high speed transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01284}01284 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01285}01285                 \textcolor{comment}{/* check last transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01286}01286                 td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01287}01287                 \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(td-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01288}01288                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[0];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01289}01289                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[1];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01290}01290                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[2];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01291}01291                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[3];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01292}01292                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[4];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01293}01293                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[5];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01294}01294                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[6];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01295}01295                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[7];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01296}01296 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01297}01297                 \textcolor{comment}{/* also check first transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01298}01298                 td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01299}01299                 \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(td-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01300}01300                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[0];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01301}01301                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[1];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01302}01302                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[2];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01303}01303                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[3];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01304}01304                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[4];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01305}01305                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[5];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01306}01306                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[6];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01307}01307                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} |= td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[7];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01308}01308 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01309}01309                 \textcolor{comment}{/* if no transactions are active we continue */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01310}01310                 \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}}))) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01311}01311                         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a01e440e0629669433dd14bc477757c74}{USB\_ERR\_NORMAL\_COMPLETION}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01312}01312                         \textcolor{keywordflow}{goto} transferred;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01313}01313                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01314}01314         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01315}01315                 \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01316}01316                 \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01317}01317 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01318}01318                 \textcolor{comment}{/* non-\/isochronous transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01319}01319 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01320}01320                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01321}01321 \textcolor{comment}{                 * check whether there is an error somewhere in the middle,}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01322}01322 \textcolor{comment}{                 * or whether there was a short packet (SPD and not ACTIVE)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01323}01323 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01324}01324                 td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01325}01325 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01326}01326                 qh = xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01327}01327 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01328}01328                 \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(qh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01329}01329 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01330}01330                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a12d01f66b40289b2377a5578e52fd05e}{qtd\_status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01331}01331                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01332}01332                         \textcolor{comment}{/* transfer is pending */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01333}01333                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01334}01334                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01335}01335 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01336}01336                 \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01337}01337                         \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(td-\/>\mbox{\hyperlink{structehci__qtd_a289476501a408aebdcdc070300d568eb}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01338}01338                         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, td-\/>\mbox{\hyperlink{structehci__qtd_a39e32864cb9fca59b2b665955169afd2}{qtd\_status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01339}01339 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01340}01340                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01341}01341 \textcolor{comment}{                         * Check if there is an active TD which}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01342}01342 \textcolor{comment}{                         * indicates that the transfer isn't done.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01343}01343 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01344}01344                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01345}01345                                 \textcolor{comment}{/* update cache */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01346}01346                                 xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01347}01347                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01348}01348                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01349}01349                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01350}01350 \textcolor{comment}{                         * last transfer descriptor makes the transfer done}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01351}01351 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01352}01352                         \textcolor{keywordflow}{if} (((\textcolor{keywordtype}{void} *)td) == xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01353}01353                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01354}01354                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01355}01355                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01356}01356 \textcolor{comment}{                         * any kind of error makes the transfer done}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01357}01357 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01358}01358                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehci_8h_a1148742f1379409da44361ae4f2e2faa}{EHCI\_QTD\_HALTED}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01359}01359                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01360}01360                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01361}01361                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01362}01362 \textcolor{comment}{                         * if there is no alternate next transfer, a short}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01363}01363 \textcolor{comment}{                         * packet also makes the transfer done}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01364}01364 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01365}01365                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_aeb480e670af1131f1f9d76ea2e87cbbe}{EHCI\_QTD\_GET\_BYTES}}(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01366}01366                                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a1023a81a83c7acfbe3134100363e7fde}{short\_frames\_ok}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01367}01367                                         \textcolor{comment}{/* follow alt next */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01368}01368                                         \textcolor{keywordflow}{if} (td-\/>alt\_next) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01369}01369                                                 td = td-\/>\mbox{\hyperlink{structehci__qtd_a849bb7d04b48cb308be920c044ac2954}{alt\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01370}01370                                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01371}01371                                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01372}01372                                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01373}01373                                 \textcolor{comment}{/* transfer is done */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01374}01374                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01375}01375                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01376}01376                         td = td-\/>\mbox{\hyperlink{structehci__qtd_a9c320a3ea8cc4a59163f0651fb4d1738}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01377}01377                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01378}01378                 \mbox{\hyperlink{ehci_8c_a57c7053d99c5de50a782746c76752625}{ehci\_non\_isoc\_done}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01379}01379                 \textcolor{keywordflow}{goto} transferred;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01380}01380         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01381}01381 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01382}01382 done:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01383}01383         DPRINTFN(13, \textcolor{stringliteral}{"{}xfer=\%p is still active\(\backslash\)n"{}}, xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01384}01384         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01385}01385 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01386}01386 transferred:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01387}01387         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01388}01388 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01389}01389 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01390}01390 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01391}\mbox{\hyperlink{ehci_8c_a87d0fcc5a9210d0d6da6407a9de5d724}{01391}} \mbox{\hyperlink{ehci_8c_a87d0fcc5a9210d0d6da6407a9de5d724}{ehci\_pcd\_enable}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01392}01392 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01393}01393         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01394}01394 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01395}01395         sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}} |= \mbox{\hyperlink{ehcireg_8h_abe8026476addbad77dc001cd7e18c852}{EHCI\_STS\_PCD}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01396}01396         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a917d02ce7a170b169127cccc026a3a5e}{EHCI\_USBINTR}}, sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01397}01397 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01398}01398         \textcolor{comment}{/* acknowledge any PCD interrupt */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01399}01399         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a2c4e5bf311cee85bade409433c97d63e}{EHCI\_USBSTS}}, \mbox{\hyperlink{ehcireg_8h_abe8026476addbad77dc001cd7e18c852}{EHCI\_STS\_PCD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01400}01400 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01401}01401         \mbox{\hyperlink{ehci_8c_a3dfcb758acdc04a3081ee5cffb97d05d}{ehci\_root\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01402}01402 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01403}01403 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01404}01404 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01405}\mbox{\hyperlink{ehci_8c_aaf887a36bf2a45bb310e37b0fc2dbf7b}{01405}} \mbox{\hyperlink{ehci_8c_aaf887a36bf2a45bb310e37b0fc2dbf7b}{ehci\_interrupt\_poll}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01406}01406 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01407}01407         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01408}01408 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01409}01409 repeat:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01410}01410         TAILQ\_FOREACH(xfer, \&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_afe87bf7e25fe7284a87d14ca231bc818}{intr\_q}}.head, wait\_entry) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01411}01411                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01412}01412 \textcolor{comment}{                 * check if transfer is transferred}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01413}01413 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01414}01414                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8c_a17b21ed52a6c51e31de15b51591ce9a6}{ehci\_check\_transfer}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01415}01415                         \textcolor{comment}{/* queue has been modified */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01416}01416                         \textcolor{keywordflow}{goto} repeat;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01417}01417                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01418}01418         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01419}01419 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01420}01420 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01421}01421 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01422}01422 \textcolor{comment}{ * Some EHCI chips from VIA / ATI seem to trigger interrupts before}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01423}01423 \textcolor{comment}{ * writing back the qTD status, or miss signalling occasionally under}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01424}01424 \textcolor{comment}{ * heavy load.  If the host machine is too fast, we can miss}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01425}01425 \textcolor{comment}{ * transaction completion -\/ when we scan the active list the}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01426}01426 \textcolor{comment}{ * transaction still seems to be active. This generally exhibits}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01427}01427 \textcolor{comment}{ * itself as a umass stall that never recovers.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01428}01428 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01429}01429 \textcolor{comment}{ * We work around this behaviour by setting up this callback after any}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01430}01430 \textcolor{comment}{ * softintr that completes with transactions still pending, giving us}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01431}01431 \textcolor{comment}{ * another chance to check for completion after the writeback has}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01432}01432 \textcolor{comment}{ * taken place.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01433}01433 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01434}01434 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01435}\mbox{\hyperlink{ehci_8c_af46a8684508034b58dc8a76d584cdbec}{01435}} \mbox{\hyperlink{ehci_8c_af46a8684508034b58dc8a76d584cdbec}{ehci\_poll\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01436}01436 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01437}01437         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01438}01438 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01439}01439         DPRINTFN(3, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01440}01440         \mbox{\hyperlink{ehci_8c_aaf887a36bf2a45bb310e37b0fc2dbf7b}{ehci\_interrupt\_poll}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01441}01441 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01442}01442 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01443}01443 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01444}01444 \textcolor{comment}{ *      ehci\_interrupt -\/ EHCI interrupt handler}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01445}01445 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01446}01446 \textcolor{comment}{ * NOTE: Do not access "{}sc-\/>sc\_bus.bdev"{} inside the interrupt handler,}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01447}01447 \textcolor{comment}{ * hence the interrupt handler will be setup before "{}sc-\/>sc\_bus.bdev"{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01448}01448 \textcolor{comment}{ * is present !}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01449}01449 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01450}01450 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01451}\mbox{\hyperlink{ehci_8c_a29753f8b40af28deb1954e1c728a306b}{01451}} \mbox{\hyperlink{ehci_8c_a29753f8b40af28deb1954e1c728a306b}{ehci\_interrupt}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01452}01452 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01453}01453         uint32\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01454}01454 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01455}01455         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01456}01456 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01457}01457         DPRINTFN(16, \textcolor{stringliteral}{"{}real interrupt\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01458}01458 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01459}01459 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01460}01460         \textcolor{keywordflow}{if} (ehcidebug > 15) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01461}01461                 ehci\_dump\_regs(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01462}01462         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01463}01463 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01464}01464 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01465}01465         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{ehcireg_8h_a2db5a3b39e48a11272442c10e2c3e265}{EHCI\_STS\_INTRS}}(\mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a2c4e5bf311cee85bade409433c97d63e}{EHCI\_USBSTS}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01466}01466         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01467}01467                 \textcolor{comment}{/* the interrupt was not for us */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01468}01468                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01469}01469         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01470}01470         \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01471}01471                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01472}01472         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01473}01473         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a2c4e5bf311cee85bade409433c97d63e}{EHCI\_USBSTS}}, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});     \textcolor{comment}{/* acknowledge */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01474}01474 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01475}01475         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \&= sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01476}01476 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01477}01477         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehcireg_8h_aae45791be083bd7ce49f0448176614fd}{EHCI\_STS\_HSE}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01478}01478                 printf(\textcolor{stringliteral}{"{}\%s: unrecoverable error, "{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01479}01479                     \textcolor{stringliteral}{"{}controller halted\(\backslash\)n"{}}, \_\_FUNCTION\_\_);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01480}01480 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01481}01481                 ehci\_dump\_regs(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01482}01482                 ehci\_dump\_isoc(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01483}01483 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01484}01484         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01485}01485         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{ehcireg_8h_abe8026476addbad77dc001cd7e18c852}{EHCI\_STS\_PCD}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01486}01486                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01487}01487 \textcolor{comment}{                 * Disable PCD interrupt for now, because it will be}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01488}01488 \textcolor{comment}{                 * on until the port has been reset.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01489}01489 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01490}01490                 sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}} \&= \string~EHCI\_STS\_PCD;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01491}01491                 \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a917d02ce7a170b169127cccc026a3a5e}{EHCI\_USBINTR}}, sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01492}01492 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01493}01493                 \mbox{\hyperlink{ehci_8c_a3dfcb758acdc04a3081ee5cffb97d05d}{ehci\_root\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01494}01494 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01495}01495                 \textcolor{comment}{/* do not allow RHSC interrupts > 1 per second */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01496}01496                 \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a0fc4500c4d3e6ea59ca9b4ce660744b3}{sc\_tmo\_pcd}}, hz,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01497}01497                     (\textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{ehci_8c_a87d0fcc5a9210d0d6da6407a9de5d724}{ehci\_pcd\_enable}}, sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01498}01498         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01499}01499         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \&= \string~(\mbox{\hyperlink{ehcireg_8h_a073029544fa5c9bddabb5cc640d9ce96}{EHCI\_STS\_INT}} | \mbox{\hyperlink{ehcireg_8h_abd1e5ba801d567001ce853ebe6982007}{EHCI\_STS\_ERRINT}} | \mbox{\hyperlink{ehcireg_8h_abe8026476addbad77dc001cd7e18c852}{EHCI\_STS\_PCD}} | \mbox{\hyperlink{ehcireg_8h_a4dd6cb2a0d3d2ac39c47b7c69288eb0b}{EHCI\_STS\_IAA}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01500}01500 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01501}01501         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} != 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01502}01502                 \textcolor{comment}{/* block unprocessed interrupts */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01503}01503                 sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}} \&= \string~status;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01504}01504                 \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_a917d02ce7a170b169127cccc026a3a5e}{EHCI\_USBINTR}}, sc-\/>\mbox{\hyperlink{structehci__softc_a64ed1fdf28b87498933bd5c18fca875f}{sc\_eintrs}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01505}01505                 printf(\textcolor{stringliteral}{"{}\%s: blocking interrupts 0x\%x\(\backslash\)n"{}}, \_\_FUNCTION\_\_, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01506}01506         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01507}01507         \textcolor{comment}{/* poll all the USB transfers */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01508}01508         \mbox{\hyperlink{ehci_8c_aaf887a36bf2a45bb310e37b0fc2dbf7b}{ehci\_interrupt\_poll}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01509}01509 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01510}01510         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} \& \mbox{\hyperlink{ehci_8h_ae189d5093f1c6486b3fe8acebbffb033}{EHCI\_SCFLG\_LOSTINTRBUG}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01511}01511                 \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_a1f53d867a0921586ff1229dfb55bf030}{sc\_tmo\_poll}}, hz / 128,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01512}01512                     (\textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{ehci_8c_af46a8684508034b58dc8a76d584cdbec}{ehci\_poll\_timeout}}, sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01513}01513         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01514}01514 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01515}01515 done:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01516}01516         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01517}01517 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01518}01518 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01519}01519 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01520}01520 \textcolor{comment}{ * called when a request does not complete}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01521}01521 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01522}01522 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01523}\mbox{\hyperlink{ehci_8c_a7b311d9572708adf5e6bee81bd0538cc}{01523}} \mbox{\hyperlink{ehci_8c_a7b311d9572708adf5e6bee81bd0538cc}{ehci\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01524}01524 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01525}01525         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer = arg;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01526}01526 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01527}01527         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}xfer=\%p\(\backslash\)n"{}}, xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01528}01528 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01529}01529         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01530}01530 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01531}01531         \textcolor{comment}{/* transfer is transferred */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01532}01532         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945aeb31baaa7bf416e200f2a0d4ece60820}{USB\_ERR\_TIMEOUT}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01533}01533 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01534}01534 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01535}01535 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01536}\mbox{\hyperlink{ehci_8c_a8eb9464d1edfb384fddd19ec438187e4}{01536}} \mbox{\hyperlink{ehci_8c_a8eb9464d1edfb384fddd19ec438187e4}{ehci\_do\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *bus)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01537}01537 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01538}01538         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(bus);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01539}01539 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01540}01540         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01541}01541         \mbox{\hyperlink{ehci_8c_aaf887a36bf2a45bb310e37b0fc2dbf7b}{ehci\_interrupt\_poll}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01542}01542         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01543}01543 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01544}01544 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01545}01545 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01546}\mbox{\hyperlink{ehci_8c_a051dda41a9402639c8e1a3eab13a541e}{01546}} \mbox{\hyperlink{ehci_8c_a051dda41a9402639c8e1a3eab13a541e}{ehci\_setup\_standard\_chain\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structehci__std__temp}{ehci\_std\_temp}} *temp)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01547}01547 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01548}01548         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01549}01549         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01550}01550         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *\mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01551}01551         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *td\_alt\_next;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01552}01552         uint32\_t buf\_offset;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01553}01553         uint32\_t average;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01554}01554         uint32\_t len\_old;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01555}01555         uint32\_t terminate;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01556}01556         uint32\_t \mbox{\hyperlink{ehci_8h_a6e61cb32188054560d8ec79946d0c74d}{qtd\_altnext}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01557}01557         uint8\_t shortpkt\_old;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01558}01558         uint8\_t precompute;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01559}01559 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01560}01560         terminate = temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}-\/>\mbox{\hyperlink{structehci__softc_a5aba043eb66e6977b23125d3cbb85cd9}{sc\_terminate\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01561}01561         \mbox{\hyperlink{ehci_8h_a6e61cb32188054560d8ec79946d0c74d}{qtd\_altnext}} = temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}-\/>\mbox{\hyperlink{structehci__softc_a5aba043eb66e6977b23125d3cbb85cd9}{sc\_terminate\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01562}01562         td\_alt\_next = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01563}01563         buf\_offset = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01564}01564         shortpkt\_old = temp-\/>\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01565}01565         len\_old = temp-\/>\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01566}01566         precompute = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01567}01567 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01568}01568 restart:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01569}01569 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01570}01570         td = temp-\/>\mbox{\hyperlink{structehci__std__temp_a8162977e9ecffb7edab28138e1ec082c}{td}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01571}01571         \mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}} = temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ee39af5d9e66016061541ebafeccaa7}{td\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01572}01572 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01573}01573         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01574}01574                 \textcolor{keywordflow}{if} (temp-\/>\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01575}01575                         \textcolor{keywordflow}{if} (temp-\/>\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01576}01576                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01577}01577                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01578}01578                         \textcolor{comment}{/* send a Zero Length Packet, ZLP, last */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01579}01579 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01580}01580                         temp-\/>\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01581}01581                         average = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01582}01582 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01583}01583                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01584}01584                         average = temp-\/>\mbox{\hyperlink{structehci__std__temp_af7a390d29746bf480822a521f81269a0}{average}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01585}01585 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01586}01586                         \textcolor{keywordflow}{if} (temp-\/>\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} < average) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01587}01587                                 \textcolor{keywordflow}{if} (temp-\/>\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} \% temp-\/>\mbox{\hyperlink{structehci__std__temp_a3194585bdefc36973a4ebd58e1302481}{max\_frame\_size}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01588}01588                                         temp-\/>\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01589}01589                                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01590}01590                                 average = temp-\/>\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01591}01591                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01592}01592                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01593}01593 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01594}01594                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01595}01595                         panic(\textcolor{stringliteral}{"{}\%s: out of EHCI transfer descriptors!"{}}, \_\_FUNCTION\_\_);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01596}01596                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01597}01597                 \textcolor{comment}{/* get next TD */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01598}01598 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01599}01599                 td = \mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01600}01600                 \mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}} = td-\/>obj\_next;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01601}01601 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01602}01602                 \textcolor{comment}{/* check if we are pre-\/computing */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01603}01603 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01604}01604                 \textcolor{keywordflow}{if} (precompute) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01605}01605                         \textcolor{comment}{/* update remaining length */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01606}01606 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01607}01607                         temp-\/>\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} -\/= average;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01608}01608 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01609}01609                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01610}01610                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01611}01611                 \textcolor{comment}{/* fill out current TD */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01612}01612 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01613}01613                 td-\/>qtd\_status =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01614}01614                     temp-\/>\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01615}01615                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a43d8511886cbd4184f17ae4d99162236}{EHCI\_QTD\_IOC}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01616}01616                         \mbox{\hyperlink{ehci_8h_a3cf72d71d16a3d0e7e755a114f0ed591}{EHCI\_QTD\_SET\_BYTES}}(average));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01617}01617 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01618}01618                 \textcolor{keywordflow}{if} (average == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01619}01619                         \textcolor{keywordflow}{if} (temp-\/>\mbox{\hyperlink{structehci__std__temp_a587c0616dc969bb8a3196611e91e19f2}{auto\_data\_toggle}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01620}01620                                 \textcolor{comment}{/* update data toggle, ZLP case */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01621}01621 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01622}01622                                 temp-\/>\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} \string^=}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01623}01623                                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a8fe2f1643f2fb46033addb286f52262a}{EHCI\_QTD\_TOGGLE\_MASK}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01624}01624                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01625}01625                         td-\/>len = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01626}01626 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01627}01627                         \textcolor{comment}{/* properly reset reserved fields */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01628}01628                         td-\/>qtd\_buffer[0] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01629}01629                         td-\/>qtd\_buffer[1] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01630}01630                         td-\/>qtd\_buffer[2] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01631}01631                         td-\/>qtd\_buffer[3] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01632}01632                         td-\/>qtd\_buffer[4] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01633}01633                         td-\/>qtd\_buffer\_hi[0] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01634}01634                         td-\/>qtd\_buffer\_hi[1] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01635}01635                         td-\/>qtd\_buffer\_hi[2] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01636}01636                         td-\/>qtd\_buffer\_hi[3] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01637}01637                         td-\/>qtd\_buffer\_hi[4] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01638}01638                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01639}01639                         uint8\_t x;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01640}01640 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01641}01641                         \textcolor{keywordflow}{if} (temp-\/>\mbox{\hyperlink{structehci__std__temp_a587c0616dc969bb8a3196611e91e19f2}{auto\_data\_toggle}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01642}01642                                 \textcolor{comment}{/* update data toggle */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01643}01643 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01644}01644                                 \textcolor{keywordflow}{if} (howmany(average, temp-\/>\mbox{\hyperlink{structehci__std__temp_a3194585bdefc36973a4ebd58e1302481}{max\_frame\_size}}) \& 1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01645}01645                                         temp-\/>\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} \string^=}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01646}01646                                             \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a8fe2f1643f2fb46033addb286f52262a}{EHCI\_QTD\_TOGGLE\_MASK}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01647}01647                                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01648}01648                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01649}01649                         td-\/>len = average;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01650}01650 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01651}01651                         \textcolor{comment}{/* update remaining length */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01652}01652 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01653}01653                         temp-\/>\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} -\/= average;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01654}01654 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01655}01655                         \textcolor{comment}{/* fill out buffer pointers */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01656}01656 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01657}01657                         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a886658eee349a98cf4e11123a094841f}{pc}}, buf\_offset, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01658}01658                         td-\/>qtd\_buffer[0] =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01659}01659                             \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, buf\_res.physaddr);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01660}01660                         td-\/>qtd\_buffer\_hi[0] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01661}01661 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01662}01662                         x = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01663}01663 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01664}01664                         \textcolor{keywordflow}{while} (average > \mbox{\hyperlink{ehci_8h_acdc6d9a3468bcf6c36dc3551918eec3a}{EHCI\_PAGE\_SIZE}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01665}01665                                 average -\/= \mbox{\hyperlink{ehci_8h_acdc6d9a3468bcf6c36dc3551918eec3a}{EHCI\_PAGE\_SIZE}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01666}01666                                 buf\_offset += \mbox{\hyperlink{ehci_8h_acdc6d9a3468bcf6c36dc3551918eec3a}{EHCI\_PAGE\_SIZE}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01667}01667                                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a886658eee349a98cf4e11123a094841f}{pc}}, buf\_offset, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01668}01668                                 td-\/>qtd\_buffer[x] =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01669}01669                                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01670}01670                                     buf\_res.physaddr \& (\string~0xFFF));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01671}01671                                 td-\/>qtd\_buffer\_hi[x] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01672}01672                                 x++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01673}01673                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01674}01674 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01675}01675                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01676}01676 \textcolor{comment}{                         * NOTE: The "{}average"{} variable is never zero after}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01677}01677 \textcolor{comment}{                         * exiting the loop above !}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01678}01678 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01679}01679 \textcolor{comment}{                         * NOTE: We have to subtract one from the offset to}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01680}01680 \textcolor{comment}{                         * ensure that we are computing the physical address}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01681}01681 \textcolor{comment}{                         * of a valid page !}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01682}01682 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01683}01683                         buf\_offset += average;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01684}01684                         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a886658eee349a98cf4e11123a094841f}{pc}}, buf\_offset -\/ 1, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01685}01685                         td-\/>qtd\_buffer[x] =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01686}01686                             \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01687}01687                             buf\_res.physaddr \& (\string~0xFFF));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01688}01688                         td-\/>qtd\_buffer\_hi[x] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01689}01689 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01690}01690                         \textcolor{comment}{/* properly reset reserved fields */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01691}01691                         \textcolor{keywordflow}{while} (++x < \mbox{\hyperlink{ehci_8h_ac704b1353dfbe5cccc6983db13fb708d}{EHCI\_QTD\_NBUFFERS}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01692}01692                                 td-\/>qtd\_buffer[x] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01693}01693                                 td-\/>qtd\_buffer\_hi[x] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01694}01694                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01695}01695                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01696}01696 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01697}01697                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01698}01698                         \textcolor{comment}{/* link the current TD with the next one */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01699}01699                         td-\/>qtd\_next = \mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}}-\/>qtd\_self;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01700}01700                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01701}01701                 td-\/>qtd\_altnext = \mbox{\hyperlink{ehci_8h_a6e61cb32188054560d8ec79946d0c74d}{qtd\_altnext}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01702}01702                 td-\/>alt\_next = td\_alt\_next;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01703}01703 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01704}01704                 \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(td-\/>page\_cache);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01705}01705         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01706}01706 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01707}01707         \textcolor{keywordflow}{if} (precompute) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01708}01708                 precompute = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01709}01709 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01710}01710                 \textcolor{comment}{/* setup alt next pointer, if any */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01711}01711                 \textcolor{keywordflow}{if} (temp-\/>\mbox{\hyperlink{structehci__std__temp_a947657403fc087e5058f69cca22358ad}{last\_frame}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01712}01712                         td\_alt\_next = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01713}01713                         \mbox{\hyperlink{ehci_8h_a6e61cb32188054560d8ec79946d0c74d}{qtd\_altnext}} = terminate;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01714}01714                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01715}01715                         \textcolor{comment}{/* we use this field internally */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01716}01716                         td\_alt\_next = \mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01717}01717                         \textcolor{keywordflow}{if} (temp-\/>\mbox{\hyperlink{structehci__std__temp_a9046082bbe81037ee6a7749bf572a4dc}{setup\_alt\_next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01718}01718                                 \mbox{\hyperlink{ehci_8h_a6e61cb32188054560d8ec79946d0c74d}{qtd\_altnext}} = \mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}}-\/>qtd\_self;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01719}01719                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01720}01720                                 \mbox{\hyperlink{ehci_8h_a6e61cb32188054560d8ec79946d0c74d}{qtd\_altnext}} = terminate;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01721}01721                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01722}01722                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01723}01723 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01724}01724                 \textcolor{comment}{/* restore */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01725}01725                 temp-\/>\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}} = shortpkt\_old;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01726}01726                 temp-\/>\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} = len\_old;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01727}01727                 \textcolor{keywordflow}{goto} restart;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01728}01728         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01729}01729         temp-\/>\mbox{\hyperlink{structehci__std__temp_a8162977e9ecffb7edab28138e1ec082c}{td}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01730}01730         temp-\/>\mbox{\hyperlink{structehci__std__temp_a5ee39af5d9e66016061541ebafeccaa7}{td\_next}} = \mbox{\hyperlink{ohci_8h_a4173b5c34e0ac9c0b499c02d7e5a1b21}{td\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01731}01731 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01732}01732 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01733}01733 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01734}\mbox{\hyperlink{ehci_8c_af1ae82e36da554ebb64ab8221643f029}{01734}} \mbox{\hyperlink{ehci_8c_af1ae82e36da554ebb64ab8221643f029}{ehci\_setup\_standard\_chain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} **qh\_last)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01735}01735 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01736}01736         \textcolor{keyword}{struct }\mbox{\hyperlink{structehci__std__temp}{ehci\_std\_temp}} temp;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01737}01737         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} *methods;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01738}01738         \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01739}01739         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01740}01740         uint32\_t \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01741}01741         uint32\_t \mbox{\hyperlink{ehci_8h_a083afe48c55227504135eb3d92f8896e}{qh\_endphub}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01742}01742         uint32\_t x;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01743}01743 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01744}01744         DPRINTFN(9, \textcolor{stringliteral}{"{}addr=\%d endpt=\%d sumlen=\%d speed=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01745}01745             xfer-\/>\mbox{\hyperlink{structusb__xfer_a8ff4ea2a405466a9ce1d9a154a535f0b}{address}}, \mbox{\hyperlink{usb_8h_a5c87169fa1d69d81d7ac06bd59265243}{UE\_GET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01746}01746             xfer-\/>\mbox{\hyperlink{structusb__xfer_af7389161d91d0c0b7a17b1eaaa1772c0}{sumlen}}, \mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01747}01747 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01748}01748         temp.\mbox{\hyperlink{structehci__std__temp_af7a390d29746bf480822a521f81269a0}{average}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ad26ff9271d8a65e58ecec095be9cc78d}{max\_hc\_frame\_size}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01749}01749         temp.\mbox{\hyperlink{structehci__std__temp_a3194585bdefc36973a4ebd58e1302481}{max\_frame\_size}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01750}01750         temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}} = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01751}01751 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01752}01752         \textcolor{comment}{/* toggle the DMA set we are using */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01753}01753         xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}} \string^= 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01754}01754 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01755}01755         \textcolor{comment}{/* get next DMA set */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01756}01756         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01757}01757 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01758}01758         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01759}01759         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01760}01760 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01761}01761         temp.\mbox{\hyperlink{structehci__std__temp_a8162977e9ecffb7edab28138e1ec082c}{td}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01762}01762         temp.\mbox{\hyperlink{structehci__std__temp_a5ee39af5d9e66016061541ebafeccaa7}{td\_next}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01763}01763         temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01764}01764         temp.\mbox{\hyperlink{structehci__std__temp_a947657403fc087e5058f69cca22358ad}{last\_frame}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01765}01765         temp.\mbox{\hyperlink{structehci__std__temp_a9046082bbe81037ee6a7749bf572a4dc}{setup\_alt\_next}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a1023a81a83c7acfbe3134100363e7fde}{short\_frames\_ok}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01766}01766 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01767}01767         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01768}01768                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a23e80980572fb57b1a6097114e92cfbc}{toggle\_next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01769}01769                         \textcolor{comment}{/* DATA1 is next */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01770}01770                         temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} |=}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01771}01771                             \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_aa48bfb42445be6df5acf455fb93d21e6}{EHCI\_QTD\_SET\_TOGGLE}}(1));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01772}01772                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01773}01773                 temp.\mbox{\hyperlink{structehci__std__temp_a587c0616dc969bb8a3196611e91e19f2}{auto\_data\_toggle}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01774}01774         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01775}01775                 temp.\mbox{\hyperlink{structehci__std__temp_a587c0616dc969bb8a3196611e91e19f2}{auto\_data\_toggle}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01776}01776         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01777}01777 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01778}01778         \textcolor{keywordflow}{if} ((xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_a1d9147ffd9af6572cbfff03475f5a5e9}{parent\_hs\_hub}} != NULL) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01779}01779             (xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_ab9873df4422a53f4fa2d7c17460b11a1}{address}} != 0)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01780}01780                 \textcolor{comment}{/* max 3 retries */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01781}01781                 temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} |=}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01782}01782                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a3ec5581ff0b25d2a483b34c2e0c28741}{EHCI\_QTD\_SET\_CERR}}(3));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01783}01783         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01784}01784         \textcolor{comment}{/* check if we should prepend a setup message */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01785}01785 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01786}01786         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01787}01787                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a0add2c86d09b768df5f354746b8fe16f}{control\_hdr}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01788}01788                         xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a23e80980572fb57b1a6097114e92cfbc}{toggle\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01789}01789 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01790}01790                         temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} \&=}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01791}01791                             \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a3ec5581ff0b25d2a483b34c2e0c28741}{EHCI\_QTD\_SET\_CERR}}(3));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01792}01792                         temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} |= \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01793}01793                             \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01794}01794                             \mbox{\hyperlink{ehci_8h_adba38ee400fbfa60d13a7dd897947913}{EHCI\_QTD\_SET\_PID}}(\mbox{\hyperlink{ehci_8h_ac4634d4aba8271423bd53caeaaa18ab4}{EHCI\_QTD\_PID\_SETUP}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01795}01795                             \mbox{\hyperlink{ehci_8h_aa48bfb42445be6df5acf455fb93d21e6}{EHCI\_QTD\_SET\_TOGGLE}}(0));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01796}01796 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01797}01797                         temp.\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[0];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01798}01798                         temp.\mbox{\hyperlink{structehci__std__temp_a886658eee349a98cf4e11123a094841f}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01799}01799                         temp.\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}} = temp.\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01800}01800                         \textcolor{comment}{/* check for last frame */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01801}01801                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} == 1) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01802}01802                                 \textcolor{comment}{/* no STATUS stage yet, SETUP is last */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01803}01803                                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01804}01804                                         temp.\mbox{\hyperlink{structehci__std__temp_a947657403fc087e5058f69cca22358ad}{last\_frame}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01805}01805                                         temp.\mbox{\hyperlink{structehci__std__temp_a9046082bbe81037ee6a7749bf572a4dc}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01806}01806                                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01807}01807                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01808}01808                         \mbox{\hyperlink{ehci_8c_a051dda41a9402639c8e1a3eab13a541e}{ehci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01809}01809                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01810}01810                 x = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01811}01811         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01812}01812                 x = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01813}01813         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01814}01814 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01815}01815         \textcolor{keywordflow}{while} (x != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01816}01816                 \textcolor{comment}{/* DATA0 / DATA1 message */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01817}01817 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01818}01818                 temp.\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[x];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01819}01819                 temp.\mbox{\hyperlink{structehci__std__temp_a886658eee349a98cf4e11123a094841f}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + x;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01820}01820 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01821}01821                 x++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01822}01822 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01823}01823                 \textcolor{keywordflow}{if} (x == xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01824}01824                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01825}01825                                 \textcolor{comment}{/* no STATUS stage yet, DATA is last */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01826}01826                                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01827}01827                                         temp.\mbox{\hyperlink{structehci__std__temp_a947657403fc087e5058f69cca22358ad}{last\_frame}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01828}01828                                         temp.\mbox{\hyperlink{structehci__std__temp_a9046082bbe81037ee6a7749bf572a4dc}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01829}01829                                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01830}01830                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01831}01831                                 temp.\mbox{\hyperlink{structehci__std__temp_a947657403fc087e5058f69cca22358ad}{last\_frame}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01832}01832                                 temp.\mbox{\hyperlink{structehci__std__temp_a9046082bbe81037ee6a7749bf572a4dc}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01833}01833                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01834}01834                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01835}01835                 \textcolor{comment}{/* keep previous data toggle and error count */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01836}01836 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01837}01837                 temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} \&=}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01838}01838                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a3ec5581ff0b25d2a483b34c2e0c28741}{EHCI\_QTD\_SET\_CERR}}(3) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01839}01839                     \mbox{\hyperlink{ehci_8h_aa48bfb42445be6df5acf455fb93d21e6}{EHCI\_QTD\_SET\_TOGGLE}}(1));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01840}01840 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01841}01841                 \textcolor{keywordflow}{if} (temp.\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01842}01842                         \textcolor{comment}{/* make sure that we send an USB packet */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01843}01843 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01844}01844                         temp.\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01845}01845 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01846}01846                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01847}01847                         \textcolor{comment}{/* regular data transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01848}01848 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01849}01849                         temp.\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}} = (xfer-\/>\mbox{\hyperlink{structusb__xfer_aa251db061296120bb15fd562088a1d9d}{flags}}.\mbox{\hyperlink{structusb__xfer__flags_a76816b701c58c22a9a78904b109c2e95}{force\_short\_xfer}}) ? 0 : 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01850}01850                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01851}01851 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01852}01852                 \textcolor{comment}{/* set endpoint direction */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01853}01853 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01854}01854                 temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} |=}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01855}01855                     (\mbox{\hyperlink{usb_8h_aab65e24c804e6317e033b84730aec8e3}{UE\_GET\_DIR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}) == \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) ?}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01856}01856                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01857}01857                     \mbox{\hyperlink{ehci_8h_adba38ee400fbfa60d13a7dd897947913}{EHCI\_QTD\_SET\_PID}}(\mbox{\hyperlink{ehci_8h_a11bdbc9fc65f96b720b2f5b6dbac355e}{EHCI\_QTD\_PID\_IN}})) :}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01858}01858                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01859}01859                     \mbox{\hyperlink{ehci_8h_adba38ee400fbfa60d13a7dd897947913}{EHCI\_QTD\_SET\_PID}}(\mbox{\hyperlink{ehci_8h_aba106c813e8c3c795b69064753a384aa}{EHCI\_QTD\_PID\_OUT}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01860}01860 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01861}01861                 \mbox{\hyperlink{ehci_8c_a051dda41a9402639c8e1a3eab13a541e}{ehci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01862}01862         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01863}01863 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01864}01864         \textcolor{comment}{/* check if we should append a status stage */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01865}01865 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01866}01866         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}} \&\&}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01867}01867             !xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01868}01868                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01869}01869 \textcolor{comment}{                 * Send a DATA1 message and invert the current endpoint}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01870}01870 \textcolor{comment}{                 * direction.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01871}01871 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01872}01872 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01873}01873                 temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} \&= \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a3ec5581ff0b25d2a483b34c2e0c28741}{EHCI\_QTD\_SET\_CERR}}(3) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01874}01874                     \mbox{\hyperlink{ehci_8h_aa48bfb42445be6df5acf455fb93d21e6}{EHCI\_QTD\_SET\_TOGGLE}}(1));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01875}01875                 temp.\mbox{\hyperlink{structehci__std__temp_aeb18483ac0a6e53b5a3ab41d0bdb846a}{qtd\_status}} |=}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01876}01876                     (\mbox{\hyperlink{usb_8h_aab65e24c804e6317e033b84730aec8e3}{UE\_GET\_DIR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}) == \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}}) ?}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01877}01877                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01878}01878                     \mbox{\hyperlink{ehci_8h_adba38ee400fbfa60d13a7dd897947913}{EHCI\_QTD\_SET\_PID}}(\mbox{\hyperlink{ehci_8h_a11bdbc9fc65f96b720b2f5b6dbac355e}{EHCI\_QTD\_PID\_IN}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01879}01879                     \mbox{\hyperlink{ehci_8h_aa48bfb42445be6df5acf455fb93d21e6}{EHCI\_QTD\_SET\_TOGGLE}}(1)) :}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01880}01880                     \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a7fc20d23fabce3d29da90b6d53c1d1f2}{EHCI\_QTD\_ACTIVE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01881}01881                     \mbox{\hyperlink{ehci_8h_adba38ee400fbfa60d13a7dd897947913}{EHCI\_QTD\_SET\_PID}}(\mbox{\hyperlink{ehci_8h_aba106c813e8c3c795b69064753a384aa}{EHCI\_QTD\_PID\_OUT}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01882}01882                     \mbox{\hyperlink{ehci_8h_aa48bfb42445be6df5acf455fb93d21e6}{EHCI\_QTD\_SET\_TOGGLE}}(1));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01883}01883 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01884}01884                 temp.\mbox{\hyperlink{structehci__std__temp_ae26ada5da3f7c3049ec7bc0403d2d18c}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01885}01885                 temp.\mbox{\hyperlink{structehci__std__temp_a886658eee349a98cf4e11123a094841f}{pc}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01886}01886                 temp.\mbox{\hyperlink{structehci__std__temp_a86f53ccf59db0debb2542d3e650080cd}{shortpkt}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01887}01887                 temp.\mbox{\hyperlink{structehci__std__temp_a947657403fc087e5058f69cca22358ad}{last\_frame}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01888}01888                 temp.\mbox{\hyperlink{structehci__std__temp_a9046082bbe81037ee6a7749bf572a4dc}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01889}01889 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01890}01890                 \mbox{\hyperlink{ehci_8c_a051dda41a9402639c8e1a3eab13a541e}{ehci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01891}01891         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01892}01892         td = temp.\mbox{\hyperlink{structehci__std__temp_a8162977e9ecffb7edab28138e1ec082c}{td}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01893}01893 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01894}01894         \textcolor{comment}{/* the last TD terminates the transfer: */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01895}01895         td-\/>\mbox{\hyperlink{structehci__qtd_ad691234a0831866daa0c56de953aed25}{qtd\_next}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01896}01896         td-\/>\mbox{\hyperlink{structehci__qtd_a3f478ea53f8e5863b33d887eb8b074a2}{qtd\_altnext}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01897}01897 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01898}01898         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(td-\/>\mbox{\hyperlink{structehci__qtd_a289476501a408aebdcdc070300d568eb}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01899}01899 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01900}01900         \textcolor{comment}{/* must have at least one frame! */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01901}01901 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01902}01902         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01903}01903 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01904}01904 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01905}01905         \textcolor{keywordflow}{if} (ehcidebug > 8) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01906}01906                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}nexttog=\%d; data before transfer:\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01907}01907                     xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a23e80980572fb57b1a6097114e92cfbc}{toggle\_next}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01908}01908                 ehci\_dump\_sqtds(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01909}01909                     xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01910}01910         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01911}01911 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01912}01912 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01913}01913         methods = xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01914}01914 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01915}01915         qh = xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01916}01916 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01917}01917         \textcolor{comment}{/* the "{}qh\_link"{} field is filled when the QH is added */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01918}01918 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01919}01919         \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01920}01920             (\mbox{\hyperlink{ehci_8h_aaabdcabef4fbd76bca0c3ced641c36fa}{EHCI\_QH\_SET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a8ff4ea2a405466a9ce1d9a154a535f0b}{address}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01921}01921             \mbox{\hyperlink{ehci_8h_aa14dabb728fbb102adef0c2fb9156071}{EHCI\_QH\_SET\_ENDPT}}(\mbox{\hyperlink{usb_8h_a5c87169fa1d69d81d7ac06bd59265243}{UE\_GET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}})) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01922}01922             \mbox{\hyperlink{ehci_8h_abc35e3644612b753f7c695da1d8ce966}{EHCI\_QH\_SET\_MPL}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_aefcde8a630b7adefe68cc72e7e7a5bb5}{max\_packet\_size}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01923}01923 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01924}01924         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}) == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa57eeede6d769b09c01ac9c9c62fef8c9}{USB\_SPEED\_HIGH}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01925}01925                 \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}} |= \mbox{\hyperlink{ehci_8h_a8ab2afde2d463206c0a96cc1d58e6532}{EHCI\_QH\_SET\_EPS}}(\mbox{\hyperlink{ehci_8h_a2a756b35bb9fc234bbf694fe97e72b86}{EHCI\_QH\_SPEED\_HIGH}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01926}01926                 \textcolor{keywordflow}{if} (methods != \&\mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01927}01927                         \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}} |= \mbox{\hyperlink{ehci_8h_ac172800f71f0d24d522e57d1731dd690}{EHCI\_QH\_SET\_NRL}}(8);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01928}01928         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01929}01929                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}) == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa0f17d0b9928086c6114fea73e08f1780}{USB\_SPEED\_FULL}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01930}01930                         \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}} |= \mbox{\hyperlink{ehci_8h_a8ab2afde2d463206c0a96cc1d58e6532}{EHCI\_QH\_SET\_EPS}}(\mbox{\hyperlink{ehci_8h_a7aa4954939e89aa9d4d8bf3be6470765}{EHCI\_QH\_SPEED\_FULL}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01931}01931                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01932}01932                         \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}} |= \mbox{\hyperlink{ehci_8h_a8ab2afde2d463206c0a96cc1d58e6532}{EHCI\_QH\_SET\_EPS}}(\mbox{\hyperlink{ehci_8h_a21b2135f3b96fec5f1d1bab4843b52f4}{EHCI\_QH\_SPEED\_LOW}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01933}01933                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01934}01934 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01935}01935                 \textcolor{keywordflow}{if} (methods == \&\mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{ehci\_device\_ctrl\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01936}01936                         \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}} |= \mbox{\hyperlink{ehci_8h_a2f116f15de913d2fb168d970755b31a3}{EHCI\_QH\_CTL}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01937}01937                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01938}01938                 \textcolor{keywordflow}{if} (methods != \&\mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01939}01939                         \textcolor{comment}{/* Only try one time per microframe! */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01940}01940                         \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}} |= \mbox{\hyperlink{ehci_8h_ac172800f71f0d24d522e57d1731dd690}{EHCI\_QH\_SET\_NRL}}(1);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01941}01941                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01942}01942         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01943}01943 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01944}01944         \textcolor{keywordflow}{if} (temp.\mbox{\hyperlink{structehci__std__temp_a587c0616dc969bb8a3196611e91e19f2}{auto\_data\_toggle}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01945}01945                 \textcolor{comment}{/* software computes the data toggle */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01946}01946                 \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}} |= \mbox{\hyperlink{ehci_8h_a197ab8aab6956599ada11f41beaa7306}{EHCI\_QH\_DTC}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01947}01947         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01948}01948 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01949}01949         qh-\/>\mbox{\hyperlink{structehci__qh_a7e9e9cc3d850a73326fdf1dfd9a7ca54}{qh\_endp}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_ab6e2c72e0c73c27efebc2c3149832ac3}{qh\_endp}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01950}01950 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01951}01951         \mbox{\hyperlink{ehci_8h_a083afe48c55227504135eb3d92f8896e}{qh\_endphub}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01952}01952             (\mbox{\hyperlink{ehci_8h_aeb44a81bef1fa52853f79288c00c777f}{EHCI\_QH\_SET\_MULT}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a68da814bcdf59aaa6975cfd931a3f97f}{max\_packet\_count}} \& 3) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01953}01953             \mbox{\hyperlink{ehci_8h_a776510cb2008ae78528237be79e8229d}{EHCI\_QH\_SET\_CMASK}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_afe00eb77e7d3cdcd91ffd4319aeb7516}{usb\_cmask}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01954}01954             \mbox{\hyperlink{ehci_8h_a495f4367930593ec8f80d5bc7334b579}{EHCI\_QH\_SET\_SMASK}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a0467beb83bb15b27efb600885a43de11}{usb\_smask}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01955}01955             \mbox{\hyperlink{ehci_8h_a193b1e84a8a501a1a3ba4b13fa80a499}{EHCI\_QH\_SET\_HUBA}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_ae4eded55423bee40ef6eefb381b62409}{hs\_hub\_addr}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01956}01956             \mbox{\hyperlink{ehci_8h_a43ca121eb7569a9489267f5ad51d81c6}{EHCI\_QH\_SET\_PORT}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_a3820f24eaa233e432b724fd1914f34a0}{hs\_port\_no}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01957}01957 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01958}01958         qh-\/>\mbox{\hyperlink{structehci__qh_ade077b1974e33d9ab12bcfdc3b658664}{qh\_endphub}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a083afe48c55227504135eb3d92f8896e}{qh\_endphub}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01959}01959         qh-\/>\mbox{\hyperlink{structehci__qh_abe761005d92d9161de84780c366d6752}{qh\_curqtd}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01960}01960 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01961}01961         \textcolor{comment}{/* fill the overlay qTD */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01962}01962 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01963}01963         \textcolor{keywordflow}{if} (temp.\mbox{\hyperlink{structehci__std__temp_a587c0616dc969bb8a3196611e91e19f2}{auto\_data\_toggle}} \&\& xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a23e80980572fb57b1a6097114e92cfbc}{toggle\_next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01964}01964                 \textcolor{comment}{/* DATA1 is next */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01965}01965                 qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a12d01f66b40289b2377a5578e52fd05e}{qtd\_status}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_aa48bfb42445be6df5acf455fb93d21e6}{EHCI\_QTD\_SET\_TOGGLE}}(1));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01966}01966         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01967}01967                 qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a12d01f66b40289b2377a5578e52fd05e}{qtd\_status}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01968}01968         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01969}01969 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01970}01970         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01971}01971 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01972}01972         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_abb7d944f1bd8a9fc076c2e3c8179fa2f}{qtd\_next}} = td-\/>\mbox{\hyperlink{structehci__qtd_aa899ed20b306e054d077e9db46764e80}{qtd\_self}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01973}01973         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a93f7b8e4574db36b5a54a8372f6edf05}{qtd\_altnext}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01974}01974             \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(temp.\mbox{\hyperlink{structehci__std__temp_a5ac34260741ed40a494458b19ca41d9b}{sc}}, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01975}01975 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01976}01976         \textcolor{comment}{/* properly reset reserved fields */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01977}01977         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a3610bfe4134d7187632746a8e61a5420}{qtd\_buffer}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01978}01978         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a3610bfe4134d7187632746a8e61a5420}{qtd\_buffer}}[1] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01979}01979         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a3610bfe4134d7187632746a8e61a5420}{qtd\_buffer}}[2] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01980}01980         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a3610bfe4134d7187632746a8e61a5420}{qtd\_buffer}}[3] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01981}01981         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_a3610bfe4134d7187632746a8e61a5420}{qtd\_buffer}}[4] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01982}01982         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_ab9039584d31865982aaf4c7011cea61b}{qtd\_buffer\_hi}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01983}01983         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_ab9039584d31865982aaf4c7011cea61b}{qtd\_buffer\_hi}}[1] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01984}01984         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_ab9039584d31865982aaf4c7011cea61b}{qtd\_buffer\_hi}}[2] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01985}01985         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_ab9039584d31865982aaf4c7011cea61b}{qtd\_buffer\_hi}}[3] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01986}01986         qh-\/>\mbox{\hyperlink{structehci__qh_a7a73b3821fa48ba4f5a9b7b1cb2c810b}{qh\_qtd}}.\mbox{\hyperlink{structehci__qh__sub_ab9039584d31865982aaf4c7011cea61b}{qtd\_buffer\_hi}}[4] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01987}01987 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01988}01988         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(qh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01989}01989 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01990}01990         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_ae7b27fdcae02d49bee5c2f0a9130b633}{flags}}.\mbox{\hyperlink{structusb__device__flags_a9d1323e73bf72fdb6a0e60b36401faae}{self\_suspended}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01991}01991                 \mbox{\hyperlink{ehci_8c_a1bdc1e85de6a5fd2df9d6aaac5535d08}{EHCI\_APPEND\_QH}}(qh, *qh\_last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01992}01992         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01993}01993 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01994}01994 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01995}01995 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01996}\mbox{\hyperlink{ehci_8c_a3dfcb758acdc04a3081ee5cffb97d05d}{01996}} \mbox{\hyperlink{ehci_8c_a3dfcb758acdc04a3081ee5cffb97d05d}{ehci\_root\_intr}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01997}01997 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01998}01998         uint16\_t i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l01999}01999         uint16\_t m;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02000}02000 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02001}02001         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02002}02002 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02003}02003         \textcolor{comment}{/* clear any old interrupt data */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02004}02004         memset(sc-\/>\mbox{\hyperlink{structehci__softc_a50a7bb951f93bd0f714b6b225566db97}{sc\_hub\_idata}}, 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structehci__softc_a50a7bb951f93bd0f714b6b225566db97}{sc\_hub\_idata}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02005}02005 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02006}02006         \textcolor{comment}{/* set bits */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02007}02007         m = (sc-\/>\mbox{\hyperlink{structehci__softc_a446d88d1433cc2cbd34fd98091ad312d}{sc\_noport}} + 1);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02008}02008         \textcolor{keywordflow}{if} (m > (8 * \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structehci__softc_a50a7bb951f93bd0f714b6b225566db97}{sc\_hub\_idata}}))) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02009}02009                 m = (8 * \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structehci__softc_a50a7bb951f93bd0f714b6b225566db97}{sc\_hub\_idata}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02010}02010         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02011}02011         \textcolor{keywordflow}{for} (i = 1; i < m; i++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02012}02012                 \textcolor{comment}{/* pick out CHANGE bits from the status register */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02013}02013                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a682de74a3ce1559d704aac0d01a876ca}{EHCI\_PORTSC}}(i)) \& \mbox{\hyperlink{ehcireg_8h_a80736de25fbe39b9d094f35ab49328c1}{EHCI\_PS\_CLEAR}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02014}02014                         sc-\/>\mbox{\hyperlink{structehci__softc_a50a7bb951f93bd0f714b6b225566db97}{sc\_hub\_idata}}[i / 8] |= 1 << (i \% 8);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02015}02015                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}port \%d changed\(\backslash\)n"{}}, i);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02016}02016                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02017}02017         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02018}02018         \mbox{\hyperlink{usb__hub_8c_a5d4ec35789c119dd1afa44df46d4b8ed}{uhub\_root\_intr}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}, sc-\/>\mbox{\hyperlink{structehci__softc_a50a7bb951f93bd0f714b6b225566db97}{sc\_hub\_idata}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02019}02019             \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structehci__softc_a50a7bb951f93bd0f714b6b225566db97}{sc\_hub\_idata}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02020}02020 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02021}02021 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02022}02022 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02023}\mbox{\hyperlink{ehci_8c_a824fa6347447690cc3fde5092c8ec081}{02023}} \mbox{\hyperlink{ehci_8c_a824fa6347447690cc3fde5092c8ec081}{ehci\_isoc\_fs\_done}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02024}02024 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02025}02025         uint32\_t nframes = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02026}02026         uint32\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02027}02027         uint32\_t *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02028}02028         uint16\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02029}02029         \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02030}02030         \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} **pp\_last = \&sc-\/>\mbox{\hyperlink{structehci__softc_aa252ae2bf17b592b3557161a16784cfe}{sc\_isoc\_fs\_p\_last}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}}];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02031}02031 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02032}02032         DPRINTFN(13, \textcolor{stringliteral}{"{}xfer=\%p endpoint=\%p transfer done\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02033}02033             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02034}02034 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02035}02035         \textcolor{keywordflow}{while} (nframes-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02036}02036                 \textcolor{keywordflow}{if} (td == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02037}02037                         panic(\textcolor{stringliteral}{"{}\%s:\%d: out of TD's\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02038}02038                             \_\_FUNCTION\_\_, \_\_LINE\_\_);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02039}02039                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02040}02040                 \textcolor{keywordflow}{if} (pp\_last >= \&sc-\/>\mbox{\hyperlink{structehci__softc_aa252ae2bf17b592b3557161a16784cfe}{sc\_isoc\_fs\_p\_last}}[\mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}]) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02041}02041                         pp\_last = \&sc-\/>\mbox{\hyperlink{structehci__softc_aa252ae2bf17b592b3557161a16784cfe}{sc\_isoc\_fs\_p\_last}}[0];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02042}02042                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02043}02043 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02044}02044                 \textcolor{keywordflow}{if} (ehcidebug > 15) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02045}02045                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}isoc FS-\/TD\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02046}02046                         ehci\_dump\_sitd(sc, td);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02047}02047                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02048}02048 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02049}02049                 \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(td-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02050}02050                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, td-\/>\mbox{\hyperlink{structehci__sitd_aedc14aca108bc105d25c85ff496050bd}{sitd\_status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02051}02051 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02052}02052                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \mbox{\hyperlink{ehci_8h_a6beff0e0c1cf58e308a7e2768bca457b}{EHCI\_SITD\_GET\_LEN}}(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02053}02053 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02054}02054                 DPRINTFN(2, \textcolor{stringliteral}{"{}status=0x\%08x, rem=\%u\(\backslash\)n"{}}, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02055}02055 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02056}02056                 \textcolor{keywordflow}{if} (*\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} >= \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02057}02057                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} -\/ \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02058}02058                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02059}02059                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02060}02060                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02061}02061 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02062}02062                 *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02063}02063 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02064}02064                 \textcolor{comment}{/* remove FS-\/TD from schedule */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02065}02065                 \mbox{\hyperlink{ehci_8c_ad613740b870d634d212a6ff718ef545e}{EHCI\_REMOVE\_FS\_TD}}(td, *pp\_last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02066}02066 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02067}02067                 pp\_last++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02068}02068                 \mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02069}02069                 td = td-\/>\mbox{\hyperlink{structehci__sitd_a11f427cb5819bcfb92e0134de43540a0}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02070}02070         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02071}02071 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02072}02072         xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02073}02073 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02074}02074 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02075}02075 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02076}\mbox{\hyperlink{ehci_8c_a88fddcf7defda483a887526c6f3e9870}{02076}} \mbox{\hyperlink{ehci_8c_a88fddcf7defda483a887526c6f3e9870}{ehci\_isoc\_hs\_done}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02077}02077 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02078}02078         uint32\_t nframes = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02079}02079         uint32\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02080}02080         uint32\_t *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02081}02081         uint16\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02082}02082         uint8\_t td\_no = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02083}02083         \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02084}02084         \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} **pp\_last = \&sc-\/>\mbox{\hyperlink{structehci__softc_a8837d4f4648d7efb6950b73386cef215}{sc\_isoc\_hs\_p\_last}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}}];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02085}02085 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02086}02086         DPRINTFN(13, \textcolor{stringliteral}{"{}xfer=\%p endpoint=\%p transfer done\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02087}02087             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02088}02088 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02089}02089         \textcolor{keywordflow}{while} (nframes) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02090}02090                 \textcolor{keywordflow}{if} (td == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02091}02091                         panic(\textcolor{stringliteral}{"{}\%s:\%d: out of TD's\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02092}02092                             \_\_FUNCTION\_\_, \_\_LINE\_\_);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02093}02093                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02094}02094                 \textcolor{keywordflow}{if} (pp\_last >= \&sc-\/>\mbox{\hyperlink{structehci__softc_a8837d4f4648d7efb6950b73386cef215}{sc\_isoc\_hs\_p\_last}}[\mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}]) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02095}02095                         pp\_last = \&sc-\/>\mbox{\hyperlink{structehci__softc_a8837d4f4648d7efb6950b73386cef215}{sc\_isoc\_hs\_p\_last}}[0];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02096}02096                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02097}02097 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02098}02098                 \textcolor{keywordflow}{if} (ehcidebug > 15) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02099}02099                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}isoc HS-\/TD\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02100}02100                         ehci\_dump\_itd(sc, td);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02101}02101                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02102}02102 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02103}02103 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02104}02104                 \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(td-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02105}02105                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{ehci_8h_aa02e827b7c169b94af530c967ee4581b}{hc32toh}}(sc, td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[td\_no]);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02106}02106 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02107}02107                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \mbox{\hyperlink{ehci_8h_a381aaba556e8eb49b60ff1c343af37f5}{EHCI\_ITD\_GET\_LEN}}(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02108}02108 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02109}02109                 DPRINTFN(2, \textcolor{stringliteral}{"{}status=0x\%08x, len=\%u\(\backslash\)n"{}}, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02110}02110 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02111}02111                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a0467beb83bb15b27efb600885a43de11}{usb\_smask}} \& (1 << td\_no)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02112}02112                         \textcolor{keywordflow}{if} (*\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} >= \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02113}02113                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02114}02114 \textcolor{comment}{                                 * The length is valid. NOTE: The}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02115}02115 \textcolor{comment}{                                 * complete length is written back}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02116}02116 \textcolor{comment}{                                 * into the status field, and not the}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02117}02117 \textcolor{comment}{                                 * remainder like with other transfer}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02118}02118 \textcolor{comment}{                                 * descriptor types.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02119}02119 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02120}02120                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02121}02121                                 \textcolor{comment}{/* Invalid length -\/ truncate */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02122}02122                                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02123}02123                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02124}02124 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02125}02125                         *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02126}02126                         \mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02127}02127                         nframes-\/-\/;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02128}02128                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02129}02129 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02130}02130                 td\_no++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02131}02131 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02132}02132                 \textcolor{keywordflow}{if} ((td\_no == 8) || (nframes == 0)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02133}02133                         \textcolor{comment}{/* remove HS-\/TD from schedule */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02134}02134                         \mbox{\hyperlink{ehci_8c_a9fac4909be400d255fb85207b3eaa32d}{EHCI\_REMOVE\_HS\_TD}}(td, *pp\_last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02135}02135                         pp\_last++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02136}02136 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02137}02137                         td\_no = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02138}02138                         td = td-\/>\mbox{\hyperlink{structehci__itd_a17cc87e4c504cf83a65e28b240da6966}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02139}02139                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02140}02140         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02141}02141         xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02142}02142 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02143}02143 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02144}02144 \textcolor{comment}{/* NOTE: "{}done"{} can be run two times in a row,}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02145}02145 \textcolor{comment}{ * from close and from interrupt}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02146}02146 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02147}02147 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02148}\mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{02148}} \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(\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{ehci_8c_source_l02149}02149 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02150}02150         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} *methods = xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02151}02151         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02152}02152 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02153}02153         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02154}02154 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02155}02155         DPRINTFN(2, \textcolor{stringliteral}{"{}xfer=\%p, endpoint=\%p, error=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02156}02156             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02157}02157 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02158}02158         \textcolor{keywordflow}{if} ((methods == \&\mbox{\hyperlink{ehci_8c_a0efb2bbc6c35dd56ec1567a58a97abc6}{ehci\_device\_bulk\_methods}}) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02159}02159             (methods == \&\mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{ehci\_device\_ctrl\_methods}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02160}02160 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02161}02161                 \textcolor{keywordflow}{if} (ehcidebug > 8) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02162}02162                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}nexttog=\%d; data after transfer:\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02163}02163                             xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a23e80980572fb57b1a6097114e92cfbc}{toggle\_next}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02164}02164                         ehci\_dump\_sqtds(sc,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02165}02165                             xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02166}02166                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02167}02167 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02168}02168 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02169}02169                 \mbox{\hyperlink{ehci_8c_a09c874474813a492d66865631bac6029}{EHCI\_REMOVE\_QH}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}],}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02170}02170                     sc-\/>\mbox{\hyperlink{structehci__softc_a3599f5c0b5f8dac01c770ace13fba03e}{sc\_async\_p\_last}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02171}02171         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02172}02172         \textcolor{keywordflow}{if} (methods == \&\mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02173}02173                 \mbox{\hyperlink{ehci_8c_a09c874474813a492d66865631bac6029}{EHCI\_REMOVE\_QH}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}],}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02174}02174                     sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}}]);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02175}02175         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02176}02176         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02177}02177 \textcolor{comment}{         * Only finish isochronous transfers once which will update}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02178}02178 \textcolor{comment}{         * "{}xfer-\/>frlengths"{}.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02179}02179 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02180}02180         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}} \&\&}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02181}02181             xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02182}02182                 \textcolor{keywordflow}{if} (methods == \&\mbox{\hyperlink{ehci_8c_a605b50f00523b535ba3cb4dae1f39f53}{ehci\_device\_isoc\_fs\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02183}02183                         \mbox{\hyperlink{ehci_8c_a824fa6347447690cc3fde5092c8ec081}{ehci\_isoc\_fs\_done}}(sc, xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02184}02184                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02185}02185                 \textcolor{keywordflow}{if} (methods == \&\mbox{\hyperlink{ehci_8c_a83093b23a8bd6627d8b114499c0f6408}{ehci\_device\_isoc\_hs\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02186}02186                         \mbox{\hyperlink{ehci_8c_a88fddcf7defda483a887526c6f3e9870}{ehci\_isoc\_hs\_done}}(sc, xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02187}02187                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02188}02188                 xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02189}02189                 xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02190}02190         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02191}02191         \textcolor{comment}{/* dequeue transfer and start next transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02192}02192         \mbox{\hyperlink{usb__transfer_8c_a3141421f88316987bbc9b10e36715faf}{usbd\_transfer\_done}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02193}02193 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02194}02194 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02195}02195 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02196}02196 \textcolor{comment}{ * ehci bulk support}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02197}02197 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02198}02198 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02199}\mbox{\hyperlink{ehci_8c_a903629d9b94fc80fe6981f55cc895ed5}{02199}} \mbox{\hyperlink{ehci_8c_a903629d9b94fc80fe6981f55cc895ed5}{ehci\_device\_bulk\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02200}02200 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02201}02201         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02202}02202 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02203}02203 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02204}02204 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02205}\mbox{\hyperlink{ehci_8c_afb11e96a718264ccdb2361e560e81d8d}{02205}} \mbox{\hyperlink{ehci_8c_afb11e96a718264ccdb2361e560e81d8d}{ehci\_device\_bulk\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02206}02206 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02207}02207         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02208}02208 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02209}02209 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02210}02210 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02211}\mbox{\hyperlink{ehci_8c_a07b1155c0e6b330cd43282b9e47e94e6}{02211}} \mbox{\hyperlink{ehci_8c_a07b1155c0e6b330cd43282b9e47e94e6}{ehci\_device\_bulk\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02212}02212 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02213}02213         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02214}02214 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02215}02215 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02216}02216 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02217}\mbox{\hyperlink{ehci_8c_a26eef10ded85594900132577550169b9}{02217}} \mbox{\hyperlink{ehci_8c_a26eef10ded85594900132577550169b9}{ehci\_doorbell\_async}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structehci__softc}{ehci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02218}02218 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02219}02219         uint32\_t temp;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02220}02220 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02221}02221         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02222}02222 \textcolor{comment}{         * XXX Performance quirk: Some Host Controllers have a too low}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02223}02223 \textcolor{comment}{         * interrupt rate. Issue an IAAD to stimulate the Host}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02224}02224 \textcolor{comment}{         * Controller after queueing the BULK transfer.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02225}02225 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02226}02226 \textcolor{comment}{         * XXX Force the host controller to refresh any QH caches.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02227}02227 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02228}02228         temp = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02229}02229         \textcolor{keywordflow}{if} (!(temp \& \mbox{\hyperlink{ehcireg_8h_a757fb25327457f2262bceb80984e646c}{EHCI\_CMD\_IAAD}}))}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02230}02230                 \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}}, temp | \mbox{\hyperlink{ehcireg_8h_a757fb25327457f2262bceb80984e646c}{EHCI\_CMD\_IAAD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02231}02231 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02232}02232 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02233}02233 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02234}\mbox{\hyperlink{ehci_8c_a09f1b084d28342929eb406d77fafdfb5}{02234}} \mbox{\hyperlink{ehci_8c_a09f1b084d28342929eb406d77fafdfb5}{ehci\_device\_bulk\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02235}02235 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02236}02236         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02237}02237 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02238}02238         \textcolor{comment}{/* setup TD's and QH */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02239}02239         \mbox{\hyperlink{ehci_8c_af1ae82e36da554ebb64ab8221643f029}{ehci\_setup\_standard\_chain}}(xfer, \&sc-\/>\mbox{\hyperlink{structehci__softc_a3599f5c0b5f8dac01c770ace13fba03e}{sc\_async\_p\_last}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02240}02240 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02241}02241         \textcolor{comment}{/* put transfer on interrupt queue */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02242}02242         \mbox{\hyperlink{ehci_8c_abd83555480de41de55c5839f102418d5}{ehci\_transfer\_intr\_enqueue}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02243}02243 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02244}02244         \textcolor{comment}{/* }}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02245}02245 \textcolor{comment}{         * XXX Certain nVidia chipsets choke when using the IAAD}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02246}02246 \textcolor{comment}{         * feature too frequently.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02247}02247 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02248}02248         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} \& \mbox{\hyperlink{ehci_8h_a87ced3e6ffe3c50a405c8a85d5fc9c25}{EHCI\_SCFLG\_IAADBUG}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02249}02249                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02250}02250 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02251}02251         \mbox{\hyperlink{ehci_8c_a26eef10ded85594900132577550169b9}{ehci\_doorbell\_async}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02252}02252 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02253}02253 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02254}02254 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_a0efb2bbc6c35dd56ec1567a58a97abc6}{ehci\_device\_bulk\_methods}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02255}02255 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02256}02256         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{ehci_8c_a903629d9b94fc80fe6981f55cc895ed5}{ehci\_device\_bulk\_open}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02257}02257         .close = \mbox{\hyperlink{ehci_8c_afb11e96a718264ccdb2361e560e81d8d}{ehci\_device\_bulk\_close}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02258}02258         .enter = \mbox{\hyperlink{ehci_8c_a07b1155c0e6b330cd43282b9e47e94e6}{ehci\_device\_bulk\_enter}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02259}02259         .start = \mbox{\hyperlink{ehci_8c_a09f1b084d28342929eb406d77fafdfb5}{ehci\_device\_bulk\_start}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02260}02260 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02261}02261 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02262}02262 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02263}02263 \textcolor{comment}{ * ehci control support}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02264}02264 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02265}02265 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02266}\mbox{\hyperlink{ehci_8c_a108f6845619dc9d71e4fe5e7f3e9c463}{02266}} \mbox{\hyperlink{ehci_8c_a108f6845619dc9d71e4fe5e7f3e9c463}{ehci\_device\_ctrl\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02267}02267 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02268}02268         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02269}02269 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02270}02270 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02271}02271 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02272}\mbox{\hyperlink{ehci_8c_abd41d5d55bcdc18eddc52f7128c0866b}{02272}} \mbox{\hyperlink{ehci_8c_abd41d5d55bcdc18eddc52f7128c0866b}{ehci\_device\_ctrl\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02273}02273 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02274}02274         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02275}02275 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02276}02276 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02277}02277 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02278}\mbox{\hyperlink{ehci_8c_a838c6b69bd1c476da9af61d4a9c55d73}{02278}} \mbox{\hyperlink{ehci_8c_a838c6b69bd1c476da9af61d4a9c55d73}{ehci\_device\_ctrl\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02279}02279 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02280}02280         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02281}02281 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02282}02282 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02283}02283 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02284}\mbox{\hyperlink{ehci_8c_ad2291be6c5a0886c35c89e7ad7ef475a}{02284}} \mbox{\hyperlink{ehci_8c_ad2291be6c5a0886c35c89e7ad7ef475a}{ehci\_device\_ctrl\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02285}02285 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02286}02286         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02287}02287 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02288}02288         \textcolor{comment}{/* setup TD's and QH */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02289}02289         \mbox{\hyperlink{ehci_8c_af1ae82e36da554ebb64ab8221643f029}{ehci\_setup\_standard\_chain}}(xfer, \&sc-\/>\mbox{\hyperlink{structehci__softc_a3599f5c0b5f8dac01c770ace13fba03e}{sc\_async\_p\_last}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02290}02290 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02291}02291         \textcolor{comment}{/* put transfer on interrupt queue */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02292}02292         \mbox{\hyperlink{ehci_8c_abd83555480de41de55c5839f102418d5}{ehci\_transfer\_intr\_enqueue}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02293}02293 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02294}02294 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02295}02295 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{ehci\_device\_ctrl\_methods}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02296}02296 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02297}02297         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{ehci_8c_a108f6845619dc9d71e4fe5e7f3e9c463}{ehci\_device\_ctrl\_open}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02298}02298         .close = \mbox{\hyperlink{ehci_8c_abd41d5d55bcdc18eddc52f7128c0866b}{ehci\_device\_ctrl\_close}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02299}02299         .enter = \mbox{\hyperlink{ehci_8c_a838c6b69bd1c476da9af61d4a9c55d73}{ehci\_device\_ctrl\_enter}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02300}02300         .start = \mbox{\hyperlink{ehci_8c_ad2291be6c5a0886c35c89e7ad7ef475a}{ehci\_device\_ctrl\_start}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02301}02301 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02302}02302 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02303}02303 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02304}02304 \textcolor{comment}{ * ehci interrupt support}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02305}02305 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02306}02306 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02307}\mbox{\hyperlink{ehci_8c_a6ad670c73a8c3096b561edd3c3c5778e}{02307}} \mbox{\hyperlink{ehci_8c_a6ad670c73a8c3096b561edd3c3c5778e}{ehci\_device\_intr\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02308}02308 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02309}02309         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02310}02310         uint16\_t best;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02311}02311         uint16\_t bit;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02312}02312         uint16\_t x;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02313}02313 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02314}02314         \mbox{\hyperlink{usb__hub_8c_a90ad1a274265a5a797a807f779c6d379}{usb\_hs\_bandwidth\_alloc}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02315}02315 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02316}02316         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02317}02317 \textcolor{comment}{         * Find the best QH position corresponding to the given interval:}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02318}02318 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02319}02319 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02320}02320         best = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02321}02321         bit = \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}} / 2;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02322}02322         \textcolor{keywordflow}{while} (bit) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02323}02323                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_adefe203b8c753d8828c4b8dcec099ffc}{interval}} >= bit) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02324}02324                         x = bit;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02325}02325                         best = bit;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02326}02326                         \textcolor{keywordflow}{while} (x \& bit) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02327}02327                                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a40e61d2f1ffc87e95a53381c91197290}{sc\_intr\_stat}}[x] <}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02328}02328                                     sc-\/>\mbox{\hyperlink{structehci__softc_a40e61d2f1ffc87e95a53381c91197290}{sc\_intr\_stat}}[best]) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02329}02329                                         best = x;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02330}02330                                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02331}02331                                 x++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02332}02332                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02333}02333                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02334}02334                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02335}02335                 bit >>= 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02336}02336         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02337}02337 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02338}02338         sc-\/>\mbox{\hyperlink{structehci__softc_a40e61d2f1ffc87e95a53381c91197290}{sc\_intr\_stat}}[best]++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02339}02339         xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}} = best;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02340}02340 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02341}02341         DPRINTFN(3, \textcolor{stringliteral}{"{}best=\%d interval=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02342}02342             best, xfer-\/>\mbox{\hyperlink{structusb__xfer_adefe203b8c753d8828c4b8dcec099ffc}{interval}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02343}02343 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02344}02344 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02345}02345 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02346}\mbox{\hyperlink{ehci_8c_ac7a14372c4979506727268ff3efca287}{02346}} \mbox{\hyperlink{ehci_8c_ac7a14372c4979506727268ff3efca287}{ehci\_device\_intr\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02347}02347 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02348}02348         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02349}02349 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02350}02350         sc-\/>\mbox{\hyperlink{structehci__softc_a40e61d2f1ffc87e95a53381c91197290}{sc\_intr\_stat}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}}]-\/-\/;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02351}02351 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02352}02352         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02353}02353 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02354}02354         \textcolor{comment}{/* bandwidth must be freed after device done */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02355}02355         \mbox{\hyperlink{usb__hub_8c_aa8f5e70aa7f696db06c17d4b8abb2e22}{usb\_hs\_bandwidth\_free}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02356}02356 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02357}02357 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02358}02358 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02359}\mbox{\hyperlink{ehci_8c_ab77bc66732f8be5bc498c04d828c114d}{02359}} \mbox{\hyperlink{ehci_8c_ab77bc66732f8be5bc498c04d828c114d}{ehci\_device\_intr\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02360}02360 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02361}02361         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02362}02362 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02363}02363 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02364}02364 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02365}\mbox{\hyperlink{ehci_8c_aadd1fb29d9b46f3964bc9b200f37c8eb}{02365}} \mbox{\hyperlink{ehci_8c_aadd1fb29d9b46f3964bc9b200f37c8eb}{ehci\_device\_intr\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02366}02366 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02367}02367         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02368}02368 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02369}02369         \textcolor{comment}{/* setup TD's and QH */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02370}02370         \mbox{\hyperlink{ehci_8c_af1ae82e36da554ebb64ab8221643f029}{ehci\_setup\_standard\_chain}}(xfer, \&sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}}]);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02371}02371 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02372}02372         \textcolor{comment}{/* put transfer on interrupt queue */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02373}02373         \mbox{\hyperlink{ehci_8c_abd83555480de41de55c5839f102418d5}{ehci\_transfer\_intr\_enqueue}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02374}02374 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02375}02375 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02376}02376 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02377}02377 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02378}02378         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{ehci_8c_a6ad670c73a8c3096b561edd3c3c5778e}{ehci\_device\_intr\_open}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02379}02379         .close = \mbox{\hyperlink{ehci_8c_ac7a14372c4979506727268ff3efca287}{ehci\_device\_intr\_close}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02380}02380         .enter = \mbox{\hyperlink{ehci_8c_ab77bc66732f8be5bc498c04d828c114d}{ehci\_device\_intr\_enter}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02381}02381         .start = \mbox{\hyperlink{ehci_8c_aadd1fb29d9b46f3964bc9b200f37c8eb}{ehci\_device\_intr\_start}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02382}02382 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02383}02383 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02384}02384 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02385}02385 \textcolor{comment}{ * ehci full speed isochronous support}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02386}02386 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02387}02387 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02388}\mbox{\hyperlink{ehci_8c_a2c7bec782e375b514c60931b9660ec14}{02388}} \mbox{\hyperlink{ehci_8c_a2c7bec782e375b514c60931b9660ec14}{ehci\_device\_isoc\_fs\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02389}02389 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02390}02390         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02391}02391         \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02392}02392         uint32\_t \mbox{\hyperlink{ehci_8h_adc2f7b1c1710cdc25e2200f4bf5013f1}{sitd\_portaddr}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02393}02393         uint8\_t ds;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02394}02394 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02395}02395         \mbox{\hyperlink{ehci_8h_adc2f7b1c1710cdc25e2200f4bf5013f1}{sitd\_portaddr}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02396}02396             \mbox{\hyperlink{ehci_8h_a4078c885aba689395a41abaa8cb120d9}{EHCI\_SITD\_SET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a8ff4ea2a405466a9ce1d9a154a535f0b}{address}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02397}02397             \mbox{\hyperlink{ehci_8h_ad0787b8fefc22f2d40fe1e8e75fd83f4}{EHCI\_SITD\_SET\_ENDPT}}(\mbox{\hyperlink{usb_8h_a5c87169fa1d69d81d7ac06bd59265243}{UE\_GET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}})) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02398}02398             \mbox{\hyperlink{ehci_8h_a5922dbc3518ca6022f6108134475f07f}{EHCI\_SITD\_SET\_HUBA}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_ae4eded55423bee40ef6eefb381b62409}{hs\_hub\_addr}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02399}02399             \mbox{\hyperlink{ehci_8h_a47413fa40c284e56dbc3777b083bdc80}{EHCI\_SITD\_SET\_PORT}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}-\/>\mbox{\hyperlink{structusb__device_a3820f24eaa233e432b724fd1914f34a0}{hs\_port\_no}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02400}02400 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02401}02401         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb_8h_aab65e24c804e6317e033b84730aec8e3}{UE\_GET\_DIR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}) == \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02402}02402                 \mbox{\hyperlink{ehci_8h_adc2f7b1c1710cdc25e2200f4bf5013f1}{sitd\_portaddr}} |= \mbox{\hyperlink{ehci_8h_a37606c223fc7c318464292186cc7f4ed}{EHCI\_SITD\_SET\_DIR\_IN}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02403}02403 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02404}02404         \mbox{\hyperlink{ehci_8h_adc2f7b1c1710cdc25e2200f4bf5013f1}{sitd\_portaddr}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_adc2f7b1c1710cdc25e2200f4bf5013f1}{sitd\_portaddr}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02405}02405 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02406}02406         \textcolor{comment}{/* initialize all TD's */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02407}02407 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02408}02408         \textcolor{keywordflow}{for} (ds = 0; ds != 2; ds++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02409}02409                 \textcolor{keywordflow}{for} (td = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[ds]; td; td = td-\/>\mbox{\hyperlink{structehci__sitd_a11f427cb5819bcfb92e0134de43540a0}{obj\_next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02410}02410                         td-\/>\mbox{\hyperlink{structehci__sitd_aa05535423522f78016bff1d0b6013820}{sitd\_portaddr}} = \mbox{\hyperlink{ehci_8h_adc2f7b1c1710cdc25e2200f4bf5013f1}{sitd\_portaddr}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02411}02411 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02412}02412                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02413}02413 \textcolor{comment}{                         * TODO: make some kind of automatic}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02414}02414 \textcolor{comment}{                         * SMASK/CMASK selection based on micro-\/frame}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02415}02415 \textcolor{comment}{                         * usage}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02416}02416 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02417}02417 \textcolor{comment}{                         * micro-\/frame usage (8 microframes per 1ms)}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02418}02418 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02419}02419                         td-\/>\mbox{\hyperlink{structehci__sitd_a1f267c4d34d92dedb4b5a7b28285158b}{sitd\_back}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a7ce490bda813d586cc9c5b0a1f6348ba}{EHCI\_LINK\_TERMINATE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02420}02420 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02421}02421                         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(td-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02422}02422                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02423}02423         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02424}02424 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02425}02425 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02426}02426 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02427}\mbox{\hyperlink{ehci_8c_a71b3d7c70ecc693bab862330cf2891ab}{02427}} \mbox{\hyperlink{ehci_8c_a71b3d7c70ecc693bab862330cf2891ab}{ehci\_device\_isoc\_fs\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02428}02428 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02429}02429         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02430}02430 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02431}02431 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02432}02432 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02433}\mbox{\hyperlink{ehci_8c_a04155c310c6451634d47a80603210a89}{02433}} \mbox{\hyperlink{ehci_8c_a04155c310c6451634d47a80603210a89}{ehci\_device\_isoc\_fs\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02434}02434 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02435}02435         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02436}02436         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02437}02437         \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02438}02438         \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *td\_last = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02439}02439         \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} **pp\_last;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02440}02440         uint32\_t *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02441}02441         uint32\_t buf\_offset;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02442}02442         uint32\_t nframes;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02443}02443         uint32\_t startframe;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02444}02444         uint32\_t temp;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02445}02445         uint32\_t \mbox{\hyperlink{ehci_8h_ae2290b07858ac22ecaeecb25259fdc05}{sitd\_mask}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02446}02446         uint16\_t tlen;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02447}02447         uint8\_t sa;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02448}02448         uint8\_t sb;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02449}02449 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02450}02450 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02451}02451         uint8\_t once = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02452}02452 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02453}02453 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02454}02454 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02455}02455         DPRINTFN(6, \textcolor{stringliteral}{"{}xfer=\%p next=\%d nframes=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02456}02456             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a6a4a923c46e82cd1298d7832e169d7d1}{isoc\_next}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02457}02457 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02458}02458         \textcolor{comment}{/* get the current frame index */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02459}02459 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02460}02460         nframes = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a53ea75b3eebcb6fd476b9fba72904731}{EHCI\_FRINDEX}}) / 8;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02461}02461 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02462}02462         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8c_ac7c1dd004c5c80fdda721a68ad16504d}{usbd\_xfer\_get\_isochronous\_start\_frame}}(}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02463}02463             xfer, nframes, 0, 1, \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}} -\/ 1, \&startframe))}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02464}02464                 DPRINTFN(3, \textcolor{stringliteral}{"{}start next=\%d\(\backslash\)n"{}}, startframe);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02465}02465 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02466}02466         \textcolor{comment}{/* get the real number of frames */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02467}02467 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02468}02468         nframes = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02469}02469 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02470}02470         buf\_offset = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02471}02471 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02472}02472         \mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02473}02473 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02474}02474         \textcolor{comment}{/* toggle the DMA set we are using */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02475}02475         xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}} \string^= 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02476}02476 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02477}02477         \textcolor{comment}{/* get next DMA set */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02478}02478         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02479}02479         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02480}02480 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02481}02481         pp\_last = \&sc-\/>sc\_isoc\_fs\_p\_last[startframe];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02482}02482 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02483}02483         \textcolor{comment}{/* store starting position */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02484}02484 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02485}02485         xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}} = startframe;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02486}02486 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02487}02487         \textcolor{keywordflow}{while} (nframes-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02488}02488                 \textcolor{keywordflow}{if} (td == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02489}02489                         panic(\textcolor{stringliteral}{"{}\%s:\%d: out of TD's\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02490}02490                             \_\_FUNCTION\_\_, \_\_LINE\_\_);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02491}02491                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02492}02492                 \textcolor{keywordflow}{if} (pp\_last >= \&sc-\/>sc\_isoc\_fs\_p\_last[\mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}])}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02493}02493                         pp\_last = \&sc-\/>sc\_isoc\_fs\_p\_last[0];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02494}02494 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02495}02495                 \textcolor{comment}{/* reuse sitd\_portaddr and sitd\_back from last transfer */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02496}02496 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02497}02497                 \textcolor{keywordflow}{if} (*\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} > xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02498}02498 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02499}02499                         \textcolor{keywordflow}{if} (once) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02500}02500                                 once = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02501}02501                                 printf(\textcolor{stringliteral}{"{}\%s: frame length(\%d) exceeds \%d "{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02502}02502                                     \textcolor{stringliteral}{"{}bytes (frame truncated)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02503}02503                                     \_\_FUNCTION\_\_, *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02504}02504                                     xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02505}02505                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02506}02506 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02507}02507                         *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02508}02508                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02509}02509 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02510}02510                 \textcolor{comment}{/* allocate a slot */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02511}02511 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02512}02512                 sa = usbd\_fs\_isoc\_schedule\_alloc\_slot(xfer,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02513}02513                     xfer-\/>\mbox{\hyperlink{structusb__xfer_af3b367b4cd09864247d2165a6277eff7}{isoc\_time\_complete}} -\/ nframes -\/ 1);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02514}02514 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02515}02515                 \textcolor{keywordflow}{if} (sa == 255) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02516}02516                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02517}02517 \textcolor{comment}{                         * Schedule is FULL, set length to zero:}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02518}02518 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02519}02519 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02520}02520                         *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02521}02521                         sa = \mbox{\hyperlink{usb__freebsd_8h_ab1173931120cf6829648beb5d3e0ab55}{USB\_FS\_ISOC\_UFRAME\_MAX}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02522}02522                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02523}02523                 \textcolor{keywordflow}{if} (*\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02524}02524                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02525}02525 \textcolor{comment}{                         * only call "{}usbd\_get\_page()"{} when we have a}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02526}02526 \textcolor{comment}{                         * non-\/zero length}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02527}02527 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02528}02528                         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}}, buf\_offset, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02529}02529                         td-\/>\mbox{\hyperlink{structehci__sitd_a913e70b0fc2ae51d0da7fee4f8050641}{sitd\_bp}}[0] = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, buf\_res.physaddr);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02530}02530                         buf\_offset += *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02531}02531                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02532}02532 \textcolor{comment}{                         * NOTE: We need to subtract one from the offset so}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02533}02533 \textcolor{comment}{                         * that we are on a valid page!}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02534}02534 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02535}02535                         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}}, buf\_offset -\/ 1,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02536}02536                             \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02537}02537                         temp = buf\_res.physaddr \& \string~0xFFF;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02538}02538                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02539}02539                         td-\/>\mbox{\hyperlink{structehci__sitd_a913e70b0fc2ae51d0da7fee4f8050641}{sitd\_bp}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02540}02540                         temp = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02541}02541                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02542}02542 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02543}02543                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb_8h_aab65e24c804e6317e033b84730aec8e3}{UE\_GET\_DIR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}) == \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02544}02544                         tlen = *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02545}02545                         \textcolor{keywordflow}{if} (tlen <= 188) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02546}02546                                 temp |= 1;      \textcolor{comment}{/* T-\/count = 1, TP = ALL */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02547}02547                                 tlen = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02548}02548                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02549}02549                                 tlen += 187;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02550}02550                                 tlen /= 188;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02551}02551                                 temp |= tlen;   \textcolor{comment}{/* T-\/count = [1..6] */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02552}02552                                 temp |= 8;      \textcolor{comment}{/* TP = Begin */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02553}02553                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02554}02554 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02555}02555                         tlen += sa;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02556}02556 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02557}02557                         \textcolor{keywordflow}{if} (tlen >= 8) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02558}02558                                 sb = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02559}02559                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02560}02560                                 sb = (1 << tlen);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02561}02561                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02562}02562 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02563}02563                         sa = (1 << sa);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02564}02564                         sa = (sb -\/ sa) \& 0x3F;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02565}02565                         sb = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02566}02566                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02567}02567                         sb = (-\/(4 << sa)) \& 0xFE;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02568}02568                         sa = (1 << sa) \& 0x3F;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02569}02569                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02570}02570 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02571}02571                 \mbox{\hyperlink{ehci_8h_ae2290b07858ac22ecaeecb25259fdc05}{sitd\_mask}} = (\mbox{\hyperlink{ehci_8h_a44ae1722b7491e48c2c4fec8155c4067}{EHCI\_SITD\_SET\_SMASK}}(sa) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02572}02572                     \mbox{\hyperlink{ehci_8h_a396a5a129ecc0fd7978f2c3cddd43c8e}{EHCI\_SITD\_SET\_CMASK}}(sb));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02573}02573 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02574}02574                 td-\/>\mbox{\hyperlink{structehci__sitd_a913e70b0fc2ae51d0da7fee4f8050641}{sitd\_bp}}[1] = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, temp);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02575}02575 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02576}02576                 td-\/>\mbox{\hyperlink{structehci__sitd_ab1ccf261127e730ff5f298580a94dbd6}{sitd\_mask}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_ae2290b07858ac22ecaeecb25259fdc05}{sitd\_mask}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02577}02577 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02578}02578                 \textcolor{keywordflow}{if} (nframes == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02579}02579                         td-\/>\mbox{\hyperlink{structehci__sitd_aedc14aca108bc105d25c85ff496050bd}{sitd\_status}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02580}02580                             \mbox{\hyperlink{ehci_8h_a981df7cacab9e1dbf4e49ed90eecdc52}{EHCI\_SITD\_IOC}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02581}02581                             \mbox{\hyperlink{ehci_8h_a13dd6228ac7a8e7547b2dd659e23c23f}{EHCI\_SITD\_ACTIVE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02582}02582                             \mbox{\hyperlink{ehci_8h_a82df80173cd31ba1ca4e0d7a2ce1a1af}{EHCI\_SITD\_SET\_LEN}}(*\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02583}02583                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02584}02584                         td-\/>\mbox{\hyperlink{structehci__sitd_aedc14aca108bc105d25c85ff496050bd}{sitd\_status}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02585}02585                             \mbox{\hyperlink{ehci_8h_a13dd6228ac7a8e7547b2dd659e23c23f}{EHCI\_SITD\_ACTIVE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02586}02586                             \mbox{\hyperlink{ehci_8h_a82df80173cd31ba1ca4e0d7a2ce1a1af}{EHCI\_SITD\_SET\_LEN}}(*\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02587}02587                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02588}02588                 \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(td-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02589}02589 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02590}02590 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02591}02591                 \textcolor{keywordflow}{if} (ehcidebug > 15) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02592}02592                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}FS-\/TD \%d\(\backslash\)n"{}}, nframes);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02593}02593                         ehci\_dump\_sitd(sc, td);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02594}02594                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02595}02595 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02596}02596                 \textcolor{comment}{/* insert TD into schedule */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02597}02597                 \mbox{\hyperlink{ehci_8c_ab9ba44ba9573b8448942dd7358e69084}{EHCI\_APPEND\_FS\_TD}}(td, *pp\_last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02598}02598                 pp\_last++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02599}02599 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02600}02600                 \mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02601}02601                 td\_last = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02602}02602                 td = td-\/>\mbox{\hyperlink{structehci__sitd_a11f427cb5819bcfb92e0134de43540a0}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02603}02603         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02604}02604 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02605}02605         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}} = td\_last;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02606}02606 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02607}02607         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02608}02608 \textcolor{comment}{         * We don't allow cancelling of the SPLIT transaction USB FULL}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02609}02609 \textcolor{comment}{         * speed transfer, because it disturbs the bandwidth}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02610}02610 \textcolor{comment}{         * computation algorithm.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02611}02611 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02612}02612         xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a8b3cd041803f3e2018005464ff7a5dcc}{can\_cancel\_immed}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02613}02613 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02614}02614 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02615}02615 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02616}\mbox{\hyperlink{ehci_8c_a5ff895efd13918d41b86fa2951bcab4b}{02616}} \mbox{\hyperlink{ehci_8c_a5ff895efd13918d41b86fa2951bcab4b}{ehci\_device\_isoc\_fs\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02617}02617 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02618}02618         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02619}02619 \textcolor{comment}{         * We don't allow cancelling of the SPLIT transaction USB FULL}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02620}02620 \textcolor{comment}{         * speed transfer, because it disturbs the bandwidth}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02621}02621 \textcolor{comment}{         * computation algorithm.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02622}02622 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02623}02623         xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a8b3cd041803f3e2018005464ff7a5dcc}{can\_cancel\_immed}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02624}02624 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02625}02625         \textcolor{comment}{/* set a default timeout */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02626}02626         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a766f3db3d34b816ff819212c11f27ad3}{timeout}} == 0)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02627}02627                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a766f3db3d34b816ff819212c11f27ad3}{timeout}} = 500; \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02628}02628 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02629}02629         \textcolor{comment}{/* put transfer on interrupt queue */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02630}02630         \mbox{\hyperlink{ehci_8c_abd83555480de41de55c5839f102418d5}{ehci\_transfer\_intr\_enqueue}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02631}02631 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02632}02632 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02633}02633 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_a605b50f00523b535ba3cb4dae1f39f53}{ehci\_device\_isoc\_fs\_methods}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02634}02634 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02635}02635         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{ehci_8c_a2c7bec782e375b514c60931b9660ec14}{ehci\_device\_isoc\_fs\_open}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02636}02636         .close = \mbox{\hyperlink{ehci_8c_a71b3d7c70ecc693bab862330cf2891ab}{ehci\_device\_isoc\_fs\_close}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02637}02637         .enter = \mbox{\hyperlink{ehci_8c_a04155c310c6451634d47a80603210a89}{ehci\_device\_isoc\_fs\_enter}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02638}02638         .start = \mbox{\hyperlink{ehci_8c_a5ff895efd13918d41b86fa2951bcab4b}{ehci\_device\_isoc\_fs\_start}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02639}02639 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02640}02640 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02641}02641 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02642}02642 \textcolor{comment}{ * ehci high speed isochronous support}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02643}02643 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02644}02644 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02645}\mbox{\hyperlink{ehci_8c_ad3db0556e6d6f6a8f339a7f0d418a440}{02645}} \mbox{\hyperlink{ehci_8c_ad3db0556e6d6f6a8f339a7f0d418a440}{ehci\_device\_isoc\_hs\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02646}02646 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02647}02647         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02648}02648         \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02649}02649         uint32\_t temp;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02650}02650         uint8\_t ds;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02651}02651 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02652}02652         \mbox{\hyperlink{usb__hub_8c_a90ad1a274265a5a797a807f779c6d379}{usb\_hs\_bandwidth\_alloc}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02653}02653 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02654}02654         \textcolor{comment}{/* initialize all TD's */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02655}02655 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02656}02656         \textcolor{keywordflow}{for} (ds = 0; ds != 2; ds++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02657}02657                 \textcolor{keywordflow}{for} (td = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[ds]; td; td = td-\/>\mbox{\hyperlink{structehci__itd_a17cc87e4c504cf83a65e28b240da6966}{obj\_next}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02658}02658                         \textcolor{comment}{/* set TD inactive */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02659}02659                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02660}02660                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[1] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02661}02661                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[2] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02662}02662                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[3] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02663}02663                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[4] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02664}02664                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[5] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02665}02665                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[6] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02666}02666                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[7] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02667}02667 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02668}02668                         \textcolor{comment}{/* set endpoint and address */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02669}02669                         td-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[0] = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02670}02670                             \mbox{\hyperlink{ehci_8h_a8a5207de198838df52d2b25872678b29}{EHCI\_ITD\_SET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a8ff4ea2a405466a9ce1d9a154a535f0b}{address}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02671}02671                             \mbox{\hyperlink{ehci_8h_aaf3c6fe9762e56ef9fc11291e1cc38dd}{EHCI\_ITD\_SET\_ENDPT}}(\mbox{\hyperlink{usb_8h_a5c87169fa1d69d81d7ac06bd59265243}{UE\_GET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}})));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02672}02672 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02673}02673                         temp =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02674}02674                             \mbox{\hyperlink{ehci_8h_a41926de6eeca6d0cb72ec95e514e5099}{EHCI\_ITD\_SET\_MPL}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_aefcde8a630b7adefe68cc72e7e7a5bb5}{max\_packet\_size}} \& 0x7FF);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02675}02675 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02676}02676                         \textcolor{comment}{/* set direction */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02677}02677                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb_8h_aab65e24c804e6317e033b84730aec8e3}{UE\_GET\_DIR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}) == \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02678}02678                                 temp |= \mbox{\hyperlink{ehci_8h_ac64ad7852de2c707ca95232b9e83399b}{EHCI\_ITD\_SET\_DIR\_IN}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02679}02679                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02680}02680                         \textcolor{comment}{/* set maximum packet size */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02681}02681                         td-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[1] = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, temp);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02682}02682 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02683}02683                         \textcolor{comment}{/* set transfer multiplier */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02684}02684                         td-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[2] = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, xfer-\/>\mbox{\hyperlink{structusb__xfer_a68da814bcdf59aaa6975cfd931a3f97f}{max\_packet\_count}} \& 3);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02685}02685 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02686}02686                         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(td-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02687}02687                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02688}02688         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02689}02689 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02690}02690 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02691}02691 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02692}\mbox{\hyperlink{ehci_8c_a7312f5b184fe31c6ce9e79dff61ee861}{02692}} \mbox{\hyperlink{ehci_8c_a7312f5b184fe31c6ce9e79dff61ee861}{ehci\_device\_isoc\_hs\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02693}02693 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02694}02694         \mbox{\hyperlink{ehci_8c_a5baf93ec4ad734bd029a558291d677f8}{ehci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02695}02695 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02696}02696         \textcolor{comment}{/* bandwidth must be freed after device done */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02697}02697         \mbox{\hyperlink{usb__hub_8c_aa8f5e70aa7f696db06c17d4b8abb2e22}{usb\_hs\_bandwidth\_free}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02698}02698 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02699}02699 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02700}02700 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02701}\mbox{\hyperlink{ehci_8c_a98fbc9d3ccafe6684801be05d94ff610}{02701}} \mbox{\hyperlink{ehci_8c_a98fbc9d3ccafe6684801be05d94ff610}{ehci\_device\_isoc\_hs\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02702}02702 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02703}02703         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02704}02704         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02705}02705         \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02706}02706         \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *td\_last = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02707}02707         \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} **pp\_last;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02708}02708         bus\_size\_t page\_addr;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02709}02709         uint32\_t *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02710}02710         uint32\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02711}02711         uint32\_t buf\_offset;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02712}02712         uint32\_t nframes;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02713}02713         uint32\_t startframe;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02714}02714         uint32\_t \mbox{\hyperlink{ohci_8h_aa107abd3d5280d52a9092e907beec00e}{itd\_offset}}[8 + 1];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02715}02715         uint8\_t x;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02716}02716         uint8\_t td\_no;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02717}02717         uint8\_t page\_no;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02718}02718 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02719}02719 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02720}02720         uint8\_t once = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02721}02721 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02722}02722 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02723}02723 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02724}02724         DPRINTFN(6, \textcolor{stringliteral}{"{}xfer=\%p next=\%d nframes=\%d shift=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02725}02725             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a6a4a923c46e82cd1298d7832e169d7d1}{isoc\_next}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02726}02726             \mbox{\hyperlink{usb__transfer_8c_a479907ed14a6a7e05e1409a19562b8c2}{usbd\_xfer\_get\_fps\_shift}}(xfer));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02727}02727 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02728}02728         \textcolor{comment}{/* get the current frame index */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02729}02729 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02730}02730         nframes = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a53ea75b3eebcb6fd476b9fba72904731}{EHCI\_FRINDEX}}) / 8;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02731}02731 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02732}02732         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8c_ac7c1dd004c5c80fdda721a68ad16504d}{usbd\_xfer\_get\_isochronous\_start\_frame}}(}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02733}02733             xfer, nframes, 0, 1, \mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}} -\/ 1, \&startframe))}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02734}02734                 DPRINTFN(3, \textcolor{stringliteral}{"{}start next=\%d\(\backslash\)n"{}}, startframe);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02735}02735 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02736}02736         nframes = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02737}02737 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02738}02738         buf\_offset = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02739}02739         td\_no = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02740}02740 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02741}02741         \mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02742}02742 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02743}02743         \textcolor{comment}{/* toggle the DMA set we are using */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02744}02744         xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}} \string^= 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02745}02745 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02746}02746         \textcolor{comment}{/* get next DMA set */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02747}02747         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02748}02748         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}} = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02749}02749 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02750}02750         pp\_last = \&sc-\/>sc\_isoc\_hs\_p\_last[startframe];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02751}02751 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02752}02752         \textcolor{comment}{/* store starting position */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02753}02753 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02754}02754         xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}} = startframe;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02755}02755 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02756}02756         \textcolor{keywordflow}{while} (nframes) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02757}02757                 \textcolor{keywordflow}{if} (td == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02758}02758                         panic(\textcolor{stringliteral}{"{}\%s:\%d: out of TD's\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02759}02759                             \_\_FUNCTION\_\_, \_\_LINE\_\_);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02760}02760                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02761}02761                 \textcolor{keywordflow}{if} (pp\_last >= \&sc-\/>sc\_isoc\_hs\_p\_last[\mbox{\hyperlink{ehci_8h_ab1ffb59eabf02c7618f4f8994d14ab36}{EHCI\_VIRTUAL\_FRAMELIST\_COUNT}}]) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02762}02762                         pp\_last = \&sc-\/>sc\_isoc\_hs\_p\_last[0];}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02763}02763                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02764}02764                 \textcolor{comment}{/* range check */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02765}02765                 \textcolor{keywordflow}{if} (*\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} > xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02766}02766 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02767}02767                         \textcolor{keywordflow}{if} (once) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02768}02768                                 once = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02769}02769                                 printf(\textcolor{stringliteral}{"{}\%s: frame length(\%d) exceeds \%d bytes "{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02770}02770                                     \textcolor{stringliteral}{"{}(frame truncated)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02771}02771                                     \_\_FUNCTION\_\_, *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02772}02772                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02773}02773 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02774}02774                         *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02775}02775                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02776}02776 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02777}02777                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a0467beb83bb15b27efb600885a43de11}{usb\_smask}} \& (1 << td\_no)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02778}02778                         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = (\mbox{\hyperlink{ehci_8h_ab0755d814c8641317569f446124a914a}{EHCI\_ITD\_SET\_LEN}}(*\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02779}02779                             \mbox{\hyperlink{ehci_8h_a7b8ede5745f606fb38291c79616c93f0}{EHCI\_ITD\_ACTIVE}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02780}02780                             \mbox{\hyperlink{ehci_8h_ae73b07273e6562922d9ecf507ed9fa94}{EHCI\_ITD\_SET\_PG}}(0));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02781}02781                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[td\_no] = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02782}02782                         \mbox{\hyperlink{ohci_8h_aa107abd3d5280d52a9092e907beec00e}{itd\_offset}}[td\_no] = buf\_offset;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02783}02783                         buf\_offset += *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02784}02784                         \mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}}++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02785}02785                         nframes -\/-\/;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02786}02786                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02787}02787                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[td\_no] = 0;    \textcolor{comment}{/* not active */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02788}02788                         \mbox{\hyperlink{ohci_8h_aa107abd3d5280d52a9092e907beec00e}{itd\_offset}}[td\_no] = buf\_offset;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02789}02789                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02790}02790 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02791}02791                 td\_no++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02792}02792 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02793}02793                 \textcolor{keywordflow}{if} ((td\_no == 8) || (nframes == 0)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02794}02794                         \textcolor{comment}{/* the rest of the transfers are not active, if any */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02795}02795                         \textcolor{keywordflow}{for} (x = td\_no; x != 8; x++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02796}02796                                 td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[x] = 0;        \textcolor{comment}{/* not active */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02797}02797                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02798}02798 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02799}02799                         \textcolor{comment}{/* check if there is any data to be transferred */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02800}02800                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ohci_8h_aa107abd3d5280d52a9092e907beec00e}{itd\_offset}}[0] != buf\_offset) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02801}02801                                 page\_no = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02802}02802                                 \mbox{\hyperlink{ohci_8h_aa107abd3d5280d52a9092e907beec00e}{itd\_offset}}[td\_no] = buf\_offset;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02803}02803 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02804}02804                                 \textcolor{comment}{/* get first page offset */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02805}02805                                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}}, \mbox{\hyperlink{ohci_8h_aa107abd3d5280d52a9092e907beec00e}{itd\_offset}}[0], \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02806}02806                                 \textcolor{comment}{/* get page address */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02807}02807                                 page\_addr = buf\_res.physaddr \& \string~0xFFF;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02808}02808                                 \textcolor{comment}{/* update page address */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02809}02809                                 td-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[0] \&= \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, 0xFFF);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02810}02810                                 td-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[0] |= \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, page\_addr);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02811}02811 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02812}02812                                 \textcolor{keywordflow}{for} (x = 0; x != td\_no; x++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02813}02813                                         \textcolor{comment}{/* set page number and page offset */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02814}02814                                         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = (\mbox{\hyperlink{ehci_8h_ae73b07273e6562922d9ecf507ed9fa94}{EHCI\_ITD\_SET\_PG}}(page\_no) |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02815}02815                                             (buf\_res.physaddr \& 0xFFF));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02816}02816                                         td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[x] |= \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02817}02817 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02818}02818                                         \textcolor{comment}{/* get next page offset */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02819}02819                                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ohci_8h_aa107abd3d5280d52a9092e907beec00e}{itd\_offset}}[x + 1] == buf\_offset) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02820}02820                                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02821}02821 \textcolor{comment}{                                                 * We subtract one so that}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02822}02822 \textcolor{comment}{                                                 * we don't go off the last}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02823}02823 \textcolor{comment}{                                                 * page!}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02824}02824 \textcolor{comment}{                                                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02825}02825                                                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}}, buf\_offset -\/ 1, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02826}02826                                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02827}02827                                                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}}, \mbox{\hyperlink{ohci_8h_aa107abd3d5280d52a9092e907beec00e}{itd\_offset}}[x + 1], \&buf\_res);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02828}02828                                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02829}02829 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02830}02830                                         \textcolor{comment}{/* check if we need a new page */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02831}02831                                         \textcolor{keywordflow}{if} ((buf\_res.physaddr \string^ page\_addr) \& \string~0xFFF) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02832}02832                                                 \textcolor{comment}{/* new page needed */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02833}02833                                                 page\_addr = buf\_res.physaddr \& \string~0xFFF;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02834}02834                                                 \textcolor{keywordflow}{if} (page\_no == 6) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02835}02835                                                         panic(\textcolor{stringliteral}{"{}\%s: too many pages\(\backslash\)n"{}}, \_\_FUNCTION\_\_);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02836}02836                                                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02837}02837                                                 page\_no++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02838}02838                                                 \textcolor{comment}{/* update page address */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02839}02839                                                 td-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[page\_no] \&= \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, 0xFFF);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02840}02840                                                 td-\/>\mbox{\hyperlink{structehci__itd_abbc6267c7ee140e120c0fb33a8b9b44b}{itd\_bp}}[page\_no] |= \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, page\_addr);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02841}02841                                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02842}02842                                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02843}02843                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02844}02844                         \textcolor{comment}{/* set IOC bit if we are complete */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02845}02845                         \textcolor{keywordflow}{if} (nframes == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02846}02846                                 td-\/>\mbox{\hyperlink{structehci__itd_aa2e1eb371d38d0d12afa9d950ab73ee5}{itd\_status}}[td\_no -\/ 1] |= \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, \mbox{\hyperlink{ehci_8h_a69aea2a09c6df605dae88e6aa395f6b3}{EHCI\_ITD\_IOC}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02847}02847                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02848}02848                         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(td-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02849}02849 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02850}02850                         \textcolor{keywordflow}{if} (ehcidebug > 15) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02851}02851                                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}HS-\/TD \%d\(\backslash\)n"{}}, nframes);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02852}02852                                 ehci\_dump\_itd(sc, td);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02853}02853                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02854}02854 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02855}02855                         \textcolor{comment}{/* insert TD into schedule */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02856}02856                         \mbox{\hyperlink{ehci_8c_a038b205aa738528b9d4eed732b3fa651}{EHCI\_APPEND\_HS\_TD}}(td, *pp\_last);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02857}02857                         pp\_last++;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02858}02858 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02859}02859                         td\_no = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02860}02860                         td\_last = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02861}02861                         td = td-\/>\mbox{\hyperlink{structehci__itd_a17cc87e4c504cf83a65e28b240da6966}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02862}02862                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02863}02863         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02864}02864 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02865}02865         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}} = td\_last;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02866}02866 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02867}02867 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02868}02868 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02869}\mbox{\hyperlink{ehci_8c_ab88b05db796bcf60a3334423b3811279}{02869}} \mbox{\hyperlink{ehci_8c_ab88b05db796bcf60a3334423b3811279}{ehci\_device\_isoc\_hs\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02870}02870 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02871}02871         \textcolor{comment}{/* put transfer on interrupt queue */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02872}02872         \mbox{\hyperlink{ehci_8c_abd83555480de41de55c5839f102418d5}{ehci\_transfer\_intr\_enqueue}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02873}02873 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02874}02874 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02875}02875 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{ehci_8c_a83093b23a8bd6627d8b114499c0f6408}{ehci\_device\_isoc\_hs\_methods}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02876}02876 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02877}02877         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{ehci_8c_ad3db0556e6d6f6a8f339a7f0d418a440}{ehci\_device\_isoc\_hs\_open}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02878}02878         .close = \mbox{\hyperlink{ehci_8c_a7312f5b184fe31c6ce9e79dff61ee861}{ehci\_device\_isoc\_hs\_close}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02879}02879         .enter = \mbox{\hyperlink{ehci_8c_a98fbc9d3ccafe6684801be05d94ff610}{ehci\_device\_isoc\_hs\_enter}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02880}02880         .start = \mbox{\hyperlink{ehci_8c_ab88b05db796bcf60a3334423b3811279}{ehci\_device\_isoc\_hs\_start}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02881}02881 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02882}02882 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02883}02883 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02884}02884 \textcolor{comment}{ * ehci root control support}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02885}02885 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02886}02886 \textcolor{comment}{ * Simulate a hardware hub by handling all the necessary requests.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02887}02887 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02888}02888 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02889}02889 \textcolor{keyword}{static} \textcolor{keyword}{const}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02890}\mbox{\hyperlink{ehci_8c_a8f4964b9bf96192cbc0abe53f6fb58f4}{02890}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__descriptor}{usb\_device\_descriptor}} \mbox{\hyperlink{ehci_8c_a8f4964b9bf96192cbc0abe53f6fb58f4}{ehci\_devd}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02891}02891 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02892}02892         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__descriptor}{usb\_device\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02893}02893         \mbox{\hyperlink{usb_8h_a91e8696a051fcdd76cd797fa128938a2}{UDESC\_DEVICE}},                       \textcolor{comment}{/* type */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02894}02894         \{0x00, 0x02\},                   \textcolor{comment}{/* USB version */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02895}02895         \mbox{\hyperlink{usb_8h_a3c5e5fca25f06d3b8ddc5ec932116178}{UDCLASS\_HUB}},                 \textcolor{comment}{/* class */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02896}02896         \mbox{\hyperlink{usb_8h_a0ce87986a681a89bcb413e066e007785}{UDSUBCLASS\_HUB}},                   \textcolor{comment}{/* subclass */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02897}02897         \mbox{\hyperlink{usb_8h_a7d338cb7381cbf5f996588ef21739dd0}{UDPROTO\_HSHUBSTT}},               \textcolor{comment}{/* protocol */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02898}02898         64,                             \textcolor{comment}{/* max packet */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02899}02899         \{0\}, \{0\}, \{0x00, 0x01\},         \textcolor{comment}{/* device id */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02900}02900         1, 2, 0,                        \textcolor{comment}{/* string indexes */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02901}02901         1                               \textcolor{comment}{/* \# of configurations */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02902}02902 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02903}02903 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02904}02904 \textcolor{keyword}{static} \textcolor{keyword}{const}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02905}\mbox{\hyperlink{ehci_8c_a71f871ab15ec510334ff563a8c87c34a}{02905}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__qualifier}{usb\_device\_qualifier}} \mbox{\hyperlink{ehci_8c_a71f871ab15ec510334ff563a8c87c34a}{ehci\_odevd}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02906}02906 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02907}02907         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__qualifier}{usb\_device\_qualifier}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02908}02908         \mbox{\hyperlink{usb_8h_a5ab2dc4d80db05aea0b739d0f9f66bb1}{UDESC\_DEVICE\_QUALIFIER}},           \textcolor{comment}{/* type */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02909}02909         \{0x00, 0x02\},                   \textcolor{comment}{/* USB version */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02910}02910         \mbox{\hyperlink{usb_8h_a3c5e5fca25f06d3b8ddc5ec932116178}{UDCLASS\_HUB}},                 \textcolor{comment}{/* class */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02911}02911         \mbox{\hyperlink{usb_8h_a0ce87986a681a89bcb413e066e007785}{UDSUBCLASS\_HUB}},                   \textcolor{comment}{/* subclass */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02912}02912         \mbox{\hyperlink{usb_8h_ab80f5dc89606b21b68c1081e55c7d373}{UDPROTO\_FSHUB}},                     \textcolor{comment}{/* protocol */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02913}02913         0,                              \textcolor{comment}{/* max packet */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02914}02914         0,                              \textcolor{comment}{/* \# of configurations */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02915}02915         0}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02916}02916 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02917}02917 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02918}\mbox{\hyperlink{ehci_8c_a21c393cbb34eaad219e85c1d73f0a6a0}{02918}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structehci__config__desc}{ehci\_config\_desc}} \mbox{\hyperlink{ehci_8c_a21c393cbb34eaad219e85c1d73f0a6a0}{ehci\_confd}} = \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02919}02919         .\mbox{\hyperlink{structehci__config__desc_a4d55a2ef36bf830bb1de559203acfbc1}{confd}} = \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02920}02920                 .\mbox{\hyperlink{structusb__config__descriptor_ab93f48211c037d6431326d0d46db44b3}{bLength}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config__descriptor}{usb\_config\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02921}02921                 .\mbox{\hyperlink{structusb__config__descriptor_a5fe7b158ddf2b2c752a0e9d5540ccb30}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a35d8259be2f4b9d3b278e889898a697a}{UDESC\_CONFIG}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02922}02922                 .wTotalLength[0] = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{ehci_8c_a21c393cbb34eaad219e85c1d73f0a6a0}{ehci\_confd}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02923}02923                 .\mbox{\hyperlink{structusb__config__descriptor_a60b87e4669815bc7e5728c897dae77fb}{bNumInterface}} = 1,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02924}02924                 .\mbox{\hyperlink{structusb__config__descriptor_affc7816579932817c36478f630b7b7a1}{bConfigurationValue}} = 1,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02925}02925                 .\mbox{\hyperlink{structusb__config__descriptor_af2e38326d498da74125894ea7482bed8}{iConfiguration}} = 0,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02926}02926                 .\mbox{\hyperlink{structusb__config__descriptor_a8f3926a6e43bcd315b7b2f770cdfed7e}{bmAttributes}} = \mbox{\hyperlink{usb_8h_a1a9a7ef4724e86785942f8ca612cd661}{UC\_SELF\_POWERED}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02927}02927                 .\mbox{\hyperlink{structusb__config__descriptor_aeac4fc9cf1261c3db5e17e28b48f873c}{bMaxPower}} = 0         \textcolor{comment}{/* max power */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02928}02928         \},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02929}02929         .ifcd = \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02930}02930                 .bLength = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface__descriptor}{usb\_interface\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02931}02931                 .\mbox{\hyperlink{structusb__interface__descriptor_ad4f7914ce2bc3d8830d6463a7f2989d6}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a93c15218c1fed26b097fb0b53a3ce4f7}{UDESC\_INTERFACE}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02932}02932                 .bNumEndpoints = 1,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02933}02933                 .bInterfaceClass = \mbox{\hyperlink{usb_8h_a9087453dd0a77bb9091c9ee62a3c87cc}{UICLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02934}02934                 .bInterfaceSubClass = \mbox{\hyperlink{usb_8h_a2b2ea572877c6b2bb5d2238be6554fa0}{UISUBCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02935}02935                 .bInterfaceProtocol = 0,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02936}02936         \},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02937}02937         .endpd = \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02938}02938                 .bLength = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__endpoint__descriptor}{usb\_endpoint\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02939}02939                 .\mbox{\hyperlink{structusb__endpoint__descriptor_a82be4599246c494022ea964cfddfb121}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a4b8e0317b094aec02ff237d9b4f7a202}{UDESC\_ENDPOINT}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02940}02940                 .bEndpointAddress = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}} | \mbox{\hyperlink{ehci_8c_ac1c85c866ebbef098a77326450737459}{EHCI\_INTR\_ENDPT}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02941}02941                 .bmAttributes = \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02942}02942                 .wMaxPacketSize[0] = 8, \textcolor{comment}{/* max packet (63 ports) */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02943}02943                 .bInterval = 255,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02944}02944         \},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02945}02945 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02946}02946 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02947}02947 \textcolor{keyword}{static} \textcolor{keyword}{const}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02948}\mbox{\hyperlink{ehci_8c_a74719fdcb8d8ac7fe948bacc86596da0}{02948}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hub__descriptor}{usb\_hub\_descriptor}} \mbox{\hyperlink{ehci_8c_a74719fdcb8d8ac7fe948bacc86596da0}{ehci\_hubd}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02949}02949 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02950}02950         .\mbox{\hyperlink{structusb__hub__descriptor_a73411ea92746003e9b0d3aa3a2e29f9d}{bDescLength}} = 0,            \textcolor{comment}{/* dynamic length */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02951}02951         .bDescriptorType = \mbox{\hyperlink{usb_8h_a61e1d91f3367e2a9928acbd3a33b1385}{UDESC\_HUB}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02952}02952 \};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02953}02953 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02954}02954 uint16\_t}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02955}\mbox{\hyperlink{ehci_8c_aeb866c18c344370d8adc24958b873828}{02955}} \mbox{\hyperlink{ehci_8c_aeb866c18c344370d8adc24958b873828}{ehci\_get\_port\_speed\_portsc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structehci__softc}{ehci\_softc}} *sc, uint16\_t index)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02956}02956 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02957}02957         uint32\_t v;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02958}02958 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02959}02959         v = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a682de74a3ce1559d704aac0d01a876ca}{EHCI\_PORTSC}}(index));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02960}02960         v = (v >> \mbox{\hyperlink{ehcireg_8h_a5b65b35a8e15a7f7be44d7e4544e24b4}{EHCI\_PORTSC\_PSPD\_SHIFT}}) \& \mbox{\hyperlink{ehcireg_8h_a22c94faf83cc25b8dd9f64342d2ff8e1}{EHCI\_PORTSC\_PSPD\_MASK}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02961}02961 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02962}02962         \textcolor{keywordflow}{if} (v == \mbox{\hyperlink{ehcireg_8h_a16be6c6a0a921f851652dd27a73160a5}{EHCI\_PORT\_SPEED\_HIGH}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02963}02963                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb_8h_a97ca7a7e2da62abe5d0257e822b0a649}{UPS\_HIGH\_SPEED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02964}02964         \textcolor{keywordflow}{if} (v == \mbox{\hyperlink{ehcireg_8h_acb31a5216f00c3bbaa3e701bd9544680}{EHCI\_PORT\_SPEED\_LOW}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02965}02965                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb_8h_a4f5a2b9be2d8cddf4b83879211db69b9}{UPS\_LOW\_SPEED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02966}02966         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02967}02967 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02968}02968 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02969}02969 uint16\_t}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02970}\mbox{\hyperlink{ehci_8c_a3f2d04c7ac9a45f633fade841d4a6880}{02970}} \mbox{\hyperlink{ehci_8c_a3f2d04c7ac9a45f633fade841d4a6880}{ehci\_get\_port\_speed\_hostc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structehci__softc}{ehci\_softc}} *sc, uint16\_t index)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02971}02971 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02972}02972         uint32\_t v;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02973}02973 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02974}02974         v = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a2dc1c82621c727197f179dd46a54ee41}{EHCI\_HOSTC}}(index));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02975}02975         v = (v >> \mbox{\hyperlink{ehcireg_8h_a82acd7372895cd92d79eacfb1764975e}{EHCI\_HOSTC\_PSPD\_SHIFT}}) \& \mbox{\hyperlink{ehcireg_8h_a24f3cd42480013538a0b1788f0dcacc0}{EHCI\_HOSTC\_PSPD\_MASK}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02976}02976 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02977}02977         \textcolor{keywordflow}{if} (v == \mbox{\hyperlink{ehcireg_8h_a16be6c6a0a921f851652dd27a73160a5}{EHCI\_PORT\_SPEED\_HIGH}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02978}02978                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb_8h_a97ca7a7e2da62abe5d0257e822b0a649}{UPS\_HIGH\_SPEED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02979}02979         \textcolor{keywordflow}{if} (v == \mbox{\hyperlink{ehcireg_8h_acb31a5216f00c3bbaa3e701bd9544680}{EHCI\_PORT\_SPEED\_LOW}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02980}02980                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb_8h_a4f5a2b9be2d8cddf4b83879211db69b9}{UPS\_LOW\_SPEED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02981}02981         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02982}02982 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02983}02983 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02984}02984 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02985}\mbox{\hyperlink{ehci_8c_a434e6cab02eb5e3b99d831bc675a1d6b}{02985}} \mbox{\hyperlink{ehci_8c_a434e6cab02eb5e3b99d831bc675a1d6b}{ehci\_disown}}(\mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc, uint16\_t index, uint8\_t lowspeed)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02986}02986 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02987}02987         uint32\_t port;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02988}02988         uint32\_t v;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02989}02989 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02990}02990         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}index=\%d lowspeed=\%d\(\backslash\)n"{}}, index, lowspeed);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02991}02991 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02992}02992         port = \mbox{\hyperlink{ehcireg_8h_a682de74a3ce1559d704aac0d01a876ca}{EHCI\_PORTSC}}(index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02993}02993         v = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, port) \& \string~EHCI\_PS\_CLEAR;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02994}02994         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a2557f4208754acea1ae21a63707eb1f9}{EHCI\_PS\_PO}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02995}02995 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02996}02996 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02997}02997 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02998}\mbox{\hyperlink{ehci_8c_a49be424a8299b8ceeef18f214925cec5}{02998}} \mbox{\hyperlink{ehci_8c_a49be424a8299b8ceeef18f214925cec5}{ehci\_roothub\_exec}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l02999}02999     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{const} \textcolor{keywordtype}{void} **\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}}, uint16\_t *plength)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03000}03000 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03001}03001         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03002}03002         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *str\_ptr;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03003}03003         \textcolor{keyword}{const} \textcolor{keywordtype}{void} *ptr;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03004}03004         uint32\_t port;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03005}03005         uint32\_t v;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03006}03006         uint16\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03007}03007         uint16\_t i;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03008}03008         uint16\_t value;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03009}03009         uint16\_t index;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03010}03010         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03011}03011 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03012}03012         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03013}03013 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03014}03014         \textcolor{comment}{/* buffer reset */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03015}03015         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03016}03016         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03017}03017         err = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03018}03018 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03019}03019         value = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03020}03020         index = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wIndex);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03021}03021 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03022}03022         DPRINTFN(3, \textcolor{stringliteral}{"{}type=0x\%02x request=0x\%02x wLen=0x\%04x "{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03023}03023             \textcolor{stringliteral}{"{}wValue=0x\%04x wIndex=0x\%04x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03024}03024             \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType, \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03025}03025             \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wLength), value, index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03026}03026 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03027}03027 \textcolor{preprocessor}{\#define C(x,y) ((x) | ((y) << 8))}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03028}03028         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest, \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03029}03029         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}, \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03030}03030         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}, \mbox{\hyperlink{usb_8h_a1c18aa69d1e986a87fcdbfbb624c954f}{UT\_WRITE\_INTERFACE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03031}03031         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}, \mbox{\hyperlink{usb_8h_ab592eead7baaa45331e0e4768c0259dd}{UT\_WRITE\_ENDPOINT}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03032}03032                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03033}03033 \textcolor{comment}{                 * DEVICE\_REMOTE\_WAKEUP and ENDPOINT\_HALT are no-\/ops}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03034}03034 \textcolor{comment}{                 * for the integrated root hub.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03035}03035 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03036}03036                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03037}03037         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a27856773c79338192e9fc272942ffb2a}{UR\_GET\_CONFIG}}, \mbox{\hyperlink{usb_8h_a760afaa5e388cb04e742b564e4c509f3}{UT\_READ\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03038}03038                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03039}03039                 sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ac5058a343d504a453d1c5ef0243dfea1}{temp}}[0] = sc-\/>\mbox{\hyperlink{structehci__softc_a56342ea0fed9d069f69696f16e9d1f55}{sc\_conf}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03040}03040                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03041}03041         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_afe0147b1f88f094b26142d372647bd01}{UR\_GET\_DESCRIPTOR}}, \mbox{\hyperlink{usb_8h_a760afaa5e388cb04e742b564e4c509f3}{UT\_READ\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03042}03042                 \textcolor{keywordflow}{switch} (value >> 8) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03043}03043                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a91e8696a051fcdd76cd797fa128938a2}{UDESC\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03044}03044                         \textcolor{keywordflow}{if} ((value \& 0xff) != 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03045}03045                                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03046}03046                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03047}03047                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03048}03048                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{ehci_8c_a8f4964b9bf96192cbc0abe53f6fb58f4}{ehci\_devd}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03049}03049                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{ehci_8c_a8f4964b9bf96192cbc0abe53f6fb58f4}{ehci\_devd}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03050}03050                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03051}03051                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03052}03052 \textcolor{comment}{                         * We can't really operate at another speed,}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03053}03053 \textcolor{comment}{                         * but the specification says we need this}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03054}03054 \textcolor{comment}{                         * descriptor:}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03055}03055 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03056}03056                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a5ab2dc4d80db05aea0b739d0f9f66bb1}{UDESC\_DEVICE\_QUALIFIER}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03057}03057                         \textcolor{keywordflow}{if} ((value \& 0xff) != 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03058}03058                                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03059}03059                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03060}03060                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03061}03061                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{ehci_8c_a71f871ab15ec510334ff563a8c87c34a}{ehci\_odevd}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03062}03062                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{ehci_8c_a71f871ab15ec510334ff563a8c87c34a}{ehci\_odevd}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03063}03063                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03064}03064 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03065}03065                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a35d8259be2f4b9d3b278e889898a697a}{UDESC\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03066}03066                         \textcolor{keywordflow}{if} ((value \& 0xff) != 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03067}03067                                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03068}03068                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03069}03069                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03070}03070                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{ehci_8c_a21c393cbb34eaad219e85c1d73f0a6a0}{ehci\_confd}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03071}03071                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{ehci_8c_a21c393cbb34eaad219e85c1d73f0a6a0}{ehci\_confd}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03072}03072                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03073}03073 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03074}03074                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6b58bb576493debe416ae239bb38267c}{UDESC\_STRING}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03075}03075                         \textcolor{keywordflow}{switch} (value \& 0xff) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03076}03076                         \textcolor{keywordflow}{case} 0: \textcolor{comment}{/* Language table */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03077}03077                                 str\_ptr = \textcolor{stringliteral}{"{}\(\backslash\)001"{}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03078}03078                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03079}03079 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03080}03080                         \textcolor{keywordflow}{case} 1: \textcolor{comment}{/* Vendor */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03081}03081                                 str\_ptr = sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03082}03082                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03083}03083 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03084}03084                         \textcolor{keywordflow}{case} 2: \textcolor{comment}{/* Product */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03085}03085                                 str\_ptr = \textcolor{stringliteral}{"{}EHCI root HUB"{}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03086}03086                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03087}03087 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03088}03088                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03089}03089                                 str\_ptr = \textcolor{stringliteral}{"{}"{}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03090}03090                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03091}03091                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03092}03092 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03093}03093                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \mbox{\hyperlink{usb__util_8c_a7e0b76fa91e891e0439d03afad4fc889}{usb\_make\_str\_desc}}(}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03094}03094                             sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ac5058a343d504a453d1c5ef0243dfea1}{temp}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03095}03095                             \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ac5058a343d504a453d1c5ef0243dfea1}{temp}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03096}03096                             str\_ptr);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03097}03097                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03098}03098                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03099}03099                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03100}03100                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03101}03101                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03102}03102                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03103}03103         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a3654eeeab796d0863e7527e3aac772fe}{UR\_GET\_INTERFACE}}, \mbox{\hyperlink{usb_8h_afc6a17fce8bdb62291274b83223eea65}{UT\_READ\_INTERFACE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03104}03104                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03105}03105                 sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ac5058a343d504a453d1c5ef0243dfea1}{temp}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03106}03106                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03107}03107         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}, \mbox{\hyperlink{usb_8h_a760afaa5e388cb04e742b564e4c509f3}{UT\_READ\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03108}03108                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 2;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03109}03109                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_a2f4f339c46fec60f4f58c275a891ec8d}{stat}}.\mbox{\hyperlink{structusb__status_aa56f46e2ca05aa6427ed3e02b07225ff}{wStatus}}, \mbox{\hyperlink{usb_8h_a5df434c22d261f2fcdf9c54080ad0f48}{UDS\_SELF\_POWERED}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03110}03110                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03111}03111         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}, \mbox{\hyperlink{usb_8h_afc6a17fce8bdb62291274b83223eea65}{UT\_READ\_INTERFACE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03112}03112         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}, \mbox{\hyperlink{usb_8h_acfdcbf0400459ac3c17c15f1ccc3794d}{UT\_READ\_ENDPOINT}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03113}03113                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 2;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03114}03114                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_a2f4f339c46fec60f4f58c275a891ec8d}{stat}}.\mbox{\hyperlink{structusb__status_aa56f46e2ca05aa6427ed3e02b07225ff}{wStatus}}, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03115}03115                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03116}03116         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a2e5fb48757cb795a44b99af832d6cd7d}{UR\_SET\_ADDRESS}}, \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03117}03117                 \textcolor{keywordflow}{if} (value >= \mbox{\hyperlink{ehci_8h_accffc95758a4a2f4585ddaef5e522a28}{EHCI\_MAX\_DEVICES}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03118}03118                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03119}03119                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03120}03120                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03121}03121                 sc-\/>\mbox{\hyperlink{structehci__softc_afcf73f93e765e4e0edeea81412c384ce}{sc\_addr}} = value;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03122}03122                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03123}03123         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a03842765b1d21adb3eb41b3d706ec1aa}{UR\_SET\_CONFIG}}, \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03124}03124                 \textcolor{keywordflow}{if} ((value != 0) \&\& (value != 1)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03125}03125                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03126}03126                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03127}03127                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03128}03128                 sc-\/>\mbox{\hyperlink{structehci__softc_a56342ea0fed9d069f69696f16e9d1f55}{sc\_conf}} = value;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03129}03129                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03130}03130         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a1e9409609a7c66d1d575c53d5b2b39d9}{UR\_SET\_DESCRIPTOR}}, \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03131}03131                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03132}03132         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}, \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03133}03133         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}, \mbox{\hyperlink{usb_8h_a1c18aa69d1e986a87fcdbfbb624c954f}{UT\_WRITE\_INTERFACE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03134}03134         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}, \mbox{\hyperlink{usb_8h_ab592eead7baaa45331e0e4768c0259dd}{UT\_WRITE\_ENDPOINT}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03135}03135                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03136}03136                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03137}03137         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_ac158866f6b7f31946ace0216225b79cb}{UR\_SET\_INTERFACE}}, \mbox{\hyperlink{usb_8h_a1c18aa69d1e986a87fcdbfbb624c954f}{UT\_WRITE\_INTERFACE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03138}03138                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03139}03139         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a744ab8acdd49be39deee38a2e4c61fae}{UR\_SYNCH\_FRAME}}, \mbox{\hyperlink{usb_8h_ab592eead7baaa45331e0e4768c0259dd}{UT\_WRITE\_ENDPOINT}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03140}03140                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03141}03141                 \textcolor{comment}{/* Hub requests */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03142}03142         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}, \mbox{\hyperlink{usb_8h_a2e2f4f55979f2bd987385ecca0deb448}{UT\_WRITE\_CLASS\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03143}03143                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03144}03144         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}, \mbox{\hyperlink{usb_8h_a2b0da1f1f369841fec9c55cf4df6888b}{UT\_WRITE\_CLASS\_OTHER}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03145}03145                 DPRINTFN(9, \textcolor{stringliteral}{"{}UR\_CLEAR\_PORT\_FEATURE\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03146}03146 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03147}03147                 \textcolor{keywordflow}{if} ((index < 1) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03148}03148                     (index > sc-\/>\mbox{\hyperlink{structehci__softc_a446d88d1433cc2cbd34fd98091ad312d}{sc\_noport}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03149}03149                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03150}03150                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03151}03151                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03152}03152                 port = \mbox{\hyperlink{ehcireg_8h_a682de74a3ce1559d704aac0d01a876ca}{EHCI\_PORTSC}}(index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03153}03153                 v = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, port) \& \string~EHCI\_PS\_CLEAR;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03154}03154                 \textcolor{keywordflow}{switch} (value) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03155}03155                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a8fa7a9a0c538b3c5c683f530f58d7b11}{UHF\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03156}03156                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v \& \string~\mbox{\hyperlink{ehcireg_8h_af62c297fe47abd2944b2c7eb8f33a5f2}{EHCI\_PS\_PE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03157}03157                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03158}03158                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df9599557522c7163bdcb13c9f4095c}{UHF\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03159}03159                         \textcolor{keywordflow}{if} ((v \& \mbox{\hyperlink{ehcireg_8h_a0de921642d380b72595b8349bccf6b51}{EHCI\_PS\_SUSP}}) \&\& (!(v \& \mbox{\hyperlink{ehcireg_8h_a8c7bf633be4a3f004c2642e1701ef4a3}{EHCI\_PS\_FPR}}))) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03160}03160                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03161}03161 \textcolor{comment}{                                 * waking up a High Speed device is rather}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03162}03162 \textcolor{comment}{                                 * complicated if}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03163}03163 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03164}03164                                 \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a8c7bf633be4a3f004c2642e1701ef4a3}{EHCI\_PS\_FPR}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03165}03165                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03166}03166                         \textcolor{comment}{/* wait 20ms for resume sequence to complete */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03167}03167                         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}}, hz / 50);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03168}03168 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03169}03169                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v \& \string~(\mbox{\hyperlink{ehcireg_8h_a0de921642d380b72595b8349bccf6b51}{EHCI\_PS\_SUSP}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03170}03170                             \mbox{\hyperlink{ehcireg_8h_a8c7bf633be4a3f004c2642e1701ef4a3}{EHCI\_PS\_FPR}} | (3 << 10) \textcolor{comment}{/* High Speed */} ));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03171}03171 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03172}03172                         \textcolor{comment}{/* 4ms settle time */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03173}03173                         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}}, hz / 250);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03174}03174                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03175}03175                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a25f7d33df63b7439eb79041effad57f8}{UHF\_PORT\_POWER}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03176}03176                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v \& \string~\mbox{\hyperlink{ehcireg_8h_ab77ba71088d9d7b7fe06376ffc6734b4}{EHCI\_PS\_PP}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03177}03177                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03178}03178                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6027a0c92cd4a7619825f6924b44b3fd}{UHF\_PORT\_TEST}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03179}03179                         DPRINTFN(3, \textcolor{stringliteral}{"{}clear port test "{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03180}03180                             \textcolor{stringliteral}{"{}\%d\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03181}03181                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03182}03182                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_acef0673348b3a416db2e1c3c514b79cb}{UHF\_PORT\_INDICATOR}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03183}03183                         DPRINTFN(3, \textcolor{stringliteral}{"{}clear port ind "{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03184}03184                             \textcolor{stringliteral}{"{}\%d\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03185}03185                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v \& \string~\mbox{\hyperlink{ehcireg_8h_a86c6d515488bd7a439ec3b3edcf6f553}{EHCI\_PS\_PIC}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03186}03186                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03187}03187                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afe4efdc37762fbdffef921a8ae17e975}{UHF\_C\_PORT\_CONNECTION}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03188}03188                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a6a6f8d009860b4eb00d35496d27d820e}{EHCI\_PS\_CSC}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03189}03189                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03190}03190                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aed1a43dc5a9b1f893ef9b7a4ce0ed279}{UHF\_C\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03191}03191                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a4808ea3cff6855c82f63d2213a1de08c}{EHCI\_PS\_PEC}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03192}03192                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03193}03193                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a495feecc17b28cb813521e342360d414}{UHF\_C\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03194}03194                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a0de921642d380b72595b8349bccf6b51}{EHCI\_PS\_SUSP}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03195}03195                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03196}03196                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df63ab5c3f9e5715c428f42e7309595}{UHF\_C\_PORT\_OVER\_CURRENT}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03197}03197                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a3ad4cb576145078e8c60b810bac1356f}{EHCI\_PS\_OCC}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03198}03198                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03199}03199                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ad0f9e88acdd8f7a6e466e9d3ede9b392}{UHF\_C\_PORT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03200}03200                         sc-\/>\mbox{\hyperlink{structehci__softc_af654ee3400c7cf836953fab23b9d2bcd}{sc\_isreset}} = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03201}03201                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03202}03202                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03203}03203                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03204}03204                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03205}03205                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03206}03206                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03207}03207         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_afe0147b1f88f094b26142d372647bd01}{UR\_GET\_DESCRIPTOR}}, \mbox{\hyperlink{usb_8h_ab6456f1ff04af01cc72ae7aa754cd45f}{UT\_READ\_CLASS\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03208}03208                 \textcolor{keywordflow}{if} ((value \& 0xff) != 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03209}03209                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03210}03210                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03211}03211                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03212}03212                 v = \mbox{\hyperlink{ehci_8h_aca8562aa9c2b4bfcc55f66c00c0c1110}{EREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a04e7378999a0b9facc9cc3f616eb6858}{EHCI\_HCSPARAMS}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03213}03213 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03214}03214                 sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad4c82247fe6bf0847d4f2a478132f982}{hubd}} = \mbox{\hyperlink{ehci_8c_a74719fdcb8d8ac7fe948bacc86596da0}{ehci\_hubd}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03215}03215                 sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad4c82247fe6bf0847d4f2a478132f982}{hubd}}.\mbox{\hyperlink{structusb__hub__descriptor_a6f95185ae8b1a5e0b961678504456889}{bNbrPorts}} = sc-\/>\mbox{\hyperlink{structehci__softc_a446d88d1433cc2cbd34fd98091ad312d}{sc\_noport}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03216}03216 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03217}03217                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehcireg_8h_a8793cb2ca73667e71fbf9e00cceb786c}{EHCI\_HCS\_PPC}}(v))}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03218}03218                         i = \mbox{\hyperlink{usb_8h_a0c6c49f6a5c7cefac02b1cfff17e30a8}{UHD\_PWR\_INDIVIDUAL}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03219}03219                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03220}03220                         i = \mbox{\hyperlink{usb_8h_ae376b1b1d3d165c2d208854983d2139d}{UHD\_PWR\_NO\_SWITCH}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03221}03221 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03222}03222                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehcireg_8h_abb0175835e1fc3bbda2bb09c24c91f67}{EHCI\_HCS\_P\_INDICATOR}}(v))}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03223}03223                         i |= \mbox{\hyperlink{usb_8h_ae48ece4a49b4d6d81356c01ee9c793c3}{UHD\_PORT\_IND}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03224}03224 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03225}03225                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad4c82247fe6bf0847d4f2a478132f982}{hubd}}.\mbox{\hyperlink{structusb__hub__descriptor_a2cff89f8777513bc1b3a98dee6b75a57}{wHubCharacteristics}}, i);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03226}03226                 \textcolor{comment}{/* XXX can't find out? */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03227}03227                 sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad4c82247fe6bf0847d4f2a478132f982}{hubd}}.\mbox{\hyperlink{structusb__hub__descriptor_a804c2a30cdf87ef0d1bd87ec7008030d}{bPwrOn2PwrGood}} = 200;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03228}03228                 \textcolor{comment}{/* XXX don't know if ports are removable or not */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03229}03229                 sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad4c82247fe6bf0847d4f2a478132f982}{hubd}}.\mbox{\hyperlink{structusb__hub__descriptor_a73411ea92746003e9b0d3aa3a2e29f9d}{bDescLength}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03230}03230                     8 + ((sc-\/>\mbox{\hyperlink{structehci__softc_a446d88d1433cc2cbd34fd98091ad312d}{sc\_noport}} + 7) / 8);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03231}03231                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad4c82247fe6bf0847d4f2a478132f982}{hubd}}.\mbox{\hyperlink{structusb__hub__descriptor_a73411ea92746003e9b0d3aa3a2e29f9d}{bDescLength}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03232}03232                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03233}03233         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}, \mbox{\hyperlink{usb_8h_ab6456f1ff04af01cc72ae7aa754cd45f}{UT\_READ\_CLASS\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03234}03234                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 16;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03235}03235                 memset(sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ac5058a343d504a453d1c5ef0243dfea1}{temp}}, 0, 16);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03236}03236                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03237}03237         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}, \mbox{\hyperlink{usb_8h_ac619fe4cc188166d4001c4b75365154c}{UT\_READ\_CLASS\_OTHER}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03238}03238                 DPRINTFN(9, \textcolor{stringliteral}{"{}get port status i=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03239}03239                     index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03240}03240                 \textcolor{keywordflow}{if} ((index < 1) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03241}03241                     (index > sc-\/>\mbox{\hyperlink{structehci__softc_a446d88d1433cc2cbd34fd98091ad312d}{sc\_noport}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03242}03242                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03243}03243                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03244}03244                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03245}03245                 v = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a682de74a3ce1559d704aac0d01a876ca}{EHCI\_PORTSC}}(index));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03246}03246                 DPRINTFN(9, \textcolor{stringliteral}{"{}port status=0x\%04x\(\backslash\)n"{}}, v);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03247}03247                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} \& \mbox{\hyperlink{ehci_8h_ac31d087886e6d19027a3f08d44d7f579}{EHCI\_SCFLG\_TT}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03248}03248                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_af8ff650e5547c6ca1f6de7a1d2b86693}{sc\_vendor\_get\_port\_speed}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03249}03249                                 i = sc-\/>\mbox{\hyperlink{structehci__softc_af8ff650e5547c6ca1f6de7a1d2b86693}{sc\_vendor\_get\_port\_speed}}(sc, index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03250}03250                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03251}03251                                 device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03252}03252                                     \textcolor{stringliteral}{"{}EHCI\_SCFLG\_TT quirk is set but "{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03253}03253                                     \textcolor{stringliteral}{"{}sc\_vendor\_get\_hub\_speed() is NULL\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03254}03254                                 i = \mbox{\hyperlink{usb_8h_a97ca7a7e2da62abe5d0257e822b0a649}{UPS\_HIGH\_SPEED}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03255}03255                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03256}03256                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03257}03257                         i = \mbox{\hyperlink{usb_8h_a97ca7a7e2da62abe5d0257e822b0a649}{UPS\_HIGH\_SPEED}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03258}03258                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03259}03259                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_a5bed9976ae7729be292de5b9ff64895b}{EHCI\_PS\_CS}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03260}03260                         i |= \mbox{\hyperlink{usb_8h_ae763504258270b68d4bfe033088208a5}{UPS\_CURRENT\_CONNECT\_STATUS}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03261}03261                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_af62c297fe47abd2944b2c7eb8f33a5f2}{EHCI\_PS\_PE}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03262}03262                         i |= \mbox{\hyperlink{usb_8h_aade8d9406d7a4acd137a942f3c830a23}{UPS\_PORT\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03263}03263                 \textcolor{keywordflow}{if} ((v \& \mbox{\hyperlink{ehcireg_8h_a0de921642d380b72595b8349bccf6b51}{EHCI\_PS\_SUSP}}) \&\& !(v \& \mbox{\hyperlink{ehcireg_8h_a8c7bf633be4a3f004c2642e1701ef4a3}{EHCI\_PS\_FPR}}))}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03264}03264                         i |= \mbox{\hyperlink{usb_8h_afbcf31f5c8d04b7ea8da8a819675eeef}{UPS\_SUSPEND}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03265}03265                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_a8d3a24591eaee08945268d91a09f73bb}{EHCI\_PS\_OCA}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03266}03266                         i |= \mbox{\hyperlink{usb_8h_af92351302f2c9bf0e72f370df430c9b3}{UPS\_OVERCURRENT\_INDICATOR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03267}03267                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_a60c4e20e8c833025d802cc30936df443}{EHCI\_PS\_PR}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03268}03268                         i |= \mbox{\hyperlink{usb_8h_afeb64657e3f788cb3671cf851cba2ee0}{UPS\_RESET}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03269}03269                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_ab77ba71088d9d7b7fe06376ffc6734b4}{EHCI\_PS\_PP}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03270}03270                         i |= \mbox{\hyperlink{usb_8h_a615d6c17b8159bf4e146f69a1aa36bbc}{UPS\_PORT\_POWER}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03271}03271                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad78efae752a69bdbb3f7552cc5a3c1d1}{ps}}.\mbox{\hyperlink{structusb__port__status_a2b6feb27a59da0abd9e91a4ca8f55866}{wPortStatus}}, i);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03272}03272                 i = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03273}03273                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_a6a6f8d009860b4eb00d35496d27d820e}{EHCI\_PS\_CSC}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03274}03274                         i |= \mbox{\hyperlink{usb_8h_ae67d894f69d3af508dc6696e73b980ee}{UPS\_C\_CONNECT\_STATUS}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03275}03275                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_a4808ea3cff6855c82f63d2213a1de08c}{EHCI\_PS\_PEC}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03276}03276                         i |= \mbox{\hyperlink{usb_8h_a2f330019ba8dba665520e7f7986f090a}{UPS\_C\_PORT\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03277}03277                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_a3ad4cb576145078e8c60b810bac1356f}{EHCI\_PS\_OCC}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03278}03278                         i |= \mbox{\hyperlink{usb_8h_a3c0d918475bac92ae0874f094d964d34}{UPS\_C\_OVERCURRENT\_INDICATOR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03279}03279                 \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_a8c7bf633be4a3f004c2642e1701ef4a3}{EHCI\_PS\_FPR}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03280}03280                         i |= \mbox{\hyperlink{usb_8h_ae2b5e8f919ad7ab52144bbc76128fbc3}{UPS\_C\_SUSPEND}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03281}03281                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_af654ee3400c7cf836953fab23b9d2bcd}{sc\_isreset}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03282}03282                         i |= \mbox{\hyperlink{usb_8h_a0a8fde772b3e3ae01fb3be9c998e3c3a}{UPS\_C\_PORT\_RESET}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03283}03283                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad78efae752a69bdbb3f7552cc5a3c1d1}{ps}}.\mbox{\hyperlink{structusb__port__status_a5651385a11bdb3346496b276d1053de8}{wPortChange}}, i);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03284}03284                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structehci__softc_af4eb924495ab78bd6723fe4f988f32a8}{sc\_hub\_desc}}.\mbox{\hyperlink{unionehci__hub__desc_ad78efae752a69bdbb3f7552cc5a3c1d1}{ps}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03285}03285                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03286}03286         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a1e9409609a7c66d1d575c53d5b2b39d9}{UR\_SET\_DESCRIPTOR}}, \mbox{\hyperlink{usb_8h_a2e2f4f55979f2bd987385ecca0deb448}{UT\_WRITE\_CLASS\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03287}03287                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03288}03288                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03289}03289         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}, \mbox{\hyperlink{usb_8h_a2e2f4f55979f2bd987385ecca0deb448}{UT\_WRITE\_CLASS\_DEVICE}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03290}03290                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03291}03291         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}, \mbox{\hyperlink{usb_8h_a2b0da1f1f369841fec9c55cf4df6888b}{UT\_WRITE\_CLASS\_OTHER}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03292}03292                 \textcolor{keywordflow}{if} ((index < 1) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03293}03293                     (index > sc-\/>\mbox{\hyperlink{structehci__softc_a446d88d1433cc2cbd34fd98091ad312d}{sc\_noport}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03294}03294                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03295}03295                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03296}03296                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03297}03297                 port = \mbox{\hyperlink{ehcireg_8h_a682de74a3ce1559d704aac0d01a876ca}{EHCI\_PORTSC}}(index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03298}03298                 v = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, port) \& \string~EHCI\_PS\_CLEAR;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03299}03299                 \textcolor{keywordflow}{switch} (value) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03300}03300                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a8fa7a9a0c538b3c5c683f530f58d7b11}{UHF\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03301}03301                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_af62c297fe47abd2944b2c7eb8f33a5f2}{EHCI\_PS\_PE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03302}03302                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03303}03303                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df9599557522c7163bdcb13c9f4095c}{UHF\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03304}03304                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a0de921642d380b72595b8349bccf6b51}{EHCI\_PS\_SUSP}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03305}03305                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03306}03306                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ab7d2ba22c960f8009974c75a79739380}{UHF\_PORT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03307}03307                         DPRINTFN(6, \textcolor{stringliteral}{"{}reset port \%d\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03308}03308 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03309}03309                         \textcolor{keywordflow}{if} (ehcinohighspeed) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03310}03310                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03311}03311 \textcolor{comment}{                                 * Connect USB device to companion}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03312}03312 \textcolor{comment}{                                 * controller.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03313}03313 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03314}03314                                 \mbox{\hyperlink{ehci_8c_a434e6cab02eb5e3b99d831bc675a1d6b}{ehci\_disown}}(sc, index, 1);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03315}03315                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03316}03316                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03317}03317 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03318}03318                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehcireg_8h_aa0a70888632760e44cce20a56471bc9d}{EHCI\_PS\_IS\_LOWSPEED}}(v) \&\&}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03319}03319                             (sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} \& \mbox{\hyperlink{ehci_8h_ac31d087886e6d19027a3f08d44d7f579}{EHCI\_SCFLG\_TT}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03320}03320                                 \textcolor{comment}{/* Low speed device, give up ownership. */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03321}03321                                 \mbox{\hyperlink{ehci_8c_a434e6cab02eb5e3b99d831bc675a1d6b}{ehci\_disown}}(sc, index, 1);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03322}03322                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03323}03323                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03324}03324                         \textcolor{comment}{/* Start reset sequence. */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03325}03325                         v \&= \string~(\mbox{\hyperlink{ehcireg_8h_af62c297fe47abd2944b2c7eb8f33a5f2}{EHCI\_PS\_PE}} | \mbox{\hyperlink{ehcireg_8h_a60c4e20e8c833025d802cc30936df443}{EHCI\_PS\_PR}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03326}03326                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a60c4e20e8c833025d802cc30936df443}{EHCI\_PS\_PR}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03327}03327 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03328}03328                         \textcolor{comment}{/* Wait for reset to complete. */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03329}03329                         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03330}03330                             \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(\mbox{\hyperlink{usb__debug_8h_afe58e3fdfdb70d6a78dde4d74580ddb2}{usb\_port\_root\_reset\_delay}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03331}03331 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03332}03332                         \textcolor{comment}{/* Terminate reset sequence. */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03333}03333                         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} \& \mbox{\hyperlink{ehci_8h_a8632cbeff2acad776a6b4753d1d1faaa}{EHCI\_SCFLG\_NORESTERM}}))}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03334}03334                                 \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03335}03335 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03336}03336                         \textcolor{comment}{/* Wait for HC to complete reset. */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03337}03337                         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03338}03338                             \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(\mbox{\hyperlink{ehcireg_8h_a67127e9f6c61b20ce242cd6727c83ff8}{EHCI\_PORT\_RESET\_COMPLETE}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03339}03339 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03340}03340                         v = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, port);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03341}03341                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}ehci after reset, status=0x\%08x\(\backslash\)n"{}}, v);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03342}03342                         \textcolor{keywordflow}{if} (v \& \mbox{\hyperlink{ehcireg_8h_a60c4e20e8c833025d802cc30936df443}{EHCI\_PS\_PR}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03343}03343                                 device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03344}03344                                     \textcolor{stringliteral}{"{}port reset timeout\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03345}03345                                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945aeb31baaa7bf416e200f2a0d4ece60820}{USB\_ERR\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03346}03346                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03347}03347                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03348}03348                         \textcolor{keywordflow}{if} (!(v \& \mbox{\hyperlink{ehcireg_8h_af62c297fe47abd2944b2c7eb8f33a5f2}{EHCI\_PS\_PE}}) \&\&}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03349}03349                             (sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} \& \mbox{\hyperlink{ehci_8h_ac31d087886e6d19027a3f08d44d7f579}{EHCI\_SCFLG\_TT}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03350}03350                                 \textcolor{comment}{/* Not a high speed device, give up ownership.*/}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03351}03351                                 \mbox{\hyperlink{ehci_8c_a434e6cab02eb5e3b99d831bc675a1d6b}{ehci\_disown}}(sc, index, 0);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03352}03352                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03353}03353                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03354}03354                         sc-\/>\mbox{\hyperlink{structehci__softc_af654ee3400c7cf836953fab23b9d2bcd}{sc\_isreset}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03355}03355                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}ehci port \%d reset, status = 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03356}03356                             index, v);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03357}03357                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03358}03358 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03359}03359                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a25f7d33df63b7439eb79041effad57f8}{UHF\_PORT\_POWER}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03360}03360                         DPRINTFN(3, \textcolor{stringliteral}{"{}set port power \%d\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03361}03361                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_ab77ba71088d9d7b7fe06376ffc6734b4}{EHCI\_PS\_PP}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03362}03362                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03363}03363 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03364}03364                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6027a0c92cd4a7619825f6924b44b3fd}{UHF\_PORT\_TEST}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03365}03365                         DPRINTFN(3, \textcolor{stringliteral}{"{}set port test \%d\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03366}03366                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03367}03367 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03368}03368                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_acef0673348b3a416db2e1c3c514b79cb}{UHF\_PORT\_INDICATOR}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03369}03369                         DPRINTFN(3, \textcolor{stringliteral}{"{}set port ind \%d\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03370}03370                         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, port, v | \mbox{\hyperlink{ehcireg_8h_a86c6d515488bd7a439ec3b3edcf6f553}{EHCI\_PS\_PIC}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03371}03371                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03372}03372 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03373}03373                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03374}03374                         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03375}03375                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03376}03376                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03377}03377                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03378}03378         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a44d4b0ff5d9dfa1f511a77a5c02d3d45}{UR\_CLEAR\_TT\_BUFFER}}, \mbox{\hyperlink{usb_8h_a2b0da1f1f369841fec9c55cf4df6888b}{UT\_WRITE\_CLASS\_OTHER}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03379}03379         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a98706aa73be778406ec64d7a2c3f2c68}{UR\_RESET\_TT}}, \mbox{\hyperlink{usb_8h_a2b0da1f1f369841fec9c55cf4df6888b}{UT\_WRITE\_CLASS\_OTHER}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03380}03380         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a82661d7f0b0812c9668c22cf1905b940}{UR\_GET\_TT\_STATE}}, \mbox{\hyperlink{usb_8h_ac619fe4cc188166d4001c4b75365154c}{UT\_READ\_CLASS\_OTHER}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03381}03381         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci_8c_a5d447be7aadd1d1130c01a26a9dafa6a}{C}}(\mbox{\hyperlink{usb_8h_a6e4e96fd45ca7b0afd0ea2ea63daae2c}{UR\_STOP\_TT}}, \mbox{\hyperlink{usb_8h_a2b0da1f1f369841fec9c55cf4df6888b}{UT\_WRITE\_CLASS\_OTHER}}):}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03382}03382                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03383}03383         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03384}03384                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03385}03385                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03386}03386         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03387}03387 done:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03388}03388         *plength = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03389}03389         *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = ptr;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03390}03390         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03391}03391 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03392}03392 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03393}03393 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03394}\mbox{\hyperlink{ehci_8c_a5dcbe554dac0d8d422c1acaee919e18a}{03394}} \mbox{\hyperlink{ehci_8c_a5dcbe554dac0d8d422c1acaee919e18a}{ehci\_xfer\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__setup__params}{usb\_setup\_params}} *parm)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03395}03395 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03396}03396         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} page\_info;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03397}03397         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03398}03398         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03399}03399         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03400}03400         \textcolor{keywordtype}{void} *last\_obj;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03401}03401         uint32\_t nqtd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03402}03402         uint32\_t nqh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03403}03403         uint32\_t nsitd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03404}03404         uint32\_t nitd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03405}03405         uint32\_t \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03406}03406 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03407}03407         sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(parm-\/>\mbox{\hyperlink{structusb__setup__params_a9f1d602d76af2261a9f113b707bc56f7}{udev}}-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03408}03408         xfer = parm-\/>\mbox{\hyperlink{structusb__setup__params_aa8ed6ed21704b223bdfa97a3ab0d4c0a}{curr\_xfer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03409}03409 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03410}03410         nqtd = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03411}03411         nqh = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03412}03412         nsitd = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03413}03413         nitd = 0;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03414}03414 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03415}03415         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03416}03416 \textcolor{comment}{         * compute maximum number of some structures}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03417}03417 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03418}03418         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{ehci\_device\_ctrl\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03419}03419                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03420}03420 \textcolor{comment}{                 * The proof for the "{}nqtd"{} formula is illustrated like}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03421}03421 \textcolor{comment}{                 * this:}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03422}03422 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03423}03423 \textcolor{comment}{                 * +-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/+}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03424}03424 \textcolor{comment}{                 * |                                    |}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03425}03425 \textcolor{comment}{                 * |         |remainder -\/>              |}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03426}03426 \textcolor{comment}{                 * |   +-\/-\/-\/-\/-\/+-\/-\/-\/+                      |}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03427}03427 \textcolor{comment}{                 * |   | xxx | x | frm 0                |}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03428}03428 \textcolor{comment}{                 * |   +-\/-\/-\/-\/-\/+-\/-\/-\/++                     |}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03429}03429 \textcolor{comment}{                 * |   | xxx | xx | frm 1               |}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03430}03430 \textcolor{comment}{                 * |   +-\/-\/-\/-\/-\/+-\/-\/-\/-\/+                     |}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03431}03431 \textcolor{comment}{                 * |            ...                     |}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03432}03432 \textcolor{comment}{                 * +-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/+}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03433}03433 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03434}03434 \textcolor{comment}{                 * "{}xxx"{} means a completely full USB transfer descriptor}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03435}03435 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03436}03436 \textcolor{comment}{                 * "{}x"{} and "{}xx"{} means a short USB packet}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03437}03437 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03438}03438 \textcolor{comment}{                 * For the remainder of an USB transfer modulo}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03439}03439 \textcolor{comment}{                 * "{}max\_data\_length"{} we need two USB transfer descriptors.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03440}03440 \textcolor{comment}{                 * One to transfer the remaining data and one to finalise}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03441}03441 \textcolor{comment}{                 * with a zero length packet in case the "{}force\_short\_xfer"{}}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03442}03442 \textcolor{comment}{                 * flag is set. We only need two USB transfer descriptors in}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03443}03443 \textcolor{comment}{                 * the case where the transfer length of the first one is a}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03444}03444 \textcolor{comment}{                 * factor of "{}max\_frame\_size"{}. The rest of the needed USB}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03445}03445 \textcolor{comment}{                 * transfer descriptors is given by the buffer size divided}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03446}03446 \textcolor{comment}{                 * by the maximum data payload.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03447}03447 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03448}03448                 parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = 0x400;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03449}03449                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03450}03450                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}} = \mbox{\hyperlink{ehci_8h_adce6431c3bb8845bddc500384a495f0f}{EHCI\_QTD\_PAYLOAD\_MAX}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03451}03451                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.bdma\_enable = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03452}03452 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03453}03453                 \mbox{\hyperlink{usb__transfer_8c_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(parm);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03454}03454 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03455}03455                 nqh = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03456}03456                 nqtd = ((2 * xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) + 1  \textcolor{comment}{/* STATUS */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03457}03457                     + (xfer-\/>\mbox{\hyperlink{structusb__xfer_a3ece1de738e7c3ca20f0bfdbd827fd16}{max\_data\_length}} / xfer-\/>\mbox{\hyperlink{structusb__xfer_ad26ff9271d8a65e58ecec095be9cc78d}{max\_hc\_frame\_size}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03458}03458 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03459}03459         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{ehci_8c_a0efb2bbc6c35dd56ec1567a58a97abc6}{ehci\_device\_bulk\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03460}03460                 parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = 0x400;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03461}03461                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03462}03462                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}} = \mbox{\hyperlink{ehci_8h_adce6431c3bb8845bddc500384a495f0f}{EHCI\_QTD\_PAYLOAD\_MAX}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03463}03463                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.bdma\_enable = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03464}03464 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03465}03465                 \mbox{\hyperlink{usb__transfer_8c_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(parm);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03466}03466 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03467}03467                 nqh = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03468}03468                 nqtd = ((2 * xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03469}03469                     + (xfer-\/>\mbox{\hyperlink{structusb__xfer_a3ece1de738e7c3ca20f0bfdbd827fd16}{max\_data\_length}} / xfer-\/>\mbox{\hyperlink{structusb__xfer_ad26ff9271d8a65e58ecec095be9cc78d}{max\_hc\_frame\_size}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03470}03470 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03471}03471         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03472}03472                 \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_aea4ab21578342e03467d3f7792a81e80}{speed}} == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa57eeede6d769b09c01ac9c9c62fef8c9}{USB\_SPEED\_HIGH}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03473}03473                         parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = 0x400;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03474}03474                         parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 3;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03475}03475                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_aea4ab21578342e03467d3f7792a81e80}{speed}} == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa0f17d0b9928086c6114fea73e08f1780}{USB\_SPEED\_FULL}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03476}03476                         parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = \mbox{\hyperlink{usb_8h_adb8746b9424cc1d1fb62ebc812e236bd}{USB\_FS\_BYTES\_PER\_HS\_UFRAME}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03477}03477                         parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03478}03478                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03479}03479                         parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = \mbox{\hyperlink{usb_8h_adb8746b9424cc1d1fb62ebc812e236bd}{USB\_FS\_BYTES\_PER\_HS\_UFRAME}} / 8;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03480}03480                         parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03481}03481                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03482}03482 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03483}03483                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}} = \mbox{\hyperlink{ehci_8h_adce6431c3bb8845bddc500384a495f0f}{EHCI\_QTD\_PAYLOAD\_MAX}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03484}03484                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.bdma\_enable = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03485}03485 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03486}03486                 \mbox{\hyperlink{usb__transfer_8c_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(parm);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03487}03487 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03488}03488                 nqh = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03489}03489                 nqtd = ((2 * xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}})}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03490}03490                     + (xfer-\/>\mbox{\hyperlink{structusb__xfer_a3ece1de738e7c3ca20f0bfdbd827fd16}{max\_data\_length}} / xfer-\/>\mbox{\hyperlink{structusb__xfer_ad26ff9271d8a65e58ecec095be9cc78d}{max\_hc\_frame\_size}}));}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03491}03491 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03492}03492         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{ehci_8c_a605b50f00523b535ba3cb4dae1f39f53}{ehci\_device\_isoc\_fs\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03493}03493                 parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = 0x3FF;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03494}03494                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03495}03495                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}} = 0x3FF;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03496}03496                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.bdma\_enable = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03497}03497 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03498}03498                 \mbox{\hyperlink{usb__transfer_8c_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(parm);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03499}03499 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03500}03500                 nsitd = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03501}03501 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03502}03502         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{ehci_8c_a83093b23a8bd6627d8b114499c0f6408}{ehci\_device\_isoc\_hs\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03503}03503                 parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = 0x400;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03504}03504                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 3;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03505}03505                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}} = 0xC00;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03506}03506                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.bdma\_enable = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03507}03507 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03508}03508                 \mbox{\hyperlink{usb__transfer_8c_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(parm);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03509}03509 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03510}03510                 nitd = ((xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} + 7) / 8) <<}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03511}03511                     \mbox{\hyperlink{usb__transfer_8c_a479907ed14a6a7e05e1409a19562b8c2}{usbd\_xfer\_get\_fps\_shift}}(xfer);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03512}03512 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03513}03513         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03514}03514                 parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = 0x400;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03515}03515                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03516}03516                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}} = 0x400;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03517}03517 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03518}03518                 \mbox{\hyperlink{usb__transfer_8c_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(parm);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03519}03519         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03520}03520 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03521}03521 alloc\_dma\_set:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03522}03522 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03523}03523         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03524}03524                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03525}03525         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03526}03526         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03527}03527 \textcolor{comment}{         * Allocate queue heads and transfer descriptors}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03528}03528 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03529}03529         last\_obj = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03530}03530 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03531}03531         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8h_a340073210a5be29d27fd51f0c0a87b3d}{usbd\_transfer\_setup\_sub\_malloc}}(}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03532}03532             parm, \&pc, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03533}03533             \mbox{\hyperlink{ehci_8h_aa0d7fd2c5c7a524b5aa1b586725db925}{EHCI\_ITD\_ALIGN}}, nitd)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03534}03534                 parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}} = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ab676f37fd789593cd476f746210170cf}{USB\_ERR\_NOMEM}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03535}03535                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03536}03536         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03537}03537         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{buf}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03538}03538                 \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != nitd; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03539}03539                         \mbox{\hyperlink{structehci__itd}{ehci\_itd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03540}03540 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03541}03541                         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}, 0, \&page\_info);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03542}03542 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03543}03543                         td = page\_info.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03544}03544 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03545}03545                         \textcolor{comment}{/* init TD */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03546}03546                         td-\/>\mbox{\hyperlink{structehci__itd_a07b1a769eb0233951a2271041ff04176}{itd\_self}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, page\_info.physaddr | \mbox{\hyperlink{ehci_8h_ade331918140106b69244c3600f1b4841}{EHCI\_LINK\_ITD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03547}03547                         td-\/>\mbox{\hyperlink{structehci__itd_a17cc87e4c504cf83a65e28b240da6966}{obj\_next}} = last\_obj;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03548}03548                         td-\/>\mbox{\hyperlink{structehci__itd_ab7974a8fdc89e67d466e82c5f287cfe1}{page\_cache}} = pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03549}03549 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03550}03550                         last\_obj = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03551}03551 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03552}03552                         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03553}03553                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03554}03554         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03555}03555         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8h_a340073210a5be29d27fd51f0c0a87b3d}{usbd\_transfer\_setup\_sub\_malloc}}(}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03556}03556             parm, \&pc, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03557}03557             \mbox{\hyperlink{ehci_8h_a5ea56785fab153bd7adb6af42c9026c3}{EHCI\_SITD\_ALIGN}}, nsitd)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03558}03558                 parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}} = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ab676f37fd789593cd476f746210170cf}{USB\_ERR\_NOMEM}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03559}03559                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03560}03560         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03561}03561         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{buf}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03562}03562                 \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != nsitd; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03563}03563                         \mbox{\hyperlink{structehci__sitd}{ehci\_sitd\_t}} *td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03564}03564 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03565}03565                         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}, 0, \&page\_info);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03566}03566 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03567}03567                         td = page\_info.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03568}03568 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03569}03569                         \textcolor{comment}{/* init TD */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03570}03570                         td-\/>\mbox{\hyperlink{structehci__sitd_abc1501540073a2ba23de370a1ffd9144}{sitd\_self}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, page\_info.physaddr | \mbox{\hyperlink{ehci_8h_abee70435c4f025bcf2758303fff5a49a}{EHCI\_LINK\_SITD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03571}03571                         td-\/>\mbox{\hyperlink{structehci__sitd_a11f427cb5819bcfb92e0134de43540a0}{obj\_next}} = last\_obj;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03572}03572                         td-\/>\mbox{\hyperlink{structehci__sitd_ad816427e55ac9b5c6ef4e532718daa32}{page\_cache}} = pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03573}03573 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03574}03574                         last\_obj = td;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03575}03575 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03576}03576                         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03577}03577                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03578}03578         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03579}03579         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8h_a340073210a5be29d27fd51f0c0a87b3d}{usbd\_transfer\_setup\_sub\_malloc}}(}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03580}03580             parm, \&pc, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03581}03581             \mbox{\hyperlink{ehci_8h_acd2c9955df0f0ef22c0ecb3a944af83b}{EHCI\_QTD\_ALIGN}}, nqtd)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03582}03582                 parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}} = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ab676f37fd789593cd476f746210170cf}{USB\_ERR\_NOMEM}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03583}03583                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03584}03584         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03585}03585         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{buf}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03586}03586                 \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != nqtd; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03587}03587                         \mbox{\hyperlink{structehci__qtd}{ehci\_qtd\_t}} *qtd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03588}03588 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03589}03589                         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}, 0, \&page\_info);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03590}03590 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03591}03591                         qtd = page\_info.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03592}03592 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03593}03593                         \textcolor{comment}{/* init TD */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03594}03594                         qtd-\/>\mbox{\hyperlink{structehci__qtd_aa899ed20b306e054d077e9db46764e80}{qtd\_self}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, page\_info.physaddr);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03595}03595                         qtd-\/>\mbox{\hyperlink{structehci__qtd_a9c320a3ea8cc4a59163f0651fb4d1738}{obj\_next}} = last\_obj;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03596}03596                         qtd-\/>\mbox{\hyperlink{structehci__qtd_a289476501a408aebdcdc070300d568eb}{page\_cache}} = pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03597}03597 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03598}03598                         last\_obj = qtd;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03599}03599 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03600}03600                         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03601}03601                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03602}03602         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03603}03603         xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}] = last\_obj;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03604}03604 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03605}03605         last\_obj = NULL;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03606}03606 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03607}03607         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8h_a340073210a5be29d27fd51f0c0a87b3d}{usbd\_transfer\_setup\_sub\_malloc}}(}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03608}03608             parm, \&pc, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}}),}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03609}03609             \mbox{\hyperlink{ehci_8h_a83440792117b721e819f9ce867f40906}{EHCI\_QH\_ALIGN}}, nqh)) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03610}03610                 parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}} = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ab676f37fd789593cd476f746210170cf}{USB\_ERR\_NOMEM}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03611}03611                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03612}03612         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03613}03613         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{buf}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03614}03614                 \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != nqh; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03615}03615                         \mbox{\hyperlink{structehci__qh}{ehci\_qh\_t}} *qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03616}03616 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03617}03617                         \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}, 0, \&page\_info);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03618}03618 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03619}03619                         qh = page\_info.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03620}03620 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03621}03621                         \textcolor{comment}{/* init QH */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03622}03622                         qh-\/>\mbox{\hyperlink{structehci__qh_a40588373ecdf3a8e81b63ffb63960ac3}{qh\_self}} = \mbox{\hyperlink{ehci_8h_ab7b3a28ee020a22d8c9383f99bacad37}{htohc32}}(sc, page\_info.physaddr | \mbox{\hyperlink{ehci_8h_abbd91c57691fc9a2df99abf25c56d828}{EHCI\_LINK\_QH}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03623}03623                         qh-\/>\mbox{\hyperlink{structehci__qh_abda8e2a91e0b8aff67c3820275f4ce4a}{obj\_next}} = last\_obj;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03624}03624                         qh-\/>\mbox{\hyperlink{structehci__qh_a61161fcc8ea701bd45010a58ba15a372}{page\_cache}} = pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03625}03625 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03626}03626                         last\_obj = qh;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03627}03627 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03628}03628                         \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(pc + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03629}03629                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03630}03630         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03631}03631         xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}] = last\_obj;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03632}03632 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03633}03633         \textcolor{keywordflow}{if} (!xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03634}03634                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}} = 1;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03635}03635                 \textcolor{keywordflow}{goto} alloc\_dma\_set;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03636}03636         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03637}03637 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03638}03638 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03639}03639 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03640}\mbox{\hyperlink{ehci_8c_ada776d18647b0264a35547e1d7695b80}{03640}} \mbox{\hyperlink{ehci_8c_ada776d18647b0264a35547e1d7695b80}{ehci\_xfer\_unsetup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03641}03641 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03642}03642         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03643}03643 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03644}03644 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03645}03645 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03646}\mbox{\hyperlink{ehci_8c_a7d32f94564683d714ba083b7afa14e78}{03646}} \mbox{\hyperlink{ehci_8c_a7d32f94564683d714ba083b7afa14e78}{ehci\_ep\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint__descriptor}{usb\_endpoint\_descriptor}} *edesc,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03647}03647     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03648}03648 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03649}03649         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03650}03650 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03651}03651         DPRINTFN(2, \textcolor{stringliteral}{"{}endpoint=\%p, addr=\%d, endpt=\%d, mode=\%d (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03652}03652             ep, udev-\/>\mbox{\hyperlink{structusb__device_ab9873df4422a53f4fa2d7c17460b11a1}{address}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03653}03653             edesc-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_a3d0a0ab41c53023055a242d66a437a2d}{bEndpointAddress}}, udev-\/>\mbox{\hyperlink{structusb__device_ae7b27fdcae02d49bee5c2f0a9130b633}{flags}}.\mbox{\hyperlink{structusb__device__flags_ad686103f845c7d070e25fa7a26c34694}{usb\_mode}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03654}03654             sc-\/>\mbox{\hyperlink{structehci__softc_afcf73f93e765e4e0edeea81412c384ce}{sc\_addr}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03655}03655 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03656}03656         \textcolor{keywordflow}{if} (udev-\/>\mbox{\hyperlink{structusb__device_a5671e9a7365d48bd470879e2b95ea2e5}{device\_index}} != sc-\/>\mbox{\hyperlink{structehci__softc_afcf73f93e765e4e0edeea81412c384ce}{sc\_addr}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03657}03657                 \textcolor{keywordflow}{if} ((udev-\/>\mbox{\hyperlink{structusb__device_a1fc02abd43bd33f295493ed23debd852}{speed}} != \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa57eeede6d769b09c01ac9c9c62fef8c9}{USB\_SPEED\_HIGH}}) \&\&}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03658}03658                     ((udev-\/>\mbox{\hyperlink{structusb__device_ae4eded55423bee40ef6eefb381b62409}{hs\_hub\_addr}} == 0) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03659}03659                     (udev-\/>\mbox{\hyperlink{structusb__device_a3820f24eaa233e432b724fd1914f34a0}{hs\_port\_no}} == 0) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03660}03660                     (udev-\/>\mbox{\hyperlink{structusb__device_a1d9147ffd9af6572cbfff03475f5a5e9}{parent\_hs\_hub}} == NULL) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03661}03661                     (udev-\/>\mbox{\hyperlink{structusb__device_a1d9147ffd9af6572cbfff03475f5a5e9}{parent\_hs\_hub}}-\/>\mbox{\hyperlink{structusb__device_a4fff6a478d5f92f73df9d6f2b34760a3}{hub}} == NULL))) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03662}03662                         \textcolor{comment}{/* We need a transaction translator */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03663}03663                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03664}03664                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03665}03665                 \textcolor{keywordflow}{switch} (edesc-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} \& \mbox{\hyperlink{usb_8h_a8badd3504359a0aed83ac575a46a67b4}{UE\_XFERTYPE}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03666}03666                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03667}03667                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{ehci\_device\_ctrl\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03668}03668                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03669}03669                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03670}03670                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03671}03671                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03672}03672                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aecbab40f64cd5ffe365b73f7360ea2a3}{UE\_ISOCHRONOUS}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03673}03673                         \textcolor{keywordflow}{if} (udev-\/>\mbox{\hyperlink{structusb__device_a1fc02abd43bd33f295493ed23debd852}{speed}} == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa57eeede6d769b09c01ac9c9c62fef8c9}{USB\_SPEED\_HIGH}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03674}03674                                 ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{ehci_8c_a83093b23a8bd6627d8b114499c0f6408}{ehci\_device\_isoc\_hs\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03675}03675                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (udev-\/>\mbox{\hyperlink{structusb__device_a1fc02abd43bd33f295493ed23debd852}{speed}} == \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa0f17d0b9928086c6114fea73e08f1780}{USB\_SPEED\_FULL}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03676}03676                                 ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{ehci_8c_a605b50f00523b535ba3cb4dae1f39f53}{ehci\_device\_isoc\_fs\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03677}03677                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03678}03678                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03679}03679                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03680}03680                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{ehci_8c_a0efb2bbc6c35dd56ec1567a58a97abc6}{ehci\_device\_bulk\_methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03681}03681                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03682}03682                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03683}03683                         \textcolor{comment}{/* do nothing */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03684}03684                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03685}03685                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03686}03686         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03687}03687 done:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03688}03688         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03689}03689 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03690}03690 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03691}03691 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03692}\mbox{\hyperlink{ehci_8c_a7db52fd0d90136aae0221c6044db3479}{03692}} \mbox{\hyperlink{ehci_8c_a7db52fd0d90136aae0221c6044db3479}{ehci\_get\_dma\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev, uint32\_t *pus)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03693}03693 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03694}03694         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03695}03695 \textcolor{comment}{         * Wait until the hardware has finished any possible use of}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03696}03696 \textcolor{comment}{         * the transfer descriptor(s) and QH}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03697}03697 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03698}03698         *pus = (1125);                  \textcolor{comment}{/* microseconds */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03699}03699 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03700}03700 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03701}03701 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03702}\mbox{\hyperlink{ehci_8c_a683a39457c5454a5c2f91a78b202aeb0}{03702}} \mbox{\hyperlink{ehci_8c_a683a39457c5454a5c2f91a78b202aeb0}{ehci\_device\_resume}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03703}03703 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03704}03704         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03705}03705         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03706}03706         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} *methods;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03707}03707 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03708}03708         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03709}03709 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03710}03710         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03711}03711 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03712}03712         TAILQ\_FOREACH(xfer, \&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_afe87bf7e25fe7284a87d14ca231bc818}{intr\_q}}.head, wait\_entry) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03713}03713                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}} == udev) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03714}03714                         methods = xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03715}03715 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03716}03716                         \textcolor{keywordflow}{if} ((methods == \&\mbox{\hyperlink{ehci_8c_a0efb2bbc6c35dd56ec1567a58a97abc6}{ehci\_device\_bulk\_methods}}) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03717}03717                             (methods == \&\mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{ehci\_device\_ctrl\_methods}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03718}03718                                 \mbox{\hyperlink{ehci_8c_a1bdc1e85de6a5fd2df9d6aaac5535d08}{EHCI\_APPEND\_QH}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}],}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03719}03719                                     sc-\/>\mbox{\hyperlink{structehci__softc_a3599f5c0b5f8dac01c770ace13fba03e}{sc\_async\_p\_last}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03720}03720                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03721}03721                         \textcolor{keywordflow}{if} (methods == \&\mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03722}03722                                 \mbox{\hyperlink{ehci_8c_a1bdc1e85de6a5fd2df9d6aaac5535d08}{EHCI\_APPEND\_QH}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}],}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03723}03723                                     sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}}]);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03724}03724                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03725}03725                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03726}03726         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03727}03727 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03728}03728         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03729}03729 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03730}03730         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03731}03731 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03732}03732 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03733}03733 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03734}\mbox{\hyperlink{ehci_8c_a6cf409b53d8c2fe5fb1b83dd2be42a33}{03734}} \mbox{\hyperlink{ehci_8c_a6cf409b53d8c2fe5fb1b83dd2be42a33}{ehci\_device\_suspend}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03735}03735 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03736}03736         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03737}03737         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03738}03738         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} *methods;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03739}03739 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03740}03740         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03741}03741 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03742}03742         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03743}03743 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03744}03744         TAILQ\_FOREACH(xfer, \&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_afe87bf7e25fe7284a87d14ca231bc818}{intr\_q}}.head, wait\_entry) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03745}03745                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}} == udev) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03746}03746                         methods = xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03747}03747 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03748}03748                         \textcolor{keywordflow}{if} ((methods == \&\mbox{\hyperlink{ehci_8c_a0efb2bbc6c35dd56ec1567a58a97abc6}{ehci\_device\_bulk\_methods}}) ||}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03749}03749                             (methods == \&\mbox{\hyperlink{ehci_8c_aa7790be52f0ed132560e50369e7d822b}{ehci\_device\_ctrl\_methods}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03750}03750                                 \mbox{\hyperlink{ehci_8c_a09c874474813a492d66865631bac6029}{EHCI\_REMOVE\_QH}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}],}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03751}03751                                     sc-\/>\mbox{\hyperlink{structehci__softc_a3599f5c0b5f8dac01c770ace13fba03e}{sc\_async\_p\_last}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03752}03752                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03753}03753                         \textcolor{keywordflow}{if} (methods == \&\mbox{\hyperlink{ehci_8c_a8133b6ed35e8669561759c9f941d6213}{ehci\_device\_intr\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03754}03754                                 \mbox{\hyperlink{ehci_8c_a09c874474813a492d66865631bac6029}{EHCI\_REMOVE\_QH}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_abdb337036af2dd11314d97b01f4c9aa8}{qh\_start}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a7574b7503818fc7c9e8f08fb5919a373}{curr\_dma\_set}}],}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03755}03755                                     sc-\/>\mbox{\hyperlink{structehci__softc_a1e2fdca9306b8aa4309076a9c2b741cf}{sc\_intr\_p\_last}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a4dcb22bb91c18dba08366792900c01c9}{qh\_pos}}]);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03756}03756                         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03757}03757                 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03758}03758         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03759}03759 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03760}03760         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03761}03761 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03762}03762 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03763}03763 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03764}\mbox{\hyperlink{ehci_8c_a9c97fac3c416bfcc4dabc493475d7f5e}{03764}} \mbox{\hyperlink{ehci_8c_a9c97fac3c416bfcc4dabc493475d7f5e}{ehci\_set\_hw\_power\_sleep}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *bus, uint32\_t state)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03765}03765 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03766}03766         \textcolor{keyword}{struct }\mbox{\hyperlink{structehci__softc}{ehci\_softc}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(bus);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03767}03767 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03768}03768         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03769}03769         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a7059f3b2b6c2ad966a4c72fc57b72de1}{USB\_HW\_POWER\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03770}03770         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a9bf3bc2863030915ae241b50188c8f21}{USB\_HW\_POWER\_SHUTDOWN}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03771}03771                 \mbox{\hyperlink{ehci_8c_aecd9c3db72f17bc4740e40418119415e}{ehci\_suspend}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03772}03772                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03773}03773         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a13be95e61855e5fddce8004288a740ca}{USB\_HW\_POWER\_RESUME}}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03774}03774                 \mbox{\hyperlink{ehci_8c_af2a1af8a3892f20d7e58859abf49a827}{ehci\_resume}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03775}03775                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03776}03776         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03777}03777                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03778}03778         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03779}03779 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03780}03780 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03781}03781 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03782}\mbox{\hyperlink{ehci_8c_a7c4d97221f7b6635dd4fdefac0d77b8d}{03782}} \mbox{\hyperlink{ehci_8c_a7c4d97221f7b6635dd4fdefac0d77b8d}{ehci\_set\_hw\_power}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *bus)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03783}03783 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03784}03784         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(bus);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03785}03785         uint32\_t temp;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03786}03786         uint32\_t flags;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03787}03787 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03788}03788         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03789}03789 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03790}03790         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(bus);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03791}03791 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03792}03792         flags = bus-\/>hw\_power\_state;}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03793}03793 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03794}03794         temp = \mbox{\hyperlink{ehci_8h_a981d9b718980ec59025b6f7edf2dd2eb}{EOREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03795}03795 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03796}03796         temp \&= \string~(\mbox{\hyperlink{ehcireg_8h_a8901ac4dd9b1aca389afdaa052ed9163}{EHCI\_CMD\_ASE}} | \mbox{\hyperlink{ehcireg_8h_a6d5c9057bcdf77576e6b931e4c2e2ba8}{EHCI\_CMD\_PSE}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03797}03797 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03798}03798         \textcolor{keywordflow}{if} (flags \& (\mbox{\hyperlink{usb__controller_8h_a6f54c2912dd79f2efaa5391dd5c21753}{USB\_HW\_POWER\_CONTROL}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03799}03799             \mbox{\hyperlink{usb__controller_8h_a524ce0f27ed4f59a73809268a68feaba}{USB\_HW\_POWER\_BULK}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03800}03800                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}Async is active\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03801}03801                 temp |= \mbox{\hyperlink{ehcireg_8h_a8901ac4dd9b1aca389afdaa052ed9163}{EHCI\_CMD\_ASE}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03802}03802         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03803}03803         \textcolor{keywordflow}{if} (flags \& (\mbox{\hyperlink{usb__controller_8h_ad63ee2bb9f1e8b7e2f2348202effb82f}{USB\_HW\_POWER\_INTERRUPT}} |}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03804}03804             \mbox{\hyperlink{usb__controller_8h_ab620c1c47bcda0ba7d1695756827e7c4}{USB\_HW\_POWER\_ISOC}})) \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03805}03805                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}Periodic is active\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03806}03806                 temp |= \mbox{\hyperlink{ehcireg_8h_a6d5c9057bcdf77576e6b931e4c2e2ba8}{EHCI\_CMD\_PSE}};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03807}03807         \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03808}03808         \mbox{\hyperlink{ehci_8h_ab3846fe0a70207f9c7de21fd9f3a3e50}{EOWRITE4}}(sc, \mbox{\hyperlink{ehcireg_8h_aaffdc9d8be7cf3d040172842448ac8d5}{EHCI\_USBCMD}}, temp);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03809}03809 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03810}03810         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(bus);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03811}03811 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03812}03812         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03813}03813 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03814}03814 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03815}03815 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03816}\mbox{\hyperlink{ehci_8c_ae0ceb092a5f6a0e4184cfde1de08bbd2}{03816}} \mbox{\hyperlink{ehci_8c_ae0ceb092a5f6a0e4184cfde1de08bbd2}{ehci\_start\_dma\_delay\_second}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03817}03817 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03818}03818         \textcolor{keyword}{struct }\mbox{\hyperlink{structehci__softc}{ehci\_softc}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03819}03819 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03820}03820         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03821}03821 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03822}03822         \textcolor{comment}{/* trigger doorbell */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03823}03823         \mbox{\hyperlink{ehci_8c_a26eef10ded85594900132577550169b9}{ehci\_doorbell\_async}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03824}03824 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03825}03825         \textcolor{comment}{/* give the doorbell 4ms */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03826}03826         \mbox{\hyperlink{usb__transfer_8c_ad2a08e4791c74765a0ecc20d5894ab36}{usbd\_transfer\_timeout\_ms}}(xfer,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03827}03827             (\textcolor{keywordtype}{void} (*)(\textcolor{keywordtype}{void} *))\&\mbox{\hyperlink{usb__transfer_8c_a7adbc7aadc7b24fc28fea9ff049ac1ad}{usb\_dma\_delay\_done\_cb}}, 4);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03828}03828 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03829}03829 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03830}03830 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03831}03831 \textcolor{comment}{ * Ring the doorbell twice before freeing any DMA descriptors. Some host}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03832}03832 \textcolor{comment}{ * controllers apparently cache the QH descriptors and need a message}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03833}03833 \textcolor{comment}{ * that the cache needs to be discarded.}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03834}03834 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03835}03835 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03836}\mbox{\hyperlink{ehci_8c_a7df53546dcd5103acff86ed1d439f4c3}{03836}} \mbox{\hyperlink{ehci_8c_a7df53546dcd5103acff86ed1d439f4c3}{ehci\_start\_dma\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03837}03837 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03838}03838         \textcolor{keyword}{struct }\mbox{\hyperlink{structehci__softc}{ehci\_softc}} *sc = \mbox{\hyperlink{ehci_8c_a4ea25144046d14df222bd24af55c6d50}{EHCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03839}03839 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03840}03840         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03841}03841 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03842}03842         \textcolor{comment}{/* trigger doorbell */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03843}03843         \mbox{\hyperlink{ehci_8c_a26eef10ded85594900132577550169b9}{ehci\_doorbell\_async}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03844}03844 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03845}03845         \textcolor{comment}{/* give the doorbell 4ms */}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03846}03846         \mbox{\hyperlink{usb__transfer_8c_ad2a08e4791c74765a0ecc20d5894ab36}{usbd\_transfer\_timeout\_ms}}(xfer,}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03847}03847             (\textcolor{keywordtype}{void} (*)(\textcolor{keywordtype}{void} *))\&\mbox{\hyperlink{ehci_8c_ae0ceb092a5f6a0e4184cfde1de08bbd2}{ehci\_start\_dma\_delay\_second}}, 4);}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03848}03848 \}}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03849}03849 }
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03850}03850 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__bus__methods}{usb\_bus\_methods}} \mbox{\hyperlink{ehci_8c_a2d22ecb44872d6fa3da65fdc05dcc5ee}{ehci\_bus\_methods}} =}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03851}03851 \{}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03852}03852         .\mbox{\hyperlink{structusb__bus__methods_ae9169cdc4fe46a61286ad14aa59c3a31}{endpoint\_init}} = \mbox{\hyperlink{ehci_8c_a7d32f94564683d714ba083b7afa14e78}{ehci\_ep\_init}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03853}03853         .xfer\_setup = \mbox{\hyperlink{ehci_8c_a5dcbe554dac0d8d422c1acaee919e18a}{ehci\_xfer\_setup}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03854}03854         .xfer\_unsetup = \mbox{\hyperlink{ehci_8c_ada776d18647b0264a35547e1d7695b80}{ehci\_xfer\_unsetup}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03855}03855         .get\_dma\_delay = \mbox{\hyperlink{ehci_8c_a7db52fd0d90136aae0221c6044db3479}{ehci\_get\_dma\_delay}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03856}03856         .device\_resume = \mbox{\hyperlink{ehci_8c_a683a39457c5454a5c2f91a78b202aeb0}{ehci\_device\_resume}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03857}03857         .device\_suspend = \mbox{\hyperlink{ehci_8c_a6cf409b53d8c2fe5fb1b83dd2be42a33}{ehci\_device\_suspend}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03858}03858         .set\_hw\_power = \mbox{\hyperlink{ehci_8c_a7c4d97221f7b6635dd4fdefac0d77b8d}{ehci\_set\_hw\_power}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03859}03859         .set\_hw\_power\_sleep = \mbox{\hyperlink{ehci_8c_a9c97fac3c416bfcc4dabc493475d7f5e}{ehci\_set\_hw\_power\_sleep}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03860}03860         .roothub\_exec = \mbox{\hyperlink{ehci_8c_a49be424a8299b8ceeef18f214925cec5}{ehci\_roothub\_exec}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03861}03861         .xfer\_poll = \mbox{\hyperlink{ehci_8c_a8eb9464d1edfb384fddd19ec438187e4}{ehci\_do\_poll}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03862}03862         .start\_dma\_delay = \mbox{\hyperlink{ehci_8c_a7df53546dcd5103acff86ed1d439f4c3}{ehci\_start\_dma\_delay}},}
\DoxyCodeLine{\Hypertarget{ehci_8c_source_l03863}03863 \};}

\end{DoxyCode}
