\hypertarget{usb__busdma_8h_source}{}\doxysection{usb\+\_\+busdma.\+h}
\label{usb__busdma_8h_source}\index{dev/usb/usb\_busdma.h@{dev/usb/usb\_busdma.h}}
\mbox{\hyperlink{usb__busdma_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00001}00001 \textcolor{comment}{/* \$FreeBSD\$ */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00002}00002 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00003}00003 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00029}00029 \textcolor{preprocessor}{\#ifndef \_USB\_BUSDMA\_H\_}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00030}00030 \textcolor{preprocessor}{\#define \_USB\_BUSDMA\_H\_}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00032}00032 \textcolor{preprocessor}{\#ifndef USB\_GLOBAL\_INCLUDE\_FILE}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/uio.h>}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/mbuf.h>}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00036}00036 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00037}00037 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00039}00039 \textcolor{comment}{/* defines */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00041}\mbox{\hyperlink{usb__busdma_8h_af6bf43ebbdb929a25626381152fc2950}{00041}} \textcolor{preprocessor}{\#define USB\_PAGE\_SIZE PAGE\_SIZE         }\textcolor{comment}{/* use system PAGE\_SIZE */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00043}00043 \textcolor{preprocessor}{\#if (\_\_FreeBSD\_version >= 700020)}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00044}00044 \textcolor{preprocessor}{\#define USB\_GET\_DMA\_TAG(dev) bus\_get\_dma\_tag(dev)}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00045}00045 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00046}\mbox{\hyperlink{usb__busdma_8h_acec0356df4d4a6905c59303652de41ad}{00046}} \textcolor{preprocessor}{\#define USB\_GET\_DMA\_TAG(dev) NULL       }\textcolor{comment}{/* XXX */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00047}00047 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00049}00049 \textcolor{comment}{/* structure prototypes */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00051}00051 \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer__root}{usb\_xfer\_root}};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00052}00052 \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00053}00053 \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__tag}{usb\_dma\_tag}};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00055}00055 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00056}00056 \textcolor{comment}{ * The following typedef defines the USB DMA load done callback.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00057}00057 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00059}\mbox{\hyperlink{usb__busdma_8h_ac5f727f26f9bc35b8c3f632b9241e1b3}{00059}} \textcolor{keyword}{typedef} void (\mbox{\hyperlink{usb__busdma_8h_ac5f727f26f9bc35b8c3f632b9241e1b3}{usb\_dma\_callback\_t}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} *udpt);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00061}00061 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00062}00062 \textcolor{comment}{ * The following structure defines physical and non kernel virtual}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00063}00063 \textcolor{comment}{ * address of a memory page having size USB\_PAGE\_SIZE.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00064}00064 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00065}\mbox{\hyperlink{structusb__page}{00065}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page}{usb\_page}} \{}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00066}00066 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00067}00067         bus\_addr\_t physaddr;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00068}00068         \textcolor{keywordtype}{void}   *buffer;                 \textcolor{comment}{/* non Kernel Virtual Address */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00069}00069 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00070}00070 \};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00072}00072 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00073}00073 \textcolor{comment}{ * The following structure is used when needing the kernel virtual}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00074}00074 \textcolor{comment}{ * pointer and the physical address belonging to an offset in an USB}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00075}00075 \textcolor{comment}{ * page cache.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00076}00076 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00077}\mbox{\hyperlink{structusb__page__search}{00077}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} \{}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00078}\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{00078}}         \textcolor{keywordtype}{void}   *\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00079}00079 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00080}00080         bus\_addr\_t physaddr;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00081}00081 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00082}\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{00082}}         \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00083}00083 \};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00085}00085 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00086}00086 \textcolor{comment}{ * The following structure is used to keep information about a DMA}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00087}00087 \textcolor{comment}{ * memory allocation.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00088}00088 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00089}\mbox{\hyperlink{structusb__page__cache}{00089}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} \{}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00090}00090 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00091}00091         bus\_dma\_tag\_t tag;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00092}00092         bus\_dmamap\_t map;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00093}00093         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page}{usb\_page}} *page\_start;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00094}00094 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00095}\mbox{\hyperlink{structusb__page__cache_a7663bc380dc8f03d66b09cb845e309a6}{00095}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} *\mbox{\hyperlink{structusb__page__cache_a7663bc380dc8f03d66b09cb845e309a6}{tag\_parent}};      \textcolor{comment}{/* always set */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00096}\mbox{\hyperlink{structusb__page__cache_ac3dfc991ca2375bf28920c34d4e11267}{00096}}         \textcolor{keywordtype}{void}   *\mbox{\hyperlink{structusb__page__cache_ac3dfc991ca2375bf28920c34d4e11267}{buffer}};                   \textcolor{comment}{/* virtual buffer pointer */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00097}00097 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00098}00098         \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} page\_offset\_buf;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00099}00099         \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} page\_offset\_end;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00100}00100         uint8\_t isread:1;               \textcolor{comment}{/* set if we are currently reading}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00101}00101 \textcolor{comment}{                                         * from the memory. Else write. */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00102}00102         uint8\_t ismultiseg:1;           \textcolor{comment}{/* set if we can have multiple}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00103}00103 \textcolor{comment}{                                         * segments */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00104}00104         uint8\_t isloaded:1;             \textcolor{comment}{/* Set if map is currently loaded. */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00105}00105 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00106}00106 \};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00107}00107 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00108}00108 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00109}00109 \textcolor{comment}{ * The following structure describes the parent USB DMA tag.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00110}00110 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00111}00111 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00112}00112 \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} \{}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00113}00113         \textcolor{keyword}{struct }cv cv[1];                \textcolor{comment}{/* internal condition variable */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00114}00114         bus\_dma\_tag\_t tag;              \textcolor{comment}{/* always set */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00116}00116         \textcolor{keyword}{struct }mtx *mtx;                \textcolor{comment}{/* private mutex, always set */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00117}00117         \mbox{\hyperlink{usb__busdma_8h_ac5f727f26f9bc35b8c3f632b9241e1b3}{usb\_dma\_callback\_t}} *func; \textcolor{comment}{/* load complete callback function */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00118}00118         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__tag}{usb\_dma\_tag}} *utag\_first;\textcolor{comment}{/* pointer to first USB DMA tag */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00119}00119         uint8\_t dma\_error;              \textcolor{comment}{/* set if DMA load operation failed */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00120}00120         uint8\_t dma\_bits;               \textcolor{comment}{/* number of DMA address lines */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00121}00121         uint8\_t utag\_max;               \textcolor{comment}{/* number of USB DMA tags */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00122}00122 \};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00123}00123 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00124}\mbox{\hyperlink{structusb__dma__parent__tag}{00124}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} \{\};         \textcolor{comment}{/* empty struct */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00125}00125 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00127}00127 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00128}00128 \textcolor{comment}{ * The following structure describes an USB DMA tag.}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00129}00129 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00130}00130 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00131}00131 \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__tag}{usb\_dma\_tag}} \{}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00132}00132         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} *tag\_parent;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00133}00133         bus\_dma\_tag\_t tag;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00134}00134         \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} align;}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00135}00135         \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00136}00136 \};}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00137}00137 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00138}\mbox{\hyperlink{structusb__dma__tag}{00138}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__tag}{usb\_dma\_tag}} \{\};                       \textcolor{comment}{/* empty struct */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00139}00139 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00141}00141 \textcolor{comment}{/* function prototypes */}}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00143}\mbox{\hyperlink{usb__busdma_8h_ac9239c1e50246f287ea710c1f96d513e}{00143}} \textcolor{keywordtype}{int}     \mbox{\hyperlink{usb__busdma_8h_ac9239c1e50246f287ea710c1f96d513e}{usb\_uiomove}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc, \textcolor{keyword}{struct} uio *uio,}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00144}00144             \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} pc\_offset, \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00145}\mbox{\hyperlink{usb__busdma_8h_a974640cac87034aaaff4436c8feecf09}{00145}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__tag}{usb\_dma\_tag}} *\mbox{\hyperlink{usb__busdma_8h_a974640cac87034aaaff4436c8feecf09}{usb\_dma\_tag\_find}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} *udpt,}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00146}00146             \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}}, \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} align);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00147}\mbox{\hyperlink{usb__busdma_8h_aded9f2a61863d5d619acdb1e5094848a}{00147}} uint8\_t \mbox{\hyperlink{usb__busdma_8h_aded9f2a61863d5d619acdb1e5094848a}{usb\_pc\_alloc\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page}{usb\_page}} *pg,}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00148}00148             \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}}, \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} align);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00149}\mbox{\hyperlink{usb__busdma_8h_a479fe20680d7490d41e587b23bcc3d45}{00149}} uint8\_t \mbox{\hyperlink{usb__busdma_8h_a479fe20680d7490d41e587b23bcc3d45}{usb\_pc\_dmamap\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc, \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}});}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00150}\mbox{\hyperlink{usb__busdma_8h_a5e740a0fe99e8ff3a45f8b8559cadc87}{00150}} uint8\_t \mbox{\hyperlink{usb__busdma_8h_a5e740a0fe99e8ff3a45f8b8559cadc87}{usb\_pc\_load\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc, \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}},}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00151}00151             uint8\_t sync);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00152}\mbox{\hyperlink{usb__busdma_8h_a9c4441294ce37d9e921fa472f948f5a7}{00152}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a9c4441294ce37d9e921fa472f948f5a7}{usb\_bdma\_done\_event}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} *udpt);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00153}\mbox{\hyperlink{usb__busdma_8h_ac1a8c5dea66b9e97f75fdaf85a4cc0d1}{00153}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_ac1a8c5dea66b9e97f75fdaf85a4cc0d1}{usb\_bdma\_post\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00154}\mbox{\hyperlink{usb__busdma_8h_a34e303136b59f404b8f89593d526f739}{00154}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a34e303136b59f404b8f89593d526f739}{usb\_bdma\_pre\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00155}\mbox{\hyperlink{usb__busdma_8h_a2e9402cfe5e0b0122559cd48a5ffb4d3}{00155}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a2e9402cfe5e0b0122559cd48a5ffb4d3}{usb\_bdma\_work\_loop}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer__queue}{usb\_xfer\_queue}} *pq);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00156}\mbox{\hyperlink{usb__busdma_8h_a68e750125c81ade86c0508031f432b12}{00156}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a68e750125c81ade86c0508031f432b12}{usb\_dma\_tag\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} *udpt,}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00157}00157             \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__dma__tag}{usb\_dma\_tag}} *udt, bus\_dma\_tag\_t dmat, \textcolor{keyword}{struct} mtx *mtx,}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00158}00158             \mbox{\hyperlink{usb__busdma_8h_ac5f727f26f9bc35b8c3f632b9241e1b3}{usb\_dma\_callback\_t}} *func, uint8\_t ndmabits, uint8\_t nudt);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00159}\mbox{\hyperlink{usb__busdma_8h_a76a905ce76102f9049f0d8bf285ad066}{00159}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a76a905ce76102f9049f0d8bf285ad066}{usb\_dma\_tag\_unsetup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} *udpt);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00160}\mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{00160}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a988a5299f521e8a8d94a68a03015bd77}{usb\_pc\_cpu\_flush}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00161}\mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{00161}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a8752e7de57d1aa5d26c2cd8209162f69}{usb\_pc\_cpu\_invalidate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00162}\mbox{\hyperlink{usb__busdma_8h_a2c89e45054daeaf289561130a1d3a275}{00162}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a2c89e45054daeaf289561130a1d3a275}{usb\_pc\_dmamap\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00163}\mbox{\hyperlink{usb__busdma_8h_a43ad85a548118cf8d9e3cbc97dd7106f}{00163}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__busdma_8h_a43ad85a548118cf8d9e3cbc97dd7106f}{usb\_pc\_free\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00164}00164 uint8\_t \mbox{\hyperlink{usb__busdma_8h_af24344726935c97582c922f2dbdc2388}{usb\_pc\_buffer\_is\_aligned}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc,}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00165}00165             \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}}, \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}},}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00166}00166             \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} mask);}
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00167}00167 }
\DoxyCodeLine{\Hypertarget{usb__busdma_8h_source_l00168}00168 \textcolor{preprocessor}{\#endif                                  }\textcolor{comment}{/* \_USB\_BUSDMA\_H\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
