\hypertarget{ehci__pci_8c_source}{}\doxysection{ehci\+\_\+pci.\+c}
\label{ehci__pci_8c_source}\index{dev/usb/controller/ehci\_pci.c@{dev/usb/controller/ehci\_pci.c}}
\mbox{\hyperlink{ehci__pci_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/NetBSD}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1998 The NetBSD Foundation, Inc.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00007}00007 \textcolor{comment}{ * This code is derived from software contributed to The NetBSD Foundation}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00008}00008 \textcolor{comment}{ * by Lennart Augustsson (augustss@carlstedt.se) at}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00009}00009 \textcolor{comment}{ * Carlstedt Research \& Technology.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00011}00011 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00012}00012 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00013}00013 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00014}00014 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00015}00015 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00016}00016 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00017}00017 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00018}00018 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00019}00019 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00020}00020 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00021}00021 \textcolor{comment}{ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00022}00022 \textcolor{comment}{ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00023}00023 \textcolor{comment}{ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00024}00024 \textcolor{comment}{ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00025}00025 \textcolor{comment}{ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00026}00026 \textcolor{comment}{ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00027}00027 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00028}00028 \textcolor{comment}{ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00029}00029 \textcolor{comment}{ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00030}00030 \textcolor{comment}{ * POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00031}00031 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00034}\mbox{\hyperlink{ehci__pci_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00034}} \mbox{\hyperlink{ehci__pci_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00036}00036 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00037}00037 \textcolor{comment}{ * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00038}00038 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00039}00039 \textcolor{comment}{ * The EHCI 1.0 spec can be found at}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00040}00040 \textcolor{comment}{ * http://developer.intel.com/technology/usb/download/ehci-\/r10.pdf}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00041}00041 \textcolor{comment}{ * and the USB 2.0 spec at}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00042}00042 \textcolor{comment}{ * http://www.usb.org/developers/docs/usb\_20.zip}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00043}00043 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00045}00045 \textcolor{comment}{/* The low level controller code for EHCI has been split into}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00046}00046 \textcolor{comment}{ * PCI probes and EHCI specific code. This was done to facilitate the}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00047}00047 \textcolor{comment}{ * sharing of code between *BSD's}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00048}00048 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__core_8h}{dev/usb/usb\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00073}00073 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__busdma_8h}{dev/usb/usb\_busdma.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00074}00074 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00075}00075 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__util_8h}{dev/usb/usb\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__controller_8h}{dev/usb/usb\_controller.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00078}00078 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__bus_8h}{dev/usb/usb\_bus.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00079}00079 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__pci_8h}{dev/usb/usb\_pci.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00080}00080 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ehci_8h}{dev/usb/controller/ehci.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00081}00081 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{ehcireg_8h}{dev/usb/controller/ehcireg.h}}>}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00082}00082 \textcolor{preprocessor}{\#include "{}usb\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00084}\mbox{\hyperlink{ehci__pci_8c_ad4ae86c9343419883e1951348f54e554}{00084}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_ACERLABS      0x10b9}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00085}\mbox{\hyperlink{ehci__pci_8c_a6b6b92c63b60e4bed33c467c8c95ca9d}{00085}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_AMD           0x1022}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00086}\mbox{\hyperlink{ehci__pci_8c_a0de239e138f74f7cbb49d82e0b3e1837}{00086}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_APPLE         0x106b}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00087}\mbox{\hyperlink{ehci__pci_8c_add87203bbc921bcfbcb9b4643e18b08d}{00087}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_ATI           0x1002}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00088}\mbox{\hyperlink{ehci__pci_8c_a3c2bdc0f61f208bba931c2ca498d1689}{00088}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_CMDTECH       0x1095}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00089}\mbox{\hyperlink{ehci__pci_8c_a4333130ae559874b34f6764a67eaa3be}{00089}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_HYGON         0x1d94}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00090}\mbox{\hyperlink{ehci__pci_8c_a00a4f3495d85e69c277f19e3d3b4e86e}{00090}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_INTEL         0x8086}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00091}\mbox{\hyperlink{ehci__pci_8c_a84979638838ee808019d85f24a74ce62}{00091}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_NEC           0x1033}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00092}\mbox{\hyperlink{ehci__pci_8c_ade25f0d66a4cd7819d12e39fd91a3537}{00092}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_OPTI          0x1045}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00093}\mbox{\hyperlink{ehci__pci_8c_a71a91143308b9a56fe95b44ace949087}{00093}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_PHILIPS       0x1131}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00094}\mbox{\hyperlink{ehci__pci_8c_a3e375b4316d15ad43f43eb0f6174f10c}{00094}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_SIS           0x1039}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00095}\mbox{\hyperlink{ehci__pci_8c_a6e809889cca691416a772d3132f28665}{00095}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_NVIDIA        0x12D2}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00096}\mbox{\hyperlink{ehci__pci_8c_a5ef37efbd14f099a73fa91f5fdf8eebe}{00096}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_NVIDIA2       0x10DE}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00097}\mbox{\hyperlink{ehci__pci_8c_aeb7962062bee0acf46844392eedff387}{00097}} \textcolor{preprocessor}{\#define PCI\_EHCI\_VENDORID\_VIA           0x1106}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00099}\mbox{\hyperlink{ehci__pci_8c_aa5ddd11f9acd139036552a40d66239c4}{00099}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{ehci__pci_8c_aa5ddd11f9acd139036552a40d66239c4}{ehci\_pci\_probe}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00100}\mbox{\hyperlink{ehci__pci_8c_a4dd49a2ed539d21534c3eee4dd35d6bc}{00100}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{ehci__pci_8c_a4dd49a2ed539d21534c3eee4dd35d6bc}{ehci\_pci\_attach}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00101}\mbox{\hyperlink{ehci__pci_8c_a8aa2b76784f83f3331e562032fd5eda2}{00101}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{ehci__pci_8c_a8aa2b76784f83f3331e562032fd5eda2}{ehci\_pci\_detach}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00102}\mbox{\hyperlink{ehci__pci_8c_ad1ee74939d0ea08e2f3871c92db8f7d8}{00102}} \textcolor{keyword}{static} usb\_take\_controller\_t \mbox{\hyperlink{ehci__pci_8c_ad1ee74939d0ea08e2f3871c92db8f7d8}{ehci\_pci\_take\_controller}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00104}00104 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00105}\mbox{\hyperlink{ehci__pci_8c_aef972617a2df8ef5601de84fa71fbf89}{00105}} \mbox{\hyperlink{ehci__pci_8c_aef972617a2df8ef5601de84fa71fbf89}{ehci\_pci\_match}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00106}00106 \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00107}00107         uint32\_t device\_id = pci\_get\_devid(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00108}00108 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00109}00109         \textcolor{keywordflow}{switch} (device\_id) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00110}00110         \textcolor{keywordflow}{case} 0x523910b9:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00111}00111                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}ALi M5239 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00113}00113         \textcolor{keywordflow}{case} 0x10227463:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00114}00114                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}AMD 8111 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00116}00116         \textcolor{keywordflow}{case} 0x20951022:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00117}00117                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AMD CS5536 (Geode) USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00118}00118         \textcolor{keywordflow}{case} 0x78081022:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00119}00119                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AMD FCH USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00120}00120         \textcolor{keywordflow}{case} 0x79081022:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00121}00121                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AMD FCH USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00123}00123         \textcolor{keywordflow}{case} 0x43451002:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00124}00124                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}ATI SB200 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00125}00125         \textcolor{keywordflow}{case} 0x43731002:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00126}00126                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}ATI SB400 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00127}00127         \textcolor{keywordflow}{case} 0x43961002:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00128}00128                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00129}00129 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00130}00130         \textcolor{keywordflow}{case} 0x0f348086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00131}00131                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel BayTrail USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00132}00132         \textcolor{keywordflow}{case} 0x1c268086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00133}00133                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Cougar Point USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00134}00134         \textcolor{keywordflow}{case} 0x1c2d8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00135}00135                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Cougar Point USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00136}00136         \textcolor{keywordflow}{case} 0x1d268086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00137}00137                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Patsburg USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00138}00138         \textcolor{keywordflow}{case} 0x1d2d8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00139}00139                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Patsburg USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00140}00140         \textcolor{keywordflow}{case} 0x1e268086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00141}00141                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Panther Point USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00142}00142         \textcolor{keywordflow}{case} 0x1e2d8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00143}00143                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Panther Point USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00144}00144         \textcolor{keywordflow}{case} 0x1f2c8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00145}00145                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Avoton USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00146}00146         \textcolor{keywordflow}{case} 0x25ad8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00147}00147                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 6300ESB USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00148}00148         \textcolor{keywordflow}{case} 0x24cd8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00149}00149                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801DB/L/M (ICH4) USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00150}00150         \textcolor{keywordflow}{case} 0x24dd8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00151}00151                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801EB/R (ICH5) USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00152}00152         \textcolor{keywordflow}{case} 0x265c8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00153}00153                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801FB (ICH6) USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00154}00154         \textcolor{keywordflow}{case} 0x268c8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00155}00155                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel 63XXESB USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00156}00156         \textcolor{keywordflow}{case} 0x27cc8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00157}00157                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801GB/R (ICH7) USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00158}00158         \textcolor{keywordflow}{case} 0x28368086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00159}00159                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801H (ICH8) USB 2.0 controller USB2-\/A"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00160}00160         \textcolor{keywordflow}{case} 0x283a8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00161}00161                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801H (ICH8) USB 2.0 controller USB2-\/B"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00162}00162         \textcolor{keywordflow}{case} 0x293a8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00163}00163                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801I (ICH9) USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00164}00164         \textcolor{keywordflow}{case} 0x293c8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00165}00165                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801I (ICH9) USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00166}00166         \textcolor{keywordflow}{case} 0x3a3a8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00167}00167                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801JI (ICH10) USB 2.0 controller USB-\/A"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00168}00168         \textcolor{keywordflow}{case} 0x3a3c8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00169}00169                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Intel 82801JI (ICH10) USB 2.0 controller USB-\/B"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00170}00170         \textcolor{keywordflow}{case} 0x3b348086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00171}00171                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel PCH USB 2.0 controller USB-\/A"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00172}00172         \textcolor{keywordflow}{case} 0x3b3c8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00173}00173                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel PCH USB 2.0 controller USB-\/B"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00174}00174         \textcolor{keywordflow}{case} 0x8c268086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00175}00175                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Lynx Point USB 2.0 controller USB-\/A"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00176}00176         \textcolor{keywordflow}{case} 0x8c2d8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00177}00177                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Lynx Point USB 2.0 controller USB-\/B"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00178}00178         \textcolor{keywordflow}{case} 0x8ca68086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00179}00179                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Wildcat Point USB 2.0 controller USB-\/A"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00180}00180         \textcolor{keywordflow}{case} 0x8cad8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00181}00181                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Wildcat Point USB 2.0 controller USB-\/B"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00182}00182         \textcolor{keywordflow}{case} 0x8d268086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00183}00183                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Wellsburg USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00184}00184         \textcolor{keywordflow}{case} 0x8d2d8086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00185}00185                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Wellsburg USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00186}00186         \textcolor{keywordflow}{case} 0x9c268086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00187}00187                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Lynx Point-\/LP USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00188}00188         \textcolor{keywordflow}{case} 0x9ca68086:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00189}00189                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}Intel Wildcat Point-\/LP USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00190}00190 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00191}00191         \textcolor{keywordflow}{case} 0x00e01033:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00192}00192                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}NEC uPD 72010x USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00194}00194         \textcolor{keywordflow}{case} 0x006810de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00195}00195                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce2 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00196}00196         \textcolor{keywordflow}{case} 0x008810de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00197}00197                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce2 Ultra 400 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00198}00198         \textcolor{keywordflow}{case} 0x00d810de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00199}00199                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce3 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00200}00200         \textcolor{keywordflow}{case} 0x00e810de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00201}00201                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce3 250 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00202}00202         \textcolor{keywordflow}{case} 0x005b10de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00203}00203                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce CK804 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00204}00204         \textcolor{keywordflow}{case} 0x036d10de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00205}00205                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce MCP55 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00206}00206         \textcolor{keywordflow}{case} 0x03f210de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00207}00207                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce MCP61 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00208}00208         \textcolor{keywordflow}{case} 0x0aa610de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00209}00209                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce MCP79 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00210}00210         \textcolor{keywordflow}{case} 0x0aa910de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00211}00211                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce MCP79 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00212}00212         \textcolor{keywordflow}{case} 0x0aaa10de:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00213}00213                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}NVIDIA nForce MCP79 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00215}00215         \textcolor{keywordflow}{case} 0x15621131:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00216}00216                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}Philips ISP156x USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00218}00218         \textcolor{keywordflow}{case} 0x70021039:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00219}00219                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}SiS 968 USB 2.0 controller"{}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00220}00220 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00221}00221         \textcolor{keywordflow}{case} 0x31041106:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00222}00222                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}VIA VT6202 USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00224}00224         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00225}00225                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00226}00226         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00228}00228         \textcolor{keywordflow}{if} ((pci\_get\_class(self) == PCIC\_SERIALBUS)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00229}00229             \&\& (pci\_get\_subclass(self) == PCIS\_SERIALBUS\_USB)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00230}00230             \&\& (pci\_get\_progif(self) == \mbox{\hyperlink{ehcireg_8h_a4eab319157eac60bae77dc97c27ce24b}{PCI\_INTERFACE\_EHCI}})) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00231}00231                 \textcolor{keywordflow}{return} (\textcolor{stringliteral}{"{}EHCI (generic) USB 2.0 controller"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00232}00232         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00233}00233         \textcolor{keywordflow}{return} (NULL);                  \textcolor{comment}{/* dunno */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00234}00234 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00236}00236 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00237}\mbox{\hyperlink{ehci__pci_8c_a46975cb52cf1aa934d7fb5794d22bbbf}{00237}} \mbox{\hyperlink{ehci__pci_8c_aa5ddd11f9acd139036552a40d66239c4}{ehci\_pci\_probe}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00238}00238 \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00239}00239         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}} = \mbox{\hyperlink{ehci__pci_8c_aef972617a2df8ef5601de84fa71fbf89}{ehci\_pci\_match}}(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00241}00241         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00242}00242                 device\_set\_desc(self, \mbox{\hyperlink{usb__device_8h_ab3a00cd7fdc532cb4cd4d59733b440bf}{desc}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00243}00243                 \textcolor{keywordflow}{return} (BUS\_PROBE\_DEFAULT);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00244}00244         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00245}00245                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00246}00246         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00247}00247 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00249}00249 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00250}\mbox{\hyperlink{ehci__pci_8c_adca58c8402b5f68a83282f42a7c26770}{00250}} \mbox{\hyperlink{ehci__pci_8c_adca58c8402b5f68a83282f42a7c26770}{ehci\_pci\_ati\_quirk}}(device\_t self, uint8\_t is\_sb700)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00251}00251 \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00252}00252         device\_t smbdev;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00253}00253         uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00255}00255         \textcolor{keywordflow}{if} (is\_sb700) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00256}00256                 \textcolor{comment}{/* Lookup SMBUS PCI device */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00257}00257                 smbdev = pci\_find\_device(\mbox{\hyperlink{ehci__pci_8c_add87203bbc921bcfbcb9b4643e18b08d}{PCI\_EHCI\_VENDORID\_ATI}}, 0x4385);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00258}00258                 \textcolor{keywordflow}{if} (smbdev == NULL)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00259}00259                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00260}00260                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = pci\_get\_revid(smbdev);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00261}00261                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} != 0x3a \&\& \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} != 0x3b)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00262}00262                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00263}00263         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00264}00264 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00265}00265         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00266}00266 \textcolor{comment}{         * Note: this bit is described as reserved in SB700}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00267}00267 \textcolor{comment}{         * Register Reference Guide.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00268}00268 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00269}00269         \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = pci\_read\_config(self, 0x53, 1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00270}00270         \textcolor{keywordflow}{if} (!(\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x8)) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00271}00271                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= 0x8;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00272}00272                 pci\_write\_config(self, 0x53, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00273}00273                 device\_printf(self, \textcolor{stringliteral}{"{}AMD SB600/700 quirk applied\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00274}00274         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00275}00275 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00276}00276 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00277}00277 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00278}\mbox{\hyperlink{ehci__pci_8c_a967ed236ad465adbba8e9cee9743183d}{00278}} \mbox{\hyperlink{ehci__pci_8c_a967ed236ad465adbba8e9cee9743183d}{ehci\_pci\_via\_quirk}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00279}00279 \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00280}00280         uint32\_t \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00282}00282         \textcolor{keywordflow}{if} ((pci\_get\_device(self) == 0x3104) \&\& }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00283}00283             ((pci\_get\_revid(self) \& 0xf0) == 0x60)) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00284}00284                 \textcolor{comment}{/* Correct schedule sleep time to 10us */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00285}00285                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} = pci\_read\_config(self, 0x4b, 1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00286}00286                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} \& 0x20)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00287}00287                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00288}00288                 \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}} |= 0x20;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00289}00289                 pci\_write\_config(self, 0x4b, \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}}, 1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00290}00290                 device\_printf(self, \textcolor{stringliteral}{"{}VIA-\/quirk applied\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00291}00291         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00292}00292 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00293}00293 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00294}00294 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00295}\mbox{\hyperlink{ehci__pci_8c_ad7d8dfee26debcc2f09db53249128a49}{00295}} \mbox{\hyperlink{ehci__pci_8c_a4dd49a2ed539d21534c3eee4dd35d6bc}{ehci\_pci\_attach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00296}00296 \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00297}00297         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00298}00298         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00299}00299         \textcolor{keywordtype}{int} rid;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00301}00301         \textcolor{comment}{/* initialise some bus fields */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00302}00302         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7855a7fc5c4b3f5289323c7743c6a975}{parent}} = self;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00303}00303         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a9412f3e10804046f19d5e8ab00a38b59}{devices}} = sc-\/>\mbox{\hyperlink{structehci__softc_a0802e5ef39459d22c35166dccbcd337c}{sc\_devices}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00304}00304         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_ac665d059dd509782705e2eb35fdc9c58}{devices\_max}} = \mbox{\hyperlink{ehci_8h_accffc95758a4a2f4585ddaef5e522a28}{EHCI\_MAX\_DEVICES}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00305}00305         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_af7cf6d04a3d928e28be8825b637fab68}{dma\_bits}} = 32;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00306}00306 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00307}00307         \textcolor{comment}{/* get all DMA memory */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00308}00308         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__controller_8c_a736f5aa67bd8014944a1dc24fbf3fbb5}{usb\_bus\_mem\_alloc\_all}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}},}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00309}00309             \mbox{\hyperlink{usb__busdma_8h_acec0356df4d4a6905c59303652de41ad}{USB\_GET\_DMA\_TAG}}(self), \&\mbox{\hyperlink{ehci_8h_ac442dc73d309535c45d563b140daf901}{ehci\_iterate\_hw\_softc}})) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00310}00310                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00311}00311         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00313}00313         pci\_enable\_busmaster(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00314}00314 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00315}00315         \textcolor{keywordflow}{switch} (pci\_read\_config(self, \mbox{\hyperlink{ehcireg_8h_ab2ef0a52ec6713a575eb9fd7d20349d8}{PCI\_USBREV}}, 1) \& \mbox{\hyperlink{ehcireg_8h_ab7e12bd9f2c6631281ee2b5f253da77f}{PCI\_USB\_REV\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00316}00316         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehcireg_8h_aab60e5dd31083f79c3b98b748d24b9a1}{PCI\_USB\_REV\_PRE\_1\_0}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00317}00317         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehcireg_8h_ada038d84d35366ddb490aa394b922408}{PCI\_USB\_REV\_1\_0}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00318}00318         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehcireg_8h_a83d556ad60bea944d908b7fa770b86c5}{PCI\_USB\_REV\_1\_1}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00319}00319                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00320}00320 \textcolor{comment}{                 * NOTE: some EHCI USB controllers have the wrong USB}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00321}00321 \textcolor{comment}{                 * revision number. It appears those controllers are}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00322}00322 \textcolor{comment}{                 * fully compliant so we just ignore this value in}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00323}00323 \textcolor{comment}{                 * some common cases.}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00324}00324 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00325}00325                 device\_printf(self, \textcolor{stringliteral}{"{}pre-\/2.0 USB revision (ignored)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00326}00326                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00327}00327         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehcireg_8h_a9023b30a20d51352abe4a40381373db5}{PCI\_USB\_REV\_2\_0}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00328}00328                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00329}00329         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00330}00330                 \textcolor{comment}{/* Quirk for Parallels Desktop 4.0 */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00331}00331                 device\_printf(self, \textcolor{stringliteral}{"{}USB revision is unknown. Assuming v2.0.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00332}00332                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00333}00333         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00334}00334 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00335}00335         rid = \mbox{\hyperlink{ehcireg_8h_ac3cc3afb87f6abd4a45f02b00de3f610}{PCI\_CBMEM}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00336}00336         sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}} = bus\_alloc\_resource\_any(self, SYS\_RES\_MEMORY, \&rid,}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00337}00337             RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00338}00338         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00339}00339                 device\_printf(self, \textcolor{stringliteral}{"{}Could not map memory\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00340}00340                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00341}00341         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00342}00342         sc-\/>\mbox{\hyperlink{structehci__softc_a7cec17ef772fa77476e3911beee92aff}{sc\_io\_tag}} = rman\_get\_bustag(sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00343}00343         sc-\/>\mbox{\hyperlink{structehci__softc_a37d4db155aa3c0b309ef66274193f626}{sc\_io\_hdl}} = rman\_get\_bushandle(sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00344}00344         sc-\/>\mbox{\hyperlink{structehci__softc_a123f8105874f7a9b84db9b04fdf38778}{sc\_io\_size}} = rman\_get\_size(sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00345}00345 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00346}00346         rid = 0;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00347}00347         sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}} = bus\_alloc\_resource\_any(self, SYS\_RES\_IRQ, \&rid,}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00348}00348             RF\_SHAREABLE | RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00349}00349         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00350}00350                 device\_printf(self, \textcolor{stringliteral}{"{}Could not allocate irq\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00351}00351                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00352}00352         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00353}00353         sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}} = device\_add\_child(self, \textcolor{stringliteral}{"{}usbus"{}}, -\/1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00354}00354         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00355}00355                 device\_printf(self, \textcolor{stringliteral}{"{}Could not add USB device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00356}00356                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00357}00357         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00358}00358         device\_set\_ivars(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00360}00360         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00361}00361 \textcolor{comment}{         * ehci\_pci\_match will never return NULL if ehci\_pci\_probe}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00362}00362 \textcolor{comment}{         * succeeded}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00363}00363 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00364}00364         device\_set\_desc(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \mbox{\hyperlink{ehci__pci_8c_aef972617a2df8ef5601de84fa71fbf89}{ehci\_pci\_match}}(self));}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00365}00365         \textcolor{keywordflow}{switch} (pci\_get\_vendor(self)) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00366}00366         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_ad4ae86c9343419883e1951348f54e554}{PCI\_EHCI\_VENDORID\_ACERLABS}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00367}00367                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}AcerLabs"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00368}00368                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00369}00369         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a6b6b92c63b60e4bed33c467c8c95ca9d}{PCI\_EHCI\_VENDORID\_AMD}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00370}00370                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}AMD"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00371}00371                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00372}00372         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a0de239e138f74f7cbb49d82e0b3e1837}{PCI\_EHCI\_VENDORID\_APPLE}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00373}00373                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}Apple"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00374}00374                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00375}00375         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_add87203bbc921bcfbcb9b4643e18b08d}{PCI\_EHCI\_VENDORID\_ATI}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00376}00376                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}ATI"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00377}00377                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00378}00378         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a3c2bdc0f61f208bba931c2ca498d1689}{PCI\_EHCI\_VENDORID\_CMDTECH}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00379}00379                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}CMDTECH"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00380}00380                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00381}00381         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a4333130ae559874b34f6764a67eaa3be}{PCI\_EHCI\_VENDORID\_HYGON}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00382}00382                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}Hygon"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00383}00383                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00384}00384         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a00a4f3495d85e69c277f19e3d3b4e86e}{PCI\_EHCI\_VENDORID\_INTEL}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00385}00385                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}Intel"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00386}00386                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00387}00387         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a84979638838ee808019d85f24a74ce62}{PCI\_EHCI\_VENDORID\_NEC}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00388}00388                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}NEC"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00389}00389                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00390}00390         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_ade25f0d66a4cd7819d12e39fd91a3537}{PCI\_EHCI\_VENDORID\_OPTI}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00391}00391                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}OPTi"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00392}00392                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00393}00393         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a71a91143308b9a56fe95b44ace949087}{PCI\_EHCI\_VENDORID\_PHILIPS}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00394}00394                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}Philips"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00395}00395                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00396}00396         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a3e375b4316d15ad43f43eb0f6174f10c}{PCI\_EHCI\_VENDORID\_SIS}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00397}00397                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}SiS"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00398}00398                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00399}00399         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a6e809889cca691416a772d3132f28665}{PCI\_EHCI\_VENDORID\_NVIDIA}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00400}00400         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a5ef37efbd14f099a73fa91f5fdf8eebe}{PCI\_EHCI\_VENDORID\_NVIDIA2}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00401}00401                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}nVidia"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00402}00402                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00403}00403         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_aeb7962062bee0acf46844392eedff387}{PCI\_EHCI\_VENDORID\_VIA}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00404}00404                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}VIA"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00405}00405                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00406}00406         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00407}00407                 \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00408}00408                         device\_printf(self, \textcolor{stringliteral}{"{}(New EHCI DeviceId=0x\%08x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00409}00409                             pci\_get\_devid(self));}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00410}00410                 sprintf(sc-\/>\mbox{\hyperlink{structehci__softc_a0a38070806b7d156e746430f4b54e81d}{sc\_vendor}}, \textcolor{stringliteral}{"{}(0x\%04x)"{}}, pci\_get\_vendor(self));}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00411}00411         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00413}00413 \textcolor{preprocessor}{\#if (\_\_FreeBSD\_version >= 700031)}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00414}00414         err = bus\_setup\_intr(self, sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}}, INTR\_TYPE\_BIO | INTR\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00415}00415             NULL, (driver\_intr\_t *)\mbox{\hyperlink{ehci_8c_a29753f8b40af28deb1954e1c728a306b}{ehci\_interrupt}}, sc, \&sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00416}00416 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00417}00417         err = bus\_setup\_intr(self, sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}}, INTR\_TYPE\_BIO | INTR\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00418}00418             (driver\_intr\_t *)\mbox{\hyperlink{ehci_8c_a29753f8b40af28deb1954e1c728a306b}{ehci\_interrupt}}, sc, \&sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00419}00419 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00420}00420         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00421}00421                 device\_printf(self, \textcolor{stringliteral}{"{}Could not setup irq, \%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00422}00422                 sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00423}00423                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00424}00424         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00425}00425         \mbox{\hyperlink{ehci__pci_8c_ad1ee74939d0ea08e2f3871c92db8f7d8}{ehci\_pci\_take\_controller}}(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00426}00426 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00427}00427         \textcolor{comment}{/* Undocumented quirks taken from Linux */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00429}00429         \textcolor{keywordflow}{switch} (pci\_get\_vendor(self)) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00430}00430         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_add87203bbc921bcfbcb9b4643e18b08d}{PCI\_EHCI\_VENDORID\_ATI}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00431}00431                 \textcolor{comment}{/* SB600 and SB700 EHCI quirk */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00432}00432                 \textcolor{keywordflow}{switch} (pci\_get\_device(self)) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00433}00433                 \textcolor{keywordflow}{case} 0x4386:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00434}00434                         \mbox{\hyperlink{ehci__pci_8c_adca58c8402b5f68a83282f42a7c26770}{ehci\_pci\_ati\_quirk}}(self, 0);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00435}00435                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00436}00436                 \textcolor{keywordflow}{case} 0x4396:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00437}00437                         \mbox{\hyperlink{ehci__pci_8c_adca58c8402b5f68a83282f42a7c26770}{ehci\_pci\_ati\_quirk}}(self, 1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00438}00438                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00439}00439                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00440}00440                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00441}00441                 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00442}00442                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00444}00444         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_aeb7962062bee0acf46844392eedff387}{PCI\_EHCI\_VENDORID\_VIA}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00445}00445                 \mbox{\hyperlink{ehci__pci_8c_a967ed236ad465adbba8e9cee9743183d}{ehci\_pci\_via\_quirk}}(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00446}00446                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00447}00447 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00448}00448         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00449}00449                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00450}00450         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00451}00451 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00452}00452         \textcolor{comment}{/* Dropped interrupts workaround */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00453}00453         \textcolor{keywordflow}{switch} (pci\_get\_vendor(self)) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00454}00454         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_add87203bbc921bcfbcb9b4643e18b08d}{PCI\_EHCI\_VENDORID\_ATI}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00455}00455         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_aeb7962062bee0acf46844392eedff387}{PCI\_EHCI\_VENDORID\_VIA}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00456}00456                 sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} |= \mbox{\hyperlink{ehci_8h_ae189d5093f1c6486b3fe8acebbffb033}{EHCI\_SCFLG\_LOSTINTRBUG}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00457}00457                 \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00458}00458                         device\_printf(self,}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00459}00459                             \textcolor{stringliteral}{"{}Dropped interrupts workaround enabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00460}00460                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00461}00461         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00462}00462                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00463}00463         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00465}00465         \textcolor{comment}{/* Doorbell feature workaround */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00466}00466         \textcolor{keywordflow}{switch} (pci\_get\_vendor(self)) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00467}00467         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a6e809889cca691416a772d3132f28665}{PCI\_EHCI\_VENDORID\_NVIDIA}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00468}00468         \textcolor{keywordflow}{case} \mbox{\hyperlink{ehci__pci_8c_a5ef37efbd14f099a73fa91f5fdf8eebe}{PCI\_EHCI\_VENDORID\_NVIDIA2}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00469}00469                 sc-\/>\mbox{\hyperlink{structehci__softc_ad443ed297f00f3febfe77d06855081b2}{sc\_flags}} |= \mbox{\hyperlink{ehci_8h_a87ced3e6ffe3c50a405c8a85d5fc9c25}{EHCI\_SCFLG\_IAADBUG}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00470}00470                 \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00471}00471                         device\_printf(self,}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00472}00472                             \textcolor{stringliteral}{"{}Doorbell workaround enabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00473}00473                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00474}00474         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00475}00475                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00476}00476         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00477}00477 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00478}00478         err = \mbox{\hyperlink{ehci_8c_ae09cd35aac92ce20149a1714a7109613}{ehci\_init}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00479}00479         \textcolor{keywordflow}{if} (!err) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00480}00480                 err = device\_probe\_and\_attach(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00481}00481         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00482}00482         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00483}00483                 device\_printf(self, \textcolor{stringliteral}{"{}USB init failed err=\%d\(\backslash\)n"{}}, err);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00484}00484                 \textcolor{keywordflow}{goto} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00485}00485         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00486}00486         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00487}00487 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00488}00488 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}:}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00489}00489         \mbox{\hyperlink{ehci__pci_8c_a8aa2b76784f83f3331e562032fd5eda2}{ehci\_pci\_detach}}(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00490}00490         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00491}00491 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00492}00492 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00493}00493 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00494}\mbox{\hyperlink{ehci__pci_8c_afa878b19db64045e3ff71bc2748b531e}{00494}} \mbox{\hyperlink{ehci__pci_8c_a8aa2b76784f83f3331e562032fd5eda2}{ehci\_pci\_detach}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00495}00495 \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00496}00496         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00498}00498         \textcolor{comment}{/* during module unload there are lots of children leftover */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00499}00499         device\_delete\_children(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00500}00500 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00501}00501         pci\_disable\_busmaster(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00502}00502 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00503}00503         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}} \&\& sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00504}00504                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00505}00505 \textcolor{comment}{                 * only call ehci\_detach() after ehci\_init()}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00506}00506 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00507}00507                 \mbox{\hyperlink{ehci_8c_a4d9677740a3aa048c4b03e13bdafe43a}{ehci\_detach}}(sc);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00508}00508 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00509}00509                 \textcolor{keywordtype}{int} err = bus\_teardown\_intr(self, sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}}, sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00510}00510 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00511}00511                 \textcolor{keywordflow}{if} (err)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00512}00512                         \textcolor{comment}{/* XXX or should we panic? */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00513}00513                         device\_printf(self, \textcolor{stringliteral}{"{}Could not tear down irq, \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00514}00514                             err);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00515}00515                 sc-\/>\mbox{\hyperlink{structehci__softc_a2d11b55fee6de8b402bd60b6947f3d80}{sc\_intr\_hdl}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00516}00516         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00517}00517         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00518}00518                 bus\_release\_resource(self, SYS\_RES\_IRQ, 0, sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00519}00519                 sc-\/>\mbox{\hyperlink{structehci__softc_a25322dcf9605477b63aa53cf44ad6404}{sc\_irq\_res}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00520}00520         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00521}00521         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00522}00522                 bus\_release\_resource(self, SYS\_RES\_MEMORY, \mbox{\hyperlink{ehcireg_8h_ac3cc3afb87f6abd4a45f02b00de3f610}{PCI\_CBMEM}},}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00523}00523                     sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00524}00524                 sc-\/>\mbox{\hyperlink{structehci__softc_a50eaffc0569b91d99e647f1b059571c2}{sc\_io\_res}} = NULL;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00525}00525         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00526}00526         \mbox{\hyperlink{usb__controller_8c_a0a85a587a062a4af3f1df6fc298a02b2}{usb\_bus\_mem\_free\_all}}(\&sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}, \&\mbox{\hyperlink{ehci_8h_ac442dc73d309535c45d563b140daf901}{ehci\_iterate\_hw\_softc}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00528}00528         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00529}00529 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00531}00531 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00532}\mbox{\hyperlink{ehci__pci_8c_ad3fdab028ac24c008d2054bedcc18a92}{00532}} \mbox{\hyperlink{ehci__pci_8c_ad1ee74939d0ea08e2f3871c92db8f7d8}{ehci\_pci\_take\_controller}}(device\_t self)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00533}00533 \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00534}00534         \mbox{\hyperlink{structehci__softc}{ehci\_softc\_t}} *sc = device\_get\_softc(self);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00535}00535         uint32\_t cparams;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00536}00536         uint32\_t eec;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00537}00537         uint16\_t to;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00538}00538         uint8\_t eecp;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00539}00539         uint8\_t bios\_sem;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00541}00541         cparams = \mbox{\hyperlink{ehci_8h_aca8562aa9c2b4bfcc55f66c00c0c1110}{EREAD4}}(sc, \mbox{\hyperlink{ehcireg_8h_a01f0888bf280756a9c106294b4195034}{EHCI\_HCCPARAMS}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00542}00542 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00543}00543         \textcolor{comment}{/* Synchronise with the BIOS if it owns the controller. */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00544}00544         \textcolor{keywordflow}{for} (eecp = \mbox{\hyperlink{ehcireg_8h_a3e7d309afac96f2cf8f8ab887c61adc0}{EHCI\_HCC\_EECP}}(cparams); eecp != 0;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00545}00545             eecp = \mbox{\hyperlink{ehcireg_8h_a79d307fd414d78be9454937c611270cd}{EHCI\_EECP\_NEXT}}(eec)) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00546}00546                 eec = pci\_read\_config(self, eecp, 4);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00547}00547                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehcireg_8h_a924e5602272bedf3741f00877a74bd87}{EHCI\_EECP\_ID}}(eec) != \mbox{\hyperlink{ehcireg_8h_af12c46f162b80754f8e0de9512583d6d}{EHCI\_EC\_LEGSUP}}) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00548}00548                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00549}00549                 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00550}00550                 bios\_sem = pci\_read\_config(self, eecp +}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00551}00551                     \mbox{\hyperlink{ehcireg_8h_aef511a7ec321dab0b2834063e639531d}{EHCI\_LEGSUP\_BIOS\_SEM}}, 1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00552}00552                 \textcolor{keywordflow}{if} (bios\_sem == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00553}00553                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00554}00554                 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00555}00555                 device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}}, \textcolor{stringliteral}{"{}waiting for BIOS "{}}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00556}00556                     \textcolor{stringliteral}{"{}to give up control\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00557}00557                 pci\_write\_config(self, eecp +}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00558}00558                     \mbox{\hyperlink{ehcireg_8h_aa8046627dc7dd78434c261b11b1076a0}{EHCI\_LEGSUP\_OS\_SEM}}, 1, 1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00559}00559                 to = 500;}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00560}00560                 \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00561}00561                         bios\_sem = pci\_read\_config(self, eecp +}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00562}00562                             \mbox{\hyperlink{ehcireg_8h_aef511a7ec321dab0b2834063e639531d}{EHCI\_LEGSUP\_BIOS\_SEM}}, 1);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00563}00563                         \textcolor{keywordflow}{if} (bios\_sem == 0)}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00564}00564                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00565}00565 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00566}00566                         \textcolor{keywordflow}{if} (-\/-\/to == 0) \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00567}00567                                 device\_printf(sc-\/>\mbox{\hyperlink{structehci__softc_aeba7905929a62292435fea502ddd238b}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}},}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00568}00568                                     \textcolor{stringliteral}{"{}timed out waiting for BIOS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00569}00569                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00570}00570                         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00571}00571                         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(NULL, hz / 100);     \textcolor{comment}{/* wait 10ms */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00572}00572                 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00573}00573         \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00574}00574         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00575}00575 \}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00576}00576 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00577}\mbox{\hyperlink{ehci__pci_8c_a25bc8d0b5976bad1409829c4484b5771}{00577}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{ehci__pci_8c_a25bc8d0b5976bad1409829c4484b5771}{ehci\_pci\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00578}00578         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00579}00579         DEVMETHOD(device\_probe, \mbox{\hyperlink{ehci__pci_8c_aa5ddd11f9acd139036552a40d66239c4}{ehci\_pci\_probe}}),}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00580}00580         DEVMETHOD(device\_attach, \mbox{\hyperlink{ehci__pci_8c_a4dd49a2ed539d21534c3eee4dd35d6bc}{ehci\_pci\_attach}}),}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00581}00581         DEVMETHOD(device\_detach, \mbox{\hyperlink{ehci__pci_8c_a8aa2b76784f83f3331e562032fd5eda2}{ehci\_pci\_detach}}),}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00582}00582         DEVMETHOD(device\_suspend, bus\_generic\_suspend),}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00583}00583         DEVMETHOD(device\_resume, bus\_generic\_resume),}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00584}00584         DEVMETHOD(device\_shutdown, bus\_generic\_shutdown),}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00585}00585         DEVMETHOD(usb\_take\_controller, \mbox{\hyperlink{ehci__pci_8c_ad1ee74939d0ea08e2f3871c92db8f7d8}{ehci\_pci\_take\_controller}}),}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00586}00586 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00587}00587         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00588}00588 \};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00589}00589 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00590}\mbox{\hyperlink{ehci__pci_8c_afee8c0eb6173d0449096dbaed5da602a}{00590}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{ehci__pci_8c_afee8c0eb6173d0449096dbaed5da602a}{ehci\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00591}00591         .name = \textcolor{stringliteral}{"{}ehci"{}},}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00592}00592         .methods = \mbox{\hyperlink{ehci__pci_8c_a25bc8d0b5976bad1409829c4484b5771}{ehci\_pci\_methods}},}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00593}00593         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structehci__softc}{ehci\_softc}}),}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00594}00594 \};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00595}00595 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00596}\mbox{\hyperlink{ehci__pci_8c_aad032634e20e0d13d4b63c8bcebf4e17}{00596}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{ehci__pci_8c_aad032634e20e0d13d4b63c8bcebf4e17}{ehci\_devclass}};}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00597}00597 }
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00598}\mbox{\hyperlink{ehci__pci_8c_a4183adbb531a7e5977a33396bb907b11}{00598}} \mbox{\hyperlink{ehci__pci_8c_a4183adbb531a7e5977a33396bb907b11}{DRIVER\_MODULE}}(ehci, pci, \mbox{\hyperlink{ehci__pci_8c_afee8c0eb6173d0449096dbaed5da602a}{ehci\_driver}}, \mbox{\hyperlink{ehci__pci_8c_aad032634e20e0d13d4b63c8bcebf4e17}{ehci\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{ehci__pci_8c_source_l00599}\mbox{\hyperlink{ehci__pci_8c_a72ea123a49454e114a49ada028b5d1b9}{00599}} \mbox{\hyperlink{ehci__pci_8c_a72ea123a49454e114a49ada028b5d1b9}{MODULE\_DEPEND}}(ehci, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}

\end{DoxyCode}
