\hypertarget{qla__os_8h_source}{}\doxysection{qla\+\_\+os.\+h}
\label{qla__os_8h_source}\index{dev/qlxgb/qla\_os.h@{dev/qlxgb/qla\_os.h}}
\mbox{\hyperlink{qla__os_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2011-\/2013 Qlogic Corporation}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00007}00007 \textcolor{comment}{ *  Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00008}00008 \textcolor{comment}{ *  modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00009}00009 \textcolor{comment}{ *  are met:}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00011}00011 \textcolor{comment}{ *  1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00012}00012 \textcolor{comment}{ *     notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00013}00013 \textcolor{comment}{ *  2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00014}00014 \textcolor{comment}{ *     notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00015}00015 \textcolor{comment}{ *     documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00017}00017 \textcolor{comment}{ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "{}AS IS"{}}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00018}00018 \textcolor{comment}{ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00019}00019 \textcolor{comment}{ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00020}00020 \textcolor{comment}{ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00021}00021 \textcolor{comment}{ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00022}00022 \textcolor{comment}{ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00023}00023 \textcolor{comment}{ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00024}00024 \textcolor{comment}{ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00025}00025 \textcolor{comment}{ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00026}00026 \textcolor{comment}{ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00027}00027 \textcolor{comment}{ *  POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00028}00028 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00029}00029 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00030}00030 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00031}00031 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00032}00032 \textcolor{comment}{ * File: qla\_os.h}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00033}00033 \textcolor{comment}{ * Author : David C Somayajulu, Qlogic Corporation, Aliso Viejo, CA 92656.}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00034}00034 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00036}00036 \textcolor{preprocessor}{\#ifndef \_QLA\_OS\_H\_}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00037}00037 \textcolor{preprocessor}{\#define \_QLA\_OS\_H\_}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/mbuf.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/protosw.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/socket.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/sockio.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00049}00049 \textcolor{preprocessor}{\#include <machine/atomic.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00052}00052 \textcolor{preprocessor}{\#if \_\_FreeBSD\_version < 700112}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00053}00053 \textcolor{preprocessor}{\#error FreeBSD Version not supported -\/ use version >= 700112}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00054}00054 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00056}00056 \textcolor{preprocessor}{\#include <net/if.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00057}00057 \textcolor{preprocessor}{\#include <net/if\_var.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00058}00058 \textcolor{preprocessor}{\#include <net/if\_arp.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00059}00059 \textcolor{preprocessor}{\#include <net/ethernet.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00060}00060 \textcolor{preprocessor}{\#include <net/if\_dl.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00061}00061 \textcolor{preprocessor}{\#include <net/if\_media.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00062}00062 \textcolor{preprocessor}{\#include <net/bpf.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00063}00063 \textcolor{preprocessor}{\#include <net/if\_types.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00064}00064 \textcolor{preprocessor}{\#include <net/if\_vlan\_var.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00066}00066 \textcolor{preprocessor}{\#include <netinet/in\_systm.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00067}00067 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00068}00068 \textcolor{preprocessor}{\#include <netinet/if\_ether.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00069}00069 \textcolor{preprocessor}{\#include <netinet/ip.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00070}00070 \textcolor{preprocessor}{\#include <netinet/ip6.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00071}00071 \textcolor{preprocessor}{\#include <netinet/tcp.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00072}00072 \textcolor{preprocessor}{\#include <netinet/udp.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00073}00073 \textcolor{preprocessor}{\#include <netinet/in\_var.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00074}00074 \textcolor{preprocessor}{\#include <netinet/tcp\_lro.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00076}00076 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00077}00077 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00078}00078 \textcolor{preprocessor}{\#include <sys/rman.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00079}00079 \textcolor{preprocessor}{\#include <machine/resource.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00080}00080 \textcolor{preprocessor}{\#include <dev/pci/pcireg.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00081}00081 \textcolor{preprocessor}{\#include <dev/pci/pcivar.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00082}00082 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00083}00083 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00084}00084 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00085}00085 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00086}00086 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00087}00087 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00088}00088 \textcolor{preprocessor}{\#include <sys/pcpu.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00090}00090 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00091}00091 \textcolor{preprocessor}{\#include <sys/kthread.h>}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00093}\mbox{\hyperlink{qla__os_8h_ac5cf4317aa0206f11f5c454c0ec7c8b7}{00093}} \textcolor{preprocessor}{\#define QLA\_USEC\_DELAY(usec)    DELAY(usec)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00095}\mbox{\hyperlink{qla__os_8h_a73a47844972f5a5c302beb119927fde5}{00095}} \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__os_8h_a73a47844972f5a5c302beb119927fde5}{qla\_ms\_to\_hz}}(\textcolor{keywordtype}{int} ms)}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00096}00096 \{}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00097}00097         \textcolor{keywordtype}{int} qla\_hz;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00099}00099         \textcolor{keyword}{struct }timeval t;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00101}00101         t.tv\_sec = ms / 1000;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00102}00102         t.tv\_usec = (ms \% 1000) * 1000;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00104}00104         qla\_hz = tvtohz(\&t);}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00106}00106         \textcolor{keywordflow}{if} (qla\_hz < 0)}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00107}00107                 qla\_hz = 0x7fffffff;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00108}00108         \textcolor{keywordflow}{if} (!qla\_hz)}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00109}00109                 qla\_hz = 1;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00111}00111         \textcolor{keywordflow}{return} (qla\_hz);}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00112}00112 \}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00114}\mbox{\hyperlink{qla__os_8h_a307fd4449e94e89090889dccb93a01ea}{00114}} \textcolor{keyword}{static} \_\_inline \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__os_8h_a307fd4449e94e89090889dccb93a01ea}{qla\_sec\_to\_hz}}(\textcolor{keywordtype}{int} sec)}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00115}00115 \{}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00116}00116         \textcolor{keyword}{struct }timeval t;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00118}00118         t.tv\_sec = sec;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00119}00119         t.tv\_usec = 0;}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00121}00121         \textcolor{keywordflow}{return} (tvtohz(\&t));}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00122}00122 \}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00124}\mbox{\hyperlink{qla__os_8h_a2c16e8bd784bac8a87027db51ddbf393}{00124}} \textcolor{preprocessor}{\#define qla\_host\_to\_le16(x)     htole16(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00125}\mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{00125}} \textcolor{preprocessor}{\#define qla\_host\_to\_le32(x)     htole32(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00126}\mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{00126}} \textcolor{preprocessor}{\#define qla\_host\_to\_le64(x)     htole64(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00127}\mbox{\hyperlink{qla__os_8h_a958f5685f82a2784d22e594fc72f3ffd}{00127}} \textcolor{preprocessor}{\#define qla\_host\_to\_be16(x)     htobe16(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00128}\mbox{\hyperlink{qla__os_8h_a78ff3c1831b1e0083d995fac973494da}{00128}} \textcolor{preprocessor}{\#define qla\_host\_to\_be32(x)     htobe32(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00129}\mbox{\hyperlink{qla__os_8h_ae6c872aed48eaf28200c9f1fede8bb24}{00129}} \textcolor{preprocessor}{\#define qla\_host\_to\_be64(x)     htobe64(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00131}\mbox{\hyperlink{qla__os_8h_ac4253b6dbfe7f233b7d7de4a4598de76}{00131}} \textcolor{preprocessor}{\#define qla\_le16\_to\_host(x)     le16toh(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00132}\mbox{\hyperlink{qla__os_8h_a5678a056cf0fc9b4544cb654c95abc28}{00132}} \textcolor{preprocessor}{\#define qla\_le32\_to\_host(x)     le32toh(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00133}\mbox{\hyperlink{qla__os_8h_a1344ccfc4fcadc5c7956d3dedcf4d2dd}{00133}} \textcolor{preprocessor}{\#define qla\_le64\_to\_host(x)     le64toh(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00134}\mbox{\hyperlink{qla__os_8h_a8d3c860fe3e1a149c322f7130b5139f8}{00134}} \textcolor{preprocessor}{\#define qla\_be16\_to\_host(x)     be16toh(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00135}\mbox{\hyperlink{qla__os_8h_a4eaf85f819082ee1b99165dd7820aab8}{00135}} \textcolor{preprocessor}{\#define qla\_be32\_to\_host(x)     be32toh(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00136}\mbox{\hyperlink{qla__os_8h_a4d4925f6c64ab00ca8ca9a596d68476f}{00136}} \textcolor{preprocessor}{\#define qla\_be64\_to\_host(x)     be64toh(x)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00137}00137 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00138}\mbox{\hyperlink{qla__os_8h_a8978794d727d6961c9ae243238dd836f}{00138}} \mbox{\hyperlink{qla__os_8h_a8978794d727d6961c9ae243238dd836f}{MALLOC\_DECLARE}}(M\_QLA8XXXBUF);}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00140}\mbox{\hyperlink{qla__os_8h_ac19585fb4979e3ca1d70ab87532bedbd}{00140}} \textcolor{preprocessor}{\#define qla\_mdelay(fn, msecs)   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00141}00141 \textcolor{preprocessor}{        \{\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00142}00142 \textcolor{preprocessor}{                if (cold) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00143}00143 \textcolor{preprocessor}{                        DELAY((msecs * 1000)); \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00144}00144 \textcolor{preprocessor}{                else  \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00145}00145 \textcolor{preprocessor}{                        pause(fn, qla\_ms\_to\_hz(msecs)); \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00146}00146 \textcolor{preprocessor}{        \}}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00148}00148 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00149}00149 \textcolor{comment}{ * Locks}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00150}00150 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00151}\mbox{\hyperlink{qla__os_8h_a4cec8c2e95251192893c94ce5464fccf}{00151}} \textcolor{preprocessor}{\#define QLA\_LOCK(ha, str) qla\_lock(ha, str);}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00152}\mbox{\hyperlink{qla__os_8h_a6c60ef5d07514a0b191b8ed4685eac5d}{00152}} \textcolor{preprocessor}{\#define QLA\_UNLOCK(ha, str) qla\_unlock(ha, str)}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00154}\mbox{\hyperlink{qla__os_8h_a6eb0319bc822f8ea3f7492609ce88a95}{00154}} \textcolor{preprocessor}{\#define QLA\_TX\_LOCK(ha)         mtx\_lock(\&ha-\/>tx\_lock);}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00155}\mbox{\hyperlink{qla__os_8h_a4ddfbd3b7ed492219439cc4c89bfe411}{00155}} \textcolor{preprocessor}{\#define QLA\_TX\_UNLOCK(ha)       mtx\_unlock(\&ha-\/>tx\_lock);}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00156}00156 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00157}\mbox{\hyperlink{qla__os_8h_a8154256ca86283ad9df490ad2a13a5ea}{00157}} \textcolor{preprocessor}{\#define QLA\_RX\_LOCK(ha)         mtx\_lock(\&ha-\/>rx\_lock);}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00158}\mbox{\hyperlink{qla__os_8h_a74684a16b9d54d45a94f063b7ffb2f7c}{00158}} \textcolor{preprocessor}{\#define QLA\_RX\_UNLOCK(ha)       mtx\_unlock(\&ha-\/>rx\_lock);}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00160}\mbox{\hyperlink{qla__os_8h_a6af8adf0f224b52eca59d78fe630c852}{00160}} \textcolor{preprocessor}{\#define QLA\_RXJ\_LOCK(ha)        mtx\_lock(\&ha-\/>rxj\_lock);}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00161}\mbox{\hyperlink{qla__os_8h_a5abc406aeff29c82e53a5ca72cfe5136}{00161}} \textcolor{preprocessor}{\#define QLA\_RXJ\_UNLOCK(ha)      mtx\_unlock(\&ha-\/>rxj\_lock);}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00163}00163 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00164}00164 \textcolor{comment}{ * structure encapsulating a DMA buffer}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00165}00165 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00166}\mbox{\hyperlink{structqla__dma}{00166}} \textcolor{keyword}{struct }\mbox{\hyperlink{structqla__dma}{qla\_dma}} \{}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00167}\mbox{\hyperlink{structqla__dma_a0e726a06c6fe46dd3e6b672ef70ca08e}{00167}}         bus\_size\_t              \mbox{\hyperlink{structqla__dma_a0e726a06c6fe46dd3e6b672ef70ca08e}{alignment}};}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00168}\mbox{\hyperlink{structqla__dma_a3e03d663b6110695efa7d32e05016283}{00168}}         uint32\_t                \mbox{\hyperlink{structqla__dma_a3e03d663b6110695efa7d32e05016283}{size}};}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00169}\mbox{\hyperlink{structqla__dma_a8aede9bd66787a90b6da70337c8d78c4}{00169}}         \textcolor{keywordtype}{void}                    *\mbox{\hyperlink{structqla__dma_a8aede9bd66787a90b6da70337c8d78c4}{dma\_b}};}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00170}\mbox{\hyperlink{structqla__dma_a54139d6681f6b2e49db2375e426c6575}{00170}}         bus\_addr\_t              \mbox{\hyperlink{structqla__dma_a54139d6681f6b2e49db2375e426c6575}{dma\_addr}};}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00171}\mbox{\hyperlink{structqla__dma_a3c850783f73ece1749c8c0cd88705eca}{00171}}         bus\_dmamap\_t            \mbox{\hyperlink{structqla__dma_a3c850783f73ece1749c8c0cd88705eca}{dma\_map}};}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00172}\mbox{\hyperlink{structqla__dma_ae8fd493fb2fb49dc8d0c058a9cc4b4a9}{00172}}         bus\_dma\_tag\_t           \mbox{\hyperlink{structqla__dma_ae8fd493fb2fb49dc8d0c058a9cc4b4a9}{dma\_tag}};}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00173}00173 \};}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00174}\mbox{\hyperlink{qla__os_8h_a91943e4fbc8f59f617997af5a291b06f}{00174}} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\mbox{\hyperlink{structqla__dma}{qla\_dma}} \mbox{\hyperlink{structqla__dma}{qla\_dma\_t}};}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00176}\mbox{\hyperlink{qla__os_8h_a2f6bb97d2fd774c485b5b89ac0f5712f}{00176}} \textcolor{preprocessor}{\#define QL\_ASSERT(x, y) if (!x) panic y}}
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{qla__os_8h_source_l00178}00178 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \#ifndef \_QLA\_OS\_H\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
