\hypertarget{qla__hw_8c_source}{}\doxysection{qla\+\_\+hw.\+c}
\label{qla__hw_8c_source}\index{dev/qlxgb/qla\_hw.c@{dev/qlxgb/qla\_hw.c}}
\mbox{\hyperlink{qla__hw_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2011-\/2012 Qlogic Corporation}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00007}00007 \textcolor{comment}{ *  Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00008}00008 \textcolor{comment}{ *  modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00009}00009 \textcolor{comment}{ *  are met:}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00011}00011 \textcolor{comment}{ *  1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00012}00012 \textcolor{comment}{ *     notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00013}00013 \textcolor{comment}{ *  2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00014}00014 \textcolor{comment}{ *     notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00015}00015 \textcolor{comment}{ *     documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00017}00017 \textcolor{comment}{ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "{}AS IS"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00018}00018 \textcolor{comment}{ *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00019}00019 \textcolor{comment}{ *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00020}00020 \textcolor{comment}{ *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00021}00021 \textcolor{comment}{ *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00022}00022 \textcolor{comment}{ *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00023}00023 \textcolor{comment}{ *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00024}00024 \textcolor{comment}{ *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00025}00025 \textcolor{comment}{ *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00026}00026 \textcolor{comment}{ *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00027}00027 \textcolor{comment}{ *  POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00028}00028 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00030}00030 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00031}00031 \textcolor{comment}{ * File: qla\_hw.c}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00032}00032 \textcolor{comment}{ * Author : David C Somayajulu, Qlogic Corporation, Aliso Viejo, CA 92656.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00033}00033 \textcolor{comment}{ * Content: Contains Hardware dependent functions}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00034}00034 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00037}\mbox{\hyperlink{qla__hw_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00037}} \mbox{\hyperlink{qla__hw_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00039}00039 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{qla__os_8h}{qla\_os.h}}"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00040}00040 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{qla__reg_8h}{qla\_reg.h}}"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00041}00041 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{qla__hw_8h}{qla\_hw.h}}"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00042}00042 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{qla__def_8h}{qla\_def.h}}"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00043}00043 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{qla__inline_8h}{qla\_inline.h}}"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00044}00044 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{qla__ver_8h}{qla\_ver.h}}"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00045}00045 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{qla__glbl_8h}{qla\_glbl.h}}"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00046}00046 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{qla__dbg_8h}{qla\_dbg.h}}"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00048}\mbox{\hyperlink{qla__hw_8c_a99441fb0388fe2bcb178d2654b13c464}{00048}} \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{qla__hw_8c_a99441fb0388fe2bcb178d2654b13c464}{sysctl\_num\_rds\_rings}} = 2;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00049}\mbox{\hyperlink{qla__hw_8c_a1dbedd841236a49505bce7101a9a4077}{00049}} \textcolor{keyword}{static} uint32\_t \mbox{\hyperlink{qla__hw_8c_a1dbedd841236a49505bce7101a9a4077}{sysctl\_num\_sds\_rings}} = 4;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00051}00051 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00052}00052 \textcolor{comment}{ * Static Functions}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00053}00053 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00055}00055 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{qla__hw_8c_a73e0d052c3dd490fbe908ce75ceff14f}{qla\_init\_cntxt\_regions}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00056}00056 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}} *cdrp);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00057}00057 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_a58a9879d90432e1b9e13e359de855cec}{qla\_fw\_cmd}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, \textcolor{keywordtype}{void} *fw\_cmd, uint32\_t size);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00058}00058 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_ad38dd3dabb0c8bc9297b4cb14a1ec9c3}{qla\_config\_mac\_addr}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, uint8\_t *mac\_addr,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00059}00059                 uint16\_t cntxt\_id, uint32\_t add\_multi);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00060}00060 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{qla__hw_8c_a7c8442421450fb321e473bbc9e4681bb}{qla\_del\_rcv\_cntxt}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00061}00061 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_a9d557bd4d77d831376c271fde9fcc05f}{qla\_init\_rcv\_cntxt}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00062}00062 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{qla__hw_8c_ac316dd9b6747738c56480a3e341ebd5a}{qla\_del\_xmt\_cntxt}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00063}00063 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_a99c5cd39b549b63ba8ebe320d3865352}{qla\_init\_xmt\_cntxt}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00064}00064 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_a660edebff0fe1644eef886ac21777a82}{qla\_get\_max\_rds}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00065}00065 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_a75dfd31a9dbfe3bb99db5ca5d6115e04}{qla\_get\_max\_sds}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00066}00066 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_a87901b8f694f964f6ed09e98d1e10586}{qla\_get\_max\_rules}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00067}00067 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_abd8afd5d41c7306351efba793591b2ea}{qla\_get\_max\_rcv\_cntxts}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00068}00068 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_adc991a3a8c9463c787fe5332f20f39e1}{qla\_get\_max\_tx\_cntxts}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00069}00069 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_a74634bca6e86955cc1cf13ec177bec4a}{qla\_get\_max\_mtu}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00070}00070 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_a918cf291f537045157d0db563f0f6f8c}{qla\_get\_max\_lro}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00071}00071 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{qla__hw_8c_afec02c17660111f176a251534b63cdcd}{qla\_get\_flow\_control}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00072}00072 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{qla__hw_8c_a02a9fed36ce48292a7877f9ba4578747}{qla\_hw\_tx\_done\_locked}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00074}00074 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00075}\mbox{\hyperlink{qla__glbl_8h_a54836418367ce76aab2ab931d9816ace}{00075}} \mbox{\hyperlink{qla__hw_8c_a54836418367ce76aab2ab931d9816ace}{qla\_get\_msix\_count}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00076}00076 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00077}00077         \textcolor{keywordflow}{return} (\mbox{\hyperlink{qla__hw_8c_a1dbedd841236a49505bce7101a9a4077}{sysctl\_num\_sds\_rings}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00078}00078 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00080}00080 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00081}00081 \textcolor{comment}{ * Name: qla\_hw\_add\_sysctls}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00082}00082 \textcolor{comment}{ * Function: Add P3Plus specific sysctls}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00083}00083 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00084}00084 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00085}\mbox{\hyperlink{qla__glbl_8h_ace883fd7193131c11d0e086aeaad09dc}{00085}} \mbox{\hyperlink{qla__hw_8c_ace883fd7193131c11d0e086aeaad09dc}{qla\_hw\_add\_sysctls}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00086}00086 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00087}00087         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00089}00089         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00091}00091         SYSCTL\_ADD\_UINT(device\_get\_sysctl\_ctx(dev),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00092}00092                 SYSCTL\_CHILDREN(device\_get\_sysctl\_tree(dev)),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00093}00093                 OID\_AUTO, \textcolor{stringliteral}{"{}num\_rds\_rings"{}}, CTLFLAG\_RD, \&\mbox{\hyperlink{qla__hw_8c_a99441fb0388fe2bcb178d2654b13c464}{sysctl\_num\_rds\_rings}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00094}00094                 \mbox{\hyperlink{qla__hw_8c_a99441fb0388fe2bcb178d2654b13c464}{sysctl\_num\_rds\_rings}}, \textcolor{stringliteral}{"{}Number of Rcv Descriptor Rings"{}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00096}00096         SYSCTL\_ADD\_UINT(device\_get\_sysctl\_ctx(dev),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00097}00097                 SYSCTL\_CHILDREN(device\_get\_sysctl\_tree(dev)),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00098}00098                 OID\_AUTO, \textcolor{stringliteral}{"{}num\_sds\_rings"{}}, CTLFLAG\_RD, \&\mbox{\hyperlink{qla__hw_8c_a1dbedd841236a49505bce7101a9a4077}{sysctl\_num\_sds\_rings}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00099}00099                 \mbox{\hyperlink{qla__hw_8c_a1dbedd841236a49505bce7101a9a4077}{sysctl\_num\_sds\_rings}}, \textcolor{stringliteral}{"{}Number of Status Descriptor Rings"{}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00100}00100 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00102}00102 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00103}00103 \textcolor{comment}{ * Name: qla\_free\_dma}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00104}00104 \textcolor{comment}{ * Function: Frees the DMA'able memory allocated in qla\_alloc\_dma()}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00105}00105 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00106}00106 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00107}\mbox{\hyperlink{qla__glbl_8h_a79f78ba206dd54798b1ed77a44a7f15d}{00107}} \mbox{\hyperlink{qla__hw_8c_a79f78ba206dd54798b1ed77a44a7f15d}{qla\_free\_dma}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00108}00108 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00109}00109         uint32\_t i;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00111}00111         \textcolor{keywordflow}{if} (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00112}00112                 \mbox{\hyperlink{qla__glbl_8h_aa45706188df046e1ccd3b3d1b6abfd13}{qla\_free\_dmabuf}}(ha, \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00113}00113                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00114}00114         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00116}00116         \textcolor{keywordflow}{if} (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00117}00117                 \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00118}00118                         \mbox{\hyperlink{qla__glbl_8h_aa45706188df046e1ccd3b3d1b6abfd13}{qla\_free\_dmabuf}}(ha, \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i]);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00119}00119                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00120}00120         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00121}00121 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00122}00122         \textcolor{keywordflow}{if} (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00123}00123                 \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a5688e24e949b050585ae048b40292f29}{num\_rds\_rings}}; i++)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00124}00124                         \mbox{\hyperlink{qla__glbl_8h_aa45706188df046e1ccd3b3d1b6abfd13}{qla\_free\_dmabuf}}(ha, \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[i]);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00125}00125                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00126}00126         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00128}00128         \textcolor{keywordflow}{if} (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00129}00129                 \mbox{\hyperlink{qla__glbl_8h_aa45706188df046e1ccd3b3d1b6abfd13}{qla\_free\_dmabuf}}(ha, \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00130}00130                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00131}00131         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00132}00132 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00134}00134 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00135}00135 \textcolor{comment}{ * Name: qla\_alloc\_dma}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00136}00136 \textcolor{comment}{ * Function: Allocates DMA'able memory for Tx/Rx Rings, Tx/Rx Contexts.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00137}00137 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00138}00138 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00139}\mbox{\hyperlink{qla__glbl_8h_aa0840f4fdadc64fe8a5bd9662a410d80}{00139}} \mbox{\hyperlink{qla__hw_8c_aa0840f4fdadc64fe8a5bd9662a410d80}{qla\_alloc\_dma}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00140}00140 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00141}00141         device\_t                dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00142}00142         uint32\_t                i, j, size;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00143}00143 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00144}00144         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00146}00146         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: enter\(\backslash\)n"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00148}00148         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a5688e24e949b050585ae048b40292f29}{num\_rds\_rings}} = (uint16\_t)\mbox{\hyperlink{qla__hw_8c_a99441fb0388fe2bcb178d2654b13c464}{sysctl\_num\_rds\_rings}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00149}00149         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}} = (uint16\_t)\mbox{\hyperlink{qla__hw_8c_a1dbedd841236a49505bce7101a9a4077}{sysctl\_num\_sds\_rings}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00151}00151         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00152}00152 \textcolor{comment}{         * Allocate Transmit Ring}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00153}00153 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00155}00155         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}}.alignment = 8;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00156}00156         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}}.size =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00157}00157                 (\textcolor{keyword}{sizeof}(\mbox{\hyperlink{qla__hw_8h_af9f0a44cffa447ce821d5d2d1a4f1bb1}{q80\_tx\_cmd\_t}})) * \mbox{\hyperlink{qla__hw_8h_ad70baca046931aa8d783f9db0a950f08}{NUM\_TX\_DESCRIPTORS}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00159}00159         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__glbl_8h_ae8775d7cd14d41674979d1ba29484973}{qla\_alloc\_dmabuf}}(ha, \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}})) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00160}00160                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: tx ring alloc failed\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00161}00161                 \textcolor{keywordflow}{goto} qla\_alloc\_dma\_exit;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00162}00162         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00163}00163         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}} = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00165}00165         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: tx\_ring phys \%p virt \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00166}00166                 \_\_func\_\_, (\textcolor{keywordtype}{void} *)(ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}}.dma\_addr),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00167}00167                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}}.dma\_b));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00168}00168         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00169}00169 \textcolor{comment}{         * Allocate Receive Descriptor Rings}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00170}00170 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00172}00172         \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a5688e24e949b050585ae048b40292f29}{num\_rds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00173}00173                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[i].alignment = 8;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00175}00175                 \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{qla__hw_8h_ae449003bc9fcbde94675bf00a9938c60}{RDS\_RING\_INDEX\_NORMAL}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00176}00176                         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[i].size =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00177}00177                                 (\textcolor{keyword}{sizeof}(\mbox{\hyperlink{qla__hw_8h_ac8dbef11d5f305012648657d3fcb9b71}{q80\_recv\_desc\_t}})) * \mbox{\hyperlink{qla__hw_8h_ad9819ff90ac3963fcb6ba7c402fb98c6}{NUM\_RX\_DESCRIPTORS}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00178}00178                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{qla__hw_8h_aec5c1ab293ee9527856cb07e25e5f823}{RDS\_RING\_INDEX\_JUMBO}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00179}00179                         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[i].size = }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00180}00180                                 (\textcolor{keyword}{sizeof}(\mbox{\hyperlink{qla__hw_8h_ac8dbef11d5f305012648657d3fcb9b71}{q80\_recv\_desc\_t}})) *}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00181}00181                                         \mbox{\hyperlink{qla__hw_8h_a598e4a9695729b7026f185db3ab61755}{NUM\_RX\_JUMBO\_DESCRIPTORS}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00182}00182                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00183}00183                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00185}00185                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__glbl_8h_ae8775d7cd14d41674979d1ba29484973}{qla\_alloc\_dmabuf}}(ha, \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[i])) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00186}00186                         \mbox{\hyperlink{qla__dbg_8h_ad91f9f4a99b12756f68dbf803a8bbda9}{QL\_DPRINT4}}((dev, \textcolor{stringliteral}{"{}\%s: rds ring alloc failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00187}00187                                 \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00189}00189                         \textcolor{keywordflow}{for} (j = 0; j < i; j++)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00190}00190                                 \mbox{\hyperlink{qla__glbl_8h_aa45706188df046e1ccd3b3d1b6abfd13}{qla\_free\_dmabuf}}(ha,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00191}00191                                         \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[j]);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00192}00192 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00193}00193                         \textcolor{keywordflow}{goto} qla\_alloc\_dma\_exit;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00194}00194                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00195}00195                 \mbox{\hyperlink{qla__dbg_8h_ad91f9f4a99b12756f68dbf803a8bbda9}{QL\_DPRINT4}}((dev, \textcolor{stringliteral}{"{}\%s: rx\_ring[\%d] phys \%p virt \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00196}00196                         \_\_func\_\_, i,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00197}00197                         (\textcolor{keywordtype}{void} *)(ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[i].dma\_addr),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00198}00198                         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[i].dma\_b));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00199}00199         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00200}00200         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}} = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00202}00202         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00203}00203 \textcolor{comment}{         * Allocate Status Descriptor Rings}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00204}00204 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00206}00206         \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00207}00207                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i].alignment = 8;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00208}00208                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i].size =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00209}00209                         (\textcolor{keyword}{sizeof}(\mbox{\hyperlink{qla__hw_8h_a3c8a525e1d104f83f27e7d235ec7b2df}{q80\_stat\_desc\_t}})) * \mbox{\hyperlink{qla__hw_8h_a1cbf4f9c1de85c44e772b03454c3a79b}{NUM\_STATUS\_DESCRIPTORS}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00211}00211                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__glbl_8h_ae8775d7cd14d41674979d1ba29484973}{qla\_alloc\_dmabuf}}(ha, \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i])) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00212}00212                         device\_printf(dev, \textcolor{stringliteral}{"{}\%s: sds ring alloc failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00213}00213                                 \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00215}00215                         \textcolor{keywordflow}{for} (j = 0; j < i; j++)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00216}00216                                 \mbox{\hyperlink{qla__glbl_8h_aa45706188df046e1ccd3b3d1b6abfd13}{qla\_free\_dmabuf}}(ha,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00217}00217                                         \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[j]);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00218}00218 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00219}00219                         \textcolor{keywordflow}{goto} qla\_alloc\_dma\_exit;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00220}00220                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00221}00221                 \mbox{\hyperlink{qla__dbg_8h_ad91f9f4a99b12756f68dbf803a8bbda9}{QL\_DPRINT4}}((dev, \textcolor{stringliteral}{"{}\%s: sds\_ring[\%d] phys \%p virt \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00222}00222                         \_\_func\_\_, i,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00223}00223                         (\textcolor{keywordtype}{void} *)(ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i].dma\_addr),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00224}00224                         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i].dma\_b));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00225}00225         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00226}00226         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}} = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00228}00228         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00229}00229 \textcolor{comment}{         * Allocate Context Area}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00230}00230 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00231}00231         size = \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}((\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__tx__cntxt__req}{q80\_tx\_cntxt\_req\_t}})), \mbox{\hyperlink{qla__hw_8h_a655344f26300e7eb7a3b0153ec80debc}{QL\_BUFFER\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00233}00233         size += \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}((\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__tx__cntxt__rsp}{q80\_tx\_cntxt\_rsp\_t}})), \mbox{\hyperlink{qla__hw_8h_a655344f26300e7eb7a3b0153ec80debc}{QL\_BUFFER\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00235}00235         size += \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}((\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__rcv__cntxt__req}{q80\_rcv\_cntxt\_req\_t}})), \mbox{\hyperlink{qla__hw_8h_a655344f26300e7eb7a3b0153ec80debc}{QL\_BUFFER\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00237}00237         size += \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}((\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp}{q80\_rcv\_cntxt\_rsp\_t}})), \mbox{\hyperlink{qla__hw_8h_a655344f26300e7eb7a3b0153ec80debc}{QL\_BUFFER\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00239}00239         size += \textcolor{keyword}{sizeof} (uint32\_t); \textcolor{comment}{/* for tx consumer index */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00241}00241         size = \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}(size, PAGE\_SIZE);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00243}00243         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}.alignment = 8;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00244}00244         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}.size = size;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00246}00246         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__glbl_8h_ae8775d7cd14d41674979d1ba29484973}{qla\_alloc\_dmabuf}}(ha, \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}})) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00247}00247                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: context alloc failed\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00248}00248                 \textcolor{keywordflow}{goto} qla\_alloc\_dma\_exit;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00249}00249         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00250}00250         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a132f91fb8702abf40b46428ac2034146}{flags}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}} = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00251}00251         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: context phys \%p virt \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00252}00252                 \_\_func\_\_, (\textcolor{keywordtype}{void} *)(ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}.dma\_addr),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00253}00253                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}.dma\_b));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00255}00255         \mbox{\hyperlink{qla__hw_8c_a73e0d052c3dd490fbe908ce75ceff14f}{qla\_init\_cntxt\_regions}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00256}00256 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00257}00257         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00259}00259 qla\_alloc\_dma\_exit:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00260}00260         \mbox{\hyperlink{qla__hw_8c_a79f78ba206dd54798b1ed77a44a7f15d}{qla\_free\_dma}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00261}00261         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00262}00262 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00264}00264 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00265}00265 \textcolor{comment}{ * Name: qla\_init\_cntxt\_regions}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00266}00266 \textcolor{comment}{ * Function: Initializes Tx/Rx Contexts.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00267}00267 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00268}00268 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00269}\mbox{\hyperlink{qla__hw_8c_a73e0d052c3dd490fbe908ce75ceff14f}{00269}} \mbox{\hyperlink{qla__hw_8c_a73e0d052c3dd490fbe908ce75ceff14f}{qla\_init\_cntxt\_regions}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00270}00270 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00271}00271         \mbox{\hyperlink{struct__qla__hw}{qla\_hw\_t}}                *hw;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00272}00272         \mbox{\hyperlink{struct__q80__tx__cntxt__req}{q80\_tx\_cntxt\_req\_t}}    *tx\_cntxt\_req;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00273}00273         \mbox{\hyperlink{struct__q80__rcv__cntxt__req}{q80\_rcv\_cntxt\_req\_t}}  *rx\_cntxt\_req;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00274}00274         bus\_addr\_t              phys\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00275}00275         uint32\_t                i;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00276}00276         device\_t                dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00277}00277         uint32\_t                size;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00279}00279         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00281}00281         hw = \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00282}00282 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00283}00283         hw-\/>\mbox{\hyperlink{struct__qla__hw_a7a5e88ebf50ec54eaa70be6a62187af1}{tx\_ring\_base}} = hw-\/>\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}}.dma\_b;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00285}00285         \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00286}00286                 hw-\/>\mbox{\hyperlink{struct__qla__hw_af16a274e30dd5236b87f17bb5e815440}{sds}}[i].\mbox{\hyperlink{struct__qla__sds_a28582500ddaa8f0e7ed02e7c243be8b5}{sds\_ring\_base}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00287}00287                         (\mbox{\hyperlink{struct__q80__stat__desc}{q80\_stat\_desc\_t}} *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i].dma\_b;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00289}00289         phys\_addr = hw-\/>\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}.dma\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00291}00291         memset((\textcolor{keywordtype}{void} *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}.dma\_b, 0,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00292}00292                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}.size);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00293}00293 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00294}00294         hw-\/>\mbox{\hyperlink{struct__qla__hw_a1e985389b1d14bb94ba799c06d7c8d85}{tx\_cntxt\_req}}    =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00295}00295                 (\mbox{\hyperlink{struct__q80__tx__cntxt__req}{q80\_tx\_cntxt\_req\_t}} *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_ac13e238e5e36e1bd3e62136a7917feb0}{context}}.dma\_b;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00296}00296         hw-\/>\mbox{\hyperlink{struct__qla__hw_a1e0ec8910767a73d914b4da3cc31807d}{tx\_cntxt\_req\_paddr}}        = phys\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00298}00298         size = \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}((\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__tx__cntxt__req}{q80\_tx\_cntxt\_req\_t}})), \mbox{\hyperlink{qla__hw_8h_a655344f26300e7eb7a3b0153ec80debc}{QL\_BUFFER\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00300}00300         hw-\/>\mbox{\hyperlink{struct__qla__hw_a255dff594425cffabe29aad6f6abe351}{tx\_cntxt\_rsp}}    =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00301}00301                 (\mbox{\hyperlink{struct__q80__tx__cntxt__rsp}{q80\_tx\_cntxt\_rsp\_t}} *)((uint8\_t *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a1e985389b1d14bb94ba799c06d7c8d85}{tx\_cntxt\_req}} + size);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00302}00302         hw-\/>\mbox{\hyperlink{struct__qla__hw_acaef7876ba52dde5b4107355c3651c1d}{tx\_cntxt\_rsp\_paddr}}        = hw-\/>\mbox{\hyperlink{struct__qla__hw_a1e0ec8910767a73d914b4da3cc31807d}{tx\_cntxt\_req\_paddr}} + size;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00304}00304         size = \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}((\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__tx__cntxt__rsp}{q80\_tx\_cntxt\_rsp\_t}})), \mbox{\hyperlink{qla__hw_8h_a655344f26300e7eb7a3b0153ec80debc}{QL\_BUFFER\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00306}00306         hw-\/>\mbox{\hyperlink{struct__qla__hw_a29acb53ab98a9188a14951ce6d77f29c}{rx\_cntxt\_req}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00307}00307                 (\mbox{\hyperlink{struct__q80__rcv__cntxt__req}{q80\_rcv\_cntxt\_req\_t}} *)((uint8\_t *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a255dff594425cffabe29aad6f6abe351}{tx\_cntxt\_rsp}} + size);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00308}00308         hw-\/>\mbox{\hyperlink{struct__qla__hw_a3f666b0b38ec80d9d9299d8ce89efc2f}{rx\_cntxt\_req\_paddr}} = hw-\/>\mbox{\hyperlink{struct__qla__hw_acaef7876ba52dde5b4107355c3651c1d}{tx\_cntxt\_rsp\_paddr}} + size;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00310}00310         size = \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}((\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__rcv__cntxt__req}{q80\_rcv\_cntxt\_req\_t}})), \mbox{\hyperlink{qla__hw_8h_a655344f26300e7eb7a3b0153ec80debc}{QL\_BUFFER\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00311}00311 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00312}00312         hw-\/>\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00313}00313                 (\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp}{q80\_rcv\_cntxt\_rsp\_t}} *)((uint8\_t *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a29acb53ab98a9188a14951ce6d77f29c}{rx\_cntxt\_req}} + size);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00314}00314         hw-\/>\mbox{\hyperlink{struct__qla__hw_a6787c235937f21a09ebaf5e1d42389df}{rx\_cntxt\_rsp\_paddr}} = hw-\/>\mbox{\hyperlink{struct__qla__hw_a3f666b0b38ec80d9d9299d8ce89efc2f}{rx\_cntxt\_req\_paddr}} + size;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00315}00315 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00316}00316         size = \mbox{\hyperlink{qla__def_8h_a0b0f0c178c145a94d0211b325be54afa}{QL\_ALIGN}}((\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp}{q80\_rcv\_cntxt\_rsp\_t}})), \mbox{\hyperlink{qla__hw_8h_a655344f26300e7eb7a3b0153ec80debc}{QL\_BUFFER\_ALIGN}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00317}00317 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00318}00318         hw-\/>\mbox{\hyperlink{struct__qla__hw_aa0fbf444e5219b357dec63a163f826ef}{tx\_cons}} = (uint32\_t *)((uint8\_t *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}} + size);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00319}00319         hw-\/>\mbox{\hyperlink{struct__qla__hw_abbee069aceb0bc467aabbd03f43216f8}{tx\_cons\_paddr}} = hw-\/>\mbox{\hyperlink{struct__qla__hw_a6787c235937f21a09ebaf5e1d42389df}{rx\_cntxt\_rsp\_paddr}} + size;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00320}00320 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00321}00321         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00322}00322 \textcolor{comment}{         * Initialize the Transmit Context Request so that we don't need to}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00323}00323 \textcolor{comment}{         * do it every time we need to create a context}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00324}00324 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00325}00325         tx\_cntxt\_req = hw-\/>\mbox{\hyperlink{struct__qla__hw_a1e985389b1d14bb94ba799c06d7c8d85}{tx\_cntxt\_req}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00326}00326 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00327}00327         tx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__req_acd483c9e9bd70efce4c02e30e0025d70}{rsp\_dma\_addr}} = \mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{qla\_host\_to\_le64}}(hw-\/>\mbox{\hyperlink{struct__qla__hw_acaef7876ba52dde5b4107355c3651c1d}{tx\_cntxt\_rsp\_paddr}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00328}00328 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00329}00329         tx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__req_ad60998bb3100b39be7dbe1474af74d99}{cmd\_cons\_dma\_addr}} = \mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{qla\_host\_to\_le64}}(hw-\/>\mbox{\hyperlink{struct__qla__hw_abbee069aceb0bc467aabbd03f43216f8}{tx\_cons\_paddr}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00331}00331         tx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__req_aff90902ef2d577f0462dbcf4cca0bee1}{caps}}[0] = \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}((\mbox{\hyperlink{qla__hw_8h_aeb3fd6cb22674a9d975230778d98d0d6}{CNTXT\_CAP0\_BASEFW}} |}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00332}00332                                         \mbox{\hyperlink{qla__hw_8h_a02c76cc25349ded9d7d0245aa17a0a85}{CNTXT\_CAP0\_LEGACY\_MN}} | \mbox{\hyperlink{qla__hw_8h_ae4bb5596d77c63ae742dc504c0fa8411}{CNTXT\_CAP0\_LSO}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00334}00334         tx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__req_a1bbcd6b83b00ecaad036a1672ac98fd8}{intr\_mode}} = \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(\mbox{\hyperlink{qla__hw_8h_a4f38ee5cc846b0963d20b73e8ccac1e3}{CNTXT\_INTR\_MODE\_SHARED}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00335}00335 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00336}00336         tx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__req_a0a327880065b42ab4386984190bb4f88}{phys\_addr}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00337}00337                 \mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{qla\_host\_to\_le64}}(hw-\/>\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_aba1386acba6ebe275abc993ff314bb27}{tx\_ring}}.dma\_addr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00338}00338 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00339}00339         tx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__req_ab4545ef6dc4eaf963d649aa02033d7cf}{num\_entries}} = \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(\mbox{\hyperlink{qla__hw_8h_ad70baca046931aa8d783f9db0a950f08}{NUM\_TX\_DESCRIPTORS}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00340}00340 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00341}00341         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00342}00342 \textcolor{comment}{         * Initialize the Receive Context Request}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00343}00343 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00344}00344 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00345}00345         rx\_cntxt\_req = hw-\/>\mbox{\hyperlink{struct__qla__hw_a29acb53ab98a9188a14951ce6d77f29c}{rx\_cntxt\_req}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00347}00347         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a07bea09c558caba0ffc43f4c835e5ddb}{rx\_req}}.\mbox{\hyperlink{struct__q80__rq__rcv__cntxt_ac4e187dbc87d651b5841e4e4ae87aa3d}{rsp\_dma\_addr}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00348}00348                 \mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{qla\_host\_to\_le64}}(hw-\/>\mbox{\hyperlink{struct__qla__hw_a6787c235937f21a09ebaf5e1d42389df}{rx\_cntxt\_rsp\_paddr}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00349}00349 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00350}00350         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a07bea09c558caba0ffc43f4c835e5ddb}{rx\_req}}.\mbox{\hyperlink{struct__q80__rq__rcv__cntxt_a04549be447c73776d35afcd421283306}{caps}}[0] = \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(\mbox{\hyperlink{qla__hw_8h_aeb3fd6cb22674a9d975230778d98d0d6}{CNTXT\_CAP0\_BASEFW}} |}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00351}00351                                                 \mbox{\hyperlink{qla__hw_8h_a02c76cc25349ded9d7d0245aa17a0a85}{CNTXT\_CAP0\_LEGACY\_MN}} |}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00352}00352                                                 \mbox{\hyperlink{qla__hw_8h_a838006fb667a36ad88974daab2cc4ef0}{CNTXT\_CAP0\_JUMBO}} |}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00353}00353                                                 \mbox{\hyperlink{qla__hw_8h_afd2e377975bb24e23a70fe830dbb0479}{CNTXT\_CAP0\_LRO}}|}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00354}00354                                                 \mbox{\hyperlink{qla__hw_8h_a4f8e043bc68903b7af5ff0618a29ca30}{CNTXT\_CAP0\_HW\_LRO}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00355}00355 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00356}00356         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a07bea09c558caba0ffc43f4c835e5ddb}{rx\_req}}.\mbox{\hyperlink{struct__q80__rq__rcv__cntxt_a52908dc0c9b09c873e232ec3d61b2c8b}{intr\_mode}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00357}00357                 \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(\mbox{\hyperlink{qla__hw_8h_a4f38ee5cc846b0963d20b73e8ccac1e3}{CNTXT\_INTR\_MODE\_SHARED}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00359}00359         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a07bea09c558caba0ffc43f4c835e5ddb}{rx\_req}}.\mbox{\hyperlink{struct__q80__rq__rcv__cntxt_a00a7ee842cadc1cd4eb4143e5e76657d}{rds\_intr\_mode}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00360}00360                 \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(\mbox{\hyperlink{qla__hw_8h_a77e414607b289753a740c66ab417053f}{CNTXT\_INTR\_MODE\_UNIQUE}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00362}00362         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a07bea09c558caba0ffc43f4c835e5ddb}{rx\_req}}.\mbox{\hyperlink{struct__q80__rq__rcv__cntxt_a4a71bcdf1522d99cef5bf91b1afe2d99}{rds\_ring\_offset}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00363}00363         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a07bea09c558caba0ffc43f4c835e5ddb}{rx\_req}}.\mbox{\hyperlink{struct__q80__rq__rcv__cntxt_a015c02fae12d03eb79f02573e6897cd3}{sds\_ring\_offset}} = \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00364}00364                 (hw-\/>\mbox{\hyperlink{struct__qla__hw_a5688e24e949b050585ae048b40292f29}{num\_rds\_rings}} * \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__rq__rds__ring}{q80\_rq\_rds\_ring\_t}})));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00365}00365         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a07bea09c558caba0ffc43f4c835e5ddb}{rx\_req}}.\mbox{\hyperlink{struct__q80__rq__rcv__cntxt_aae3314b36821e1aa59d43bba2056d412}{num\_rds\_rings}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00366}00366                 \mbox{\hyperlink{qla__os_8h_a2c16e8bd784bac8a87027db51ddbf393}{qla\_host\_to\_le16}}(hw-\/>\mbox{\hyperlink{struct__qla__hw_a5688e24e949b050585ae048b40292f29}{num\_rds\_rings}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00367}00367         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a07bea09c558caba0ffc43f4c835e5ddb}{rx\_req}}.\mbox{\hyperlink{struct__q80__rq__rcv__cntxt_aaaf1acc4b9929bfec25fd924eddd757f}{num\_sds\_rings}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00368}00368                 \mbox{\hyperlink{qla__os_8h_a2c16e8bd784bac8a87027db51ddbf393}{qla\_host\_to\_le16}}(hw-\/>\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00370}00370         \textcolor{keywordflow}{for} (i = 0; i < hw-\/>\mbox{\hyperlink{struct__qla__hw_a5688e24e949b050585ae048b40292f29}{num\_rds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00371}00371                 rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_aadf55324511aa3024b1b1834af31ebe5}{rds\_req}}[i].\mbox{\hyperlink{struct__q80__rq__rds__ring_aaee6cc7dbc6b4a61802c671c9c86ec99}{phys\_addr}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00372}00372                         \mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{qla\_host\_to\_le64}}(hw-\/>\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_afd9682c495cbc91ebc160098c0e65006}{rds\_ring}}[i].dma\_addr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00373}00373 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00374}00374                 \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{qla__hw_8h_ae449003bc9fcbde94675bf00a9938c60}{RDS\_RING\_INDEX\_NORMAL}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00375}00375                         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_aadf55324511aa3024b1b1834af31ebe5}{rds\_req}}[i].\mbox{\hyperlink{struct__q80__rq__rds__ring_a977e6c4d2f30837fe8d5b61478409bdc}{buf\_size}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00376}00376                                 \mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{qla\_host\_to\_le64}}(MCLBYTES);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00377}00377                         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_aadf55324511aa3024b1b1834af31ebe5}{rds\_req}}[i].\mbox{\hyperlink{struct__q80__rq__rds__ring_a59e1cef02b0ebecb4a98c785bd388f80}{size}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00378}00378                                 \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(\mbox{\hyperlink{qla__hw_8h_ad9819ff90ac3963fcb6ba7c402fb98c6}{NUM\_RX\_DESCRIPTORS}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00379}00379                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00380}00380                         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_aadf55324511aa3024b1b1834af31ebe5}{rds\_req}}[i].\mbox{\hyperlink{struct__q80__rq__rds__ring_a977e6c4d2f30837fe8d5b61478409bdc}{buf\_size}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00381}00381                                 \mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{qla\_host\_to\_le64}}(MJUM9BYTES);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00382}00382                         rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_aadf55324511aa3024b1b1834af31ebe5}{rds\_req}}[i].\mbox{\hyperlink{struct__q80__rq__rds__ring_a59e1cef02b0ebecb4a98c785bd388f80}{size}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00383}00383                                 \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(\mbox{\hyperlink{qla__hw_8h_a598e4a9695729b7026f185db3ab61755}{NUM\_RX\_JUMBO\_DESCRIPTORS}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00384}00384                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00385}00385         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00386}00386 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00387}00387         \textcolor{keywordflow}{for} (i = 0; i < hw-\/>\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00388}00388                 rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a61f25a7c2e1a1a40a63c444fb60c44e1}{sds\_req}}[i].\mbox{\hyperlink{struct__q80__rq__sds__ring_a3ff10107e2c6671d3888ed988aea4f53}{phys\_addr}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00389}00389                         \mbox{\hyperlink{qla__os_8h_a727fc6d258e1bb749e6aee3a0e02a183}{qla\_host\_to\_le64}}(hw-\/>\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i].dma\_addr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00390}00390                 rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a61f25a7c2e1a1a40a63c444fb60c44e1}{sds\_req}}[i].\mbox{\hyperlink{struct__q80__rq__sds__ring_a2e0a9f02f980eaed5c8d41fff3794231}{size}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00391}00391                         \mbox{\hyperlink{qla__os_8h_a459b097f3b7262f337a7a234787a61f7}{qla\_host\_to\_le32}}(\mbox{\hyperlink{qla__hw_8h_a1cbf4f9c1de85c44e772b03454c3a79b}{NUM\_STATUS\_DESCRIPTORS}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00392}00392                 rx\_cntxt\_req-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__req_a61f25a7c2e1a1a40a63c444fb60c44e1}{sds\_req}}[i].\mbox{\hyperlink{struct__q80__rq__sds__ring_ab17a62a778ef791118a0bf943ec233fb}{msi\_index}} = \mbox{\hyperlink{qla__os_8h_a2c16e8bd784bac8a87027db51ddbf393}{qla\_host\_to\_le16}}(i);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00393}00393         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00394}00394 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00395}00395         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}}, \textcolor{stringliteral}{"{}\%s: tx\_cntxt\_req = \%p paddr \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00396}00396                 \_\_func\_\_, hw-\/>\mbox{\hyperlink{struct__qla__hw_a1e985389b1d14bb94ba799c06d7c8d85}{tx\_cntxt\_req}}, (\textcolor{keywordtype}{void} *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a1e0ec8910767a73d914b4da3cc31807d}{tx\_cntxt\_req\_paddr}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00397}00397         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}}, \textcolor{stringliteral}{"{}\%s: tx\_cntxt\_rsp = \%p paddr \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00398}00398                 \_\_func\_\_, hw-\/>\mbox{\hyperlink{struct__qla__hw_a255dff594425cffabe29aad6f6abe351}{tx\_cntxt\_rsp}}, (\textcolor{keywordtype}{void} *)hw-\/>\mbox{\hyperlink{struct__qla__hw_acaef7876ba52dde5b4107355c3651c1d}{tx\_cntxt\_rsp\_paddr}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00399}00399         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}}, \textcolor{stringliteral}{"{}\%s: rx\_cntxt\_req = \%p paddr \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00400}00400                 \_\_func\_\_, hw-\/>\mbox{\hyperlink{struct__qla__hw_a29acb53ab98a9188a14951ce6d77f29c}{rx\_cntxt\_req}}, (\textcolor{keywordtype}{void} *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a3f666b0b38ec80d9d9299d8ce89efc2f}{rx\_cntxt\_req\_paddr}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00401}00401         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}}, \textcolor{stringliteral}{"{}\%s: rx\_cntxt\_rsp = \%p paddr \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00402}00402                 \_\_func\_\_, hw-\/>\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}}, (\textcolor{keywordtype}{void} *)hw-\/>\mbox{\hyperlink{struct__qla__hw_a6787c235937f21a09ebaf5e1d42389df}{rx\_cntxt\_rsp\_paddr}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00403}00403         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}}, \textcolor{stringliteral}{"{}\%s: tx\_cons      = \%p paddr \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00404}00404                 \_\_func\_\_, hw-\/>\mbox{\hyperlink{struct__qla__hw_aa0fbf444e5219b357dec63a163f826ef}{tx\_cons}}, (\textcolor{keywordtype}{void} *)hw-\/>\mbox{\hyperlink{struct__qla__hw_abbee069aceb0bc467aabbd03f43216f8}{tx\_cons\_paddr}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00405}00405 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00407}00407 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00408}00408 \textcolor{comment}{ * Name: qla\_issue\_cmd}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00409}00409 \textcolor{comment}{ * Function: Issues commands on the CDRP interface and returns responses.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00410}00410 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00411}00411 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00412}\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{00412}} \mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}} *cdrp)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00413}00413 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00414}00414         \textcolor{keywordtype}{int}     ret = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00415}00415         uint32\_t signature;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00416}00416         uint32\_t count = 400; \textcolor{comment}{/* 4 seconds or 400 10ms intervals */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00417}00417         uint32\_t data;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00418}00418         device\_t dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00419}00419 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00420}00420         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00421}00421 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00422}00422         signature = 0xcafe0000 | 0x0100 | ha-\/>\mbox{\hyperlink{structqla__host_a241ccac5b886c6195827db9ac08c78f3}{pci\_func}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00423}00423 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00424}00424         ret = \mbox{\hyperlink{qla__inline_8h_a4dd70a3a3eb7c40007cd2039faa0fce5}{qla\_sem\_lock}}(ha, \mbox{\hyperlink{qla__reg_8h_ab24968b417fd4fffd97f81fd27844333}{Q8\_SEM5\_LOCK}}, 0, (uint32\_t)ha-\/>\mbox{\hyperlink{structqla__host_a241ccac5b886c6195827db9ac08c78f3}{pci\_func}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00426}00426         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00427}00427                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: SEM5\_LOCK lock failed\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00428}00428                 \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00429}00429         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00430}00430 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00431}00431         \mbox{\hyperlink{qla__reg_8h_a794274184e3050490a86b05e0f297558}{WRITE\_OFFSET32}}(ha, \mbox{\hyperlink{qla__reg_8h_aecc01f72115107cf48024fe24fc4a5c6}{Q8\_NX\_CDRP\_SIGNATURE}}, signature);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00432}00432 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00433}00433         \mbox{\hyperlink{qla__reg_8h_a794274184e3050490a86b05e0f297558}{WRITE\_OFFSET32}}(ha, \mbox{\hyperlink{qla__reg_8h_a09b41c54909da0665881ed134e3b19f4}{Q8\_NX\_CDRP\_ARG1}}, (cdrp-\/>\mbox{\hyperlink{structqla__cdrp_ad72b11e1c76ef045855bcd32788c5177}{cmd\_arg1}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00434}00434         \mbox{\hyperlink{qla__reg_8h_a794274184e3050490a86b05e0f297558}{WRITE\_OFFSET32}}(ha, \mbox{\hyperlink{qla__reg_8h_a81cd2a18393fbe9aff8e99fd90463a09}{Q8\_NX\_CDRP\_ARG2}}, (cdrp-\/>\mbox{\hyperlink{structqla__cdrp_ad39814a1448f7194f9a0ce0ea4b304ec}{cmd\_arg2}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00435}00435         \mbox{\hyperlink{qla__reg_8h_a794274184e3050490a86b05e0f297558}{WRITE\_OFFSET32}}(ha, \mbox{\hyperlink{qla__reg_8h_a3ad6cc6fb2ab7f59040136be6f8704a4}{Q8\_NX\_CDRP\_ARG3}}, (cdrp-\/>\mbox{\hyperlink{structqla__cdrp_af7e097f25d651bb2fcba733fb9a89f4d}{cmd\_arg3}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00436}00436 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00437}00437         \mbox{\hyperlink{qla__reg_8h_a794274184e3050490a86b05e0f297558}{WRITE\_OFFSET32}}(ha, \mbox{\hyperlink{qla__reg_8h_a43748d820544b32c7e119aac13fffd14}{Q8\_NX\_CDRP\_CMD\_RSP}}, cdrp-\/>\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00438}00438 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00439}00439         \textcolor{keywordflow}{while} (count) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00440}00440                 \mbox{\hyperlink{qla__os_8h_ac19585fb4979e3ca1d70ab87532bedbd}{qla\_mdelay}}(\_\_func\_\_, 10);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00441}00441 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00442}00442                 data = \mbox{\hyperlink{qla__reg_8h_aa0a42c8d7ea3ce8787ad99176e49af0a}{READ\_REG32}}(ha, \mbox{\hyperlink{qla__reg_8h_a43748d820544b32c7e119aac13fffd14}{Q8\_NX\_CDRP\_CMD\_RSP}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00444}00444                 \textcolor{keywordflow}{if} ((!(data \& 0x80000000)))}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00445}00445                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00446}00446                 count-\/-\/;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00447}00447         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00448}00448         \textcolor{keywordflow}{if} ((!count) || (data != 1))}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00449}00449                 ret = -\/1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00450}00450 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00451}00451         cdrp-\/>\mbox{\hyperlink{structqla__cdrp_a88a20c3db1f67812ec045f1fc54ca1a8}{rsp}} = \mbox{\hyperlink{qla__reg_8h_aa0a42c8d7ea3ce8787ad99176e49af0a}{READ\_REG32}}(ha, \mbox{\hyperlink{qla__reg_8h_a43748d820544b32c7e119aac13fffd14}{Q8\_NX\_CDRP\_CMD\_RSP}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00452}00452         cdrp-\/>\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}} = \mbox{\hyperlink{qla__reg_8h_aa0a42c8d7ea3ce8787ad99176e49af0a}{READ\_REG32}}(ha, \mbox{\hyperlink{qla__reg_8h_a09b41c54909da0665881ed134e3b19f4}{Q8\_NX\_CDRP\_ARG1}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00453}00453         cdrp-\/>\mbox{\hyperlink{structqla__cdrp_a29d68c7c79e2d4dc8f8cc016d4663d23}{rsp\_arg2}} = \mbox{\hyperlink{qla__reg_8h_aa0a42c8d7ea3ce8787ad99176e49af0a}{READ\_REG32}}(ha, \mbox{\hyperlink{qla__reg_8h_a81cd2a18393fbe9aff8e99fd90463a09}{Q8\_NX\_CDRP\_ARG2}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00454}00454         cdrp-\/>\mbox{\hyperlink{structqla__cdrp_a15ba5f612cb2f04a2181d09a9644b0f4}{rsp\_arg3}} = \mbox{\hyperlink{qla__reg_8h_aa0a42c8d7ea3ce8787ad99176e49af0a}{READ\_REG32}}(ha, \mbox{\hyperlink{qla__reg_8h_a3ad6cc6fb2ab7f59040136be6f8704a4}{Q8\_NX\_CDRP\_ARG3}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00455}00455 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00456}00456         \mbox{\hyperlink{qla__inline_8h_a6ce7fa148fb41a273051d390a4d4d2f0}{qla\_sem\_unlock}}(ha, \mbox{\hyperlink{qla__reg_8h_a2e17793847b6595ad3aa2602984ae053}{Q8\_SEM5\_UNLOCK}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00457}00457 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00458}00458         \textcolor{keywordflow}{if} (ret) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00459}00459                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: "{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00460}00460                         \textcolor{stringliteral}{"{}cmd[0x\%08x] = 0x\%08x\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00461}00461                         \textcolor{stringliteral}{"{}\(\backslash\)tsig[0x\%08x] = 0x\%08x\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00462}00462                         \textcolor{stringliteral}{"{}\(\backslash\)targ1[0x\%08x] = 0x\%08x\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00463}00463                         \textcolor{stringliteral}{"{}\(\backslash\)targ2[0x\%08x] = 0x\%08x\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00464}00464                         \textcolor{stringliteral}{"{}\(\backslash\)targ3[0x\%08x] = 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00465}00465                         \_\_func\_\_, \mbox{\hyperlink{qla__reg_8h_a43748d820544b32c7e119aac13fffd14}{Q8\_NX\_CDRP\_CMD\_RSP}}, cdrp-\/>\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00466}00466                         \mbox{\hyperlink{qla__reg_8h_aecc01f72115107cf48024fe24fc4a5c6}{Q8\_NX\_CDRP\_SIGNATURE}}, signature,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00467}00467                         \mbox{\hyperlink{qla__reg_8h_a09b41c54909da0665881ed134e3b19f4}{Q8\_NX\_CDRP\_ARG1}}, cdrp-\/>\mbox{\hyperlink{structqla__cdrp_ad72b11e1c76ef045855bcd32788c5177}{cmd\_arg1}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00468}00468                         \mbox{\hyperlink{qla__reg_8h_a81cd2a18393fbe9aff8e99fd90463a09}{Q8\_NX\_CDRP\_ARG2}}, cdrp-\/>\mbox{\hyperlink{structqla__cdrp_ad39814a1448f7194f9a0ce0ea4b304ec}{cmd\_arg2}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00469}00469                         \mbox{\hyperlink{qla__reg_8h_a3ad6cc6fb2ab7f59040136be6f8704a4}{Q8\_NX\_CDRP\_ARG3}}, cdrp-\/>\mbox{\hyperlink{structqla__cdrp_af7e097f25d651bb2fcba733fb9a89f4d}{cmd\_arg3}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00470}00470                 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00471}00471                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: exit (ret = 0x\%x)\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00472}00472                         \textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t rsp = 0x\%08x\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00473}00473                         \textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t arg1 = 0x\%08x\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00474}00474                         \textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t arg2 = 0x\%08x\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00475}00475                         \textcolor{stringliteral}{"{}\(\backslash\)t\(\backslash\)t arg3 = 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00476}00476                         \_\_func\_\_, ret, cdrp-\/>\mbox{\hyperlink{structqla__cdrp_a88a20c3db1f67812ec045f1fc54ca1a8}{rsp}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00477}00477                         cdrp-\/>\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}}, cdrp-\/>\mbox{\hyperlink{structqla__cdrp_a29d68c7c79e2d4dc8f8cc016d4663d23}{rsp\_arg2}}, cdrp-\/>\mbox{\hyperlink{structqla__cdrp_a15ba5f612cb2f04a2181d09a9644b0f4}{rsp\_arg3}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00478}00478         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00480}00480         \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00481}00481 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00482}00482 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00483}\mbox{\hyperlink{qla__hw_8c_ac10f1a20b39cb1ac6f713bc9b7609c70}{00483}} \textcolor{preprocessor}{\#define QLA\_TX\_MIN\_FREE 2}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00484}00484 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00485}00485 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00486}00486 \textcolor{comment}{ * Name: qla\_fw\_cmd}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00487}00487 \textcolor{comment}{ * Function: Issues firmware control commands on the Tx Ring.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00488}00488 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00489}00489 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00490}\mbox{\hyperlink{qla__hw_8c_a58a9879d90432e1b9e13e359de855cec}{00490}} \mbox{\hyperlink{qla__hw_8c_a58a9879d90432e1b9e13e359de855cec}{qla\_fw\_cmd}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, \textcolor{keywordtype}{void} *fw\_cmd, uint32\_t size)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00491}00491 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00492}00492         device\_t dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00493}00493         \mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}} *tx\_cmd;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00494}00494         \mbox{\hyperlink{struct__qla__hw}{qla\_hw\_t}} *hw = \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00495}00495         \textcolor{keywordtype}{int} count = 100;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00497}00497         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00498}00498 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00499}00499         \mbox{\hyperlink{qla__os_8h_a6eb0319bc822f8ea3f7492609ce88a95}{QLA\_TX\_LOCK}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00500}00500 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00501}00501         \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} <= \mbox{\hyperlink{qla__hw_8c_ac10f1a20b39cb1ac6f713bc9b7609c70}{QLA\_TX\_MIN\_FREE}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00502}00502                 \textcolor{keywordflow}{while} (count-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00503}00503                         \mbox{\hyperlink{qla__hw_8c_a02a9fed36ce48292a7877f9ba4578747}{qla\_hw\_tx\_done\_locked}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00504}00504                         \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} > \mbox{\hyperlink{qla__hw_8c_ac10f1a20b39cb1ac6f713bc9b7609c70}{QLA\_TX\_MIN\_FREE}})}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00505}00505                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00506}00506 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00507}00507                         \mbox{\hyperlink{qla__os_8h_a4ddfbd3b7ed492219439cc4c89bfe411}{QLA\_TX\_UNLOCK}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00508}00508                         \mbox{\hyperlink{qla__os_8h_ac19585fb4979e3ca1d70ab87532bedbd}{qla\_mdelay}}(\_\_func\_\_, 10);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00509}00509                         \mbox{\hyperlink{qla__os_8h_a6eb0319bc822f8ea3f7492609ce88a95}{QLA\_TX\_LOCK}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00510}00510                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00511}00511                 \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} <= \mbox{\hyperlink{qla__hw_8c_ac10f1a20b39cb1ac6f713bc9b7609c70}{QLA\_TX\_MIN\_FREE}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00512}00512                         \mbox{\hyperlink{qla__os_8h_a4ddfbd3b7ed492219439cc4c89bfe411}{QLA\_TX\_UNLOCK}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00513}00513                         device\_printf(dev, \textcolor{stringliteral}{"{}\%s: xmit queue full\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00514}00514                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00515}00515                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00516}00516         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00517}00517         tx\_cmd = \&hw-\/>\mbox{\hyperlink{struct__qla__hw_a7a5e88ebf50ec54eaa70be6a62187af1}{tx\_ring\_base}}[hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}}];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00518}00518 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00519}00519         bzero((\textcolor{keywordtype}{void} *)tx\_cmd, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00520}00520 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00521}00521         bcopy(fw\_cmd, tx\_cmd, size);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00522}00522 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00523}00523         hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} = (hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} + 1) \& (\mbox{\hyperlink{qla__hw_8h_ad70baca046931aa8d783f9db0a950f08}{NUM\_TX\_DESCRIPTORS}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00524}00524         hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00525}00525 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00526}00526         \mbox{\hyperlink{qla__hw_8h_a56937e1125633cee67ed80e544939c6c}{QL\_UPDATE\_TX\_PRODUCER\_INDEX}}(ha, hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00528}00528         \mbox{\hyperlink{qla__os_8h_a4ddfbd3b7ed492219439cc4c89bfe411}{QLA\_TX\_UNLOCK}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00529}00529 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00530}00530         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00531}00531 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00532}00532 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00533}00533 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00534}00534 \textcolor{comment}{ * Name: qla\_config\_rss}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00535}00535 \textcolor{comment}{ * Function: Configure RSS for the context/interface.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00536}00536 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00537}\mbox{\hyperlink{qla__hw_8c_a13ceb5caa8c341bc5bcf16feadc3013c}{00537}} \textcolor{keyword}{const} uint64\_t \mbox{\hyperlink{qla__hw_8c_a13ceb5caa8c341bc5bcf16feadc3013c}{rss\_key}}[] = \{ 0xbeac01fa6a42b73bULL, 0x8030f20c77cb2da3ULL,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00538}00538                         0xae7b30b4d0ca2bcbULL, 0x43a38fb04167253dULL,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00539}00539                         0x255b0ec26d5a56daULL \};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00541}00541 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00542}\mbox{\hyperlink{qla__hw_8c_a9810cd71b01c968762fa0e64f90e815d}{00542}} \mbox{\hyperlink{qla__hw_8c_a9810cd71b01c968762fa0e64f90e815d}{qla\_config\_rss}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, uint16\_t cntxt\_id)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00543}00543 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00544}00544         \mbox{\hyperlink{struct__qla__fw__cds__config__rss}{qla\_fw\_cds\_config\_rss\_t}} rss\_config;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00545}00545         \textcolor{keywordtype}{int} ret, i;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00546}00546 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00547}00547         bzero(\&rss\_config, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__fw__cds__config__rss}{qla\_fw\_cds\_config\_rss\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00548}00548 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00549}00549         rss\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__rss_adb244f1b253979f46ab332ad6e74eb7e}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a7fe685893d0bbeeee8eba136561d495d}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ad1f92d72087a47ee52a01b70c551d3ab}{Q8\_FWCD\_CNTRL\_REQ}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00550}00550         rss\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__rss_adb244f1b253979f46ab332ad6e74eb7e}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a2c5531b8fea3dcd71f5d94342bdd2ad8}{opcode}} = \mbox{\hyperlink{qla__hw_8h_a7501147f2795717b57f8fc25441b930d}{Q8\_FWCD\_OPCODE\_CONFIG\_RSS}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00551}00551         rss\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__rss_adb244f1b253979f46ab332ad6e74eb7e}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a534b246e05b667cf5d180dc4d28bdb6c}{cntxt\_id}} = cntxt\_id;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00552}00552 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00553}00553         rss\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__rss_a70681aa48ae24419bf2b2b3212999221}{hash\_type}} = (\mbox{\hyperlink{qla__hw_8h_ab60e69e23511c3456a28e51af465c9a8}{Q8\_FWCD\_RSS\_HASH\_TYPE\_IPV4\_TCP\_IP}} |}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00554}00554                                         \mbox{\hyperlink{qla__hw_8h_a2f0c64e91731921f01d65270fe18ff5e}{Q8\_FWCD\_RSS\_HASH\_TYPE\_IPV6\_TCP\_IP}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00555}00555         rss\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__rss_a97fef78d69c186aa28cf8af6312eb129}{flags}} = \mbox{\hyperlink{qla__hw_8h_ab8d7bc58ccd01f5d6f4e4050b0f4af5d}{Q8\_FWCD\_RSS\_FLAGS\_ENABLE\_RSS}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00556}00556 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00557}00557         rss\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__rss_a10a5b62dcae7e99392444790035f4998}{ind\_tbl\_mask}} = 0x7;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00558}00558 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00559}00559         \textcolor{keywordflow}{for} (i = 0; i < 5; i++)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00560}00560                 rss\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__rss_a3bc074d9a241c229e0398114c482865a}{rss\_key}}[i] = \mbox{\hyperlink{qla__hw_8c_a13ceb5caa8c341bc5bcf16feadc3013c}{rss\_key}}[i];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00561}00561 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00562}00562         ret = \mbox{\hyperlink{qla__hw_8c_a58a9879d90432e1b9e13e359de855cec}{qla\_fw\_cmd}}(ha, \&rss\_config, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__fw__cds__config__rss}{qla\_fw\_cds\_config\_rss\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00563}00563 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00564}00564         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00565}00565 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00566}00566 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00567}00567 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00568}00568 \textcolor{comment}{ * Name: qla\_config\_intr\_coalesce}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00569}00569 \textcolor{comment}{ * Function: Configure Interrupt Coalescing.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00570}00570 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00571}00571 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00572}\mbox{\hyperlink{qla__hw_8c_af7325cfcefc0bf75c5ba83d7e0683425}{00572}} \mbox{\hyperlink{qla__hw_8c_af7325cfcefc0bf75c5ba83d7e0683425}{qla\_config\_intr\_coalesce}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, uint16\_t cntxt\_id, \textcolor{keywordtype}{int} tenable)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00573}00573 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00574}00574         \mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc}{qla\_fw\_cds\_config\_intr\_coalesc\_t}} intr\_coalesce;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00575}00575         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00576}00576 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00577}00577         bzero(\&intr\_coalesce, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc}{qla\_fw\_cds\_config\_intr\_coalesc\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00578}00578 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00579}00579         intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_aaec0d45fcd5470b870ae349a4d73369e}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a7fe685893d0bbeeee8eba136561d495d}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ad1f92d72087a47ee52a01b70c551d3ab}{Q8\_FWCD\_CNTRL\_REQ}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00580}00580         intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_aaec0d45fcd5470b870ae349a4d73369e}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a2c5531b8fea3dcd71f5d94342bdd2ad8}{opcode}} = \mbox{\hyperlink{qla__hw_8h_ac80bd4431454df8b7f276b510abd2ca3}{Q8\_FWCD\_OPCODE\_CONFIG\_INTR\_COALESCING}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00581}00581         intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_aaec0d45fcd5470b870ae349a4d73369e}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a534b246e05b667cf5d180dc4d28bdb6c}{cntxt\_id}} = cntxt\_id;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00582}00582 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00583}00583         intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_a7a85b1185fb3467ef36c299f3e5484e4}{flags}} = 0x04;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00584}00584         intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_a045ec3332b1f7890c2ce4c2be1010ce8}{max\_rcv\_pkts}} = 256;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00585}00585         intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_a32a45cb3f26fb222c61d3554c8b8d4a4}{max\_rcv\_usecs}} = 3;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00586}00586         intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_a6f3c9064e5d20e2ffc98defbf7c21055}{max\_snd\_pkts}} = 64;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00587}00587         intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_a7936e9ab49d8742ac5a6166ed5419cbe}{max\_snd\_usecs}} = 4;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00588}00588 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00589}00589         \textcolor{keywordflow}{if} (tenable) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00590}00590                 intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_a3fe401a9270af147b1c25e75114ef2b7}{usecs\_to}} = 1000; \textcolor{comment}{/* 1 millisecond */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00591}00591                 intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_a7cb8e75e01d144acb681e9d4ae256162}{timer\_type}} = \mbox{\hyperlink{qla__hw_8h_a5296ebff18858ffa48ed98ff672cce44}{Q8\_FWCMD\_INTR\_COALESC\_TIMER\_PERIODIC}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00592}00592                 intr\_coalesce.\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc_ab67755675c5255e28540415475278e3c}{sds\_ring\_bitmask}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00593}00593                         \mbox{\hyperlink{qla__hw_8h_abc7284c67136e290255c8ec79151670a}{Q8\_FWCMD\_INTR\_COALESC\_SDS\_RING\_0}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00594}00594         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00595}00595 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00596}00596         ret = \mbox{\hyperlink{qla__hw_8c_a58a9879d90432e1b9e13e359de855cec}{qla\_fw\_cmd}}(ha, \&intr\_coalesce,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00597}00597                         \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__fw__cds__config__intr__coalesc}{qla\_fw\_cds\_config\_intr\_coalesc\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00599}00599         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00600}00600 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00601}00601 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00602}00602 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00603}00603 \textcolor{comment}{ * Name: qla\_config\_mac\_addr}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00604}00604 \textcolor{comment}{ * Function: binds a MAC address to the context/interface.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00605}00605 \textcolor{comment}{ *      Can be unicast, multicast or broadcast.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00606}00606 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00607}00607 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00608}\mbox{\hyperlink{qla__hw_8c_ad38dd3dabb0c8bc9297b4cb14a1ec9c3}{00608}} \mbox{\hyperlink{qla__hw_8c_ad38dd3dabb0c8bc9297b4cb14a1ec9c3}{qla\_config\_mac\_addr}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, uint8\_t *mac\_addr, uint16\_t cntxt\_id,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00609}00609         uint32\_t add\_multi)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00610}00610 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00611}00611         \mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr}{qla\_fw\_cds\_config\_mac\_addr\_t}} mac\_config;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00612}00612         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00613}00613 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00614}00614 \textcolor{comment}{//      device\_printf(ha-\/>pci\_dev,}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00615}00615 \textcolor{comment}{//              "{}\%s: mac\_addr \%02x:\%02x:\%02x:\%02x:\%02x:\%02x\(\backslash\)n"{}, \_\_func\_\_,}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00616}00616 \textcolor{comment}{//              mac\_addr[0], mac\_addr[1], mac\_addr[2],}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00617}00617 \textcolor{comment}{//              mac\_addr[3], mac\_addr[4], mac\_addr[5]);}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00618}00618 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00619}00619         bzero(\&mac\_config, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr}{qla\_fw\_cds\_config\_mac\_addr\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00620}00620 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00621}00621         mac\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr_a1b886126f043481c2c83ec70047e72dc}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a7fe685893d0bbeeee8eba136561d495d}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ad1f92d72087a47ee52a01b70c551d3ab}{Q8\_FWCD\_CNTRL\_REQ}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00622}00622         mac\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr_a1b886126f043481c2c83ec70047e72dc}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a2c5531b8fea3dcd71f5d94342bdd2ad8}{opcode}} = \mbox{\hyperlink{qla__hw_8h_a6f1df5c2f4c69bbf566e8892f950037e}{Q8\_FWCD\_OPCODE\_CONFIG\_MAC\_ADDR}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00623}00623         mac\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr_a1b886126f043481c2c83ec70047e72dc}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a534b246e05b667cf5d180dc4d28bdb6c}{cntxt\_id}} = cntxt\_id;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00624}00624 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00625}00625         \textcolor{keywordflow}{if} (add\_multi)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00626}00626                 mac\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr_a4a7ed68601f09dd828354cf7c42406fd}{cmd}} = \mbox{\hyperlink{qla__hw_8h_a96c4b99cfe74620afc66164ba682f46c}{Q8\_FWCD\_ADD\_MAC\_ADDR}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00627}00627         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00628}00628                 mac\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr_a4a7ed68601f09dd828354cf7c42406fd}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ae1201c8e71eb8a9d17f68359b53dc511}{Q8\_FWCD\_DEL\_MAC\_ADDR}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00629}00629         bcopy(mac\_addr, mac\_config.\mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr_a3eb610cfd15cee91f72f5b4226d637cd}{mac\_addr}},6); }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00631}00631         ret = \mbox{\hyperlink{qla__hw_8c_a58a9879d90432e1b9e13e359de855cec}{qla\_fw\_cmd}}(ha, \&mac\_config, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__fw__cds__config__mac__addr}{qla\_fw\_cds\_config\_mac\_addr\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00632}00632 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00633}00633         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00634}00634 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00635}00635 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00636}00636 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00637}00637 \textcolor{comment}{ * Name: qla\_set\_mac\_rcv\_mode}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00638}00638 \textcolor{comment}{ * Function: Enable/Disable AllMulticast and Promiscuous Modes.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00639}00639 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00640}00640 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00641}\mbox{\hyperlink{qla__hw_8c_ada6eb8b932ee3ee2416a0f6eacfdfcfb}{00641}} \mbox{\hyperlink{qla__hw_8c_ada6eb8b932ee3ee2416a0f6eacfdfcfb}{qla\_set\_mac\_rcv\_mode}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, uint16\_t cntxt\_id, uint32\_t mode)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00642}00642 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00643}00643         \mbox{\hyperlink{struct__qla__set__mac__rcv__mode}{qla\_set\_mac\_rcv\_mode\_t}} rcv\_mode;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00644}00644         \textcolor{keywordtype}{int} ret;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00646}00646         bzero(\&rcv\_mode, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__set__mac__rcv__mode}{qla\_set\_mac\_rcv\_mode\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00647}00647 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00648}00648         rcv\_mode.\mbox{\hyperlink{struct__qla__set__mac__rcv__mode_adbd65fbabbac7e95a9cf293ec0b923ca}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a7fe685893d0bbeeee8eba136561d495d}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ad1f92d72087a47ee52a01b70c551d3ab}{Q8\_FWCD\_CNTRL\_REQ}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00649}00649         rcv\_mode.\mbox{\hyperlink{struct__qla__set__mac__rcv__mode_adbd65fbabbac7e95a9cf293ec0b923ca}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a2c5531b8fea3dcd71f5d94342bdd2ad8}{opcode}} = \mbox{\hyperlink{qla__hw_8h_ae4db792c8a6deefc788d3c70cb26a613}{Q8\_FWCD\_OPCODE\_CONFIG\_MAC\_RCV\_MODE}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00650}00650         rcv\_mode.\mbox{\hyperlink{struct__qla__set__mac__rcv__mode_adbd65fbabbac7e95a9cf293ec0b923ca}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a534b246e05b667cf5d180dc4d28bdb6c}{cntxt\_id}} = cntxt\_id;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00651}00651 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00652}00652         rcv\_mode.\mbox{\hyperlink{struct__qla__set__mac__rcv__mode_a1274f5c109688730f521a2218a9a6f82}{mode}} = mode;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00653}00653 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00654}00654         ret = \mbox{\hyperlink{qla__hw_8c_a58a9879d90432e1b9e13e359de855cec}{qla\_fw\_cmd}}(ha, \&rcv\_mode, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__set__mac__rcv__mode}{qla\_set\_mac\_rcv\_mode\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00655}00655 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00656}00656         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00657}00657 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00658}00658 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00659}00659 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00660}\mbox{\hyperlink{qla__glbl_8h_a683f9d54a8be68466a6a1b78b113d27e}{00660}} \mbox{\hyperlink{qla__hw_8c_a683f9d54a8be68466a6a1b78b113d27e}{qla\_set\_promisc}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00661}00661 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00662}00662         (void)\mbox{\hyperlink{qla__hw_8c_ada6eb8b932ee3ee2416a0f6eacfdfcfb}{qla\_set\_mac\_rcv\_mode}}(ha,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00663}00663                 (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00664}00664                 \mbox{\hyperlink{qla__hw_8h_adb324a299bd56bf85c5f88cdf55cd0f6}{Q8\_MAC\_RCV\_ENABLE\_PROMISCUOUS}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00665}00665 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00666}00666 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00667}00667 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00668}\mbox{\hyperlink{qla__glbl_8h_a42af1ebf36a0af91b0152ca6ebf5d22d}{00668}} \mbox{\hyperlink{qla__hw_8c_a42af1ebf36a0af91b0152ca6ebf5d22d}{qla\_set\_allmulti}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00669}00669 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00670}00670         (void)\mbox{\hyperlink{qla__hw_8c_ada6eb8b932ee3ee2416a0f6eacfdfcfb}{qla\_set\_mac\_rcv\_mode}}(ha,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00671}00671                 (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00672}00672                 \mbox{\hyperlink{qla__hw_8h_a76dfd47e33dee5da5a5b144d9709ab68}{Q8\_MAC\_RCV\_ENABLE\_ALLMULTI}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00673}00673 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00674}00674 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00675}00675 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00676}\mbox{\hyperlink{qla__glbl_8h_a4b6566e034ffddd32a2914fb7bc1860f}{00676}} \mbox{\hyperlink{qla__hw_8c_a4b6566e034ffddd32a2914fb7bc1860f}{qla\_reset\_promisc\_allmulti}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00677}00677 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00678}00678         (void)\mbox{\hyperlink{qla__hw_8c_ada6eb8b932ee3ee2416a0f6eacfdfcfb}{qla\_set\_mac\_rcv\_mode}}(ha,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00679}00679                 (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00680}00680                 \mbox{\hyperlink{qla__hw_8h_a1cb8b79919820d4b242a24fe036154ea}{Q8\_MAC\_RCV\_RESET\_PROMISC\_ALLMULTI}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00681}00681 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00682}00682 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00683}00683 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00684}00684 \textcolor{comment}{ * Name: qla\_config\_ipv4\_addr}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00685}00685 \textcolor{comment}{ * Function: Configures the Destination IP Addr for LRO.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00686}00686 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00687}00687 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00688}\mbox{\hyperlink{qla__glbl_8h_aa76b1367229ca0292d592014ee822069}{00688}} \mbox{\hyperlink{qla__hw_8c_aa76b1367229ca0292d592014ee822069}{qla\_config\_ipv4\_addr}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, uint32\_t ipv4\_addr)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00689}00689 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00690}00690         \mbox{\hyperlink{struct__qla__config__ipv4}{qla\_config\_ipv4\_t}} ip\_conf;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00691}00691 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00692}00692         bzero(\&ip\_conf, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__config__ipv4}{qla\_config\_ipv4\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00693}00693 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00694}00694         ip\_conf.\mbox{\hyperlink{struct__qla__config__ipv4_ad1aa0ee351f1c1ad48c3634ff6a85da2}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a7fe685893d0bbeeee8eba136561d495d}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ad1f92d72087a47ee52a01b70c551d3ab}{Q8\_FWCD\_CNTRL\_REQ}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00695}00695         ip\_conf.\mbox{\hyperlink{struct__qla__config__ipv4_ad1aa0ee351f1c1ad48c3634ff6a85da2}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a2c5531b8fea3dcd71f5d94342bdd2ad8}{opcode}} = \mbox{\hyperlink{qla__hw_8h_a639efaa4944e52e96c838e09ea9ff183}{Q8\_FWCD\_OPCODE\_CONFIG\_IPADDR}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00696}00696         ip\_conf.\mbox{\hyperlink{struct__qla__config__ipv4_ad1aa0ee351f1c1ad48c3634ff6a85da2}{hdr}}.\mbox{\hyperlink{struct__qla__fw__cds__hdr_a534b246e05b667cf5d180dc4d28bdb6c}{cntxt\_id}} = (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00697}00697 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00698}00698         ip\_conf.\mbox{\hyperlink{struct__qla__config__ipv4_a84826f00ee8a528064b9371699b8e3a7}{cmd}} = (uint64\_t)\mbox{\hyperlink{qla__hw_8h_ac68f2a28a2564736fe30246879c684b5}{Q8\_CONFIG\_CMD\_IP\_ENABLE}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00699}00699         ip\_conf.\mbox{\hyperlink{struct__qla__config__ipv4_aef2af84bb962b74f9c1324153006778e}{ipv4\_addr}} = (uint64\_t)ipv4\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00700}00700 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00701}00701         (void)\mbox{\hyperlink{qla__hw_8c_a58a9879d90432e1b9e13e359de855cec}{qla\_fw\_cmd}}(ha, \&ip\_conf, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__qla__config__ipv4}{qla\_config\_ipv4\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00702}00702 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00703}00703         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00704}00704 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00705}00705 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00706}00706 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00707}00707 \textcolor{comment}{ * Name: qla\_tx\_tso}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00708}00708 \textcolor{comment}{ * Function: Checks if the packet to be transmitted is a candidate for}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00709}00709 \textcolor{comment}{ *      Large TCP Segment Offload. If yes, the appropriate fields in the Tx}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00710}00710 \textcolor{comment}{ *      Ring Structure are plugged in.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00711}00711 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00712}00712 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00713}\mbox{\hyperlink{qla__hw_8c_a1d5544dc9fa2ea0158fc594f1a9a5124}{00713}} \mbox{\hyperlink{qla__hw_8c_a1d5544dc9fa2ea0158fc594f1a9a5124}{qla\_tx\_tso}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, \textcolor{keyword}{struct} mbuf *mp, \mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}} *tx\_cmd, uint8\_t *hdr)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00714}00714 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00715}00715         \textcolor{keyword}{struct }ether\_vlan\_header *eh;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00716}00716         \textcolor{keyword}{struct }ip *ip = NULL;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00717}00717         \textcolor{keyword}{struct }tcphdr *th = NULL;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00718}00718         uint32\_t ehdrlen,  hdrlen = 0, ip\_hlen, tcp\_hlen, tcp\_opt\_off;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00719}00719         uint16\_t etype, opcode, offload = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00720}00720         uint8\_t *tcp\_opt;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00721}00721         device\_t dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00722}00722 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00723}00723         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00724}00724 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00725}00725         eh = mtod(mp, \textcolor{keyword}{struct} ether\_vlan\_header *);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00726}00726 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00727}00727         \textcolor{keywordflow}{if} (eh-\/>evl\_encap\_proto == htons(ETHERTYPE\_VLAN)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00728}00728                 ehdrlen = ETHER\_HDR\_LEN + ETHER\_VLAN\_ENCAP\_LEN;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00729}00729                 etype = ntohs(eh-\/>evl\_proto);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00730}00730         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00731}00731                 ehdrlen = ETHER\_HDR\_LEN;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00732}00732                 etype = ntohs(eh-\/>evl\_encap\_proto);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00733}00733         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00734}00734 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00735}00735         \textcolor{keywordflow}{switch} (etype) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00736}00736                 \textcolor{keywordflow}{case} ETHERTYPE\_IP:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00737}00737 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00738}00738                         tcp\_opt\_off = ehdrlen + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }ip) +}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00739}00739                                         sizeof(struct tcphdr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00740}00740 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00741}00741                         \textcolor{keywordflow}{if} (mp-\/>m\_len < tcp\_opt\_off) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00742}00742                                 m\_copydata(mp, 0, tcp\_opt\_off, hdr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00743}00743                                 ip = (\textcolor{keyword}{struct }ip *)hdr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00744}00744                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00745}00745                                 ip = (\textcolor{keyword}{struct }ip *)(mp-\/>m\_data + ehdrlen);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00746}00746                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00747}00747 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00748}00748                         ip\_hlen = ip-\/>ip\_hl << 2;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00749}00749                         opcode = \mbox{\hyperlink{qla__hw_8h_a4cea3556d07f51e1014e2b528fd02cef}{Q8\_TX\_CMD\_OP\_XMT\_TCP\_LSO}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00750}00750 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00751}00751                         \textcolor{keywordflow}{if} ((ip-\/>ip\_p != IPPROTO\_TCP) ||}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00752}00752                                 (ip\_hlen != \textcolor{keyword}{sizeof} (\textcolor{keyword}{struct }ip))) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00753}00753                                 offload = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00754}00754                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00755}00755                                 th = (\textcolor{keyword}{struct }tcphdr *)((caddr\_t)ip + ip\_hlen);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00756}00756                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00757}00757                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00758}00758 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00759}00759                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00760}00760                         \mbox{\hyperlink{qla__dbg_8h_a5d64cf3cf50ae82e8bb775b3e8520fa6}{QL\_DPRINT8}}((dev, \textcolor{stringliteral}{"{}\%s: type!=ip\(\backslash\)n"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00761}00761                         offload = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00762}00762                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00763}00763         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00764}00764 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00765}00765         \textcolor{keywordflow}{if} (!offload)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00766}00766                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00767}00767 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00768}00768         tcp\_hlen = th-\/>th\_off << 2;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00769}00769 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00770}00770         hdrlen = ehdrlen + ip\_hlen + tcp\_hlen;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00771}00771 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00772}00772         \textcolor{keywordflow}{if} (mp-\/>m\_len < hdrlen) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00773}00773                 \textcolor{keywordflow}{if} (mp-\/>m\_len < tcp\_opt\_off) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00774}00774                         \textcolor{keywordflow}{if} (tcp\_hlen > \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} tcphdr)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00775}00775                                 m\_copydata(mp, tcp\_opt\_off,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00776}00776                                         (tcp\_hlen -\/ \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} tcphdr)),}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00777}00777                                         \&hdr[tcp\_opt\_off]);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00778}00778                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00779}00779                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00780}00780                         m\_copydata(mp, 0, hdrlen, hdr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00781}00781                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00782}00782         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00783}00783 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00784}00784         \textcolor{keywordflow}{if} ((mp-\/>m\_pkthdr.csum\_flags \& CSUM\_TSO) == 0) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00785}00785                 \textcolor{comment}{/* If TCP options are preset only time stamp option is supported */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00786}00786                 \textcolor{keywordflow}{if} ((tcp\_hlen -\/ \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} tcphdr)) != 10) }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00787}00787                         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00788}00788                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00789}00789                         \textcolor{keywordflow}{if} (mp-\/>m\_len < hdrlen) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00790}00790                                 tcp\_opt = \&hdr[tcp\_opt\_off];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00791}00791                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00792}00792                                 tcp\_opt = (uint8\_t *)(mp-\/>m\_data + tcp\_opt\_off);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00793}00793                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00794}00794 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00795}00795                         \textcolor{keywordflow}{if} ((*tcp\_opt != 0x01) || (*(tcp\_opt + 1) != 0x01) ||}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00796}00796                                 (*(tcp\_opt + 2) != 0x08) ||}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00797}00797                                 (*(tcp\_opt + 3) != 10)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00798}00798                                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00799}00799                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00800}00800                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00801}00801 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00802}00802                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a6e807b6cd971930213687bd384765416}{mss}} = ha-\/>\mbox{\hyperlink{structqla__host_a8fd521b8939dbb2a27d6d38bbb3dd97a}{max\_frame\_size}} -\/ ETHER\_CRC\_LEN -\/ hdrlen;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00803}00803         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00804}00804                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a6e807b6cd971930213687bd384765416}{mss}} = mp-\/>m\_pkthdr.tso\_segsz;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00805}00805         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00806}00806 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00807}00807         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a2b2b5a65b6e87b63aef53d459c959c34}{flags\_opcode}} = opcode ;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00808}00808         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_ac5a96ce14b91b2a60a504014f5856ac8}{tcp\_hdr\_off}} = ip\_hlen + ehdrlen;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00809}00809         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_aa14ec68eab62522ff8b05495957638f6}{ip\_hdr\_off}} = ehdrlen;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00810}00810         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a6e807b6cd971930213687bd384765416}{mss}} = mp-\/>m\_pkthdr.tso\_segsz;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00811}00811         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_ae51b611c0a16ff1e5062719466cf9864}{total\_hdr\_len}} = hdrlen;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00812}00812 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00813}00813         \textcolor{comment}{/* Check for Multicast least significant bit of MSB == 1 */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00814}00814         \textcolor{keywordflow}{if} (eh-\/>evl\_dhost[0] \& 0x01) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00815}00815                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a2b2b5a65b6e87b63aef53d459c959c34}{flags\_opcode}} = \mbox{\hyperlink{qla__hw_8h_a36db9836902d3fa0011944b90d15a74b}{Q8\_TX\_CMD\_FLAGS\_MULTICAST}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00816}00816         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00817}00817 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00818}00818         \textcolor{keywordflow}{if} (mp-\/>m\_len < hdrlen) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00819}00819                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00820}00820         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00821}00821 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00822}00822         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00823}00823 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00824}00824 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00825}00825 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00826}00826 \textcolor{comment}{ * Name: qla\_tx\_chksum}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00827}00827 \textcolor{comment}{ * Function: Checks if the packet to be transmitted is a candidate for}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00828}00828 \textcolor{comment}{ *      TCP/UDP Checksum offload. If yes, the appropriate fields in the Tx}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00829}00829 \textcolor{comment}{ *      Ring Structure are plugged in.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00830}00830 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00831}00831 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00832}\mbox{\hyperlink{qla__hw_8c_a93d467c6f0460cd0b1ea92bcb2e19223}{00832}} \mbox{\hyperlink{qla__hw_8c_a93d467c6f0460cd0b1ea92bcb2e19223}{qla\_tx\_chksum}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, \textcolor{keyword}{struct} mbuf *mp, \mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}} *tx\_cmd)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00833}00833 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00834}00834         \textcolor{keyword}{struct }ether\_vlan\_header *eh;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00835}00835         \textcolor{keyword}{struct }ip *ip;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00836}00836         \textcolor{keyword}{struct }ip6\_hdr *ip6;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00837}00837         uint32\_t ehdrlen, ip\_hlen;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00838}00838         uint16\_t etype, opcode, offload = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00839}00839         device\_t dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00840}00840 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00841}00841         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00842}00842 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00843}00843         \textcolor{keywordflow}{if} ((mp-\/>m\_pkthdr.csum\_flags \& (CSUM\_TCP|CSUM\_UDP)) == 0)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00844}00844                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00845}00845 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00846}00846         eh = mtod(mp, \textcolor{keyword}{struct} ether\_vlan\_header *);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00847}00847 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00848}00848         \textcolor{keywordflow}{if} (eh-\/>evl\_encap\_proto == htons(ETHERTYPE\_VLAN)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00849}00849                 ehdrlen = ETHER\_HDR\_LEN + ETHER\_VLAN\_ENCAP\_LEN;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00850}00850                 etype = ntohs(eh-\/>evl\_proto);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00851}00851         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00852}00852                 ehdrlen = ETHER\_HDR\_LEN;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00853}00853                 etype = ntohs(eh-\/>evl\_encap\_proto);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00854}00854         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00855}00855 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00856}00856                 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00857}00857         \textcolor{keywordflow}{switch} (etype) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00858}00858                 \textcolor{keywordflow}{case} ETHERTYPE\_IP:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00859}00859                         ip = (\textcolor{keyword}{struct }ip *)(mp-\/>m\_data + ehdrlen);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00860}00860 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00861}00861                         ip\_hlen = \textcolor{keyword}{sizeof} (\textcolor{keyword}{struct }ip);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00862}00862 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00863}00863                         \textcolor{keywordflow}{if} (mp-\/>m\_len < (ehdrlen + ip\_hlen)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00864}00864                                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: ipv4 mlen\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00865}00865                                 offload = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00866}00866                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00867}00867                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00868}00868 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00869}00869                         \textcolor{keywordflow}{if} (ip-\/>ip\_p == IPPROTO\_TCP)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00870}00870                                 opcode = \mbox{\hyperlink{qla__hw_8h_aa1aeae9dc923497328e34a8458f19c30}{Q8\_TX\_CMD\_OP\_XMT\_TCP\_CHKSUM}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00871}00871                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ip-\/>ip\_p == IPPROTO\_UDP)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00872}00872                                 opcode = \mbox{\hyperlink{qla__hw_8h_a492bdd9b01c5e96757d6184d0b3ea32c}{Q8\_TX\_CMD\_OP\_XMT\_UDP\_CHKSUM}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00873}00873                         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00874}00874                                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: ipv4\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00875}00875                                 offload = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00876}00876                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00877}00877                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00878}00878 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00879}00879                 \textcolor{keywordflow}{case} ETHERTYPE\_IPV6:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00880}00880                         ip6 = (\textcolor{keyword}{struct }ip6\_hdr *)(mp-\/>m\_data + ehdrlen);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00881}00881 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00882}00882                         ip\_hlen = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }ip6\_hdr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00883}00883 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00884}00884                         \textcolor{keywordflow}{if} (mp-\/>m\_len < (ehdrlen + ip\_hlen)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00885}00885                                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: ipv6 mlen\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00886}00886                                 offload = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00887}00887                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00888}00888                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00889}00889 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00890}00890                         \textcolor{keywordflow}{if} (ip6-\/>ip6\_nxt == IPPROTO\_TCP)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00891}00891                                 opcode = \mbox{\hyperlink{qla__hw_8h_a9b0a3fc7468e05e5cb420f3da7be15cc}{Q8\_TX\_CMD\_OP\_XMT\_TCP\_CHKSUM\_IPV6}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00892}00892                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ip6-\/>ip6\_nxt == IPPROTO\_UDP)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00893}00893                                 opcode = \mbox{\hyperlink{qla__hw_8h_acff32424636efe958d28f7a65bd6559a}{Q8\_TX\_CMD\_OP\_XMT\_UDP\_CHKSUM\_IPV6}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00894}00894                         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00895}00895                                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: ipv6\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00896}00896                                 offload = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00897}00897                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00898}00898                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00899}00899 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00900}00900                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00901}00901                         offload = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00902}00902                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00903}00903         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00904}00904         \textcolor{keywordflow}{if} (!offload)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00905}00905                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00906}00906 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00907}00907         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a2b2b5a65b6e87b63aef53d459c959c34}{flags\_opcode}} = opcode;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00908}00908 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00909}00909         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_ac5a96ce14b91b2a60a504014f5856ac8}{tcp\_hdr\_off}} = ip\_hlen + ehdrlen;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00910}00910 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00911}00911         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00912}00912 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00913}00913 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00914}00914 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00915}00915 \textcolor{comment}{ * Name: qla\_hw\_send}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00916}00916 \textcolor{comment}{ * Function: Transmits a packet. It first checks if the packet is a}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00917}00917 \textcolor{comment}{ *      candidate for Large TCP Segment Offload and then for UDP/TCP checksum}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00918}00918 \textcolor{comment}{ *      offload. If either of these creteria are not met, it is transmitted}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00919}00919 \textcolor{comment}{ *      as a regular ethernet frame.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00920}00920 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00921}00921 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00922}\mbox{\hyperlink{qla__glbl_8h_ae6dcdb43093683b0e22d95c994f8b2ec}{00922}} \mbox{\hyperlink{qla__hw_8c_ae6dcdb43093683b0e22d95c994f8b2ec}{qla\_hw\_send}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nsegs,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00923}00923         uint32\_t *tx\_idx,  \textcolor{keyword}{struct} mbuf *mp)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00924}00924 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00925}00925         \textcolor{keyword}{struct }ether\_vlan\_header *eh;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00926}00926         \mbox{\hyperlink{struct__qla__hw}{qla\_hw\_t}} *hw = \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00927}00927         \mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}} *tx\_cmd, tso\_cmd;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00928}00928         bus\_dma\_segment\_t *c\_seg;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00929}00929         uint32\_t num\_tx\_cmds, hdr\_len = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00930}00930         uint32\_t total\_length = 0, bytes, tx\_cmd\_count = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00931}00931         device\_t dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00932}00932         \textcolor{keywordtype}{int} i, ret;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00933}00933         uint8\_t *src = NULL, *dst = NULL;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00934}00934 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00935}00935         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00936}00936 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00937}00937         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00938}00938 \textcolor{comment}{         * Always make sure there is atleast one empty slot in the tx\_ring}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00939}00939 \textcolor{comment}{         * tx\_ring is considered full when there only one entry available}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00940}00940 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00941}00941         num\_tx\_cmds = (nsegs + (\mbox{\hyperlink{qla__hw_8h_a17931e9e8989f60b01f88a48bc62e705}{Q8\_TX\_CMD\_MAX\_SEGMENTS}} -\/ 1)) >> 2;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00942}00942 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00943}00943         total\_length = mp-\/>m\_pkthdr.len;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00944}00944         \textcolor{keywordflow}{if} (total\_length > \mbox{\hyperlink{qla__def_8h_a5d90bec978e83c51304d299eb5641366}{QLA\_MAX\_TSO\_FRAME\_SIZE}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00945}00945                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: total length exceeds maxlen(\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00946}00946                         \_\_func\_\_, total\_length);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00947}00947                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00948}00948         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00949}00949         eh = mtod(mp, \textcolor{keyword}{struct} ether\_vlan\_header *);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00950}00950 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00951}00951         \textcolor{keywordflow}{if} ((mp-\/>m\_pkthdr.len > ha-\/>\mbox{\hyperlink{structqla__host_a8fd521b8939dbb2a27d6d38bbb3dd97a}{max\_frame\_size}})||(nsegs > \mbox{\hyperlink{qla__hw_8h_a2fa01b05aed60c56a3d17eab56262849}{Q8\_TX\_MAX\_SEGMENTS}})) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00952}00952                 bzero((\textcolor{keywordtype}{void} *)\&tso\_cmd, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00953}00953 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00954}00954                 src = ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a1fbe439278c516d9b022d98511d63881}{frame\_hdr}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00955}00955                 ret = \mbox{\hyperlink{qla__hw_8c_a1d5544dc9fa2ea0158fc594f1a9a5124}{qla\_tx\_tso}}(ha, mp, \&tso\_cmd, src);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00956}00956 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00957}00957                 \textcolor{keywordflow}{if} (!(ret \& \string~1)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00958}00958                         \textcolor{comment}{/* find the additional tx\_cmd descriptors required */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00959}00959 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00960}00960                         hdr\_len = tso\_cmd.total\_hdr\_len;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00962}00962                         bytes = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{qla__hw_8h_af9f0a44cffa447ce821d5d2d1a4f1bb1}{q80\_tx\_cmd\_t}}) -\/ \mbox{\hyperlink{qla__hw_8h_a67e0294ab2154cae2d39c71eb68447e3}{Q8\_TX\_CMD\_TSO\_ALIGN}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00963}00963                         bytes = \mbox{\hyperlink{qla__def_8h_a48747f4d5503d665933fd730c8b8b4d3}{QL\_MIN}}(bytes, hdr\_len);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00964}00964 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00965}00965                         num\_tx\_cmds++;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00966}00966                         hdr\_len -\/= bytes;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00967}00967 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00968}00968                         \textcolor{keywordflow}{while} (hdr\_len) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00969}00969                                 bytes = \mbox{\hyperlink{qla__def_8h_a48747f4d5503d665933fd730c8b8b4d3}{QL\_MIN}}((\textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}})), hdr\_len);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00970}00970                                 hdr\_len -\/= bytes;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00971}00971                                 num\_tx\_cmds++;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00972}00972                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00973}00973                         hdr\_len = tso\_cmd.total\_hdr\_len;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00974}00974 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00975}00975                         \textcolor{keywordflow}{if} (ret == 0)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00976}00976                                 src = (uint8\_t *)eh;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00977}00977                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00978}00978         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00979}00979 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00980}00980         \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} <= (num\_tx\_cmds + \mbox{\hyperlink{qla__hw_8c_ac10f1a20b39cb1ac6f713bc9b7609c70}{QLA\_TX\_MIN\_FREE}})) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00981}00981                 \mbox{\hyperlink{qla__hw_8c_a02a9fed36ce48292a7877f9ba4578747}{qla\_hw\_tx\_done\_locked}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00982}00982                 \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} <= (num\_tx\_cmds + \mbox{\hyperlink{qla__hw_8c_ac10f1a20b39cb1ac6f713bc9b7609c70}{QLA\_TX\_MIN\_FREE}})) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00983}00983                         \mbox{\hyperlink{qla__dbg_8h_a5d64cf3cf50ae82e8bb775b3e8520fa6}{QL\_DPRINT8}}((dev, \textcolor{stringliteral}{"{}\%s: (hw-\/>txr\_free <= "{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00984}00984                                 \textcolor{stringliteral}{"{}(num\_tx\_cmds + QLA\_TX\_MIN\_FREE))\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00985}00985                                 \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00986}00986                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00987}00987                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00988}00988         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00989}00989 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00990}00990         *tx\_idx = hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00991}00991 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00992}00992         tx\_cmd = \&hw-\/>\mbox{\hyperlink{struct__qla__hw_a7a5e88ebf50ec54eaa70be6a62187af1}{tx\_ring\_base}}[hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}}];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00993}00993 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00994}00994         \textcolor{keywordflow}{if} (hdr\_len == 0) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00995}00995                 \textcolor{keywordflow}{if} ((nsegs > \mbox{\hyperlink{qla__hw_8h_a2fa01b05aed60c56a3d17eab56262849}{Q8\_TX\_MAX\_SEGMENTS}}) ||}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00996}00996                         (mp-\/>m\_pkthdr.len > ha-\/>\mbox{\hyperlink{structqla__host_a8fd521b8939dbb2a27d6d38bbb3dd97a}{max\_frame\_size}}))\{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00997}00997                         device\_printf(dev,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00998}00998                                 \textcolor{stringliteral}{"{}\%s: (nsegs[\%d, \%d, 0x\%b] > Q8\_TX\_MAX\_SEGMENTS)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l00999}00999                                 \_\_func\_\_, nsegs, mp-\/>m\_pkthdr.len,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01000}01000                                 (\textcolor{keywordtype}{int})mp-\/>m\_pkthdr.csum\_flags, CSUM\_BITS);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01001}01001                         \mbox{\hyperlink{qla__dbg_8c_a2856f76020b3196ba54fb81a795c09a2}{qla\_dump\_buf8}}(ha, \textcolor{stringliteral}{"{}qla\_hw\_send: wrong pkt"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01002}01002                                 mtod(mp, \textcolor{keywordtype}{char} *), mp-\/>m\_len);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01003}01003                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01004}01004                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01005}01005                 bzero((\textcolor{keywordtype}{void} *)tx\_cmd, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01006}01006                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_a93d467c6f0460cd0b1ea92bcb2e19223}{qla\_tx\_chksum}}(ha, mp, tx\_cmd) != 0) }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01007}01007                         tx\_cmd-\/>flags\_opcode = \mbox{\hyperlink{qla__hw_8h_ac34acbf763e11a9c7ed961a822c29811}{Q8\_TX\_CMD\_OP\_XMT\_ETHER}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01008}01008         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01009}01009                 bcopy(\&tso\_cmd, tx\_cmd, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01010}01010         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01011}01011 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01012}01012         \textcolor{keywordflow}{if} (eh-\/>evl\_encap\_proto == htons(ETHERTYPE\_VLAN))}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01013}01013                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a2b2b5a65b6e87b63aef53d459c959c34}{flags\_opcode}} |= \mbox{\hyperlink{qla__hw_8h_aa0cd6d346cddec9d9784e8ca7b7dbeb5}{Q8\_TX\_CMD\_FLAGS\_VLAN\_TAGGED}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01014}01014         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (mp-\/>m\_flags \& M\_VLANTAG) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01015}01015                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a2b2b5a65b6e87b63aef53d459c959c34}{flags\_opcode}} |= (\mbox{\hyperlink{qla__hw_8h_aa0cd6d346cddec9d9784e8ca7b7dbeb5}{Q8\_TX\_CMD\_FLAGS\_VLAN\_TAGGED}} |}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01016}01016                                                 \mbox{\hyperlink{qla__hw_8h_a6b016ec15de07cb418a138dd8bc95b96}{Q8\_TX\_CMD\_FLAGS\_HW\_VLAN\_ID}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01017}01017                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_acec6a2d7c7deb0b1bbf1fbdaa3e4fa10}{vlan\_tci}} = mp-\/>m\_pkthdr.ether\_vtag;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01018}01018         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01019}01019 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01020}01020         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a2bd14e93532702e26680ea01f79d4648}{n\_bufs}} = (uint8\_t)nsegs;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01021}01021         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_ac7e44e218ed4acbe7187e313b0c65974}{data\_len\_lo}} = (uint8\_t)(total\_length \& 0xFF);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01022}01022         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a22158acf7effb045fad16fc97044c6ac}{data\_len\_hi}} = \mbox{\hyperlink{qla__os_8h_a2c16e8bd784bac8a87027db51ddbf393}{qla\_host\_to\_le16}}(((uint16\_t)(total\_length >> 8)));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01023}01023         tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a947a5bc6ff65667abeef680cacc6eb55}{port\_cntxtid}} = \mbox{\hyperlink{qla__hw_8h_a27b71329db51b3d475834e12ae67109e}{Q8\_TX\_CMD\_PORT\_CNXTID}}(ha-\/>\mbox{\hyperlink{structqla__host_a241ccac5b886c6195827db9ac08c78f3}{pci\_func}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01024}01024 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01025}01025         c\_seg = segs;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01026}01026 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01027}01027         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01028}01028                 \textcolor{keywordflow}{for} (i = 0; ((i < \mbox{\hyperlink{qla__hw_8h_a17931e9e8989f60b01f88a48bc62e705}{Q8\_TX\_CMD\_MAX\_SEGMENTS}}) \&\& nsegs); i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01029}01029                         \textcolor{keywordflow}{switch} (i) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01030}01030                         \textcolor{keywordflow}{case} 0:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01031}01031                                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a52c4d4237e9f2d6f3b2e3523847b2812}{buf1\_addr}} = c\_seg-\/>ds\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01032}01032                                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a73c26492461fae64444aefb557f586a1}{buf1\_len}} = c\_seg-\/>ds\_len;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01033}01033                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01034}01034 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01035}01035                         \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01036}01036                                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a77fde9ba44a171a4066230ed68a88eac}{buf2\_addr}} = c\_seg-\/>ds\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01037}01037                                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a58be4a43d8cbb48ef78467b425a769e1}{buf2\_len}} = c\_seg-\/>ds\_len;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01038}01038                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01039}01039 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01040}01040                         \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01041}01041                                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_af8b594193e767a45f0ebd6d0fc3a01cb}{buf3\_addr}} = c\_seg-\/>ds\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01042}01042                                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_ae3963ee2c827b3cf1e565d4d6930c29b}{buf3\_len}} = c\_seg-\/>ds\_len;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01043}01043                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01044}01044 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01045}01045                         \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01046}01046                                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_a51fb7ec2d2847ffc23d6b85f698aa0fb}{buf4\_addr}} = c\_seg-\/>ds\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01047}01047                                 tx\_cmd-\/>\mbox{\hyperlink{struct__q80__tx__cmd_ab63b74d47dc9615dac040d5647b55f4f}{buf4\_len}} = c\_seg-\/>ds\_len;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01048}01048                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01049}01049                         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01050}01050 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01051}01051                         c\_seg++;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01052}01052                         nsegs-\/-\/;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01053}01053                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01054}01054 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01055}01055                 hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} = (hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} + 1) \& (\mbox{\hyperlink{qla__hw_8h_ad70baca046931aa8d783f9db0a950f08}{NUM\_TX\_DESCRIPTORS}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01056}01056                 tx\_cmd\_count++;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01057}01057 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01058}01058                 \textcolor{keywordflow}{if} (!nsegs)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01059}01059                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01060}01060                 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01061}01061                 tx\_cmd = \&hw-\/>\mbox{\hyperlink{struct__qla__hw_a7a5e88ebf50ec54eaa70be6a62187af1}{tx\_ring\_base}}[hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}}];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01062}01062                 bzero((\textcolor{keywordtype}{void} *)tx\_cmd, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01063}01063         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01064}01064 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01065}01065         \textcolor{keywordflow}{if} (hdr\_len) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01066}01066                 \textcolor{comment}{/* TSO : Copy the header in the following tx cmd descriptors */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01067}01067 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01068}01068                 tx\_cmd = \&hw-\/>\mbox{\hyperlink{struct__qla__hw_a7a5e88ebf50ec54eaa70be6a62187af1}{tx\_ring\_base}}[hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}}];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01069}01069                 bzero((\textcolor{keywordtype}{void} *)tx\_cmd, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01070}01070 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01071}01071                 bytes = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{qla__hw_8h_af9f0a44cffa447ce821d5d2d1a4f1bb1}{q80\_tx\_cmd\_t}}) -\/ \mbox{\hyperlink{qla__hw_8h_a67e0294ab2154cae2d39c71eb68447e3}{Q8\_TX\_CMD\_TSO\_ALIGN}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01072}01072                 bytes = \mbox{\hyperlink{qla__def_8h_a48747f4d5503d665933fd730c8b8b4d3}{QL\_MIN}}(bytes, hdr\_len);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01073}01073 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01074}01074                 dst = (uint8\_t *)tx\_cmd + \mbox{\hyperlink{qla__hw_8h_a67e0294ab2154cae2d39c71eb68447e3}{Q8\_TX\_CMD\_TSO\_ALIGN}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01075}01075 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01076}01076                 \textcolor{keywordflow}{if} (mp-\/>m\_flags \& M\_VLANTAG) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01077}01077                         \textcolor{comment}{/* first copy the src/dst MAC addresses */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01078}01078                         bcopy(src, dst, (ETHER\_ADDR\_LEN * 2));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01079}01079                         dst += (ETHER\_ADDR\_LEN * 2);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01080}01080                         src += (ETHER\_ADDR\_LEN * 2);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01081}01081                         }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01082}01082                         hdr\_len -\/= (ETHER\_ADDR\_LEN * 2);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01083}01083 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01084}01084                         *((uint16\_t *)dst) = htons(ETHERTYPE\_VLAN);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01085}01085                         dst += 2;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01086}01086                         *((uint16\_t *)dst) = mp-\/>m\_pkthdr.ether\_vtag;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01087}01087                         dst += 2;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01088}01088 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01089}01089                         bytes -\/= ((ETHER\_ADDR\_LEN * 2) + 4);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01090}01090 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01091}01091                         bcopy(src, dst, bytes);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01092}01092                         src += bytes;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01093}01093                         hdr\_len -\/= bytes;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01094}01094                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01095}01095                         bcopy(src, dst, bytes);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01096}01096                         src += bytes;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01097}01097                         hdr\_len -\/= bytes;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01098}01098                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01099}01099 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01100}01100                 hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} = (hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} + 1) \& (\mbox{\hyperlink{qla__hw_8h_ad70baca046931aa8d783f9db0a950f08}{NUM\_TX\_DESCRIPTORS}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01101}01101                 tx\_cmd\_count++;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01102}01102                 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01103}01103                 \textcolor{keywordflow}{while} (hdr\_len) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01104}01104                         tx\_cmd = \&hw-\/>\mbox{\hyperlink{struct__qla__hw_a7a5e88ebf50ec54eaa70be6a62187af1}{tx\_ring\_base}}[hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}}];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01105}01105                         bzero((\textcolor{keywordtype}{void} *)tx\_cmd, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01106}01106 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01107}01107                         bytes = \mbox{\hyperlink{qla__def_8h_a48747f4d5503d665933fd730c8b8b4d3}{QL\_MIN}}((\textcolor{keyword}{sizeof}(\mbox{\hyperlink{struct__q80__tx__cmd}{q80\_tx\_cmd\_t}})), hdr\_len);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01108}01108 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01109}01109                         bcopy(src, tx\_cmd, bytes);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01110}01110                         src += bytes;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01111}01111                         hdr\_len -\/= bytes;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01112}01112                         hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01113}01113                                 (hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} + 1) \& (\mbox{\hyperlink{qla__hw_8h_ad70baca046931aa8d783f9db0a950f08}{NUM\_TX\_DESCRIPTORS}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01114}01114                         tx\_cmd\_count++;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01115}01115                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01116}01116         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01117}01117 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01118}01118         hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} = hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} -\/ tx\_cmd\_count;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01119}01119 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01120}01120         \mbox{\hyperlink{qla__hw_8h_a56937e1125633cee67ed80e544939c6c}{QL\_UPDATE\_TX\_PRODUCER\_INDEX}}(ha, hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01121}01121         \mbox{\hyperlink{qla__dbg_8h_a5d64cf3cf50ae82e8bb775b3e8520fa6}{QL\_DPRINT8}}((dev, \textcolor{stringliteral}{"{}\%s: return\(\backslash\)n"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01122}01122         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01123}01123 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01124}01124 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01125}01125 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01126}01126 \textcolor{comment}{ * Name: qla\_del\_hw\_if}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01127}01127 \textcolor{comment}{ * Function: Destroys the hardware specific entities corresponding to an}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01128}01128 \textcolor{comment}{ *      Ethernet Interface}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01129}01129 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01130}01130 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01131}\mbox{\hyperlink{qla__glbl_8h_ae361842770007e58e561bb84639cc134}{01131}} \mbox{\hyperlink{qla__hw_8c_ae361842770007e58e561bb84639cc134}{qla\_del\_hw\_if}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01132}01132 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01133}01133         \textcolor{keywordtype}{int}     i;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01134}01134 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01135}01135         \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01136}01136                 \mbox{\hyperlink{qla__hw_8h_a4622d43c0f16e77a4e635ec7381b9218}{QL\_DISABLE\_INTERRUPTS}}(ha, i);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01137}01137 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01138}01138         \mbox{\hyperlink{qla__hw_8c_a7c8442421450fb321e473bbc9e4681bb}{qla\_del\_rcv\_cntxt}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01139}01139         \mbox{\hyperlink{qla__hw_8c_ac316dd9b6747738c56480a3e341ebd5a}{qla\_del\_xmt\_cntxt}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01140}01140 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01141}01141         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a9f9327edca2cc04af57cf8b6e6f4536a}{lro}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01142}01142 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01143}01143 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01144}01144 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01145}01145 \textcolor{comment}{ * Name: qla\_init\_hw\_if}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01146}01146 \textcolor{comment}{ * Function: Creates the hardware specific entities corresponding to an}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01147}01147 \textcolor{comment}{ *      Ethernet Interface -\/ Transmit and Receive Contexts. Sets the MAC Address}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01148}01148 \textcolor{comment}{ *      corresponding to the interface. Enables LRO if allowed.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01149}01149 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01150}01150 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01151}\mbox{\hyperlink{qla__glbl_8h_a3470e7976c805846c65e858be6afb832}{01151}} \mbox{\hyperlink{qla__hw_8c_a3470e7976c805846c65e858be6afb832}{qla\_init\_hw\_if}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01152}01152 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01153}01153         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01154}01154         \textcolor{keywordtype}{int}             i;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01155}01155         uint8\_t         bcast\_mac[6];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01156}01156 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01157}01157         \mbox{\hyperlink{qla__hw_8c_adc07191576b3671a1015673f658252f7}{qla\_get\_hw\_caps}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01158}01158 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01159}01159         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01160}01160 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01161}01161         \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01162}01162                 bzero(ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i].dma\_b,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01163}01163                         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a8f9065e2cfe85a0f8ff60a35728d7e5c}{dma\_buf}}.\mbox{\hyperlink{structqla__dmabuf_a40da6e76ae36c93ee2d105891777b62a}{sds\_ring}}[i].size);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01164}01164         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01165}01165         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01166}01166 \textcolor{comment}{         * Create Receive Context}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01167}01167 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01168}01168         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_a9d557bd4d77d831376c271fde9fcc05f}{qla\_init\_rcv\_cntxt}}(ha)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01169}01169                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01170}01170         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01171}01171 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01172}01172         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a28845376257732569bb484af69f396cf}{rx\_next}} = \mbox{\hyperlink{qla__hw_8h_ad9819ff90ac3963fcb6ba7c402fb98c6}{NUM\_RX\_DESCRIPTORS}} -\/ 2;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01173}01173         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a963ee350ee1a3504a529b8c3a0dd3511}{rxj\_next}} = \mbox{\hyperlink{qla__hw_8h_a598e4a9695729b7026f185db3ab61755}{NUM\_RX\_JUMBO\_DESCRIPTORS}} -\/ 2;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01174}01174         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_af21ad440b33fe97ab0e67e1d630b35a6}{rx\_in}} = ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a96688ef5938a9f2a463ce8f301817056}{rxj\_in}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01175}01175 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01176}01176         \textcolor{comment}{/* Update the RDS Producer Indices */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01177}01177         \mbox{\hyperlink{qla__hw_8h_af0821a60bed27a0a82112f6259c4ee0b}{QL\_UPDATE\_RDS\_PRODUCER\_INDEX}}(ha, 0, ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a28845376257732569bb484af69f396cf}{rx\_next}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01178}01178         \mbox{\hyperlink{qla__hw_8h_af0821a60bed27a0a82112f6259c4ee0b}{QL\_UPDATE\_RDS\_PRODUCER\_INDEX}}(ha, 1, ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a963ee350ee1a3504a529b8c3a0dd3511}{rxj\_next}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01179}01179 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01180}01180         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01181}01181 \textcolor{comment}{         * Create Transmit Context}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01182}01182 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01183}01183         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_a99c5cd39b549b63ba8ebe320d3865352}{qla\_init\_xmt\_cntxt}}(ha)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01184}01184                 \mbox{\hyperlink{qla__hw_8c_a7c8442421450fb321e473bbc9e4681bb}{qla\_del\_rcv\_cntxt}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01185}01185                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01186}01186         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01187}01187 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01188}01188         \mbox{\hyperlink{qla__hw_8c_ad38dd3dabb0c8bc9297b4cb14a1ec9c3}{qla\_config\_mac\_addr}}(ha, ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a516b57a7a0df729b2e597ac95dda8834}{mac\_addr}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01189}01189                 (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id, 1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01190}01190 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01191}01191         bcast\_mac[0] = 0xFF; bcast\_mac[1] = 0xFF; bcast\_mac[2] = 0xFF;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01192}01192         bcast\_mac[3] = 0xFF; bcast\_mac[4] = 0xFF; bcast\_mac[5] = 0xFF;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01193}01193         \mbox{\hyperlink{qla__hw_8c_ad38dd3dabb0c8bc9297b4cb14a1ec9c3}{qla\_config\_mac\_addr}}(ha, bcast\_mac,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01194}01194                 (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id, 1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01195}01195 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01196}01196         \mbox{\hyperlink{qla__hw_8c_a9810cd71b01c968762fa0e64f90e815d}{qla\_config\_rss}}(ha, (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01197}01197 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01198}01198         \mbox{\hyperlink{qla__hw_8c_af7325cfcefc0bf75c5ba83d7e0683425}{qla\_config\_intr\_coalesce}}(ha, (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id, 0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01199}01199 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01200}01200         \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01201}01201                 \mbox{\hyperlink{qla__hw_8h_ae3c89978994958b51f12ec89b985658a}{QL\_ENABLE\_INTERRUPTS}}(ha, i);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01202}01202 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01203}01203         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01204}01204 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01205}01205 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01206}01206 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01207}01207 \textcolor{comment}{ * Name: qla\_init\_rcv\_cntxt}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01208}01208 \textcolor{comment}{ * Function: Creates the Receive Context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01209}01209 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01210}01210 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01211}\mbox{\hyperlink{qla__hw_8c_a9d557bd4d77d831376c271fde9fcc05f}{01211}} \mbox{\hyperlink{qla__hw_8c_a9d557bd4d77d831376c271fde9fcc05f}{qla\_init\_rcv\_cntxt}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01212}01212 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01213}01213         device\_t                dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01214}01214         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}            cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01215}01215         \mbox{\hyperlink{struct__q80__rcv__cntxt__rsp}{q80\_rcv\_cntxt\_rsp\_t}}  *rsp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01216}01216         \mbox{\hyperlink{struct__q80__stat__desc}{q80\_stat\_desc\_t}}          *sdesc;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01217}01217         bus\_addr\_t              phys\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01218}01218         \textcolor{keywordtype}{int}                     i, j;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01219}01219         \mbox{\hyperlink{struct__qla__hw}{qla\_hw\_t}}                *hw = \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01220}01220 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01221}01221         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01222}01222 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01223}01223         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01224}01224 \textcolor{comment}{         * Create Receive Context}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01225}01225 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01226}01226 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01227}01227         \textcolor{keywordflow}{for} (i = 0; i < hw-\/>\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01228}01228                 sdesc = (\mbox{\hyperlink{struct__q80__stat__desc}{q80\_stat\_desc\_t}} *)\&hw-\/>\mbox{\hyperlink{struct__qla__hw_af16a274e30dd5236b87f17bb5e815440}{sds}}[i].\mbox{\hyperlink{struct__qla__sds_a28582500ddaa8f0e7ed02e7c243be8b5}{sds\_ring\_base}}[0];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01229}01229                 for (j = 0; j < \mbox{\hyperlink{qla__hw_8h_a1cbf4f9c1de85c44e772b03454c3a79b}{NUM\_STATUS\_DESCRIPTORS}}; j++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01230}01230                         sdesc-\/>\mbox{\hyperlink{struct__q80__stat__desc_a59e326081102ae45103cbae0e3336dd1}{data}}[0] =}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01231}01231                                 \mbox{\hyperlink{qla__hw_8h_acb670b237992f8f7d0cacdfce66affcf}{Q8\_STAT\_DESC\_SET\_OWNER}}(\mbox{\hyperlink{qla__hw_8h_ab5b0874c16e1b8d48c8a6f59d723756a}{Q8\_STAT\_DESC\_OWNER\_FW}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01232}01232                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01233}01233         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01234}01234 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01235}01235         phys\_addr = ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a3f666b0b38ec80d9d9299d8ce89efc2f}{rx\_cntxt\_req\_paddr}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01236}01236 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01237}01237         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01238}01238 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01239}01239         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ac961819535e45dcc414d212a7ce83aaf}{Q8\_CMD\_CREATE\_RX\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01240}01240         cdrp.\mbox{\hyperlink{structqla__cdrp_ad72b11e1c76ef045855bcd32788c5177}{cmd\_arg1}} = (uint32\_t)(phys\_addr >> 32);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01241}01241         cdrp.\mbox{\hyperlink{structqla__cdrp_ad39814a1448f7194f9a0ce0ea4b304ec}{cmd\_arg2}} = (uint32\_t)(phys\_addr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01242}01242         cdrp.\mbox{\hyperlink{structqla__cdrp_af7e097f25d651bb2fcba733fb9a89f4d}{cmd\_arg3}} = (uint32\_t)(\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__rcv__cntxt__req}{q80\_rcv\_cntxt\_req\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01243}01243 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01244}01244         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01245}01245                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_CREATE\_RX\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01246}01246                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01247}01247                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01248}01248         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01249}01249                 rsp = ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01250}01250 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01251}01251                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: rcv cntxt successful"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01252}01252                         \textcolor{stringliteral}{"{} rds\_ring\_offset = 0x\%08x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01253}01253                         \textcolor{stringliteral}{"{} sds\_ring\_offset = 0x\%08x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01254}01254                         \textcolor{stringliteral}{"{} cntxt\_state = 0x\%08x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01255}01255                         \textcolor{stringliteral}{"{} funcs\_per\_port = 0x\%08x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01256}01256                         \textcolor{stringliteral}{"{} num\_rds\_rings = 0x\%04x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01257}01257                         \textcolor{stringliteral}{"{} num\_sds\_rings = 0x\%04x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01258}01258                         \textcolor{stringliteral}{"{} cntxt\_id = 0x\%04x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01259}01259                         \textcolor{stringliteral}{"{} phys\_port = 0x\%02x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01260}01260                         \textcolor{stringliteral}{"{} virt\_port = 0x\%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01261}01261                         \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01262}01262                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_a07695ab5a80d57a8b9ba95b7da7c6c51}{rds\_ring\_offset}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01263}01263                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_a3f3469b2b588f384b5ac80e6504a0c7f}{sds\_ring\_offset}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01264}01264                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_ad080ba7b491ecdafb5eae5cb0bad403d}{cntxt\_state}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01265}01265                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_aefcc23c35bc9f1a72da8d34542b41f79}{funcs\_per\_port}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01266}01266                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_a0a43aa2c6388f78222ac26e1b0d24a81}{num\_rds\_rings}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01267}01267                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_a11745db830835c0ff47f81cb2a5baeb6}{num\_sds\_rings}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01268}01268                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_a03c3ccb949191d802457e9c6aa9158ca}{cntxt\_id}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01269}01269                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_af18d838b169fff355b983eab72b40857}{phys\_port}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01270}01270                         rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_a3f3a29506a14d5f2d3e63cf22fc67d62}{virt\_port}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01272}01272                 \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a5688e24e949b050585ae048b40292f29}{num\_rds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01273}01273                         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01274}01274                                 \textcolor{stringliteral}{"{}\%s: rcv cntxt rds[\%i].producer\_reg = 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01275}01275                                 \_\_func\_\_, i, rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a4bdfc7e968f137a5f94d809578f78f82}{rds\_rsp}}[i].\mbox{\hyperlink{struct__q80__rsp__rds__ring_a0c420a3a243e53b4786e68c6e7855870}{producer\_reg}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01276}01276                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01277}01277                 \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01278}01278                         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01279}01279                                 \textcolor{stringliteral}{"{}\%s: rcv cntxt sds[\%i].consumer\_reg = 0x\%08x"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01280}01280                                 \textcolor{stringliteral}{"{} sds[\%i].intr\_mask\_reg = 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01281}01281                                 \_\_func\_\_, i, rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_ae3cc282e12c7200696b14b15f018572e}{sds\_rsp}}[i].\mbox{\hyperlink{struct__q80__rsp__sds__ring_a1e7d85a39f66b8f5b8dbc2a8ae26639c}{consumer\_reg}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01282}01282                                 i, rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_ae3cc282e12c7200696b14b15f018572e}{sds\_rsp}}[i].\mbox{\hyperlink{struct__q80__rsp__sds__ring_a38749349f359eee8549f40dfc6382640}{intr\_mask\_reg}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01283}01283                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01284}01284         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01285}01285         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a208d54a533b2dec01a3f396fc9cecc88}{init\_rx\_cnxt}} = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01286}01286         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01287}01287 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01288}01288 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01289}01289 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01290}01290 \textcolor{comment}{ * Name: qla\_del\_rcv\_cntxt}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01291}01291 \textcolor{comment}{ * Function: Destroys the Receive Context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01292}01292 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01293}01293 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01294}\mbox{\hyperlink{qla__hw_8c_a7c8442421450fb321e473bbc9e4681bb}{01294}} \mbox{\hyperlink{qla__hw_8c_a7c8442421450fb321e473bbc9e4681bb}{qla\_del\_rcv\_cntxt}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01295}01295 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01296}01296         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01297}01297         device\_t        dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01298}01298 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01299}01299         \textcolor{keywordflow}{if} (!ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a208d54a533b2dec01a3f396fc9cecc88}{init\_rx\_cnxt}})}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01300}01300                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01301}01301 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01302}01302         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01303}01303 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01304}01304         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_aeb223ed5af94c26d7ca58627854c562b}{Q8\_CMD\_DESTROY\_RX\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01305}01305         cdrp.\mbox{\hyperlink{structqla__cdrp_ad72b11e1c76ef045855bcd32788c5177}{cmd\_arg1}} = (uint32\_t) (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}})-\/>rx\_rsp.cntxt\_id;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01306}01306 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01307}01307         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01308}01308                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_DESTROY\_RX\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01309}01309                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01310}01310         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01311}01311         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a208d54a533b2dec01a3f396fc9cecc88}{init\_rx\_cnxt}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01312}01312 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01313}01313 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01314}01314 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01315}01315 \textcolor{comment}{ * Name: qla\_init\_xmt\_cntxt}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01316}01316 \textcolor{comment}{ * Function: Creates the Transmit Context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01317}01317 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01318}01318 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01319}\mbox{\hyperlink{qla__hw_8c_a99c5cd39b549b63ba8ebe320d3865352}{01319}} \mbox{\hyperlink{qla__hw_8c_a99c5cd39b549b63ba8ebe320d3865352}{qla\_init\_xmt\_cntxt}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01320}01320 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01321}01321         bus\_addr\_t              phys\_addr;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01322}01322         device\_t                dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01323}01323         \mbox{\hyperlink{struct__q80__tx__cntxt__rsp}{q80\_tx\_cntxt\_rsp\_t}}    *tx\_rsp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01324}01324         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}            cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01325}01325         \mbox{\hyperlink{struct__qla__hw}{qla\_hw\_t}}                *hw = \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01326}01326 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01327}01327         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01328}01328 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01329}01329         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01330}01330 \textcolor{comment}{         * Create Transmit Context}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01331}01331 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01332}01332         phys\_addr = ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a1e0ec8910767a73d914b4da3cc31807d}{tx\_cntxt\_req\_paddr}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01333}01333         tx\_rsp = ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a255dff594425cffabe29aad6f6abe351}{tx\_cntxt\_rsp}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01334}01334 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01335}01335         hw-\/>\mbox{\hyperlink{struct__qla__hw_a651875c3795999fa5484739e7d44d80e}{txr\_comp}} = hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01336}01336         *(hw-\/>\mbox{\hyperlink{struct__qla__hw_aa0fbf444e5219b357dec63a163f826ef}{tx\_cons}}) = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01337}01337 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01338}01338         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01339}01339 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01340}01340         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ae15c1909450062f84c22551da121ab37}{Q8\_CMD\_CREATE\_TX\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01341}01341         cdrp.\mbox{\hyperlink{structqla__cdrp_ad72b11e1c76ef045855bcd32788c5177}{cmd\_arg1}} = (uint32\_t)(phys\_addr >> 32);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01342}01342         cdrp.\mbox{\hyperlink{structqla__cdrp_ad39814a1448f7194f9a0ce0ea4b304ec}{cmd\_arg2}} = (uint32\_t)(phys\_addr);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01343}01343         cdrp.\mbox{\hyperlink{structqla__cdrp_af7e097f25d651bb2fcba733fb9a89f4d}{cmd\_arg3}} = (uint32\_t)(\textcolor{keyword}{sizeof} (\mbox{\hyperlink{struct__q80__tx__cntxt__req}{q80\_tx\_cntxt\_req\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01344}01344 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01345}01345         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01346}01346                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_CREATE\_TX\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01347}01347                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01348}01348                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01349}01349         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01350}01350                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_adcedee422294275dd5bcc756b26ed193}{tx\_prod\_reg}} = tx\_rsp-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__rsp_aa9fe6ae26f54e2f7559612b48763058b}{producer\_reg}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01351}01351 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01352}01352                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: tx cntxt successful"{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01353}01353                         \textcolor{stringliteral}{"{} cntxt\_state = 0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01354}01354                         \textcolor{stringliteral}{"{} cntxt\_id = 0x\%04x "{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01355}01355                         \textcolor{stringliteral}{"{} phys\_port\_id = 0x\%02x "{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01356}01356                         \textcolor{stringliteral}{"{} virt\_port\_id = 0x\%02x "{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01357}01357                         \textcolor{stringliteral}{"{} producer\_reg = 0x\%08x "{}}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01358}01358                         \textcolor{stringliteral}{"{} intr\_mask\_reg = 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01359}01359                         \_\_func\_\_, tx\_rsp-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__rsp_a7367a966df1d220f8dff3255943ef042}{cntxt\_state}}, tx\_rsp-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__rsp_afc805e99bbd40cec3e9a4477dbf47569}{cntxt\_id}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01360}01360                         tx\_rsp-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__rsp_ac6040f2416ee12a2294749767bd594e7}{phys\_port\_id}}, tx\_rsp-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__rsp_ae355ce8e654764f3d8247dba167d69f7}{virt\_port\_id}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01361}01361                         tx\_rsp-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__rsp_aa9fe6ae26f54e2f7559612b48763058b}{producer\_reg}}, tx\_rsp-\/>\mbox{\hyperlink{struct__q80__tx__cntxt__rsp_ada3bf1b3756f1681cdbf9e75784e056b}{intr\_mask\_reg}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01362}01362         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01363}01363         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} = \mbox{\hyperlink{qla__hw_8h_ad70baca046931aa8d783f9db0a950f08}{NUM\_TX\_DESCRIPTORS}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01364}01364 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01365}01365         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a353752c61936ccaa86ba5120ad3092d0}{init\_tx\_cnxt}} = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01366}01366         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01367}01367 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01368}01368 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01369}01369 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01370}01370 \textcolor{comment}{ * Name: qla\_del\_xmt\_cntxt}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01371}01371 \textcolor{comment}{ * Function: Destroys the Transmit Context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01372}01372 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01373}01373 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01374}\mbox{\hyperlink{qla__hw_8c_ac316dd9b6747738c56480a3e341ebd5a}{01374}} \mbox{\hyperlink{qla__hw_8c_ac316dd9b6747738c56480a3e341ebd5a}{qla\_del\_xmt\_cntxt}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01375}01375 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01376}01376         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01377}01377         device\_t        dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01378}01378 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01379}01379         \textcolor{keywordflow}{if} (!ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a353752c61936ccaa86ba5120ad3092d0}{init\_tx\_cnxt}})}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01380}01380                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01381}01381 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01382}01382         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01383}01383 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01384}01384         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_af191ce6027d6b5ba1fd454ee4fae7321}{Q8\_CMD\_DESTROY\_TX\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01385}01385         cdrp.\mbox{\hyperlink{structqla__cdrp_ad72b11e1c76ef045855bcd32788c5177}{cmd\_arg1}} = (uint32\_t) (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a255dff594425cffabe29aad6f6abe351}{tx\_cntxt\_rsp}})-\/>cntxt\_id;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01386}01386 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01387}01387         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01388}01388                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_DESTROY\_TX\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01389}01389                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01390}01390         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01391}01391         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a353752c61936ccaa86ba5120ad3092d0}{init\_tx\_cnxt}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01392}01392 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01393}01393 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01394}01394 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01395}01395 \textcolor{comment}{ * Name: qla\_get\_max\_rds}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01396}01396 \textcolor{comment}{ * Function: Returns the maximum number of Receive Descriptor Rings per context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01397}01397 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01398}01398 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01399}\mbox{\hyperlink{qla__hw_8c_a660edebff0fe1644eef886ac21777a82}{01399}} \mbox{\hyperlink{qla__hw_8c_a660edebff0fe1644eef886ac21777a82}{qla\_get\_max\_rds}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01400}01400 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01401}01401         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01402}01402         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01403}01403 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01404}01404         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01405}01405 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01406}01406         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01407}01407 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01408}01408         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_a87f0395f3c5d7d9667df270c6ef16901}{Q8\_CMD\_RD\_MAX\_RDS\_PER\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01409}01409 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01410}01410         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01411}01411                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_RD\_MAX\_RDS\_PER\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01412}01412                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01413}01413                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01414}01414         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01415}01415                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_adef2d1270dd0a75062e37af932758338}{max\_rds\_per\_cntxt}} = cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01416}01416                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: max\_rds\_per\_context 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01417}01417                         \_\_func\_\_, ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_adef2d1270dd0a75062e37af932758338}{max\_rds\_per\_cntxt}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01418}01418         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01419}01419         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01420}01420 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01421}01421 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01422}01422 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01423}01423 \textcolor{comment}{ * Name: qla\_get\_max\_sds}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01424}01424 \textcolor{comment}{ * Function: Returns the maximum number of Status Descriptor Rings per context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01425}01425 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01426}01426 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01427}\mbox{\hyperlink{qla__hw_8c_a75dfd31a9dbfe3bb99db5ca5d6115e04}{01427}} \mbox{\hyperlink{qla__hw_8c_a75dfd31a9dbfe3bb99db5ca5d6115e04}{qla\_get\_max\_sds}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01428}01428 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01429}01429         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01430}01430         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01431}01431 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01432}01432         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01433}01433 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01434}01434         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01435}01435 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01436}01436         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_aa9e79e5ee5a38e465addf1bbfc30e4a7}{Q8\_CMD\_RD\_MAX\_SDS\_PER\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01437}01437 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01438}01438         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01439}01439                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_RD\_MAX\_RDS\_PER\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01440}01440                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01441}01441                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01442}01442         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01443}01443                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a2d9ec3e60e07a736eb7dfed4eaeb4211}{max\_sds\_per\_cntxt}} = cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01444}01444                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: max\_sds\_per\_context 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01445}01445                         \_\_func\_\_, ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a2d9ec3e60e07a736eb7dfed4eaeb4211}{max\_sds\_per\_cntxt}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01446}01446         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01447}01447         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01448}01448 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01449}01449 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01450}01450 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01451}01451 \textcolor{comment}{ * Name: qla\_get\_max\_rules}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01452}01452 \textcolor{comment}{ * Function: Returns the maximum number of Rules per context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01453}01453 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01454}01454 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01455}\mbox{\hyperlink{qla__hw_8c_a87901b8f694f964f6ed09e98d1e10586}{01455}} \mbox{\hyperlink{qla__hw_8c_a87901b8f694f964f6ed09e98d1e10586}{qla\_get\_max\_rules}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01456}01456 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01457}01457         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01458}01458         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01459}01459 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01460}01460         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01461}01461 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01462}01462         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01463}01463 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01464}01464         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_a501bf401bc3f540cfccedb5b2c3f1940}{Q8\_CMD\_RD\_MAX\_RULES\_PER\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01465}01465 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01466}01466         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01467}01467                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_RD\_MAX\_RULES\_PER\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01468}01468                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01469}01469                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01470}01470         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01471}01471                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a48f71f7fee1532acc4115f83a6eb884e}{max\_rules\_per\_cntxt}} = cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01472}01472                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: max\_rules\_per\_cntxt 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01473}01473                         \_\_func\_\_, ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a48f71f7fee1532acc4115f83a6eb884e}{max\_rules\_per\_cntxt}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01474}01474         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01475}01475         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01476}01476 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01477}01477 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01478}01478 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01479}01479 \textcolor{comment}{ * Name: qla\_get\_max\_rcv\_cntxts}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01480}01480 \textcolor{comment}{ * Function: Returns the maximum number of Receive Contexts supported.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01481}01481 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01482}01482 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01483}\mbox{\hyperlink{qla__hw_8c_abd8afd5d41c7306351efba793591b2ea}{01483}} \mbox{\hyperlink{qla__hw_8c_abd8afd5d41c7306351efba793591b2ea}{qla\_get\_max\_rcv\_cntxts}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01484}01484 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01485}01485         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01486}01486         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01487}01487 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01488}01488         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01489}01489 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01490}01490         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01491}01491 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01492}01492         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ae0c7ac1b5ec80e903cb3ce6a71445e11}{Q8\_CMD\_RD\_MAX\_RX\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01493}01493 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01494}01494         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01495}01495                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_RD\_MAX\_RX\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01496}01496                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01497}01497                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01498}01498         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01499}01499                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a61d80fb261db28c9cff95fa0fec51889}{max\_rcv\_cntxts}} = cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01500}01500                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: max\_rcv\_cntxts 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01501}01501                         \_\_func\_\_, ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a61d80fb261db28c9cff95fa0fec51889}{max\_rcv\_cntxts}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01502}01502         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01503}01503         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01504}01504 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01505}01505 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01506}01506 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01507}01507 \textcolor{comment}{ * Name: qla\_get\_max\_tx\_cntxts}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01508}01508 \textcolor{comment}{ * Function: Returns the maximum number of Transmit Contexts supported.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01509}01509 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01510}01510 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01511}\mbox{\hyperlink{qla__hw_8c_adc991a3a8c9463c787fe5332f20f39e1}{01511}} \mbox{\hyperlink{qla__hw_8c_adc991a3a8c9463c787fe5332f20f39e1}{qla\_get\_max\_tx\_cntxts}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01512}01512 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01513}01513         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01514}01514         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01515}01515 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01516}01516         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01517}01517 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01518}01518         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01519}01519 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01520}01520         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ac41e58d09f146a9eeba8c032e64ad5dd}{Q8\_CMD\_RD\_MAX\_TX\_CNTXT}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01521}01521 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01522}01522         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01523}01523                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_RD\_MAX\_TX\_CNTXT failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01524}01524                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01525}01525                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01526}01526         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01527}01527                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a9ad3376078bafaf44a981fdf35cb4ecf}{max\_xmt\_cntxts}} = cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01528}01528                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: max\_xmt\_cntxts 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01529}01529                         \_\_func\_\_, ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a9ad3376078bafaf44a981fdf35cb4ecf}{max\_xmt\_cntxts}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01530}01530         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01531}01531         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01532}01532 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01533}01533 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01534}01534 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01535}01535 \textcolor{comment}{ * Name: qla\_get\_max\_mtu}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01536}01536 \textcolor{comment}{ * Function: Returns the MTU supported for a context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01537}01537 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01538}01538 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01539}\mbox{\hyperlink{qla__hw_8c_a74634bca6e86955cc1cf13ec177bec4a}{01539}} \mbox{\hyperlink{qla__hw_8c_a74634bca6e86955cc1cf13ec177bec4a}{qla\_get\_max\_mtu}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01540}01540 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01541}01541         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01542}01542         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01543}01543 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01544}01544         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01545}01545 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01546}01546         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01547}01547 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01548}01548         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ad6ddc4d4a61f618e0b031a146f02c26e}{Q8\_CMD\_RD\_MAX\_MTU}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01549}01549 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01550}01550         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01551}01551                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_RD\_MAX\_MTU failed\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01552}01552                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01553}01553         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01554}01554                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a88a9e465b6415d5fd7db6a13725f1550}{max\_mtu}} = cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01555}01555                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: max\_mtu 0x\%08x\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01556}01556                         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a88a9e465b6415d5fd7db6a13725f1550}{max\_mtu}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01557}01557         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01558}01558         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01559}01559 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01560}01560 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01561}01561 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01562}01562 \textcolor{comment}{ * Name: qla\_set\_max\_mtu}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01563}01563 \textcolor{comment}{ * Function:}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01564}01564 \textcolor{comment}{ *      Sets the maximum transfer unit size for the specified rcv context.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01565}01565 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01566}01566 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01567}\mbox{\hyperlink{qla__glbl_8h_a0a5b8025a9e5e9e42ec4ab74d952c7d9}{01567}} \mbox{\hyperlink{qla__hw_8c_a0a5b8025a9e5e9e42ec4ab74d952c7d9}{qla\_set\_max\_mtu}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, uint32\_t mtu, uint16\_t cntxt\_id)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01568}01568 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01569}01569         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01570}01570         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01571}01571 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01572}01572         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01573}01573 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01574}01574         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01575}01575 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01576}01576         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_abfd59688482d9a1a5e95f8eaa3d5ea5f}{Q8\_CMD\_SET\_MTU}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01577}01577         cdrp.\mbox{\hyperlink{structqla__cdrp_ad72b11e1c76ef045855bcd32788c5177}{cmd\_arg1}} = (uint32\_t)cntxt\_id;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01578}01578         cdrp.\mbox{\hyperlink{structqla__cdrp_ad39814a1448f7194f9a0ce0ea4b304ec}{cmd\_arg2}} = mtu;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01579}01579 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01580}01580         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01581}01581                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_RD\_MAX\_MTU failed\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01582}01582                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01583}01583         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01584}01584                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a88a9e465b6415d5fd7db6a13725f1550}{max\_mtu}} = cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01585}01585         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01586}01586         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01587}01587 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01588}01588 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01589}01589 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01590}01590 \textcolor{comment}{ * Name: qla\_get\_max\_lro}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01591}01591 \textcolor{comment}{ * Function: Returns the maximum number of TCP Connection which can be supported}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01592}01592 \textcolor{comment}{ *      with LRO.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01593}01593 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01594}01594 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01595}\mbox{\hyperlink{qla__hw_8c_a918cf291f537045157d0db563f0f6f8c}{01595}} \mbox{\hyperlink{qla__hw_8c_a918cf291f537045157d0db563f0f6f8c}{qla\_get\_max\_lro}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01596}01596 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01597}01597         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01598}01598         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01599}01599 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01600}01600         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01601}01601 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01602}01602         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01603}01603 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01604}01604         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_ad4a4eeb79c49e217dbf0e519120d9c85}{Q8\_CMD\_RD\_MAX\_LRO}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01605}01605 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01606}01606         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01607}01607                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_RD\_MAX\_LRO failed\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01608}01608                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01609}01609         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01610}01610                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aa5eed921850805f9d955650ac88b7982}{max\_lro}} = cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01611}01611                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: max\_lro 0x\%08x\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01612}01612                         ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aa5eed921850805f9d955650ac88b7982}{max\_lro}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01613}01613         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01614}01614         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01615}01615 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01616}01616 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01617}01617 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01618}01618 \textcolor{comment}{ * Name: qla\_get\_flow\_control}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01619}01619 \textcolor{comment}{ * Function: Returns the Receive/Transmit Flow Control (PAUSE) settings for}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01620}01620 \textcolor{comment}{ *      PCI function.}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01621}01621 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01622}01622 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01623}\mbox{\hyperlink{qla__hw_8c_afec02c17660111f176a251534b63cdcd}{01623}} \mbox{\hyperlink{qla__hw_8c_afec02c17660111f176a251534b63cdcd}{qla\_get\_flow\_control}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01624}01624 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01625}01625         \mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}    cdrp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01626}01626         device\_t        dev;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01627}01627 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01628}01628         dev = ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01629}01629 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01630}01630         bzero(\&cdrp, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{structqla__cdrp}{qla\_cdrp\_t}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01631}01631 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01632}01632         cdrp.\mbox{\hyperlink{structqla__cdrp_a688d8cda1a4e4c563a1d1d6d2a82bdc9}{cmd}} = \mbox{\hyperlink{qla__hw_8h_a3c2950df55dd54a75c7c517107041400}{Q8\_CMD\_GET\_FLOW\_CNTRL}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01633}01633 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01634}01634         \textcolor{keywordflow}{if} (\mbox{\hyperlink{qla__hw_8c_adff7124c47c91a50fd351399e8dec49e}{qla\_issue\_cmd}}(ha, \&cdrp)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01635}01635                 device\_printf(dev, \textcolor{stringliteral}{"{}\%s: Q8\_CMD\_GET\_FLOW\_CNTRL failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01636}01636                         \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01637}01637                 \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01638}01638         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01639}01639                 \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((dev, \textcolor{stringliteral}{"{}\%s: flow control 0x\%08x\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01640}01640                         cdrp.\mbox{\hyperlink{structqla__cdrp_afbb10335754e81563a8f3a18fc109de5}{rsp\_arg1}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01641}01641         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01642}01642         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01643}01643 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01644}01644 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01645}01645 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01646}01646 \textcolor{comment}{ * Name: qla\_get\_flow\_control}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01647}01647 \textcolor{comment}{ * Function: Retrieves hardware capabilities}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01648}01648 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01649}01649 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01650}\mbox{\hyperlink{qla__glbl_8h_adc07191576b3671a1015673f658252f7}{01650}} \mbox{\hyperlink{qla__hw_8c_adc07191576b3671a1015673f658252f7}{qla\_get\_hw\_caps}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01651}01651 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01652}01652         \textcolor{comment}{//qla\_read\_mac\_addr(ha);}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01653}01653         \mbox{\hyperlink{qla__hw_8c_a660edebff0fe1644eef886ac21777a82}{qla\_get\_max\_rds}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01654}01654         \mbox{\hyperlink{qla__hw_8c_a75dfd31a9dbfe3bb99db5ca5d6115e04}{qla\_get\_max\_sds}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01655}01655         \mbox{\hyperlink{qla__hw_8c_a87901b8f694f964f6ed09e98d1e10586}{qla\_get\_max\_rules}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01656}01656         \mbox{\hyperlink{qla__hw_8c_abd8afd5d41c7306351efba793591b2ea}{qla\_get\_max\_rcv\_cntxts}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01657}01657         \mbox{\hyperlink{qla__hw_8c_adc991a3a8c9463c787fe5332f20f39e1}{qla\_get\_max\_tx\_cntxts}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01658}01658         \mbox{\hyperlink{qla__hw_8c_a74634bca6e86955cc1cf13ec177bec4a}{qla\_get\_max\_mtu}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01659}01659         \mbox{\hyperlink{qla__hw_8c_a918cf291f537045157d0db563f0f6f8c}{qla\_get\_max\_lro}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01660}01660         \mbox{\hyperlink{qla__hw_8c_afec02c17660111f176a251534b63cdcd}{qla\_get\_flow\_control}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01661}01661         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01662}01662 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01663}01663 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01664}01664 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01665}01665 \textcolor{comment}{ * Name: qla\_hw\_set\_multi}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01666}01666 \textcolor{comment}{ * Function: Sets the Multicast Addresses provided the host O.S into the}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01667}01667 \textcolor{comment}{ *      hardware (for the given interface)}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01668}01668 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01669}01669 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01670}\mbox{\hyperlink{qla__glbl_8h_a186ddaef6f65664f0076ae2f62c841e8}{01670}} \mbox{\hyperlink{qla__hw_8c_a186ddaef6f65664f0076ae2f62c841e8}{qla\_hw\_set\_multi}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha, uint8\_t *mta, uint32\_t mcnt,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01671}01671         uint32\_t add\_multi)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01672}01672 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01673}01673         \mbox{\hyperlink{struct__q80__rcv__cntxt__rsp}{q80\_rcv\_cntxt\_rsp\_t}}  *rsp;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01674}01674         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01675}01675 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01676}01676         rsp = ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a89b8b786087b9faa905a1aa1f09a167c}{rx\_cntxt\_rsp}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01677}01677         \textcolor{keywordflow}{for} (i = 0; i < mcnt; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01678}01678                 \mbox{\hyperlink{qla__hw_8c_ad38dd3dabb0c8bc9297b4cb14a1ec9c3}{qla\_config\_mac\_addr}}(ha, mta, rsp-\/>\mbox{\hyperlink{struct__q80__rcv__cntxt__rsp_a2ec37c4a336228a57f9fc05767dd7333}{rx\_rsp}}.\mbox{\hyperlink{struct__q80__rsp__rcv__cntxt_a03c3ccb949191d802457e9c6aa9158ca}{cntxt\_id}}, add\_multi);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01679}01679                 mta += \mbox{\hyperlink{qla__hw_8h_aea4285769efc34638f21c1f7bc66b583}{Q8\_MAC\_ADDR\_LEN}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01680}01680         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01681}01681         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01682}01682 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01683}01683 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01684}01684 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01685}01685 \textcolor{comment}{ * Name: qla\_hw\_tx\_done\_locked}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01686}01686 \textcolor{comment}{ * Function: Handle Transmit Completions}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01687}01687 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01688}01688 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01689}\mbox{\hyperlink{qla__hw_8c_a02a9fed36ce48292a7877f9ba4578747}{01689}} \mbox{\hyperlink{qla__hw_8c_a02a9fed36ce48292a7877f9ba4578747}{qla\_hw\_tx\_done\_locked}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01690}01690 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01691}01691         \mbox{\hyperlink{structqla__tx__buf}{qla\_tx\_buf\_t}} *txb;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01692}01692         \mbox{\hyperlink{struct__qla__hw}{qla\_hw\_t}} *hw = \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01693}01693         uint32\_t comp\_idx, comp\_count = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01694}01694 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01695}01695         \textcolor{comment}{/* retrieve index of last entry in tx ring completed */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01696}01696         comp\_idx = \mbox{\hyperlink{qla__os_8h_a5678a056cf0fc9b4544cb654c95abc28}{qla\_le32\_to\_host}}(*(hw-\/>\mbox{\hyperlink{struct__qla__hw_aa0fbf444e5219b357dec63a163f826ef}{tx\_cons}}));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01697}01697 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01698}01698         \textcolor{keywordflow}{while} (comp\_idx != hw-\/>\mbox{\hyperlink{struct__qla__hw_a651875c3795999fa5484739e7d44d80e}{txr\_comp}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01699}01699                 txb = \&ha-\/>\mbox{\hyperlink{structqla__host_a462a654be5a80d1e1dc9de3a25368ff1}{tx\_buf}}[hw-\/>\mbox{\hyperlink{struct__qla__hw_a651875c3795999fa5484739e7d44d80e}{txr\_comp}}];}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01700}01700 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01701}01701                 hw-\/>\mbox{\hyperlink{struct__qla__hw_a651875c3795999fa5484739e7d44d80e}{txr\_comp}}++;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01702}01702                 \textcolor{keywordflow}{if} (hw-\/>\mbox{\hyperlink{struct__qla__hw_a651875c3795999fa5484739e7d44d80e}{txr\_comp}} == \mbox{\hyperlink{qla__hw_8h_ad70baca046931aa8d783f9db0a950f08}{NUM\_TX\_DESCRIPTORS}})}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01703}01703                         hw-\/>\mbox{\hyperlink{struct__qla__hw_a651875c3795999fa5484739e7d44d80e}{txr\_comp}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01704}01704 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01705}01705                 comp\_count++;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01706}01706 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01707}01707                 \textcolor{keywordflow}{if} (txb-\/>\mbox{\hyperlink{structqla__tx__buf_a13cdf28a665a7c028f21d4e40309b323}{m\_head}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01708}01708                         bus\_dmamap\_sync(ha-\/>\mbox{\hyperlink{structqla__host_a49a3f3b4b0cb804f0e72c8b5247a5c5b}{tx\_tag}}, txb-\/>\mbox{\hyperlink{structqla__tx__buf_a441f0e2db5d13c7d556ccbaeebd125b2}{map}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01709}01709                                 BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01710}01710                         bus\_dmamap\_unload(ha-\/>\mbox{\hyperlink{structqla__host_a49a3f3b4b0cb804f0e72c8b5247a5c5b}{tx\_tag}}, txb-\/>\mbox{\hyperlink{structqla__tx__buf_a441f0e2db5d13c7d556ccbaeebd125b2}{map}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01711}01711                         bus\_dmamap\_destroy(ha-\/>\mbox{\hyperlink{structqla__host_a49a3f3b4b0cb804f0e72c8b5247a5c5b}{tx\_tag}}, txb-\/>\mbox{\hyperlink{structqla__tx__buf_a441f0e2db5d13c7d556ccbaeebd125b2}{map}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01712}01712                         m\_freem(txb-\/>\mbox{\hyperlink{structqla__tx__buf_a13cdf28a665a7c028f21d4e40309b323}{m\_head}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01713}01713 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01714}01714                         txb-\/>\mbox{\hyperlink{structqla__tx__buf_a441f0e2db5d13c7d556ccbaeebd125b2}{map}} = (bus\_dmamap\_t)0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01715}01715                         txb-\/>\mbox{\hyperlink{structqla__tx__buf_a13cdf28a665a7c028f21d4e40309b323}{m\_head}} = NULL;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01716}01716                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01717}01717         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01718}01718 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01719}01719         hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} += comp\_count;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01720}01720 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01721}01721         \mbox{\hyperlink{qla__dbg_8h_a5d64cf3cf50ae82e8bb775b3e8520fa6}{QL\_DPRINT8}}((ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}}, \textcolor{stringliteral}{"{}\%s: return [c,f, p, pn][\%d, \%d, \%d, \%d]\(\backslash\)n"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01722}01722                 hw-\/>\mbox{\hyperlink{struct__qla__hw_a651875c3795999fa5484739e7d44d80e}{txr\_comp}}, hw-\/>\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}}, hw-\/>\mbox{\hyperlink{struct__qla__hw_ae3e1bbae7860a46ca213f5a3e1381978}{txr\_next}}, \mbox{\hyperlink{qla__reg_8h_aa0a42c8d7ea3ce8787ad99176e49af0a}{READ\_REG32}}(ha, (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_adcedee422294275dd5bcc756b26ed193}{tx\_prod\_reg}} + 0x1b2000))));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01723}01723 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01724}01724         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01725}01725 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01726}01726 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01727}01727 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01728}01728 \textcolor{comment}{ * Name: qla\_hw\_tx\_done}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01729}01729 \textcolor{comment}{ * Function: Handle Transmit Completions}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01730}01730 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01731}01731 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01732}\mbox{\hyperlink{qla__glbl_8h_ac607d40f41e9658e76fe403e591d737d}{01732}} \mbox{\hyperlink{qla__hw_8c_ac607d40f41e9658e76fe403e591d737d}{qla\_hw\_tx\_done}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01733}01733 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01734}01734         \textcolor{keywordflow}{if} (!mtx\_trylock(\&ha-\/>\mbox{\hyperlink{structqla__host_a187ce22597060971dae2b5ce65318c0c}{tx\_lock}})) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01735}01735                 \mbox{\hyperlink{qla__dbg_8h_a5d64cf3cf50ae82e8bb775b3e8520fa6}{QL\_DPRINT8}}((ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01736}01736                         \textcolor{stringliteral}{"{}\%s: !mtx\_trylock(\&ha-\/>tx\_lock)\(\backslash\)n"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01737}01737                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01738}01738         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01739}01739         \mbox{\hyperlink{qla__hw_8c_a02a9fed36ce48292a7877f9ba4578747}{qla\_hw\_tx\_done\_locked}}(ha);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01740}01740 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01741}01741         \textcolor{keywordflow}{if} (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a35e4b27d31e18390c246581eab529f14}{txr\_free}} > \mbox{\hyperlink{qla__glbl_8h_ae4e30b6a95930feea35d1b46e0640761}{free\_pkt\_thres}})}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01742}01742                 ha-\/>\mbox{\hyperlink{structqla__host_a6d997ee5686a564188e252c1c7f75d85}{ifp}}-\/>if\_drv\_flags \&= \string~IFF\_DRV\_OACTIVE;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01743}01743 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01744}01744         mtx\_unlock(\&ha-\/>\mbox{\hyperlink{structqla__host_a187ce22597060971dae2b5ce65318c0c}{tx\_lock}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01745}01745         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01746}01746 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01747}01747 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01748}01748 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01749}\mbox{\hyperlink{qla__glbl_8h_a1c8a9b3c6ec94da87ecec331366f2a55}{01749}} \mbox{\hyperlink{qla__hw_8c_a1c8a9b3c6ec94da87ecec331366f2a55}{qla\_update\_link\_state}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01750}01750 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01751}01751         uint32\_t link\_state;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01752}01752         uint32\_t prev\_link\_state;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01753}01753 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01754}01754         \textcolor{keywordflow}{if} (!(ha-\/>\mbox{\hyperlink{structqla__host_a6d997ee5686a564188e252c1c7f75d85}{ifp}}-\/>if\_drv\_flags \& IFF\_DRV\_RUNNING)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01755}01755                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a2575ed1b656d147998944b5ebed69c7c}{link\_up}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01756}01756                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01757}01757         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01758}01758         link\_state = \mbox{\hyperlink{qla__reg_8h_aa0a42c8d7ea3ce8787ad99176e49af0a}{READ\_REG32}}(ha, \mbox{\hyperlink{qla__reg_8h_a74d14068a5a795d75ac0af01b7a07de2}{Q8\_LINK\_STATE}});}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01759}01759 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01760}01760         prev\_link\_state =  ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a2575ed1b656d147998944b5ebed69c7c}{link\_up}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01761}01761 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01762}01762         \textcolor{keywordflow}{if} (ha-\/>\mbox{\hyperlink{structqla__host_a241ccac5b886c6195827db9ac08c78f3}{pci\_func}} == 0)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01763}01763                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a2575ed1b656d147998944b5ebed69c7c}{link\_up}} = (((link\_state \& 0xF) == 1)? 1 : 0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01764}01764         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01765}01765                 ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a2575ed1b656d147998944b5ebed69c7c}{link\_up}} = ((((link\_state >> 4)\& 0xF) == 1)? 1 : 0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01766}01766 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01767}01767         \textcolor{keywordflow}{if} (prev\_link\_state !=  ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a2575ed1b656d147998944b5ebed69c7c}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01768}01768                 \textcolor{keywordflow}{if} (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_aeda47980468ff31cfd07aa2a7f215bbc}{flags}}.\mbox{\hyperlink{struct__qla__hw_a2575ed1b656d147998944b5ebed69c7c}{link\_up}}) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01769}01769                         if\_link\_state\_change(ha-\/>\mbox{\hyperlink{structqla__host_a6d997ee5686a564188e252c1c7f75d85}{ifp}}, LINK\_STATE\_UP);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01770}01770                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01771}01771                         if\_link\_state\_change(ha-\/>\mbox{\hyperlink{structqla__host_a6d997ee5686a564188e252c1c7f75d85}{ifp}}, LINK\_STATE\_DOWN);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01772}01772                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01773}01773         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01774}01774 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01775}01775 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01776}01776 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01777}\mbox{\hyperlink{qla__glbl_8h_a68030d03f7f8debc47719ac6bb2dfabc}{01777}} \mbox{\hyperlink{qla__hw_8c_a68030d03f7f8debc47719ac6bb2dfabc}{qla\_config\_lro}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01778}01778 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01779}01779         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01780}01780         \mbox{\hyperlink{struct__qla__hw}{qla\_hw\_t}} *hw = \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01781}01781         \textcolor{keyword}{struct }lro\_ctrl *lro;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01782}01782 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01783}01783         \textcolor{keywordflow}{for} (i = 0; i < hw-\/>\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01784}01784                 lro = \&hw-\/>\mbox{\hyperlink{struct__qla__hw_af16a274e30dd5236b87f17bb5e815440}{sds}}[i].\mbox{\hyperlink{struct__qla__sds_a0655e5716447fb6618bbc96a4aea6441}{lro}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01785}01785                 \textcolor{keywordflow}{if} (tcp\_lro\_init(lro)) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01786}01786                         device\_printf(ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}}, \textcolor{stringliteral}{"{}\%s: tcp\_lro\_init failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01787}01787                                 \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01788}01788                         \textcolor{keywordflow}{return} (-\/1);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01789}01789                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01790}01790                 lro-\/>ifp = ha-\/>\mbox{\hyperlink{structqla__host_a6d997ee5686a564188e252c1c7f75d85}{ifp}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01791}01791         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01792}01792         ha-\/>\mbox{\hyperlink{structqla__host_acc4789393fa4265959bc99bfa879ff0c}{flags}}.\mbox{\hyperlink{structqla__host_a0cffe803ab95296e17b32707dd30ccc2}{lro\_init}} = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01793}01793 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01794}01794         \mbox{\hyperlink{qla__dbg_8h_aa7b194f2a53ff35ecd2fe3878e5e115b}{QL\_DPRINT2}}((ha-\/>\mbox{\hyperlink{structqla__host_ab63869b0e64172cee52c6f52219d7771}{pci\_dev}}, \textcolor{stringliteral}{"{}\%s: LRO initialized\(\backslash\)n"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01795}01795         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01796}01796 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01797}01797 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01798}01798 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01799}\mbox{\hyperlink{qla__glbl_8h_af86ba6c74398cbcef93bedaee990a0f4}{01799}} \mbox{\hyperlink{qla__hw_8c_af86ba6c74398cbcef93bedaee990a0f4}{qla\_free\_lro}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01800}01800 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01801}01801         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01802}01802         \mbox{\hyperlink{struct__qla__hw}{qla\_hw\_t}} *hw = \&ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01803}01803         \textcolor{keyword}{struct }lro\_ctrl *lro;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01804}01804 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01805}01805         \textcolor{keywordflow}{if} (!ha-\/>\mbox{\hyperlink{structqla__host_acc4789393fa4265959bc99bfa879ff0c}{flags}}.\mbox{\hyperlink{structqla__host_a0cffe803ab95296e17b32707dd30ccc2}{lro\_init}})}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01806}01806                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01807}01807 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01808}01808         \textcolor{keywordflow}{for} (i = 0; i < hw-\/>\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01809}01809                 lro = \&hw-\/>\mbox{\hyperlink{struct__qla__hw_af16a274e30dd5236b87f17bb5e815440}{sds}}[i].\mbox{\hyperlink{struct__qla__sds_a0655e5716447fb6618bbc96a4aea6441}{lro}};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01810}01810                 tcp\_lro\_free(lro);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01811}01811         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01812}01812         ha-\/>\mbox{\hyperlink{structqla__host_acc4789393fa4265959bc99bfa879ff0c}{flags}}.\mbox{\hyperlink{structqla__host_a0cffe803ab95296e17b32707dd30ccc2}{lro\_init}} = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01813}01813 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01814}01814 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01815}01815 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01816}\mbox{\hyperlink{qla__glbl_8h_a1a98576520f6f7bacfc073923b589fb1}{01816}} \mbox{\hyperlink{qla__hw_8c_a1a98576520f6f7bacfc073923b589fb1}{qla\_hw\_stop\_rcv}}(\mbox{\hyperlink{structqla__host}{qla\_host\_t}} *ha)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01817}01817 \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01818}01818         \textcolor{keywordtype}{int} i, done, count = 100;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01819}01819 }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01820}01820         \textcolor{keywordflow}{while} (count-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01821}01821                 done = 1;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01822}01822                 \textcolor{keywordflow}{for} (i = 0; i < ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_a4b02ee77383e385c62cb1ac2b49f9eb8}{num\_sds\_rings}}; i++) \{}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01823}01823                         \textcolor{keywordflow}{if} (ha-\/>\mbox{\hyperlink{structqla__host_acf0e3d83d58551ac31fae5350139cd45}{hw}}.\mbox{\hyperlink{struct__qla__hw_af16a274e30dd5236b87f17bb5e815440}{sds}}[i].\mbox{\hyperlink{struct__qla__sds_afa71d1d3c8a2d7d1aa24c4f0a9a84ecb}{rcv\_active}})}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01824}01824                                 done = 0;}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01825}01825                 \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01826}01826                 \textcolor{keywordflow}{if} (done)}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01827}01827                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01828}01828                 \textcolor{keywordflow}{else} }
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01829}01829                         \mbox{\hyperlink{qla__os_8h_ac19585fb4979e3ca1d70ab87532bedbd}{qla\_mdelay}}(\_\_func\_\_, 10);}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01830}01830         \}}
\DoxyCodeLine{\Hypertarget{qla__hw_8c_source_l01831}01831 \}}

\end{DoxyCode}
