\hypertarget{hptiop_8c_source}{}\doxysection{hptiop.\+c}
\label{hptiop_8c_source}\index{dev/hptiop/hptiop.c@{dev/hptiop/hptiop.c}}
\mbox{\hyperlink{hptiop_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00004}00004 \textcolor{comment}{ * HighPoint RR3xxx/4xxx RAID Driver for FreeBSD}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (C) 2007-\/2012 HighPoint Technologies, Inc. All Rights Reserved.}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00030}\mbox{\hyperlink{hptiop_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{hptiop_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/cons.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/time.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/stat.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/libkern.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/kthread.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/eventhandler.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/ioccom.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <machine/resource.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <machine/bus.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <machine/stdarg.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/rman.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <vm/vm.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <vm/pmap.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <dev/pci/pcireg.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <dev/pci/pcivar.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <cam/cam.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <cam/cam\_ccb.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <cam/cam\_sim.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <cam/cam\_xpt\_sim.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <cam/cam\_debug.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <cam/cam\_periph.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <cam/scsi/scsi\_all.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <cam/scsi/scsi\_message.h>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00075}00075 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{hptiop_8h}{dev/hptiop/hptiop.h}}>}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00077}\mbox{\hyperlink{hptiop_8c_a233dee63f005c51abbc2253360a99ece}{00077}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} \mbox{\hyperlink{hptiop_8c_a233dee63f005c51abbc2253360a99ece}{driver\_name}}[] = \textcolor{stringliteral}{"{}hptiop"{}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00078}\mbox{\hyperlink{hptiop_8c_ac880efb9c4695be8b2cb389284d7180d}{00078}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} \mbox{\hyperlink{hptiop_8c_ac880efb9c4695be8b2cb389284d7180d}{driver\_version}}[] = \textcolor{stringliteral}{"{}v1.9"{}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00080}\mbox{\hyperlink{hptiop_8c_ad2ecf100a270ce4c5bf751ab74cd4840}{00080}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{hptiop_8c_ad2ecf100a270ce4c5bf751ab74cd4840}{hptiop\_devclass}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00082}00082 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00083}00083                                 u\_int32\_t msg, u\_int32\_t millisec);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00084}00084 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_ac0629531325f83de480e414cbe785770}{hptiop\_request\_callback\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00085}00085                                                         u\_int32\_t req);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00086}00086 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a2cec15320e5430ad0281588806d4b9ba}{hptiop\_request\_callback\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int64\_t req);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00087}00087 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a4b670838335e02b868465340e7d83c90}{hptiop\_request\_callback\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00088}00088                                                         u\_int32\_t req);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00089}00089 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a311fb980172d10d1016562ace4d1a30b}{hptiop\_os\_message\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00090}00090 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a78c0de5f6c544ab7b8c55e677625c7ba}{hptiop\_do\_ioctl\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00091}00091                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00092}00092 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a2b3b347d3ce7d4ac6783af1101a0ab5a}{hptiop\_do\_ioctl\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00093}00093                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00094}00094 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a41915c7e08cc85d998e5238dbee8dd9a}{hptiop\_do\_ioctl\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00095}00095                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00096}00096 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a845636a9b56f472c82f37dfb7a801c48}{hptiop\_rescan\_bus}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00097}00097 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ac1928737064e27c186589f48c5e6e4ea}{hptiop\_alloc\_pci\_res\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00098}00098 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a212c07f85c7db9c376313b6518b4e313}{hptiop\_alloc\_pci\_res\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00099}00099 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ae0b69252ec33dcbaf1827bb77eb06495}{hptiop\_alloc\_pci\_res\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00100}00100 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ab51a59276d9ba0b5b5e4a63c50bbe5fd}{hptiop\_get\_config\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00101}00101                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} *config);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00102}00102 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a061c3cc2a90681139950599ccd09eeac}{hptiop\_get\_config\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00103}00103                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} *config);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00104}00104 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_abcd8eb624758757cc636f2d780a99aec}{hptiop\_get\_config\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00105}00105                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} *config);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00106}00106 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ac0e006ae75ce54296e9ead5fd3d29c43}{hptiop\_set\_config\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00107}00107                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}} *config);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00108}00108 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a0ef2d9ab8d0f6bd4c179e9cef15cfb72}{hptiop\_set\_config\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00109}00109                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}} *config);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00110}00110 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a02d1bf021ed9a588a0921c3e022ffc5a}{hptiop\_set\_config\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00111}00111                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}} *config);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00112}00112 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a209ba476bf8ae0c591f6dfe3b15ed627}{hptiop\_internal\_memalloc\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00113}00113 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ad3a3e7a385a11b1d853423e62b0616dd}{hptiop\_internal\_memalloc\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00114}00114 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ae49b0fcb2f6c0f47b673f0b3376e1839}{hptiop\_internal\_memfree\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00115}00115 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a0557ead7d59015c82a2096b7eabfc99f}{hptiop\_internal\_memfree\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00116}00116 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a829a5e1946561481ed8dd8771d66dc49}{hptiop\_internal\_memfree\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00117}00117 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a16dabb5767897347024448fed0aad9fa}{hptiop\_post\_ioctl\_command\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00118}00118                         u\_int32\_t req32, \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00119}00119 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_ac5a23686c693ee8c126c54362fde2de5}{hptiop\_post\_ioctl\_command\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00120}00120                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *req,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00121}00121                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00122}00122 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a8b48899707bbe817ee6ba04213b6fa86}{hptiop\_post\_ioctl\_command\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00123}00123                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *req,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00124}00124                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00125}00125 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a8bae415b466065a762e7a7c0f8424766}{hptiop\_post\_req\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00126}00126                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00127}00127                                 bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nsegs);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00128}00128 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a07df6d93ea49f77abe7006fefed275a3}{hptiop\_post\_req\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00129}00129                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00130}00130                                 bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nsegs);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00131}00131 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_ae62d2ff2e69bfe7ffb8aa1b3225e31fb}{hptiop\_post\_req\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00132}00132                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00133}00133                                 bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nsegs);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00134}00134 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a462739f9e552e52901c016377e6df245}{hptiop\_post\_msg\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00135}00135 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a3181f2b2390256b878898adaae695537}{hptiop\_post\_msg\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00136}00136 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_adb1de9166be83597df16788f3e5394fd}{hptiop\_post\_msg\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00137}00137 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a9dd8bc814795727303cf45b92f04abd5}{hptiop\_enable\_intr\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00138}00138 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a1330ecf6c46771922de8d3defd1d8c98}{hptiop\_enable\_intr\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00139}00139 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a0ae59a843e2a28b5ae42d3b5830d4733}{hptiop\_enable\_intr\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00140}00140 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a59e253c4995d8f05b69c3a44876872e8}{hptiop\_disable\_intr\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00141}00141 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_aeafc85fc1e6a0d0d600716f2f40a89cd}{hptiop\_disable\_intr\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00142}00142 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_acd1921b59d2e2a83c40778d17a6ec104}{hptiop\_disable\_intr\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00143}00143 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00144}00144 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_ad51c9dd74d0df49c6504f6ca1559ab14}{hptiop\_os\_query\_remove\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, \textcolor{keywordtype}{int} tid);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00145}00145 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a286b040e8acd5dcbc5362fb63440cf3b}{hptiop\_probe}}(device\_t dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00146}00146 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a511e182131c7e2214829ca5192e6e5f1}{hptiop\_attach}}(device\_t dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00147}00147 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a0ab9f1a29b35e42f8d3ea0733f5b27b8}{hptiop\_detach}}(device\_t dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00148}00148 \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a8e63219aa3c18ef2c73466bc944c16ee}{hptiop\_shutdown}}(device\_t dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00149}00149 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_abd319b92f54d07d4ff3c0b2ff5daede0}{hptiop\_action}}(\textcolor{keyword}{struct} cam\_sim *sim, \textcolor{keyword}{union} ccb *ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00150}00150 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a01154a5a613bff8740b830654b7952b0}{hptiop\_poll}}(\textcolor{keyword}{struct} cam\_sim *sim);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00151}00151 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_accd0539257fec63cdbf39bbf3545357a}{hptiop\_async}}(\textcolor{keywordtype}{void} *callback\_arg, u\_int32\_t code,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00152}00152                                         \textcolor{keyword}{struct} cam\_path *path, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00153}00153 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_ab12ae96e159575efae6a33c30d5e4ac6}{hptiop\_pci\_intr}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00154}00154 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a2d5b731e857f14aab6950ca1eae2ba01}{hptiop\_release\_resource}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00155}00155 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a779d871219879cfa96b1e21ebb7f921a}{hptiop\_reset\_adapter}}(\textcolor{keywordtype}{void} *argv);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00156}\mbox{\hyperlink{hptiop_8c_aa5baee589f71d8073836ab688a45fe92}{00156}} \textcolor{keyword}{static} d\_open\_t \mbox{\hyperlink{hptiop_8c_aa5baee589f71d8073836ab688a45fe92}{hptiop\_open}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00157}\mbox{\hyperlink{hptiop_8c_a01fdbdd463d704e73adf4127c5d233d7}{00157}} \textcolor{keyword}{static} d\_close\_t \mbox{\hyperlink{hptiop_8c_a01fdbdd463d704e73adf4127c5d233d7}{hptiop\_close}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00158}\mbox{\hyperlink{hptiop_8c_a000a5c860d629d6ccb3eac44bc62b8dd}{00158}} \textcolor{keyword}{static} d\_ioctl\_t \mbox{\hyperlink{hptiop_8c_a000a5c860d629d6ccb3eac44bc62b8dd}{hptiop\_ioctl}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00160}\mbox{\hyperlink{hptiop_8c_a6d2aed3bb16582a2e3b462e7613fe2a9}{00160}} \textcolor{keyword}{static} \textcolor{keyword}{struct }cdevsw \mbox{\hyperlink{hptiop_8c_a6d2aed3bb16582a2e3b462e7613fe2a9}{hptiop\_cdevsw}} = \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00161}00161         .d\_open = \mbox{\hyperlink{hptiop_8c_aa5baee589f71d8073836ab688a45fe92}{hptiop\_open}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00162}00162         .d\_close = \mbox{\hyperlink{hptiop_8c_a01fdbdd463d704e73adf4127c5d233d7}{hptiop\_close}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00163}00163         .d\_ioctl = \mbox{\hyperlink{hptiop_8c_a000a5c860d629d6ccb3eac44bc62b8dd}{hptiop\_ioctl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00164}00164         .d\_name = \mbox{\hyperlink{hptiop_8c_a233dee63f005c51abbc2253360a99ece}{driver\_name}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00165}00165         .d\_version = D\_VERSION,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00166}00166 \};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00167}00167 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00168}\mbox{\hyperlink{hptiop_8c_a415e8c5c0c0091238f2dc7942d4d9e23}{00168}} \textcolor{preprocessor}{\#define hba\_from\_dev(dev) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00169}00169 \textcolor{preprocessor}{        ((struct hpt\_iop\_hba *)devclass\_get\_softc(hptiop\_devclass, dev2unit(dev)))}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00171}\mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{00171}} \textcolor{preprocessor}{\#define BUS\_SPACE\_WRT4\_ITL(offset, value) bus\_space\_write\_4(hba-\/>bar0t,\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00172}00172 \textcolor{preprocessor}{                hba-\/>bar0h, offsetof(struct hpt\_iopmu\_itl, offset), (value))}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00173}\mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{00173}} \textcolor{preprocessor}{\#define BUS\_SPACE\_RD4\_ITL(offset) bus\_space\_read\_4(hba-\/>bar0t,\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00174}00174 \textcolor{preprocessor}{                hba-\/>bar0h, offsetof(struct hpt\_iopmu\_itl, offset))}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00176}\mbox{\hyperlink{hptiop_8c_ac4513b5ce2febcb5d7f4cea03cfda7d1}{00176}} \textcolor{preprocessor}{\#define BUS\_SPACE\_WRT4\_MV0(offset, value) bus\_space\_write\_4(hba-\/>bar0t,\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00177}00177 \textcolor{preprocessor}{                hba-\/>bar0h, offsetof(struct hpt\_iopmv\_regs, offset), value)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00178}\mbox{\hyperlink{hptiop_8c_a6996424934d7085df6b8fc161ce23103}{00178}} \textcolor{preprocessor}{\#define BUS\_SPACE\_RD4\_MV0(offset) bus\_space\_read\_4(hba-\/>bar0t,\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00179}00179 \textcolor{preprocessor}{                hba-\/>bar0h, offsetof(struct hpt\_iopmv\_regs, offset))}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00180}\mbox{\hyperlink{hptiop_8c_a99f3e5f687ac7ebb5718ca7df4f563a2}{00180}} \textcolor{preprocessor}{\#define BUS\_SPACE\_WRT4\_MV2(offset, value) bus\_space\_write\_4(hba-\/>bar2t,\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00181}00181 \textcolor{preprocessor}{                hba-\/>bar2h, offsetof(struct hpt\_iopmu\_mv, offset), value)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00182}\mbox{\hyperlink{hptiop_8c_a0666640667323eb823492b505630f5a0}{00182}} \textcolor{preprocessor}{\#define BUS\_SPACE\_RD4\_MV2(offset) bus\_space\_read\_4(hba-\/>bar2t,\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00183}00183 \textcolor{preprocessor}{                hba-\/>bar2h, offsetof(struct hpt\_iopmu\_mv, offset))}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00185}\mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{00185}} \textcolor{preprocessor}{\#define BUS\_SPACE\_WRT4\_MVFREY2(offset, value) bus\_space\_write\_4(hba-\/>bar2t,\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00186}00186 \textcolor{preprocessor}{                hba-\/>bar2h, offsetof(struct hpt\_iopmu\_mvfrey, offset), value)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00187}\mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{00187}} \textcolor{preprocessor}{\#define BUS\_SPACE\_RD4\_MVFREY2(offset) bus\_space\_read\_4(hba-\/>bar2t,\(\backslash\)}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00188}00188 \textcolor{preprocessor}{                hba-\/>bar2h, offsetof(struct hpt\_iopmu\_mvfrey, offset))}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00190}\mbox{\hyperlink{hptiop_8c_a48b420b505a7321b904352ee44a76c3d}{00190}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_aa5baee589f71d8073836ab688a45fe92}{hptiop\_open}}(\mbox{\hyperlink{hptiop_8h_a60e90279accbaa6fe623a03d3f231478}{ioctl\_dev\_t}} dev, \textcolor{keywordtype}{int} flags,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00191}00191                                         \textcolor{keywordtype}{int} devtype, \mbox{\hyperlink{hptiop_8h_abf9097db0cd9f05956e57a1955171ed8}{ioctl\_thread\_t}} proc)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00192}00192 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00193}00193         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba = \mbox{\hyperlink{hptiop_8c_a415e8c5c0c0091238f2dc7942d4d9e23}{hba\_from\_dev}}(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00195}00195         \textcolor{keywordflow}{if} (hba==NULL)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00196}00196                 \textcolor{keywordflow}{return} ENXIO;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00197}00197         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a0a68d64270349b6298dc007ace698fdf}{flag}} \& \mbox{\hyperlink{hptiop_8h_a004c6cae8a04af235108d6fdd1ed3892}{HPT\_IOCTL\_FLAG\_OPEN}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00198}00198                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00199}00199         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a0a68d64270349b6298dc007ace698fdf}{flag}} |= \mbox{\hyperlink{hptiop_8h_a004c6cae8a04af235108d6fdd1ed3892}{HPT\_IOCTL\_FLAG\_OPEN}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00200}00200         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00201}00201 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00202}00202 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00203}\mbox{\hyperlink{hptiop_8c_a19a3fc87a0c5c5d0c788b3060a7f9b5b}{00203}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a01fdbdd463d704e73adf4127c5d233d7}{hptiop\_close}}(\mbox{\hyperlink{hptiop_8h_a60e90279accbaa6fe623a03d3f231478}{ioctl\_dev\_t}} dev, \textcolor{keywordtype}{int} flags,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00204}00204                                         \textcolor{keywordtype}{int} devtype, \mbox{\hyperlink{hptiop_8h_abf9097db0cd9f05956e57a1955171ed8}{ioctl\_thread\_t}} proc)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00205}00205 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00206}00206         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba = \mbox{\hyperlink{hptiop_8c_a415e8c5c0c0091238f2dc7942d4d9e23}{hba\_from\_dev}}(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00207}00207         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a0a68d64270349b6298dc007ace698fdf}{flag}} \&= \string~(u\_int32\_t)\mbox{\hyperlink{hptiop_8h_a004c6cae8a04af235108d6fdd1ed3892}{HPT\_IOCTL\_FLAG\_OPEN}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00208}00208         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00209}00209 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00211}\mbox{\hyperlink{hptiop_8c_a0f49ef0f56b7b63b2516bec692ef92da}{00211}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a000a5c860d629d6ccb3eac44bc62b8dd}{hptiop\_ioctl}}(\mbox{\hyperlink{hptiop_8h_a60e90279accbaa6fe623a03d3f231478}{ioctl\_dev\_t}} dev, u\_long cmd, caddr\_t data,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00212}00212                                         \textcolor{keywordtype}{int} flags, \mbox{\hyperlink{hptiop_8h_abf9097db0cd9f05956e57a1955171ed8}{ioctl\_thread\_t}} proc)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00213}00213 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00214}00214         \textcolor{keywordtype}{int} ret = EFAULT;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00215}00215         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba = \mbox{\hyperlink{hptiop_8c_a415e8c5c0c0091238f2dc7942d4d9e23}{hba\_from\_dev}}(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00217}00217         \textcolor{keywordflow}{switch} (cmd) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00218}00218         \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_aeb776af5c6f36c2018eeb3cf76ff5a4f}{HPT\_DO\_IOCONTROL}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00219}00219                 ret = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a89a52809157e99622f1943c8b11aecdf}{do\_ioctl}}(hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00220}00220                                 (\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *)data);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00221}00221                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00222}00222         \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_a037eca0faaec291706c122d23830c2d0}{HPT\_SCAN\_BUS}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00223}00223                 ret = \mbox{\hyperlink{hptiop_8c_a845636a9b56f472c82f37dfb7a801c48}{hptiop\_rescan\_bus}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00224}00224                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00225}00225         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00226}00226         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00227}00227 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00229}\mbox{\hyperlink{hptiop_8c_a1adb000a925a8b772ae5370cedd1ec7b}{00229}} \textcolor{keyword}{static} u\_int64\_t \mbox{\hyperlink{hptiop_8c_a1adb000a925a8b772ae5370cedd1ec7b}{hptiop\_mv\_outbound\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00230}00230 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00231}00231         u\_int64\_t p;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00232}00232         u\_int32\_t outbound\_tail = \mbox{\hyperlink{hptiop_8c_a0666640667323eb823492b505630f5a0}{BUS\_SPACE\_RD4\_MV2}}(outbound\_tail);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00233}00233         u\_int32\_t outbound\_head = \mbox{\hyperlink{hptiop_8c_a0666640667323eb823492b505630f5a0}{BUS\_SPACE\_RD4\_MV2}}(outbound\_head);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00234}00234 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00235}00235         \textcolor{keywordflow}{if} (outbound\_tail != outbound\_head) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00236}00236                 bus\_space\_read\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7f2aa44e458e909ad4105051d022b79d}{bar2t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af7eb903a85c1a16f5f9f1244b4cce2c6}{bar2h}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00237}00237                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iopmu__mv}{hpt\_iopmu\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00238}00238                                 outbound\_q[outbound\_tail]),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00239}00239                         (u\_int32\_t *)\&p, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00241}00241                 outbound\_tail++;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00243}00243                 \textcolor{keywordflow}{if} (outbound\_tail == \mbox{\hyperlink{hptiop_8h_a8e7a7ae98fda3820469df5ad38c764b5}{MVIOP\_QUEUE\_LEN}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00244}00244                         outbound\_tail = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00246}00246                 \mbox{\hyperlink{hptiop_8c_a99f3e5f687ac7ebb5718ca7df4f563a2}{BUS\_SPACE\_WRT4\_MV2}}(outbound\_tail, outbound\_tail);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00247}00247                 \textcolor{keywordflow}{return} p;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00248}00248         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00249}00249                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00250}00250 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00252}\mbox{\hyperlink{hptiop_8c_a45f4092bb9ec1d9cb545dece7ffd2002}{00252}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a45f4092bb9ec1d9cb545dece7ffd2002}{hptiop\_mv\_inbound\_write}}(u\_int64\_t p, \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00253}00253 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00254}00254         u\_int32\_t inbound\_head = \mbox{\hyperlink{hptiop_8c_a0666640667323eb823492b505630f5a0}{BUS\_SPACE\_RD4\_MV2}}(inbound\_head);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00255}00255         u\_int32\_t head = inbound\_head + 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00256}00256 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00257}00257         \textcolor{keywordflow}{if} (head == \mbox{\hyperlink{hptiop_8h_a8e7a7ae98fda3820469df5ad38c764b5}{MVIOP\_QUEUE\_LEN}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00258}00258                 head = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00259}00259 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00260}00260         bus\_space\_write\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7f2aa44e458e909ad4105051d022b79d}{bar2t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af7eb903a85c1a16f5f9f1244b4cce2c6}{bar2h}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00261}00261                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iopmu__mv}{hpt\_iopmu\_mv}}, inbound\_q[inbound\_head]),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00262}00262                         (u\_int32\_t *)\&p, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00263}00263         \mbox{\hyperlink{hptiop_8c_a99f3e5f687ac7ebb5718ca7df4f563a2}{BUS\_SPACE\_WRT4\_MV2}}(inbound\_head, head);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00264}00264         \mbox{\hyperlink{hptiop_8c_ac4513b5ce2febcb5d7f4cea03cfda7d1}{BUS\_SPACE\_WRT4\_MV0}}(inbound\_doorbell, \mbox{\hyperlink{hptiop_8h_aece8ed204ce6e2419310f45679b49630}{MVIOP\_MU\_INBOUND\_INT\_POSTQUEUE}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00265}00265 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00267}\mbox{\hyperlink{hptiop_8c_a462739f9e552e52901c016377e6df245}{00267}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a462739f9e552e52901c016377e6df245}{hptiop\_post\_msg\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t msg)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00268}00268 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00269}00269         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(inbound\_msgaddr0, msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00270}00270         \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_intstatus);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00271}00271 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00272}00272 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00273}\mbox{\hyperlink{hptiop_8c_a3181f2b2390256b878898adaae695537}{00273}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a3181f2b2390256b878898adaae695537}{hptiop\_post\_msg\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t msg)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00274}00274 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00276}00276         \mbox{\hyperlink{hptiop_8c_a99f3e5f687ac7ebb5718ca7df4f563a2}{BUS\_SPACE\_WRT4\_MV2}}(inbound\_msg, msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00277}00277         \mbox{\hyperlink{hptiop_8c_ac4513b5ce2febcb5d7f4cea03cfda7d1}{BUS\_SPACE\_WRT4\_MV0}}(inbound\_doorbell, \mbox{\hyperlink{hptiop_8h_af4c83d19cdb48307be19836ddeb21b04}{MVIOP\_MU\_INBOUND\_INT\_MSG}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00279}00279         \mbox{\hyperlink{hptiop_8c_a6996424934d7085df6b8fc161ce23103}{BUS\_SPACE\_RD4\_MV0}}(outbound\_intmask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00280}00280 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00282}\mbox{\hyperlink{hptiop_8c_adb1de9166be83597df16788f3e5394fd}{00282}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_adb1de9166be83597df16788f3e5394fd}{hptiop\_post\_msg\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t msg)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00283}00283 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00284}00284         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(f0\_to\_cpu\_msg\_a, msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00285}00285         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(f0\_to\_cpu\_msg\_a);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00286}00286 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00288}\mbox{\hyperlink{hptiop_8c_a299b74f2ff7b75b9bec9c9272faa8915}{00288}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a299b74f2ff7b75b9bec9c9272faa8915}{hptiop\_wait\_ready\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba, u\_int32\_t millisec)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00289}00289 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00290}00290         u\_int32\_t \mbox{\hyperlink{structhpt__iop__hba_a7562764f180506e19d9f212d95676634}{req}}=0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00291}00291         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00293}00293         \textcolor{keywordflow}{for} (i = 0; i < millisec; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00294}00294                 \mbox{\hyperlink{structhpt__iop__hba_a7562764f180506e19d9f212d95676634}{req}} = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(inbound\_queue);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00295}00295                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__hba_a7562764f180506e19d9f212d95676634}{req}} != \mbox{\hyperlink{hptiop_8h_a283df53d44ec2d4fa07d1d268ba947e9}{IOPMU\_QUEUE\_EMPTY}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00296}00296                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00297}00297                 DELAY(1000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00298}00298         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00300}00300         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__hba_a7562764f180506e19d9f212d95676634}{req}}!=\mbox{\hyperlink{hptiop_8h_a283df53d44ec2d4fa07d1d268ba947e9}{IOPMU\_QUEUE\_EMPTY}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00301}00301                 \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_queue, \mbox{\hyperlink{structhpt__iop__hba_a7562764f180506e19d9f212d95676634}{req}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00302}00302                 \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_intstatus);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00303}00303                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00304}00304         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00306}00306         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00307}00307 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00309}\mbox{\hyperlink{hptiop_8c_a40de42cb3722c2470bb3f73fb536a0d7}{00309}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a40de42cb3722c2470bb3f73fb536a0d7}{hptiop\_wait\_ready\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba, u\_int32\_t millisec)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00310}00310 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00311}00311         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4a6a1aa302bf66fe8963ed992ef977f3f0}{IOPMU\_INBOUND\_MSG0\_NOP}}, millisec))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00312}00312                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00313}00313 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00314}00314         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00315}00315 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00316}00316 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00317}\mbox{\hyperlink{hptiop_8c_a8b8ef7cf08e29538e41eea78fc6a3809}{00317}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a8b8ef7cf08e29538e41eea78fc6a3809}{hptiop\_wait\_ready\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00318}00318                                                         u\_int32\_t millisec)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00319}00319 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00320}00320         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4a6a1aa302bf66fe8963ed992ef977f3f0}{IOPMU\_INBOUND\_MSG0\_NOP}}, millisec))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00321}00321                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00323}00323         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00324}00324 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00326}\mbox{\hyperlink{hptiop_8c_ac0629531325f83de480e414cbe785770}{00326}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_ac0629531325f83de480e414cbe785770}{hptiop\_request\_callback\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00327}00327                                                         u\_int32\_t index)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00328}00328 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00329}00329         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00330}00330         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *req=NULL;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00331}00331         \textcolor{keyword}{union }ccb *ccb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00332}00332         u\_int8\_t *cdb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00333}00333         u\_int32\_t result, temp, dxfer;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00334}00334         u\_int64\_t temp64;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00335}00335 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00336}00336         \textcolor{keywordflow}{if} (index \& \mbox{\hyperlink{hptiop_8h_a334322d248ad874aa0ec6d700f3f33a9}{IOPMU\_QUEUE\_MASK\_HOST\_BITS}}) \{ \textcolor{comment}{/*host req*/}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00337}00337                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab841d537375e0ccd63e1f7b62c25264d}{firmware\_version}} > 0x01020000 ||}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00338}00338                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aad564436e8b8e1de05d63e6a72ff6369}{interface\_version}} > 0x01020000) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00339}00339                         srb = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}[index \& \string~(u\_int32\_t)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00340}00340                                 (\mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00341}00341                                 | \mbox{\hyperlink{hptiop_8h_afd7f6eb5350b389beb77d6bf53fac9d2}{IOPMU\_QUEUE\_REQUEST\_RESULT\_BIT}})];}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00342}00342                         req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *)srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00343}00343                         \textcolor{keywordflow}{if} (index \& \mbox{\hyperlink{hptiop_8h_afd7f6eb5350b389beb77d6bf53fac9d2}{IOPMU\_QUEUE\_REQUEST\_RESULT\_BIT}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00344}00344                                 result = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea9d02c9ca7f4513d91200b93555f3c93d}{IOP\_RESULT\_SUCCESS}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00345}00345                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00346}00346                                 result = req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00347}00347                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00348}00348                         srb = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}[index \&}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00349}00349                                 \string~(u\_int32\_t)\mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}}];}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00350}00350                         req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *)srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00351}00351                         result = req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00352}00352                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00353}00353                 dxfer = req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00354}00354                 \textcolor{keywordflow}{goto} srb\_complete;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00355}00355         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00356}00356 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00357}00357         \textcolor{comment}{/*iop req*/}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00358}00358         temp = bus\_space\_read\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, index +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00359}00359                 \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}, type));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00360}00360         result = bus\_space\_read\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, index +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00361}00361                 \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}, result));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00362}00362         \textcolor{keywordflow}{switch}(temp) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00363}00363         \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea51cd0767fdad4bae095be181a9723651}{IOP\_REQUEST\_TYPE\_IOCTL\_COMMAND}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00364}00364         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00365}00365                 temp64 = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00366}00366                 bus\_space\_write\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, index +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00367}00367                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}, context),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00368}00368                         (u\_int32\_t *)\&temp64, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00369}00369                 wakeup((\textcolor{keywordtype}{void} *)((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_aded67c1a8ea2dcdf9ae9c21e6a19fdb8}{itl}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}} + index));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00370}00370                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00371}00371         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00372}00372 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00373}00373         \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea2bd73ea3a1ceedafbb413146997f4624}{IOP\_REQUEST\_TYPE\_SCSI\_COMMAND}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00374}00374                 bus\_space\_read\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, index +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00375}00375                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}, context),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00376}00376                         (u\_int32\_t *)\&temp64, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00377}00377                 srb = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *)(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})temp64;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00378}00378                 dxfer = bus\_space\_read\_4(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00379}00379                                 \mbox{\hyperlink{structhpt__iop__srb_ad40e355523aeb3bcc59052cf0d95a7ad}{index}} + \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00380}00380                                 dataxfer\_length));      }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00381}00381 srb\_complete:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00382}00382                 \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}} = (\textcolor{keyword}{union }ccb *)srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00383}00383                 if (ccb-\/>ccb\_h.flags \& CAM\_CDB\_POINTER)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00384}00384                         cdb = ccb-\/>csio.cdb\_io.cdb\_ptr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00385}00385                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00386}00386                         cdb = ccb-\/>csio.cdb\_io.cdb\_bytes;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00387}00387 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00388}00388                 \textcolor{keywordflow}{if} (cdb[0] == SYNCHRONIZE\_CACHE) \{ \textcolor{comment}{/* ??? */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00389}00389                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00390}00390                         \textcolor{keywordflow}{goto} scsi\_done;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00391}00391                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00392}00392 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00393}00393                 \textcolor{keywordflow}{switch} (result) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00394}00394                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea9d02c9ca7f4513d91200b93555f3c93d}{IOP\_RESULT\_SUCCESS}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00395}00395                         \textcolor{keywordflow}{switch} (ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00396}00396                         \textcolor{keywordflow}{case} CAM\_DIR\_IN:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00397}00397                                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00398}00398                                         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00399}00399                                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00400}00400                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00401}00401                         \textcolor{keywordflow}{case} CAM\_DIR\_OUT:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00402}00402                                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00403}00403                                         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00404}00404                                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00405}00405                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00406}00406                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00408}00408                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00409}00409                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00410}00410 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00411}00411                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebeaa17473ecc0a270d5b5d1830eda5e7ee6}{IOP\_RESULT\_BAD\_TARGET}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00412}00412                         ccb-\/>ccb\_h.status = CAM\_DEV\_NOT\_THERE;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00413}00413                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00414}00414                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea7ce02e62c8b4b77dfffadaf54874655c}{IOP\_RESULT\_BUSY}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00415}00415                         ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00416}00416                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00417}00417                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea988ffd6cb3e670a8f524be18d33b3db5}{IOP\_RESULT\_INVALID\_REQUEST}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00418}00418                         ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00419}00419                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00420}00420                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea05a10612a6a0fb4b713bde6c94e70f6a}{IOP\_RESULT\_FAIL}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00421}00421                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00422}00422                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00423}00423                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea5bb3f28a4b7103452e70782c664d4e0f}{IOP\_RESULT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00424}00424                         ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00425}00425                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00426}00426                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea7b448047c1f4198fac6355caaaf552a1}{IOP\_RESULT\_CHECK\_CONDITION}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00427}00427                         memset(\&ccb-\/>csio.sense\_data, 0,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00428}00428                             \textcolor{keyword}{sizeof}(ccb-\/>csio.sense\_data));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00429}00429                         \textcolor{keywordflow}{if} (dxfer < ccb-\/>csio.sense\_len)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00430}00430                                 ccb-\/>csio.sense\_resid = ccb-\/>csio.sense\_len -\/}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00431}00431                                     dxfer;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00432}00432                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00433}00433                                 ccb-\/>csio.sense\_resid = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00434}00434                         \textcolor{keywordflow}{if} (srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a7eab7e26bbf9cad4a7c3f41f831cf28f}{srb\_flag}} \& \mbox{\hyperlink{hptiop_8h_a379b2bde2cf19cc8346b97764e5037f7}{HPT\_SRB\_FLAG\_HIGH\_MEM\_ACESS}}) \{\textcolor{comment}{/*iop*/}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00435}00435                                 bus\_space\_read\_region\_1(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00436}00436                                         index + \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00437}00437                                         sg\_list), (u\_int8\_t *)\&ccb-\/>csio.sense\_data, }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00438}00438                                         \mbox{\hyperlink{hptiop_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(dxfer, \textcolor{keyword}{sizeof}(ccb-\/>csio.sense\_data)));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00439}00439                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00440}00440                                 memcpy(\&ccb-\/>csio.sense\_data, \&req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a76e59a91fb16d622a9d2f6f58b8c9bbc}{sg\_list}}, }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00441}00441                                         \mbox{\hyperlink{hptiop_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(dxfer, \textcolor{keyword}{sizeof}(ccb-\/>csio.sense\_data)));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00442}00442                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00443}00443                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00444}00444                         ccb-\/>ccb\_h.status |= CAM\_AUTOSNS\_VALID;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00445}00445                         ccb-\/>csio.scsi\_status = SCSI\_STATUS\_CHECK\_COND;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00446}00446                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00447}00447                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00448}00448                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00449}00449                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00450}00450                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00451}00451 scsi\_done:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00452}00452                 \textcolor{keywordflow}{if} (srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a7eab7e26bbf9cad4a7c3f41f831cf28f}{srb\_flag}} \& \mbox{\hyperlink{hptiop_8h_a379b2bde2cf19cc8346b97764e5037f7}{HPT\_SRB\_FLAG\_HIGH\_MEM\_ACESS}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00453}00453                         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_queue, index);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00455}00455                 ccb-\/>csio.resid = ccb-\/>csio.dxfer\_len -\/ dxfer;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00456}00456 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00457}00457                 \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(hba, srb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00458}00458                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00459}00459                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00460}00460         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00461}00461 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00462}00462 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00463}\mbox{\hyperlink{hptiop_8c_a95b784d841269b3ab18e08173e0c1cbe}{00463}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a95b784d841269b3ab18e08173e0c1cbe}{hptiop\_drain\_outbound\_queue\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00464}00464 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00465}00465         u\_int32\_t req, temp;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00467}00467         \textcolor{keywordflow}{while} ((req = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_queue)) !=\mbox{\hyperlink{hptiop_8h_a283df53d44ec2d4fa07d1d268ba947e9}{IOPMU\_QUEUE\_EMPTY}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00468}00468                 \textcolor{keywordflow}{if} (req \& \mbox{\hyperlink{hptiop_8h_a334322d248ad874aa0ec6d700f3f33a9}{IOPMU\_QUEUE\_MASK\_HOST\_BITS}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00469}00469                         \mbox{\hyperlink{hptiop_8c_ac0629531325f83de480e414cbe785770}{hptiop\_request\_callback\_itl}}(hba, req);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00470}00470                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00471}00471                         temp = bus\_space\_read\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00472}00472                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}},req +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00473}00473                                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00474}00474                                                 flags));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00475}00475                         \textcolor{keywordflow}{if} (temp \& \mbox{\hyperlink{hptiop_8h_a49c1a14f7d4d5fa67090333eb0b29855}{IOP\_REQUEST\_FLAG\_SYNC\_REQUEST}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00476}00476                                 u\_int64\_t temp64;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00477}00477                                 bus\_space\_read\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00478}00478                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}},req +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00479}00479                                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00480}00480                                                 context),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00481}00481                                         (u\_int32\_t *)\&temp64, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00482}00482                                 \textcolor{keywordflow}{if} (temp64) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00483}00483                                         \mbox{\hyperlink{hptiop_8c_ac0629531325f83de480e414cbe785770}{hptiop\_request\_callback\_itl}}(hba, req);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00484}00484                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00485}00485                                         temp64 = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00486}00486                                         bus\_space\_write\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00487}00487                                                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}},req +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00488}00488                                                 \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00489}00489                                                         context),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00490}00490                                                 (u\_int32\_t *)\&temp64, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00491}00491                                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00492}00492                         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00493}00493                                 \mbox{\hyperlink{hptiop_8c_ac0629531325f83de480e414cbe785770}{hptiop\_request\_callback\_itl}}(hba, req);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00494}00494                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00495}00495         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00496}00496 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00498}\mbox{\hyperlink{hptiop_8c_a13219fc8dd309f96f98dc3e51fe58aeb}{00498}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a13219fc8dd309f96f98dc3e51fe58aeb}{hptiop\_intr\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00499}00499 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00500}00500         u\_int32\_t status;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00501}00501         \textcolor{keywordtype}{int} ret = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00502}00502 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00503}00503         status = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_intstatus);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00504}00504 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00505}00505         \textcolor{keywordflow}{if} (status \& \mbox{\hyperlink{hptiop_8h_a3a5b2e6a36c2fa58e3cc436e681e1c5a}{IOPMU\_OUTBOUND\_INT\_MSG0}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00506}00506                 u\_int32\_t msg = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_msgaddr0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00507}00507                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: received outbound msg \%x\(\backslash\)n"{}}, msg));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00508}00508                 \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_intstatus, \mbox{\hyperlink{hptiop_8h_a3a5b2e6a36c2fa58e3cc436e681e1c5a}{IOPMU\_OUTBOUND\_INT\_MSG0}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00509}00509                 \mbox{\hyperlink{hptiop_8c_a311fb980172d10d1016562ace4d1a30b}{hptiop\_os\_message\_callback}}(hba, msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00510}00510                 ret = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00511}00511         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00512}00512 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00513}00513         \textcolor{keywordflow}{if} (status \& \mbox{\hyperlink{hptiop_8h_a2a3423948f5222aeabca28d2bfbad0b7}{IOPMU\_OUTBOUND\_INT\_POSTQUEUE}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00514}00514                 \mbox{\hyperlink{hptiop_8c_a95b784d841269b3ab18e08173e0c1cbe}{hptiop\_drain\_outbound\_queue\_itl}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00515}00515                 ret = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00516}00516         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00517}00517 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00518}00518         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00519}00519 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00520}00520 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00521}\mbox{\hyperlink{hptiop_8c_a2cec15320e5430ad0281588806d4b9ba}{00521}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a2cec15320e5430ad0281588806d4b9ba}{hptiop\_request\_callback\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00522}00522                                                         u\_int64\_t \_tag)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00523}00523 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00524}00524         u\_int32\_t context = (u\_int32\_t)\_tag;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00525}00525 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00526}00526         \textcolor{keywordflow}{if} (context \& \mbox{\hyperlink{hptiop_8h_a44309c791e627467b04b661bd077e6e1}{MVIOP\_CMD\_TYPE\_SCSI}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00527}00527                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00528}00528                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00529}00529                 \textcolor{keyword}{union }ccb *ccb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00530}00530                 u\_int8\_t *cdb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00532}00532                 srb = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}[context >> \mbox{\hyperlink{hptiop_8h_a9c7b953397bd6d59bfa582331b6e43ad}{MVIOP\_REQUEST\_NUMBER\_START\_BIT}}];}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00533}00533                 req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *)srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00534}00534                 ccb = (\textcolor{keyword}{union }ccb *)srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00535}00535                 if (ccb-\/>ccb\_h.flags \& CAM\_CDB\_POINTER)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00536}00536                         cdb = ccb-\/>csio.cdb\_io.cdb\_ptr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00537}00537                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00538}00538                         cdb = ccb-\/>csio.cdb\_io.cdb\_bytes;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00540}00540                 \textcolor{keywordflow}{if} (cdb[0] == SYNCHRONIZE\_CACHE) \{ \textcolor{comment}{/* ??? */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00541}00541                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00542}00542                         \textcolor{keywordflow}{goto} scsi\_done;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00543}00543                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00544}00544                 \textcolor{keywordflow}{if} (context \& \mbox{\hyperlink{hptiop_8h_a15df32aadc6d781990f787dd096763b6}{MVIOP\_MU\_QUEUE\_REQUEST\_RESULT\_BIT}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00545}00545                         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea9d02c9ca7f4513d91200b93555f3c93d}{IOP\_RESULT\_SUCCESS}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00546}00546 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00547}00547                 \textcolor{keywordflow}{switch} (req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00548}00548                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea9d02c9ca7f4513d91200b93555f3c93d}{IOP\_RESULT\_SUCCESS}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00549}00549                         \textcolor{keywordflow}{switch} (ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00550}00550                         \textcolor{keywordflow}{case} CAM\_DIR\_IN:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00551}00551                                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00552}00552                                         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00553}00553                                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00554}00554                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00555}00555                         \textcolor{keywordflow}{case} CAM\_DIR\_OUT:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00556}00556                                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00557}00557                                         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00558}00558                                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00559}00559                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00560}00560                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00561}00561                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00562}00562                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00563}00563                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebeaa17473ecc0a270d5b5d1830eda5e7ee6}{IOP\_RESULT\_BAD\_TARGET}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00564}00564                         ccb-\/>ccb\_h.status = CAM\_DEV\_NOT\_THERE;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00565}00565                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00566}00566                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea7ce02e62c8b4b77dfffadaf54874655c}{IOP\_RESULT\_BUSY}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00567}00567                         ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00568}00568                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00569}00569                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea988ffd6cb3e670a8f524be18d33b3db5}{IOP\_RESULT\_INVALID\_REQUEST}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00570}00570                         ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00571}00571                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00572}00572                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea05a10612a6a0fb4b713bde6c94e70f6a}{IOP\_RESULT\_FAIL}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00573}00573                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00574}00574                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00575}00575                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea5bb3f28a4b7103452e70782c664d4e0f}{IOP\_RESULT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00576}00576                         ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00577}00577                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00578}00578                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea7b448047c1f4198fac6355caaaf552a1}{IOP\_RESULT\_CHECK\_CONDITION}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00579}00579                         memset(\&ccb-\/>csio.sense\_data, 0,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00580}00580                             \textcolor{keyword}{sizeof}(ccb-\/>csio.sense\_data));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00581}00581                         \textcolor{keywordflow}{if} (req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}} < ccb-\/>csio.sense\_len)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00582}00582                                 ccb-\/>csio.sense\_resid = ccb-\/>csio.sense\_len -\/}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00583}00583                                     req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00584}00584                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00585}00585                                 ccb-\/>csio.sense\_resid = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00586}00586                         memcpy(\&ccb-\/>csio.sense\_data, \&req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a76e59a91fb16d622a9d2f6f58b8c9bbc}{sg\_list}}, }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00587}00587                                 \mbox{\hyperlink{hptiop_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}}, \textcolor{keyword}{sizeof}(ccb-\/>csio.sense\_data)));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00588}00588                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00589}00589                         ccb-\/>ccb\_h.status |= CAM\_AUTOSNS\_VALID;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00590}00590                         ccb-\/>csio.scsi\_status = SCSI\_STATUS\_CHECK\_COND;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00591}00591                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00592}00592                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00593}00593                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00594}00594                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00595}00595                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00596}00596 scsi\_done:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00597}00597                 ccb-\/>csio.resid = ccb-\/>csio.dxfer\_len -\/ req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00598}00598                 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00599}00599                 \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(hba, srb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00600}00600                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00601}00601         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (context \& \mbox{\hyperlink{hptiop_8h_a690b9ee8d7ede325612797ac6fde9ec1}{MVIOP\_CMD\_TYPE\_IOCTL}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00602}00602                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *req = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00603}00603                 \textcolor{keywordflow}{if} (context \& \mbox{\hyperlink{hptiop_8h_a15df32aadc6d781990f787dd096763b6}{MVIOP\_MU\_QUEUE\_REQUEST\_RESULT\_BIT}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00604}00604                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00605}00605                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00606}00606                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00607}00607                 wakeup(req);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00608}00608         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (context \&}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00609}00609                         (\mbox{\hyperlink{hptiop_8h_a974d09d5547f0d531ae5234b3a9034a4}{MVIOP\_CMD\_TYPE\_SET\_CONFIG}} |}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00610}00610                                 \mbox{\hyperlink{hptiop_8h_ad0c158d76b658669f47e5598468ab185}{MVIOP\_CMD\_TYPE\_GET\_CONFIG}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00611}00611                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00612}00612         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00613}00613                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}wrong callback type\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00614}00614         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00615}00615 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00616}00616 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00617}\mbox{\hyperlink{hptiop_8c_a4b670838335e02b868465340e7d83c90}{00617}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a4b670838335e02b868465340e7d83c90}{hptiop\_request\_callback\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00618}00618                                 u\_int32\_t \_tag)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00619}00619 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00620}00620         u\_int32\_t req\_type = \_tag \& 0xf;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00621}00621 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00622}00622         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00623}00623         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00624}00624         \textcolor{keyword}{union }ccb *ccb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00625}00625         u\_int8\_t *cdb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00626}00626 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00627}00627         \textcolor{keywordflow}{switch} (req\_type) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00628}00628         \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea9cd01617f6dcbd7b932e2ea40aef4c11}{IOP\_REQUEST\_TYPE\_GET\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00629}00629         \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ead89f5e4495115b4598ad85cc75a4a4ee}{IOP\_REQUEST\_TYPE\_SET\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00630}00630                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00631}00631                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00632}00632 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00633}00633         \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea2bd73ea3a1ceedafbb413146997f4624}{IOP\_REQUEST\_TYPE\_SCSI\_COMMAND}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00634}00634                 srb = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}[(\_tag >> 4) \& 0xff];}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00635}00635                 req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *)srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00636}00636 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00637}00637                 ccb = (\textcolor{keyword}{union }ccb *)srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00638}00638 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00639}00639                 callout\_stop(\&srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a3d8f13da89070461946bb931eb462ebe}{timeout}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00640}00640 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00641}00641                 \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.flags \& CAM\_CDB\_POINTER)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00642}00642                         cdb = ccb-\/>csio.cdb\_io.cdb\_ptr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00643}00643                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00644}00644                         cdb = ccb-\/>csio.cdb\_io.cdb\_bytes;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00646}00646                 \textcolor{keywordflow}{if} (cdb[0] == SYNCHRONIZE\_CACHE) \{ \textcolor{comment}{/* ??? */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00647}00647                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00648}00648                         \textcolor{keywordflow}{goto} scsi\_done;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00649}00649                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00650}00650 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00651}00651                 \textcolor{keywordflow}{if} (\_tag \& \mbox{\hyperlink{hptiop_8h_a39155e240b823ea687e384940e28a0db}{MVFREYIOPMU\_QUEUE\_REQUEST\_RESULT\_BIT}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00652}00652                         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea9d02c9ca7f4513d91200b93555f3c93d}{IOP\_RESULT\_SUCCESS}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00653}00653 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00654}00654                 \textcolor{keywordflow}{switch} (req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00655}00655                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea9d02c9ca7f4513d91200b93555f3c93d}{IOP\_RESULT\_SUCCESS}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00656}00656                         \textcolor{keywordflow}{switch} (ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00657}00657                         \textcolor{keywordflow}{case} CAM\_DIR\_IN:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00658}00658                                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00659}00659                                                 srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00660}00660                                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00661}00661                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00662}00662                         \textcolor{keywordflow}{case} CAM\_DIR\_OUT:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00663}00663                                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00664}00664                                                 srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_POSTWRITE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00665}00665                                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00666}00666                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00667}00667                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00668}00668                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00669}00669                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00670}00670                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebeaa17473ecc0a270d5b5d1830eda5e7ee6}{IOP\_RESULT\_BAD\_TARGET}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00671}00671                         ccb-\/>ccb\_h.status = CAM\_DEV\_NOT\_THERE;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00672}00672                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00673}00673                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea7ce02e62c8b4b77dfffadaf54874655c}{IOP\_RESULT\_BUSY}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00674}00674                         ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00675}00675                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00676}00676                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea988ffd6cb3e670a8f524be18d33b3db5}{IOP\_RESULT\_INVALID\_REQUEST}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00677}00677                         ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00678}00678                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00679}00679                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea05a10612a6a0fb4b713bde6c94e70f6a}{IOP\_RESULT\_FAIL}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00680}00680                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00681}00681                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00682}00682                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea5bb3f28a4b7103452e70782c664d4e0f}{IOP\_RESULT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00683}00683                         ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00684}00684                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00685}00685                 \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea7b448047c1f4198fac6355caaaf552a1}{IOP\_RESULT\_CHECK\_CONDITION}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00686}00686                         memset(\&ccb-\/>csio.sense\_data, 0,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00687}00687                                \textcolor{keyword}{sizeof}(ccb-\/>csio.sense\_data));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00688}00688                         \textcolor{keywordflow}{if} (req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}} < ccb-\/>csio.sense\_len)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00689}00689                                 ccb-\/>csio.sense\_resid = ccb-\/>csio.sense\_len -\/}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00690}00690                                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00691}00691                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00692}00692                                 ccb-\/>csio.sense\_resid = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00693}00693                         memcpy(\&ccb-\/>csio.sense\_data, \&req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a76e59a91fb16d622a9d2f6f58b8c9bbc}{sg\_list}}, }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00694}00694                                \mbox{\hyperlink{hptiop_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}}, \textcolor{keyword}{sizeof}(ccb-\/>csio.sense\_data)));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00695}00695                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00696}00696                         ccb-\/>ccb\_h.status |= CAM\_AUTOSNS\_VALID;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00697}00697                         ccb-\/>csio.scsi\_status = SCSI\_STATUS\_CHECK\_COND;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00698}00698                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00699}00699                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00700}00700                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00701}00701                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00702}00702                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00703}00703 scsi\_done:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00704}00704                 ccb-\/>csio.resid = ccb-\/>csio.dxfer\_len -\/ req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00705}00705                 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00706}00706                 \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(hba, srb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00707}00707                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00708}00708                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00709}00709         \textcolor{keywordflow}{case} \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea51cd0767fdad4bae095be181a9723651}{IOP\_REQUEST\_TYPE\_IOCTL\_COMMAND}}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00710}00710                 \textcolor{keywordflow}{if} (\_tag \& \mbox{\hyperlink{hptiop_8h_a39155e240b823ea687e384940e28a0db}{MVFREYIOPMU\_QUEUE\_REQUEST\_RESULT\_BIT}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00711}00711                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00712}00712                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00713}00713                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00714}00714                 wakeup((\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *)hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00715}00715                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00716}00716         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00717}00717                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}wrong callback type\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00718}00718                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00719}00719         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00720}00720 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00721}00721 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00722}\mbox{\hyperlink{hptiop_8c_a18cd8bdfc2837349cc3bb83c978a8451}{00722}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a18cd8bdfc2837349cc3bb83c978a8451}{hptiop\_drain\_outbound\_queue\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00723}00723 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00724}00724         u\_int64\_t req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00725}00725 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00726}00726         \textcolor{keywordflow}{while} ((req = \mbox{\hyperlink{hptiop_8c_a1adb000a925a8b772ae5370cedd1ec7b}{hptiop\_mv\_outbound\_read}}(hba))) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00727}00727                 \textcolor{keywordflow}{if} (req \& \mbox{\hyperlink{hptiop_8h_a29c36a52a32cbdd04c6256480c1fa38a}{MVIOP\_MU\_QUEUE\_ADDR\_HOST\_BIT}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00728}00728                         \textcolor{keywordflow}{if} (req \& \mbox{\hyperlink{hptiop_8h_ad78af43878f7592ce05fa42ac8fc94f4}{MVIOP\_MU\_QUEUE\_REQUEST\_RETURN\_CONTEXT}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00729}00729                                 \mbox{\hyperlink{hptiop_8c_a2cec15320e5430ad0281588806d4b9ba}{hptiop\_request\_callback\_mv}}(hba, req);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00730}00730                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00731}00731                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00732}00732         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00733}00733 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00734}00734 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00735}\mbox{\hyperlink{hptiop_8c_a7c98625a2f224fab65d56a2ce5a43c13}{00735}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a7c98625a2f224fab65d56a2ce5a43c13}{hptiop\_intr\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00736}00736 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00737}00737         u\_int32\_t status;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00738}00738         \textcolor{keywordtype}{int} ret = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00739}00739 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00740}00740         status = \mbox{\hyperlink{hptiop_8c_a6996424934d7085df6b8fc161ce23103}{BUS\_SPACE\_RD4\_MV0}}(outbound\_doorbell);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00741}00741 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00742}00742         \textcolor{keywordflow}{if} (status)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00743}00743                 \mbox{\hyperlink{hptiop_8c_ac4513b5ce2febcb5d7f4cea03cfda7d1}{BUS\_SPACE\_WRT4\_MV0}}(outbound\_doorbell, \string~status);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00744}00744 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00745}00745         \textcolor{keywordflow}{if} (status \& \mbox{\hyperlink{hptiop_8h_a5bd750c2936310ae0db9a04712b1c558}{MVIOP\_MU\_OUTBOUND\_INT\_MSG}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00746}00746                 u\_int32\_t msg = \mbox{\hyperlink{hptiop_8c_a0666640667323eb823492b505630f5a0}{BUS\_SPACE\_RD4\_MV2}}(outbound\_msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00747}00747                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: received outbound msg \%x\(\backslash\)n"{}}, msg));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00748}00748                 \mbox{\hyperlink{hptiop_8c_a311fb980172d10d1016562ace4d1a30b}{hptiop\_os\_message\_callback}}(hba, msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00749}00749                 ret = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00750}00750         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00751}00751 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00752}00752         \textcolor{keywordflow}{if} (status \& \mbox{\hyperlink{hptiop_8h_adb4fb4c0219e82a21793edaa884cc25b}{MVIOP\_MU\_OUTBOUND\_INT\_POSTQUEUE}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00753}00753                 \mbox{\hyperlink{hptiop_8c_a18cd8bdfc2837349cc3bb83c978a8451}{hptiop\_drain\_outbound\_queue\_mv}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00754}00754                 ret = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00755}00755         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00756}00756 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00757}00757         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00758}00758 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00759}00759 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00760}\mbox{\hyperlink{hptiop_8c_a04dbd22e34b962a8c36012c381e14870}{00760}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a04dbd22e34b962a8c36012c381e14870}{hptiop\_intr\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00761}00761 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00762}00762         u\_int32\_t status, \_tag, cptr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00763}00763         \textcolor{keywordtype}{int} ret = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00764}00764 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00765}00765         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad291e684b6de84c07e3d82aae57aea7c}{initialized}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00766}00766                 \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(pcie\_f0\_int\_enable, 0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00767}00767         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00768}00768 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00769}00769         status = \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(f0\_doorbell);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00770}00770         \textcolor{keywordflow}{if} (status) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00771}00771                 \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(f0\_doorbell, status);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00772}00772                 \textcolor{keywordflow}{if} (status \& \mbox{\hyperlink{hptiop_8h_a7b8596c9a1711cfa54ebfc0aadbe7c9a}{CPU\_TO\_F0\_DRBL\_MSG\_A\_BIT}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00773}00773                         u\_int32\_t msg = \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(cpu\_to\_f0\_msg\_a);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00774}00774                         \mbox{\hyperlink{hptiop_8c_a311fb980172d10d1016562ace4d1a30b}{hptiop\_os\_message\_callback}}(hba, msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00775}00775                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00776}00776                 ret = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00777}00777         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00778}00778 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00779}00779         status = \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(isr\_cause);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00780}00780         \textcolor{keywordflow}{if} (status) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00781}00781                 \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(isr\_cause, status);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00782}00782                 \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00783}00783                         cptr = *hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_ad13dbdbca1e9980adec5a20b7a0c8cef}{outlist\_cptr}} \& 0xff;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00784}00784                         \textcolor{keywordflow}{while} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a36bb216158864cdb28b725620a5551ce}{outlist\_rptr}} != cptr) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00785}00785                                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a36bb216158864cdb28b725620a5551ce}{outlist\_rptr}}++;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00786}00786                                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a36bb216158864cdb28b725620a5551ce}{outlist\_rptr}} == hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00787}00787                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a36bb216158864cdb28b725620a5551ce}{outlist\_rptr}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00788}00788                                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00789}00789         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00790}00790                                 \_tag = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a6e3f70cba2b70a607840e0e086fa4e4c}{outlist}}[hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a36bb216158864cdb28b725620a5551ce}{outlist\_rptr}}].\mbox{\hyperlink{structmvfrey__outlist__entry_a8eeba4fd279d95358f2f9d2e4225e879}{val}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00791}00791                                 \mbox{\hyperlink{hptiop_8c_a4b670838335e02b868465340e7d83c90}{hptiop\_request\_callback\_mvfrey}}(hba, \_tag);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00792}00792                                 ret = 2;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00793}00793                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00794}00794                 \} \textcolor{keywordflow}{while} (cptr != (*hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_ad13dbdbca1e9980adec5a20b7a0c8cef}{outlist\_cptr}} \& 0xff));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00795}00795         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00796}00796 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00797}00797         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad291e684b6de84c07e3d82aae57aea7c}{initialized}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00798}00798                 \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(pcie\_f0\_int\_enable, 0x1010);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00799}00799         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00800}00800 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00801}00801         \textcolor{keywordflow}{return} ret;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00802}00802 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00803}00803 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00804}\mbox{\hyperlink{hptiop_8c_abb8fad8725d401c75d75b889205abe2a}{00804}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_abb8fad8725d401c75d75b889205abe2a}{hptiop\_send\_sync\_request\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00805}00805                                         u\_int32\_t req32, u\_int32\_t millisec)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00806}00806 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00807}00807         u\_int32\_t i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00808}00808         u\_int64\_t temp64;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00809}00809 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00810}00810         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(inbound\_queue, req32);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00811}00811         \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_intstatus);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00812}00812 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00813}00813         \textcolor{keywordflow}{for} (i = 0; i < millisec; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00814}00814                 \mbox{\hyperlink{hptiop_8c_a13219fc8dd309f96f98dc3e51fe58aeb}{hptiop\_intr\_itl}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00815}00815                 bus\_space\_read\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, req32 +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00816}00816                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}, context),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00817}00817                         (u\_int32\_t *)\&temp64, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00818}00818                 \textcolor{keywordflow}{if} (temp64)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00819}00819                         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00820}00820                 DELAY(1000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00821}00821         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00822}00822 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00823}00823         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00824}00824 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00826}\mbox{\hyperlink{hptiop_8c_a404ed9b042e9860d33793f1c7c0333cc}{00826}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a404ed9b042e9860d33793f1c7c0333cc}{hptiop\_send\_sync\_request\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00827}00827                                         \textcolor{keywordtype}{void} *req, u\_int32\_t millisec)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00828}00828 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00829}00829         u\_int32\_t i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00830}00830         u\_int64\_t phy\_addr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00831}00831         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00832}00832 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00833}00833         phy\_addr = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad590f540fdf40e4055a14741f2c369bf}{ctlcfgcmd\_phy}} |}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00834}00834                         (u\_int64\_t)\mbox{\hyperlink{hptiop_8h_a29c36a52a32cbdd04c6256480c1fa38a}{MVIOP\_MU\_QUEUE\_ADDR\_HOST\_BIT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00835}00835         ((\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} *)req)-\/>header.flags |=}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00836}00836                 \mbox{\hyperlink{hptiop_8h_a49c1a14f7d4d5fa67090333eb0b29855}{IOP\_REQUEST\_FLAG\_SYNC\_REQUEST}} |}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00837}00837                 \mbox{\hyperlink{hptiop_8h_a022be7800a09b509ad416b14bb47f755}{IOP\_REQUEST\_FLAG\_OUTPUT\_CONTEXT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00838}00838         \mbox{\hyperlink{hptiop_8c_a45f4092bb9ec1d9cb545dece7ffd2002}{hptiop\_mv\_inbound\_write}}(phy\_addr, hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00839}00839         \mbox{\hyperlink{hptiop_8c_a6996424934d7085df6b8fc161ce23103}{BUS\_SPACE\_RD4\_MV0}}(outbound\_intmask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00840}00840 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00841}00841         \textcolor{keywordflow}{for} (i = 0; i < millisec; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00842}00842                 \mbox{\hyperlink{hptiop_8c_a7c98625a2f224fab65d56a2ce5a43c13}{hptiop\_intr\_mv}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00843}00843                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00844}00844                         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00845}00845                 DELAY(1000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00846}00846         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00847}00847         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00848}00848 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00849}00849 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00850}\mbox{\hyperlink{hptiop_8c_a7d038ab1b6d0c4b59f209ec831f00167}{00850}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a7d038ab1b6d0c4b59f209ec831f00167}{hptiop\_send\_sync\_request\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00851}00851                                         \textcolor{keywordtype}{void} *req, u\_int32\_t millisec)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00852}00852 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00853}00853         u\_int32\_t i, index;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00854}00854         u\_int64\_t phy\_addr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00855}00855         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}} *reqhdr =}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00856}00856                                                                                 (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}} *)req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00857}00857         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00858}00858         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00859}00859 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00860}00860         phy\_addr = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad590f540fdf40e4055a14741f2c369bf}{ctlcfgcmd\_phy}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00861}00861         reqhdr-\/>\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a49c1a14f7d4d5fa67090333eb0b29855}{IOP\_REQUEST\_FLAG\_SYNC\_REQUEST}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00862}00862                                         | \mbox{\hyperlink{hptiop_8h_a022be7800a09b509ad416b14bb47f755}{IOP\_REQUEST\_FLAG\_OUTPUT\_CONTEXT}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00863}00863                                         | \mbox{\hyperlink{hptiop_8h_a2f87167873ace8ea3bd7ef96269c592b}{IOP\_REQUEST\_FLAG\_ADDR\_BITS}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00864}00864                                         | ((phy\_addr >> 16) \& 0xffff0000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00865}00865         reqhdr-\/>\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = ((phy\_addr \& 0xffffffff) << 32 )}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00866}00866                                         | \mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}} | reqhdr-\/>\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00867}00867 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00868}00868         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}}++;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00869}00869         index = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \& 0x3fff;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00870}00870 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00871}00871         \textcolor{keywordflow}{if} (index == hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00872}00872                 index = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00873}00873                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \&= \string~0x3fff;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00874}00874                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \string^= \mbox{\hyperlink{hptiop_8h_aa18eef56905b1a3d0e9b2fb18408e5dc}{CL\_POINTER\_TOGGLE}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00875}00875         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00876}00876 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00877}00877         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a830c7050d573bee1cd75a0d62dc1801e}{inlist}}[index].\mbox{\hyperlink{structmvfrey__inlist__entry_a63102365a7c0d43838170dbd0702779d}{addr}} = phy\_addr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00878}00878         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a830c7050d573bee1cd75a0d62dc1801e}{inlist}}[index].\mbox{\hyperlink{structmvfrey__inlist__entry_a70ed61b1fe374bf14cdedd387833229d}{intrfc\_len}} = (reqhdr-\/>\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} + 3) / 4;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00879}00879 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00880}00880         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(inbound\_write\_ptr, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00881}00881         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(inbound\_write\_ptr);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00882}00882 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00883}00883         \textcolor{keywordflow}{for} (i = 0; i < millisec; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00884}00884                 \mbox{\hyperlink{hptiop_8c_a04dbd22e34b962a8c36012c381e14870}{hptiop\_intr\_mvfrey}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00885}00885                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00886}00886                         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00887}00887                 DELAY(1000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00888}00888         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00889}00889         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00890}00890 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00891}00891 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00892}\mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{00892}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00893}00893                                         u\_int32\_t msg, u\_int32\_t millisec)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00894}00894 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00895}00895         u\_int32\_t i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00896}00896 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00897}00897         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57062802270c571180e4c8ff29ebd271}{msg\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00898}00898         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a58008210339e8032d04ee0a9ffedd6ee}{post\_msg}}(hba, msg);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00899}00899 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00900}00900         \textcolor{keywordflow}{for} (i=0; i<millisec; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00901}00901                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_abda9ee4d8c5697af115a5ce14cc42224}{iop\_intr}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00902}00902                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57062802270c571180e4c8ff29ebd271}{msg\_done}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00903}00903                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00904}00904                 DELAY(1000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00905}00905         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00906}00906 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00907}00907         \textcolor{keywordflow}{return} hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57062802270c571180e4c8ff29ebd271}{msg\_done}}? 0 : -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00908}00908 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00909}00909 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00910}\mbox{\hyperlink{hptiop_8c_ab51a59276d9ba0b5b5e4a63c50bbe5fd}{00910}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ab51a59276d9ba0b5b5e4a63c50bbe5fd}{hptiop\_get\_config\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00911}00911                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} * config)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00912}00912 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00913}00913         u\_int32\_t req32;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00914}00914 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00915}00915         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00916}00916         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea9cd01617f6dcbd7b932e2ea40aef4c11}{IOP\_REQUEST\_TYPE\_GET\_CONFIG}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00917}00917         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a49c1a14f7d4d5fa67090333eb0b29855}{IOP\_REQUEST\_FLAG\_SYNC\_REQUEST}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00918}00918         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00919}00919         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00920}00920 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00921}00921         req32 = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(inbound\_queue);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00922}00922         \textcolor{keywordflow}{if} (req32 == \mbox{\hyperlink{hptiop_8h_a283df53d44ec2d4fa07d1d268ba947e9}{IOPMU\_QUEUE\_EMPTY}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00923}00923                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00924}00924 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00925}00925         bus\_space\_write\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00926}00926                         req32, (u\_int32\_t *)config,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00927}00927                         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}) >> 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00928}00928 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00929}00929         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_abb8fad8725d401c75d75b889205abe2a}{hptiop\_send\_sync\_request\_itl}}(hba, req32, 20000)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00930}00930                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: get config send cmd failed"{}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00931}00931                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00932}00932         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00933}00933 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00934}00934         bus\_space\_read\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00935}00935                         req32, (u\_int32\_t *)config,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00936}00936                         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}}) >> 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00937}00937 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00938}00938         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_queue, req32);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00939}00939 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00940}00940         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00941}00941 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00942}00942 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00943}\mbox{\hyperlink{hptiop_8c_a061c3cc2a90681139950599ccd09eeac}{00943}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a061c3cc2a90681139950599ccd09eeac}{hptiop\_get\_config\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00944}00944                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} * config)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00945}00945 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00946}00946         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00947}00947 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00948}00948         \textcolor{keywordflow}{if} (!(req = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00949}00949                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00950}00950 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00951}00951         req-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00952}00952         req-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea9cd01617f6dcbd7b932e2ea40aef4c11}{IOP\_REQUEST\_TYPE\_GET\_CONFIG}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00953}00953         req-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00954}00954         req-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00955}00955         req-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = \mbox{\hyperlink{hptiop_8h_ad0c158d76b658669f47e5598468ab185}{MVIOP\_CMD\_TYPE\_GET\_CONFIG}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00956}00956 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00957}00957         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a404ed9b042e9860d33793f1c7c0333cc}{hptiop\_send\_sync\_request\_mv}}(hba, req, 20000)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00958}00958                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: get config send cmd failed"{}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00959}00959                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00960}00960         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00962}00962         *config = *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00963}00963         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00964}00964 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00965}00965 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00966}\mbox{\hyperlink{hptiop_8c_abcd8eb624758757cc636f2d780a99aec}{00966}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_abcd8eb624758757cc636f2d780a99aec}{hptiop\_get\_config\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00967}00967                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} * config)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00968}00968 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00969}00969         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} *info = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a0b37b9d9686ce1e6104782a867b484f0}{config}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00971}00971         \textcolor{keywordflow}{if} (info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} != \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}}) ||}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00972}00972             info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} != \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea9cd01617f6dcbd7b932e2ea40aef4c11}{IOP\_REQUEST\_TYPE\_GET\_CONFIG}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00973}00973                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: header size \%x/\%x type \%x/\%x"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00974}00974                          info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}}, (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00975}00975                          info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a8b8288a51a03b5885aa89abc58d467a6}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}}, \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea9cd01617f6dcbd7b932e2ea40aef4c11}{IOP\_REQUEST\_TYPE\_GET\_CONFIG}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00976}00976                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00977}00977         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00978}00978 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00979}00979         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a27b90bbde9bf9eacc8c057555dc2980d}{interface\_version}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a27b90bbde9bf9eacc8c057555dc2980d}{interface\_version}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00980}00980         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a28029b704c1b40b284960cafb1994c75}{firmware\_version}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a28029b704c1b40b284960cafb1994c75}{firmware\_version}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00981}00981         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a87d8f9a5b3e506510b11a04e0f2cc6bc}{max\_requests}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a87d8f9a5b3e506510b11a04e0f2cc6bc}{max\_requests}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00982}00982         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a0a1169b3ea97d075e16ff4a3a9d60e55}{request\_size}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a0a1169b3ea97d075e16ff4a3a9d60e55}{request\_size}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00983}00983         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_ac084e954ffe3192ff6ff49b797c10122}{max\_sg\_count}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_ac084e954ffe3192ff6ff49b797c10122}{max\_sg\_count}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00984}00984         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_ad7e9e43a474def8110d4c1e18094176b}{data\_transfer\_length}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_ad7e9e43a474def8110d4c1e18094176b}{data\_transfer\_length}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00985}00985         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_aa7f674128984bcadc1a064d4db180fb7}{alignment\_mask}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_aa7f674128984bcadc1a064d4db180fb7}{alignment\_mask}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00986}00986         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a72b70aaff43ea411d0739c39d7409238}{max\_devices}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a72b70aaff43ea411d0739c39d7409238}{max\_devices}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00987}00987         config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a76514d9fe383f7cea281f1fef3bfbecb}{sdram\_size}} = info-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a76514d9fe383f7cea281f1fef3bfbecb}{sdram\_size}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00988}00988 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00989}00989         \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: maxreq \%x reqsz \%x datalen \%x maxdev \%x sdram \%x"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00990}00990                  config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a87d8f9a5b3e506510b11a04e0f2cc6bc}{max\_requests}}, config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a0a1169b3ea97d075e16ff4a3a9d60e55}{request\_size}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00991}00991                  config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_ad7e9e43a474def8110d4c1e18094176b}{data\_transfer\_length}}, config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a72b70aaff43ea411d0739c39d7409238}{max\_devices}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00992}00992                  config-\/>\mbox{\hyperlink{structhpt__iop__request__get__config_a76514d9fe383f7cea281f1fef3bfbecb}{sdram\_size}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00993}00993 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00994}00994         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00995}00995 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00996}00996 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00997}\mbox{\hyperlink{hptiop_8c_ac0e006ae75ce54296e9ead5fd3d29c43}{00997}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ac0e006ae75ce54296e9ead5fd3d29c43}{hptiop\_set\_config\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00998}00998                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}} *config)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l00999}00999 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01000}01000         u\_int32\_t req32;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01001}01001 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01002}01002         req32 = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(inbound\_queue);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01003}01003 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01004}01004         \textcolor{keywordflow}{if} (req32 == \mbox{\hyperlink{hptiop_8h_a283df53d44ec2d4fa07d1d268ba947e9}{IOPMU\_QUEUE\_EMPTY}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01005}01005                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01006}01006 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01007}01007         config-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01008}01008         config-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ead89f5e4495115b4598ad85cc75a4a4ee}{IOP\_REQUEST\_TYPE\_SET\_CONFIG}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01009}01009         config-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a49c1a14f7d4d5fa67090333eb0b29855}{IOP\_REQUEST\_FLAG\_SYNC\_REQUEST}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01010}01010         config-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01011}01011         config-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01012}01012 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01013}01013         bus\_space\_write\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, req32, }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01014}01014                 (u\_int32\_t *)config, }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01015}01015                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}}) >> 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01016}01016 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01017}01017         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_abb8fad8725d401c75d75b889205abe2a}{hptiop\_send\_sync\_request\_itl}}(hba, req32, 20000)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01018}01018                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: set config send cmd failed"{}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01019}01019                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01020}01020         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01021}01021 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01022}01022         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_queue, req32);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01023}01023 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01024}01024         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01025}01025 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01026}01026 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01027}\mbox{\hyperlink{hptiop_8c_a0ef2d9ab8d0f6bd4c179e9cef15cfb72}{01027}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a0ef2d9ab8d0f6bd4c179e9cef15cfb72}{hptiop\_set\_config\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01028}01028                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}} *config)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01029}01029 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01030}01030         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01031}01031 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01032}01032         \textcolor{keywordflow}{if} (!(req = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01033}01033                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01034}01034 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01035}01035         memcpy((u\_int8\_t *)req + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01036}01036                 (u\_int8\_t *)config + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01037}01037                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}}) -\/}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01038}01038                         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01039}01039 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01040}01040         req-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01041}01041         req-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ead89f5e4495115b4598ad85cc75a4a4ee}{IOP\_REQUEST\_TYPE\_SET\_CONFIG}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01042}01042         req-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01043}01043         req-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01044}01044         req-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = \mbox{\hyperlink{hptiop_8h_a974d09d5547f0d531ae5234b3a9034a4}{MVIOP\_CMD\_TYPE\_SET\_CONFIG}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01045}01045 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01046}01046         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a404ed9b042e9860d33793f1c7c0333cc}{hptiop\_send\_sync\_request\_mv}}(hba, req, 20000)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01047}01047                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: set config send cmd failed"{}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01048}01048                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01049}01049         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01050}01050 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01051}01051         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01052}01052 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01053}01053 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01054}\mbox{\hyperlink{hptiop_8c_a02d1bf021ed9a588a0921c3e022ffc5a}{01054}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a02d1bf021ed9a588a0921c3e022ffc5a}{hptiop\_set\_config\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01055}01055                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}} *config)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01056}01056 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01057}01057         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01058}01058 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01059}01059         \textcolor{keywordflow}{if} (!(req = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01060}01060                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01061}01061 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01062}01062         memcpy((u\_int8\_t *)req + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01063}01063                 (u\_int8\_t *)config + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01064}01064                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}}) -\/}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01065}01065                         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__header}{hpt\_iop\_request\_header}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01066}01066 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01067}01067         req-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ead89f5e4495115b4598ad85cc75a4a4ee}{IOP\_REQUEST\_TYPE\_SET\_CONFIG}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01068}01068         req-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01069}01069         req-\/>\mbox{\hyperlink{structhpt__iop__request__set__config_a8f7a7f87849b6407ce31dc3444f0095b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01070}01070 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01071}01071         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a7d038ab1b6d0c4b59f209ec831f00167}{hptiop\_send\_sync\_request\_mvfrey}}(hba, req, 20000)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01072}01072                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: set config send cmd failed"{}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01073}01073                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01074}01074         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01075}01075 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01076}01076         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01077}01077 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01078}01078 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01079}\mbox{\hyperlink{hptiop_8c_a16dabb5767897347024448fed0aad9fa}{01079}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a16dabb5767897347024448fed0aad9fa}{hptiop\_post\_ioctl\_command\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01080}01080                                 u\_int32\_t req32,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01081}01081                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01082}01082 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01083}01083         u\_int64\_t temp64;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01084}01084         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01085}01085 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01086}01086         \textcolor{keywordflow}{if} ((((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}} + 3) \& \string~3) + pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}}) >}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01087}01087                         (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af4bb2c5a8e0418021b0b4b6fadf2bb60}{max\_request\_size}} -\/}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01088}01088                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}}))) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01089}01089                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}request size beyond max value"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01090}01090                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01091}01091         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01092}01092 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01093}01093         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01094}01094                 + pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01095}01095         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea51cd0767fdad4bae095be181a9723651}{IOP\_REQUEST\_TYPE\_IOCTL\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01096}01096         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a49c1a14f7d4d5fa67090333eb0b29855}{IOP\_REQUEST\_FLAG\_SYNC\_REQUEST}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01097}01097         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01098}01098         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = req32 + (u\_int64\_t)(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_aded67c1a8ea2dcdf9ae9c21e6a19fdb8}{itl}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01099}01099         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a4f0f55a9cb0b3f22b2addb0bf12b94f9}{ioctl\_code}} = \mbox{\hyperlink{hptiop_8h_a2f74038266290e81b12fc2c23765fc9d}{HPT\_CTL\_CODE\_BSD\_TO\_IOP}}(pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aa515dc16bba879c30affe94c83644754}{dwIoControlCode}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01100}01100         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a7ceaf191bcb86fbbdca3aaae37718ef4}{inbuf\_size}} = pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01101}01101         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a57e8ded8fce0df64deacfc9c8ae6098b}{outbuf\_size}} = pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01102}01102         req.\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a6f8fb16ef250392df3474d2f518d936b}{bytes\_returned}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01103}01103 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01104}01104         bus\_space\_write\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, req32, (u\_int32\_t *)\&req, }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01105}01105                 \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}})>>2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01106}01106         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01107}01107         \mbox{\hyperlink{hptiop_8h_a83b2e372546b54275d6807cb21c3ac11}{hptiop\_lock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01108}01108 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01109}01109         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(inbound\_queue, req32);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01110}01110         \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_intstatus);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01111}01111 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01112}01112         bus\_space\_read\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, req32 +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01113}01113                 \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01114}01114                 (u\_int32\_t *)\&temp64, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01115}01115         \textcolor{keywordflow}{while} (temp64) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01116}01116                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8h_a8aff9e1751670fae00bb3ffe4c806190}{hptiop\_sleep}}(hba, (\textcolor{keywordtype}{void} *)((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_aded67c1a8ea2dcdf9ae9c21e6a19fdb8}{itl}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}} + req32),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01117}01117                                 PPAUSE, \textcolor{stringliteral}{"{}hptctl"{}}, \mbox{\hyperlink{hptiop_8h_abbcc9b750cdba1575d0752c28a6d136e}{HPT\_OSM\_TIMEOUT}})==0)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01118}01118                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01119}01119                 \mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4a5385621483349cf2bcf6e8ada83508c3}{IOPMU\_INBOUND\_MSG0\_RESET}}, 60000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01120}01120                 bus\_space\_read\_region\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}},req32 +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01121}01121                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01122}01122                                 \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01123}01123                         (u\_int32\_t *)\&temp64, 2);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01124}01124         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01125}01125 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01126}01126         \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01127}01127         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01128}01128 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01129}01129 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01130}\mbox{\hyperlink{hptiop_8c_a8d26212638b889f153b50ef1f9b8d2f5}{01130}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a8d26212638b889f153b50ef1f9b8d2f5}{hptiop\_bus\_space\_copyin}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t bus,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01131}01131                                                                         \textcolor{keywordtype}{void} *user, \textcolor{keywordtype}{int} size)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01132}01132 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01133}01133         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} byte;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01134}01134         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01135}01135 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01136}01136         \textcolor{keywordflow}{for} (i=0; i<size; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01137}01137                 \textcolor{keywordflow}{if} (copyin((u\_int8\_t *)user + i, \&\textcolor{keywordtype}{byte}, 1))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01138}01138                         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01139}01139                 bus\_space\_write\_1(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, bus + i, \textcolor{keywordtype}{byte});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01140}01140         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01141}01141 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01142}01142         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01143}01143 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01144}01144 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01145}\mbox{\hyperlink{hptiop_8c_aedd613a66706d95b8bf970c318bd55f6}{01145}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_aedd613a66706d95b8bf970c318bd55f6}{hptiop\_bus\_space\_copyout}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba, u\_int32\_t bus,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01146}01146                                                                         \textcolor{keywordtype}{void} *user, \textcolor{keywordtype}{int} size)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01147}01147 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01148}01148         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} byte;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01149}01149         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01150}01150 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01151}01151         \textcolor{keywordflow}{for} (i=0; i<size; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01152}01152                 \textcolor{keywordtype}{byte} = bus\_space\_read\_1(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, bus + i);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01153}01153                 \textcolor{keywordflow}{if} (copyout(\&\textcolor{keywordtype}{byte}, (u\_int8\_t *)user + i, 1))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01154}01154                         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01155}01155         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01156}01156 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01157}01157         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01158}01158 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01159}01159 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01160}\mbox{\hyperlink{hptiop_8c_a78c0de5f6c544ab7b8c55e677625c7ba}{01160}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a78c0de5f6c544ab7b8c55e677625c7ba}{hptiop\_do\_ioctl\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01161}01161                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} * pParams)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01162}01162 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01163}01163         u\_int32\_t req32;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01164}01164         u\_int32\_t result;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01165}01165 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01166}01166         \textcolor{keywordflow}{if} ((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4ddfae0572e61df3da786f9694ee369f}{Magic}} != \mbox{\hyperlink{hptiop_8h_a470df21a772ce14422c73cb7e6509c29}{HPT\_IOCTL\_MAGIC}}) \&\&}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01167}01167                 (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4ddfae0572e61df3da786f9694ee369f}{Magic}} != \mbox{\hyperlink{hptiop_8h_ac3784a2cc9dc0b5a144fe13f3d34093f}{HPT\_IOCTL\_MAGIC32}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01168}01168                 \textcolor{keywordflow}{return} EFAULT;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01169}01169         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01170}01170         req32 = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(inbound\_queue);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01171}01171         \textcolor{keywordflow}{if} (req32 == \mbox{\hyperlink{hptiop_8h_a283df53d44ec2d4fa07d1d268ba947e9}{IOPMU\_QUEUE\_EMPTY}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01172}01172                 \textcolor{keywordflow}{return} EFAULT;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01173}01173 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01174}01174         \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01175}01175                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a8d26212638b889f153b50ef1f9b8d2f5}{hptiop\_bus\_space\_copyin}}(hba, req32 +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01176}01176                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01177}01177                         (\textcolor{keywordtype}{void} *)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a523a556766e8dad72efd127dfb4e2640}{lpInBuffer}}, pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01178}01178                         \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01179}01179 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01180}01180         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a16dabb5767897347024448fed0aad9fa}{hptiop\_post\_ioctl\_command\_itl}}(hba, req32, pParams))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01181}01181                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01182}01182 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01183}01183         result = bus\_space\_read\_4(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, req32 +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01184}01184                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01185}01185                                 \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01186}01186 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01187}01187         \textcolor{keywordflow}{if} (result == \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea9d02c9ca7f4513d91200b93555f3c93d}{IOP\_RESULT\_SUCCESS}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01188}01188                 \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01189}01189                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_aedd613a66706d95b8bf970c318bd55f6}{hptiop\_bus\_space\_copyout}}(hba, req32 +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01190}01190                                 \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}}) + }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01191}01191                                         ((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}} + 3) \& \string~3),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01192}01192                                 (\textcolor{keywordtype}{void} *)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a165d04cd286b57ed1461df240bdaf0b5}{lpOutBuffer}}, pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01193}01193                                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01194}01194 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01195}01195                 \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aace0835ced0023b7bbec8c8b3bd2ebfe}{lpBytesReturned}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01196}01196                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_aedd613a66706d95b8bf970c318bd55f6}{hptiop\_bus\_space\_copyout}}(hba, req32 + }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01197}01197                                 \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a6f8fb16ef250392df3474d2f518d936b}{bytes\_returned}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01198}01198                                 (\textcolor{keywordtype}{void} *)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aace0835ced0023b7bbec8c8b3bd2ebfe}{lpBytesReturned}}, \textcolor{keyword}{sizeof}(\textcolor{keywordtype}{unsigned}  \textcolor{keywordtype}{long})))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01199}01199                                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01200}01200                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01201}01201 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01202}01202                 \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_queue, req32);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01203}01203 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01204}01204                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01205}01205         \} \textcolor{keywordflow}{else}\{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01206}01206 invalid:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01207}01207                 \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_queue, req32);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01208}01208 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01209}01209                 \textcolor{keywordflow}{return} EFAULT;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01210}01210         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01211}01211 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01212}01212 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01213}\mbox{\hyperlink{hptiop_8c_ac5a23686c693ee8c126c54362fde2de5}{01213}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ac5a23686c693ee8c126c54362fde2de5}{hptiop\_post\_ioctl\_command\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01214}01214                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *req,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01215}01215                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01216}01216 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01217}01217         u\_int64\_t req\_phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01218}01218         \textcolor{keywordtype}{int} size = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01219}01219 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01220}01220         \textcolor{keywordflow}{if} ((((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}} + 3) \& \string~3) + pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}}) >}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01221}01221                         (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af4bb2c5a8e0418021b0b4b6fadf2bb60}{max\_request\_size}} -\/}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01222}01222                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}}))) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01223}01223                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}request size beyond max value"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01224}01224                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01225}01225         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01226}01226 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01227}01227         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a4f0f55a9cb0b3f22b2addb0bf12b94f9}{ioctl\_code}} = \mbox{\hyperlink{hptiop_8h_a2f74038266290e81b12fc2c23765fc9d}{HPT\_CTL\_CODE\_BSD\_TO\_IOP}}(pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aa515dc16bba879c30affe94c83644754}{dwIoControlCode}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01228}01228         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a7ceaf191bcb86fbbdca3aaae37718ef4}{inbuf\_size}} = pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01229}01229         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a57e8ded8fce0df64deacfc9c8ae6098b}{outbuf\_size}} = pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01230}01230         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01231}01231                                         + pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01232}01232         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = (u\_int64\_t)\mbox{\hyperlink{hptiop_8h_a690b9ee8d7ede325612797ac6fde9ec1}{MVIOP\_CMD\_TYPE\_IOCTL}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01233}01233         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea51cd0767fdad4bae095be181a9723651}{IOP\_REQUEST\_TYPE\_IOCTL\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01234}01234         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01235}01235         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a022be7800a09b509ad416b14bb47f755}{IOP\_REQUEST\_FLAG\_OUTPUT\_CONTEXT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01236}01236         size = req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} >> 8;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01237}01237         size = imin(3, size);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01238}01238         req\_phy = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad590f540fdf40e4055a14741f2c369bf}{ctlcfgcmd\_phy}} | \mbox{\hyperlink{hptiop_8h_a29c36a52a32cbdd04c6256480c1fa38a}{MVIOP\_MU\_QUEUE\_ADDR\_HOST\_BIT}} | size;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01239}01239         \mbox{\hyperlink{hptiop_8c_a45f4092bb9ec1d9cb545dece7ffd2002}{hptiop\_mv\_inbound\_write}}(req\_phy, hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01240}01240 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01241}01241         \mbox{\hyperlink{hptiop_8c_a6996424934d7085df6b8fc161ce23103}{BUS\_SPACE\_RD4\_MV0}}(outbound\_intmask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01242}01242 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01243}01243         \textcolor{keywordflow}{while} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} == 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01244}01244                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8h_a8aff9e1751670fae00bb3ffe4c806190}{hptiop\_sleep}}(hba, req, PPAUSE,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01245}01245                         \textcolor{stringliteral}{"{}hptctl"{}}, \mbox{\hyperlink{hptiop_8h_abbcc9b750cdba1575d0752c28a6d136e}{HPT\_OSM\_TIMEOUT}})==0)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01246}01246                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01247}01247                 \mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4a5385621483349cf2bcf6e8ada83508c3}{IOPMU\_INBOUND\_MSG0\_RESET}}, 60000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01248}01248         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01249}01249         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01250}01250 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01251}01251 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01252}\mbox{\hyperlink{hptiop_8c_a2b3b347d3ce7d4ac6783af1101a0ab5a}{01252}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a2b3b347d3ce7d4ac6783af1101a0ab5a}{hptiop\_do\_ioctl\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01253}01253                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01254}01254 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01255}01255         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01256}01256 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01257}01257         \textcolor{keywordflow}{if} ((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4ddfae0572e61df3da786f9694ee369f}{Magic}} != \mbox{\hyperlink{hptiop_8h_a470df21a772ce14422c73cb7e6509c29}{HPT\_IOCTL\_MAGIC}}) \&\&}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01258}01258                 (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4ddfae0572e61df3da786f9694ee369f}{Magic}} != \mbox{\hyperlink{hptiop_8h_ac3784a2cc9dc0b5a144fe13f3d34093f}{HPT\_IOCTL\_MAGIC32}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01259}01259                 \textcolor{keywordflow}{return} EFAULT;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01260}01260 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01261}01261         req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *)(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01262}01262         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01263}01263         \mbox{\hyperlink{hptiop_8h_a83b2e372546b54275d6807cb21c3ac11}{hptiop\_lock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01264}01264         \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01265}01265                 \textcolor{keywordflow}{if} (copyin((\textcolor{keywordtype}{void} *)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a523a556766e8dad72efd127dfb4e2640}{lpInBuffer}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01266}01266                                 req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}}, pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01267}01267                         \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01268}01268         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_ac5a23686c693ee8c126c54362fde2de5}{hptiop\_post\_ioctl\_command\_mv}}(hba, req, pParams))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01269}01269                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01270}01270 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01271}01271         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} == 1) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01272}01272                 \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01273}01273                         \textcolor{keywordflow}{if} (copyout(req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}} +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01274}01274                                 ((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}} + 3) \& \string~3),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01275}01275                                 (\textcolor{keywordtype}{void} *)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a165d04cd286b57ed1461df240bdaf0b5}{lpOutBuffer}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01276}01276                                 pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01277}01277                                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01278}01278 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01279}01279                 \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aace0835ced0023b7bbec8c8b3bd2ebfe}{lpBytesReturned}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01280}01280                         \textcolor{keywordflow}{if} (copyout(\&req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a6f8fb16ef250392df3474d2f518d936b}{bytes\_returned}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01281}01281                                 (\textcolor{keywordtype}{void}*)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aace0835ced0023b7bbec8c8b3bd2ebfe}{lpBytesReturned}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01282}01282                                 \textcolor{keyword}{sizeof}(u\_int32\_t)))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01283}01283                                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01284}01284                 \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01285}01285                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01286}01286         \} \textcolor{keywordflow}{else}\{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01287}01287 invalid:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01288}01288                 \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01289}01289                 \textcolor{keywordflow}{return} EFAULT;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01290}01290         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01291}01291 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01292}01292 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01293}\mbox{\hyperlink{hptiop_8c_a8b48899707bbe817ee6ba04213b6fa86}{01293}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a8b48899707bbe817ee6ba04213b6fa86}{hptiop\_post\_ioctl\_command\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01294}01294                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *req,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01295}01295                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01296}01296 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01297}01297         u\_int64\_t phy\_addr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01298}01298         u\_int32\_t index;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01299}01299 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01300}01300         phy\_addr = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad590f540fdf40e4055a14741f2c369bf}{ctlcfgcmd\_phy}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01301}01301 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01302}01302         \textcolor{keywordflow}{if} ((((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}} + 3) \& \string~3) + pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}}) >}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01303}01303                         (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af4bb2c5a8e0418021b0b4b6fadf2bb60}{max\_request\_size}} -\/}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01304}01304                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}}))) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01305}01305                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}request size beyond max value"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01306}01306                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01307}01307         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01308}01308 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01309}01309         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a4f0f55a9cb0b3f22b2addb0bf12b94f9}{ioctl\_code}} = \mbox{\hyperlink{hptiop_8h_a2f74038266290e81b12fc2c23765fc9d}{HPT\_CTL\_CODE\_BSD\_TO\_IOP}}(pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aa515dc16bba879c30affe94c83644754}{dwIoControlCode}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01310}01310         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a7ceaf191bcb86fbbdca3aaae37718ef4}{inbuf\_size}} = pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01311}01311         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a57e8ded8fce0df64deacfc9c8ae6098b}{outbuf\_size}} = pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01312}01312         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}}, \mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01313}01313                                         + pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01314}01314 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01315}01315         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea51cd0767fdad4bae095be181a9723651}{IOP\_REQUEST\_TYPE\_IOCTL\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01316}01316         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01317}01317 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01318}01318         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a49c1a14f7d4d5fa67090333eb0b29855}{IOP\_REQUEST\_FLAG\_SYNC\_REQUEST}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01319}01319                                                 | \mbox{\hyperlink{hptiop_8h_a022be7800a09b509ad416b14bb47f755}{IOP\_REQUEST\_FLAG\_OUTPUT\_CONTEXT}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01320}01320                                                 | \mbox{\hyperlink{hptiop_8h_a2f87167873ace8ea3bd7ef96269c592b}{IOP\_REQUEST\_FLAG\_ADDR\_BITS}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01321}01321                                                 | ((phy\_addr >> 16) \& 0xffff0000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01322}01322         req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = ((phy\_addr \& 0xffffffff) << 32 )}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01323}01323                                                 | \mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}} | req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01324}01324 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01325}01325         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}}++;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01326}01326         index = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \& 0x3fff;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01327}01327 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01328}01328         \textcolor{keywordflow}{if} (index == hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01329}01329                 index = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01330}01330                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \&= \string~0x3fff;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01331}01331                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \string^= \mbox{\hyperlink{hptiop_8h_aa18eef56905b1a3d0e9b2fb18408e5dc}{CL\_POINTER\_TOGGLE}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01332}01332         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01333}01333 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01334}01334         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a830c7050d573bee1cd75a0d62dc1801e}{inlist}}[index].\mbox{\hyperlink{structmvfrey__inlist__entry_a63102365a7c0d43838170dbd0702779d}{addr}} = phy\_addr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01335}01335         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a830c7050d573bee1cd75a0d62dc1801e}{inlist}}[index].\mbox{\hyperlink{structmvfrey__inlist__entry_a70ed61b1fe374bf14cdedd387833229d}{intrfc\_len}} = (req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a35a07fa3217d61a34f7caa17bd14c199}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} + 3) / 4;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01336}01336 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01337}01337         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(inbound\_write\_ptr, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01338}01338         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(inbound\_write\_ptr);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01339}01339 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01340}01340         \textcolor{keywordflow}{while} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} == 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01341}01341                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8h_a8aff9e1751670fae00bb3ffe4c806190}{hptiop\_sleep}}(hba, req, PPAUSE,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01342}01342                         \textcolor{stringliteral}{"{}hptctl"{}}, \mbox{\hyperlink{hptiop_8h_abbcc9b750cdba1575d0752c28a6d136e}{HPT\_OSM\_TIMEOUT}})==0)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01343}01343                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01344}01344                 \mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4a5385621483349cf2bcf6e8ada83508c3}{IOPMU\_INBOUND\_MSG0\_RESET}}, 60000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01345}01345         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01346}01346         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01347}01347 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01348}01348 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01349}\mbox{\hyperlink{hptiop_8c_a41915c7e08cc85d998e5238dbee8dd9a}{01349}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a41915c7e08cc85d998e5238dbee8dd9a}{hptiop\_do\_ioctl\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01350}01350                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__ioctl__param}{hpt\_iop\_ioctl\_param}} *pParams)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01351}01351 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01352}01352         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01353}01353 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01354}01354         \textcolor{keywordflow}{if} ((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4ddfae0572e61df3da786f9694ee369f}{Magic}} != \mbox{\hyperlink{hptiop_8h_a470df21a772ce14422c73cb7e6509c29}{HPT\_IOCTL\_MAGIC}}) \&\&}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01355}01355                 (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4ddfae0572e61df3da786f9694ee369f}{Magic}} != \mbox{\hyperlink{hptiop_8h_ac3784a2cc9dc0b5a144fe13f3d34093f}{HPT\_IOCTL\_MAGIC32}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01356}01356                 \textcolor{keywordflow}{return} EFAULT;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01357}01357 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01358}01358         req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__ioctl__command}{hpt\_iop\_request\_ioctl\_command}} *)(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01359}01359         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01360}01360         \mbox{\hyperlink{hptiop_8h_a83b2e372546b54275d6807cb21c3ac11}{hptiop\_lock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01361}01361         \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01362}01362                 \textcolor{keywordflow}{if} (copyin((\textcolor{keywordtype}{void} *)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a523a556766e8dad72efd127dfb4e2640}{lpInBuffer}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01363}01363                                 req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}}, pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01364}01364                         \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01365}01365         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a8b48899707bbe817ee6ba04213b6fa86}{hptiop\_post\_ioctl\_command\_mvfrey}}(hba, req, pParams))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01366}01366                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01367}01367 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01368}01368         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abed9dfb5aaa2baeac9c57a79dc55775c}{config\_done}} == 1) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01369}01369                 \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01370}01370                         \textcolor{keywordflow}{if} (copyout(req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a595b6ea32d41e0821a34c03794ae5ac2}{buf}} +}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01371}01371                                 ((pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a4c4bcc11b7a585c5f74976f798c10d66}{nInBufferSize}} + 3) \& \string~3),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01372}01372                                 (\textcolor{keywordtype}{void} *)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_a165d04cd286b57ed1461df240bdaf0b5}{lpOutBuffer}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01373}01373                                 pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_ab3fffa757b570b0b4c9d5e4bdd0c8f00}{nOutBufferSize}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01374}01374                                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01375}01375 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01376}01376                 \textcolor{keywordflow}{if} (pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aace0835ced0023b7bbec8c8b3bd2ebfe}{lpBytesReturned}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01377}01377                         \textcolor{keywordflow}{if} (copyout(\&req-\/>\mbox{\hyperlink{structhpt__iop__request__ioctl__command_a6f8fb16ef250392df3474d2f518d936b}{bytes\_returned}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01378}01378                                 (\textcolor{keywordtype}{void}*)pParams-\/>\mbox{\hyperlink{structhpt__iop__ioctl__param_aace0835ced0023b7bbec8c8b3bd2ebfe}{lpBytesReturned}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01379}01379                                 \textcolor{keyword}{sizeof}(u\_int32\_t)))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01380}01380                                 \textcolor{keywordflow}{goto} invalid;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01381}01381                 \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01382}01382                 \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01383}01383         \} \textcolor{keywordflow}{else}\{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01384}01384 invalid:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01385}01385                 \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01386}01386                 \textcolor{keywordflow}{return} EFAULT;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01387}01387         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01388}01388 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01389}01389 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01390}\mbox{\hyperlink{hptiop_8c_a845636a9b56f472c82f37dfb7a801c48}{01390}} \textcolor{keyword}{static} \textcolor{keywordtype}{int}  \mbox{\hyperlink{hptiop_8c_a845636a9b56f472c82f37dfb7a801c48}{hptiop\_rescan\_bus}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01391}01391 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01392}01392         \textcolor{keyword}{union }ccb           *ccb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01393}01393 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01394}01394         \textcolor{keywordflow}{if} ((ccb = xpt\_alloc\_ccb()) == NULL)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01395}01395                 \textcolor{keywordflow}{return}(ENOMEM);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01396}01396         \textcolor{keywordflow}{if} (xpt\_create\_path(\&ccb-\/>ccb\_h.path, NULL, cam\_sim\_path(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01397}01397                 CAM\_TARGET\_WILDCARD, CAM\_LUN\_WILDCARD) != CAM\_REQ\_CMP) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01398}01398                 xpt\_free\_ccb(ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01399}01399                 \textcolor{keywordflow}{return}(EIO);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01400}01400         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01401}01401         xpt\_rescan(ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01402}01402         \textcolor{keywordflow}{return}(0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01403}01403 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01404}01404 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01405}\mbox{\hyperlink{hptiop_8c_a5ec1b25890414d3b478b6b96b218f293}{01405}} \textcolor{keyword}{static}  bus\_dmamap\_callback\_t   \mbox{\hyperlink{hptiop_8c_a5ec1b25890414d3b478b6b96b218f293}{hptiop\_map\_srb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01406}\mbox{\hyperlink{hptiop_8c_aa5cffd68f571912219ada0e54f0d1fd4}{01406}} \textcolor{keyword}{static}  bus\_dmamap\_callback\_t   \mbox{\hyperlink{hptiop_8c_aa5cffd68f571912219ada0e54f0d1fd4}{hptiop\_post\_scsi\_command}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01407}\mbox{\hyperlink{hptiop_8c_a34f2ab765b22d8d0636539827de3842f}{01407}} \textcolor{keyword}{static}  bus\_dmamap\_callback\_t   \mbox{\hyperlink{hptiop_8c_a34f2ab765b22d8d0636539827de3842f}{hptiop\_mv\_map\_ctlcfg}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01408}\mbox{\hyperlink{hptiop_8c_a41c6f098ae3013a79bea622b49646472}{01408}} \textcolor{keyword}{static}  bus\_dmamap\_callback\_t   \mbox{\hyperlink{hptiop_8c_a41c6f098ae3013a79bea622b49646472}{hptiop\_mvfrey\_map\_ctlcfg}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01409}01409 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01410}\mbox{\hyperlink{hptiop_8c_ac1928737064e27c186589f48c5e6e4ea}{01410}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ac1928737064e27c186589f48c5e6e4ea}{hptiop\_alloc\_pci\_res\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01411}01411 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01412}01412         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}} = 0x10;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01413}01413         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}} = bus\_alloc\_resource\_any(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01414}01414                         SYS\_RES\_MEMORY, \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01415}01415 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01416}01416         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01417}01417                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01418}01418                         \textcolor{stringliteral}{"{}failed to get iop base adrress.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01419}01419                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01420}01420         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01421}01421         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}} = rman\_get\_bustag(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01422}01422         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}} = rman\_get\_bushandle(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01423}01423         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_aded67c1a8ea2dcdf9ae9c21e6a19fdb8}{itl}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopmu__itl}{hpt\_iopmu\_itl}} *)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01424}01424                                 rman\_get\_virtual(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01425}01425 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01426}01426         \textcolor{keywordflow}{if} (!hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_aded67c1a8ea2dcdf9ae9c21e6a19fdb8}{itl}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01427}01427                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01428}01428                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01429}01429                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}alloc mem res failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01430}01430                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01431}01431         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01432}01432 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01433}01433         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01434}01434 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01435}01435 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01436}\mbox{\hyperlink{hptiop_8c_a212c07f85c7db9c376313b6518b4e313}{01436}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a212c07f85c7db9c376313b6518b4e313}{hptiop\_alloc\_pci\_res\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01437}01437 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01438}01438         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}} = 0x10;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01439}01439         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}} = bus\_alloc\_resource\_any(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01440}01440                         SYS\_RES\_MEMORY, \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01441}01441 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01442}01442         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01443}01443                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}failed to get iop bar0.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01444}01444                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01445}01445         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01446}01446         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}} = rman\_get\_bustag(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01447}01447         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}} = rman\_get\_bushandle(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01448}01448         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a24fc52971e10ecaebc0343c6a053e49b}{mv}}.\mbox{\hyperlink{structhpt__iop__hba_a95fe05ebc34f8c1d6d981288554e64ca}{regs}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopmv__regs}{hpt\_iopmv\_regs}} *)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01449}01449                                 rman\_get\_virtual(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01450}01450 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01451}01451         \textcolor{keywordflow}{if} (!hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a24fc52971e10ecaebc0343c6a053e49b}{mv}}.\mbox{\hyperlink{structhpt__iop__hba_a95fe05ebc34f8c1d6d981288554e64ca}{regs}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01452}01452                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01453}01453                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01454}01454                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}alloc bar0 mem res failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01455}01455                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01456}01456         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01457}01457 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01458}01458         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}} = 0x18;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01459}01459         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}} = bus\_alloc\_resource\_any(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01460}01460                         SYS\_RES\_MEMORY, \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}}, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01461}01461 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01462}01462         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01463}01463                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01464}01464                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01465}01465                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}failed to get iop bar2.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01466}01466                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01467}01467         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01468}01468 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01469}01469         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7f2aa44e458e909ad4105051d022b79d}{bar2t}} = rman\_get\_bustag(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01470}01470         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af7eb903a85c1a16f5f9f1244b4cce2c6}{bar2h}} = rman\_get\_bushandle(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01471}01471         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a24fc52971e10ecaebc0343c6a053e49b}{mv}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopmu__mv}{hpt\_iopmu\_mv}} *)rman\_get\_virtual(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01472}01472 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01473}01473         \textcolor{keywordflow}{if} (!hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a24fc52971e10ecaebc0343c6a053e49b}{mv}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01474}01474                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01475}01475                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01476}01476                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01477}01477                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01478}01478                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}alloc mem bar2 res failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01479}01479                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01480}01480         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01481}01481 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01482}01482         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01483}01483 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01484}01484 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01485}\mbox{\hyperlink{hptiop_8c_ae0b69252ec33dcbaf1827bb77eb06495}{01485}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ae0b69252ec33dcbaf1827bb77eb06495}{hptiop\_alloc\_pci\_res\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01486}01486 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01487}01487         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}} = 0x10;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01488}01488         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}} = bus\_alloc\_resource\_any(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01489}01489                         SYS\_RES\_MEMORY, \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01490}01490 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01491}01491         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01492}01492                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}failed to get iop bar0.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01493}01493                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01494}01494         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01495}01495         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}} = rman\_get\_bustag(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01496}01496         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}} = rman\_get\_bushandle(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01497}01497         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a0b37b9d9686ce1e6104782a867b484f0}{config}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}} *)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01498}01498                                 rman\_get\_virtual(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01499}01499 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01500}01500         \textcolor{keywordflow}{if} (!hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a0b37b9d9686ce1e6104782a867b484f0}{config}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01501}01501                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01502}01502                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01503}01503                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}alloc bar0 mem res failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01504}01504                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01505}01505         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01506}01506 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01507}01507         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}} = 0x18;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01508}01508         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}} = bus\_alloc\_resource\_any(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01509}01509                         SYS\_RES\_MEMORY, \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}}, RF\_ACTIVE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01510}01510 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01511}01511         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01512}01512                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01513}01513                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01514}01514                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}failed to get iop bar2.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01515}01515                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01516}01516         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01517}01517 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01518}01518         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7f2aa44e458e909ad4105051d022b79d}{bar2t}} = rman\_get\_bustag(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01519}01519         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af7eb903a85c1a16f5f9f1244b4cce2c6}{bar2h}} = rman\_get\_bushandle(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01520}01520         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}} =}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01521}01521                                         (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopmu__mvfrey}{hpt\_iopmu\_mvfrey}} *)rman\_get\_virtual(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01522}01522 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01523}01523         \textcolor{keywordflow}{if} (!hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a96203d6d106c645fb5e29dc7f46e99d1}{mu}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01524}01524                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01525}01525                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01526}01526                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01527}01527                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01528}01528                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}alloc mem bar2 res failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01529}01529                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01530}01530         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01531}01531 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01532}01532         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01533}01533 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01534}01534 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01535}\mbox{\hyperlink{hptiop_8c_a1fd4674cdfa3f94e58a4ef888dae7dc5}{01535}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a1fd4674cdfa3f94e58a4ef888dae7dc5}{hptiop\_release\_pci\_res\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01536}01536 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01537}01537         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01538}01538                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01539}01539                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01540}01540 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01541}01541 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01542}\mbox{\hyperlink{hptiop_8c_aa63b1085a6400898fc28f48d7de66b58}{01542}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_aa63b1085a6400898fc28f48d7de66b58}{hptiop\_release\_pci\_res\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01543}01543 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01544}01544         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01545}01545                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01546}01546                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01547}01547         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01548}01548                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01549}01549                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01550}01550 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01551}01551 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01552}\mbox{\hyperlink{hptiop_8c_a16ad0749cf769f4c8a0efac2232526dd}{01552}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a16ad0749cf769f4c8a0efac2232526dd}{hptiop\_release\_pci\_res\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01553}01553 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01554}01554         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01555}01555                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01556}01556                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01557}01557         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01558}01558                 bus\_release\_resource(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01559}01559                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01560}01560 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01561}01561 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01562}\mbox{\hyperlink{hptiop_8c_a209ba476bf8ae0c591f6dfe3b15ed627}{01562}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a209ba476bf8ae0c591f6dfe3b15ed627}{hptiop\_internal\_memalloc\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01563}01563 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01564}01564         \textcolor{keywordflow}{if} (bus\_dma\_tag\_create(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01565}01565                                 1,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01566}01566                                 0,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01567}01567                                 BUS\_SPACE\_MAXADDR\_32BIT,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01568}01568                                 BUS\_SPACE\_MAXADDR,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01569}01569                                 NULL, NULL,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01570}01570                                 0x800 -\/ 0x8,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01571}01571                                 1,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01572}01572                                 BUS\_SPACE\_MAXSIZE\_32BIT,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01573}01573                                 BUS\_DMA\_ALLOCNOW,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01574}01574                                 NULL,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01575}01575                                 NULL,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01576}01576                                 \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}})) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01577}01577                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}alloc ctlcfg\_dmat failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01578}01578                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01579}01579         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01580}01580 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01581}01581         \textcolor{keywordflow}{if} (bus\_dmamem\_alloc(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}, (\textcolor{keywordtype}{void} **)\&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01582}01582                 BUS\_DMA\_WAITOK | BUS\_DMA\_COHERENT,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01583}01583                 \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01584}01584                         device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01585}01585                                         \textcolor{stringliteral}{"{}bus\_dmamem\_alloc failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01586}01586                         bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01587}01587                         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01588}01588         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01589}01589 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01590}01590         \textcolor{keywordflow}{if} (bus\_dmamap\_load(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01591}01591                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01592}01592                         \mbox{\hyperlink{hptiop_8h_a187224a56fd52e6a2479cffeca48f86a}{MVIOP\_IOCTLCFG\_SIZE}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01593}01593                         \mbox{\hyperlink{hptiop_8c_a34f2ab765b22d8d0636539827de3842f}{hptiop\_mv\_map\_ctlcfg}}, hba, 0)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01594}01594                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}bus\_dmamap\_load failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01595}01595                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01596}01596                         bus\_dmamem\_free(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01597}01597                                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01598}01598                         bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01599}01599                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01600}01600                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01601}01601         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01602}01602 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01603}01603         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01604}01604 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01605}01605 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01606}\mbox{\hyperlink{hptiop_8c_ad3a3e7a385a11b1d853423e62b0616dd}{01606}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ad3a3e7a385a11b1d853423e62b0616dd}{hptiop\_internal\_memalloc\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01607}01607 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01608}01608         u\_int32\_t list\_count = \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(\mbox{\hyperlink{structhpt__iopmu__mvfrey_a504a6803bd6a8a1017f4bf4dda223cb0}{inbound\_conf\_ctl}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01609}01609 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01610}01610         list\_count >>= 16;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01611}01611 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01612}01612         \textcolor{keywordflow}{if} (list\_count == 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01613}01613                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01614}01614         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01615}01615 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01616}01616         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}} = list\_count;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01617}01617         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_aa0d68dde9dfd2e9de00b58bd9f78db3f}{internal\_mem\_size}} = 0x800}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01618}01618                                                         + list\_count * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structmvfrey__inlist__entry}{mvfrey\_inlist\_entry}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01619}01619                                                         + list\_count * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structmvfrey__outlist__entry}{mvfrey\_outlist\_entry}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01620}01620                                                         + sizeof(int);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01621}01621         \textcolor{keywordflow}{if} (bus\_dma\_tag\_create(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01622}01622                                 1,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01623}01623                                 0,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01624}01624                                 BUS\_SPACE\_MAXADDR\_32BIT,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01625}01625                                 BUS\_SPACE\_MAXADDR,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01626}01626                                 NULL, NULL,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01627}01627                                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_aa0d68dde9dfd2e9de00b58bd9f78db3f}{internal\_mem\_size}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01628}01628                                 1,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01629}01629                                 BUS\_SPACE\_MAXSIZE\_32BIT,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01630}01630                                 BUS\_DMA\_ALLOCNOW,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01631}01631                                 NULL,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01632}01632                                 NULL,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01633}01633                                 \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}})) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01634}01634                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}alloc ctlcfg\_dmat failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01635}01635                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01636}01636         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01637}01637 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01638}01638         \textcolor{keywordflow}{if} (bus\_dmamem\_alloc(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}, (\textcolor{keywordtype}{void} **)\&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01639}01639                 BUS\_DMA\_WAITOK | BUS\_DMA\_COHERENT,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01640}01640                 \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01641}01641                         device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01642}01642                                         \textcolor{stringliteral}{"{}bus\_dmamem\_alloc failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01643}01643                         bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01644}01644                         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01645}01645         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01646}01646 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01647}01647         \textcolor{keywordflow}{if} (bus\_dmamap\_load(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01648}01648                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01649}01649                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_aa0d68dde9dfd2e9de00b58bd9f78db3f}{internal\_mem\_size}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01650}01650                         \mbox{\hyperlink{hptiop_8c_a41c6f098ae3013a79bea622b49646472}{hptiop\_mvfrey\_map\_ctlcfg}}, hba, 0)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01651}01651                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}bus\_dmamap\_load failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01652}01652                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01653}01653                         bus\_dmamem\_free(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01654}01654                                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01655}01655                         bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01656}01656                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01657}01657                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01658}01658         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01659}01659 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01660}01660         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01661}01661 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01662}01662 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01663}\mbox{\hyperlink{hptiop_8c_ae49b0fcb2f6c0f47b673f0b3376e1839}{01663}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ae49b0fcb2f6c0f47b673f0b3376e1839}{hptiop\_internal\_memfree\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01664}01664         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01665}01665 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01666}01666 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01667}\mbox{\hyperlink{hptiop_8c_a0557ead7d59015c82a2096b7eabfc99f}{01667}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a0557ead7d59015c82a2096b7eabfc99f}{hptiop\_internal\_memfree\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01668}01668 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01669}01669         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01670}01670                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01671}01671                 bus\_dmamem\_free(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01672}01672                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01673}01673                 bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01674}01674         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01675}01675 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01676}01676         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01677}01677 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01678}01678 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01679}\mbox{\hyperlink{hptiop_8c_a829a5e1946561481ed8dd8771d66dc49}{01679}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a829a5e1946561481ed8dd8771d66dc49}{hptiop\_internal\_memfree\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01680}01680 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01681}01681         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01682}01682                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01683}01683                 bus\_dmamem\_free(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01684}01684                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01685}01685                 bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01686}01686         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01687}01687 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01688}01688         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01689}01689 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01690}01690 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01691}\mbox{\hyperlink{hptiop_8c_a8b904eccd30a37e7429c87a2512791d1}{01691}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a8b904eccd30a37e7429c87a2512791d1}{hptiop\_reset\_comm\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01692}01692 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01693}01693         u\_int32\_t i = 100;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01694}01694 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01695}01695         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4a61249246a52c728a4b5a1ce9c5fe75c9}{IOPMU\_INBOUND\_MSG0\_RESET\_COMM}}, 3000))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01696}01696                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01697}01697 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01698}01698         \textcolor{comment}{/* wait 100ms for MCU ready */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01699}01699         \textcolor{keywordflow}{while}(i-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01700}01700                 DELAY(1000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01701}01701         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01702}01702 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01703}01703         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(inbound\_base,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01704}01704                                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a1c735b868e0b5e3d54f362f800562d75}{inlist\_phy}} \& 0xffffffff);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01705}01705         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(inbound\_base\_high,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01706}01706                                                         (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a1c735b868e0b5e3d54f362f800562d75}{inlist\_phy}} >> 16) >> 16);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01707}01707 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01708}01708         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(outbound\_base,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01709}01709                                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a737874a3e50aeaa88aa88283f0cb2923}{outlist\_phy}} \& 0xffffffff);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01710}01710         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(outbound\_base\_high,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01711}01711                                                         (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a737874a3e50aeaa88aa88283f0cb2923}{outlist\_phy}} >> 16) >> 16);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01712}01712 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01713}01713         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(outbound\_shadow\_base,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01714}01714                                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_aedda6130a9d26ab911bf0781672ff23d}{outlist\_cptr\_phy}} \& 0xffffffff);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01715}01715         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(outbound\_shadow\_base\_high,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01716}01716                                                         (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_aedda6130a9d26ab911bf0781672ff23d}{outlist\_cptr\_phy}} >> 16) >> 16);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01717}01717 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01718}01718         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} = (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}} -\/ 1)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01719}01719                                                                 | \mbox{\hyperlink{hptiop_8h_aa18eef56905b1a3d0e9b2fb18408e5dc}{CL\_POINTER\_TOGGLE}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01720}01720         *hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_ad13dbdbca1e9980adec5a20b7a0c8cef}{outlist\_cptr}} = (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}} -\/ 1)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01721}01721                                                                 | \mbox{\hyperlink{hptiop_8h_aa18eef56905b1a3d0e9b2fb18408e5dc}{CL\_POINTER\_TOGGLE}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01722}01722         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a36bb216158864cdb28b725620a5551ce}{outlist\_rptr}} = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01723}01723         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01724}01724         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01725}01725 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01726}01726 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01727}01727 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01728}01728 \textcolor{comment}{ * CAM driver interface}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01729}01729 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01730}\mbox{\hyperlink{hptiop_8c_ae7e65aa6d157aa4fe77078088d008b48}{01730}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{hptiop_8c_ae7e65aa6d157aa4fe77078088d008b48}{driver\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01731}01731         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01732}01732         DEVMETHOD(device\_probe,     \mbox{\hyperlink{hptiop_8c_a286b040e8acd5dcbc5362fb63440cf3b}{hptiop\_probe}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01733}01733         DEVMETHOD(device\_attach,    \mbox{\hyperlink{hptiop_8c_a511e182131c7e2214829ca5192e6e5f1}{hptiop\_attach}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01734}01734         DEVMETHOD(device\_detach,    \mbox{\hyperlink{hptiop_8c_a0ab9f1a29b35e42f8d3ea0733f5b27b8}{hptiop\_detach}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01735}01735         DEVMETHOD(device\_shutdown,  \mbox{\hyperlink{hptiop_8c_a8e63219aa3c18ef2c73466bc944c16ee}{hptiop\_shutdown}}),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01736}01736         \{ 0, 0 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01737}01737 \};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01738}01738 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01739}\mbox{\hyperlink{hptiop_8c_a4cd4d9f929f3d27fd6c5e1afeecdf060}{01739}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structhptiop__adapter__ops}{hptiop\_adapter\_ops}} \mbox{\hyperlink{hptiop_8c_a4cd4d9f929f3d27fd6c5e1afeecdf060}{hptiop\_itl\_ops}} = \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01740}01740         .\mbox{\hyperlink{structhptiop__adapter__ops_ab450b25f8ae6774a87975b7b25f42bab}{family}}              = \mbox{\hyperlink{hptiop_8h_a051284e2ad6f5b036b7f2f65a67ca5d5acca2f8acb7ce054ddd99b4e30aa8c548}{INTEL\_BASED\_IOP}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01741}01741         .iop\_wait\_ready    = \mbox{\hyperlink{hptiop_8c_a299b74f2ff7b75b9bec9c9272faa8915}{hptiop\_wait\_ready\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01742}01742         .internal\_memalloc = 0,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01743}01743         .internal\_memfree  = \mbox{\hyperlink{hptiop_8c_ae49b0fcb2f6c0f47b673f0b3376e1839}{hptiop\_internal\_memfree\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01744}01744         .alloc\_pci\_res     = \mbox{\hyperlink{hptiop_8c_ac1928737064e27c186589f48c5e6e4ea}{hptiop\_alloc\_pci\_res\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01745}01745         .release\_pci\_res   = \mbox{\hyperlink{hptiop_8c_a1fd4674cdfa3f94e58a4ef888dae7dc5}{hptiop\_release\_pci\_res\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01746}01746         .enable\_intr       = \mbox{\hyperlink{hptiop_8c_a9dd8bc814795727303cf45b92f04abd5}{hptiop\_enable\_intr\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01747}01747         .disable\_intr      = \mbox{\hyperlink{hptiop_8c_a59e253c4995d8f05b69c3a44876872e8}{hptiop\_disable\_intr\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01748}01748         .get\_config        = \mbox{\hyperlink{hptiop_8c_ab51a59276d9ba0b5b5e4a63c50bbe5fd}{hptiop\_get\_config\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01749}01749         .set\_config        = \mbox{\hyperlink{hptiop_8c_ac0e006ae75ce54296e9ead5fd3d29c43}{hptiop\_set\_config\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01750}01750         .iop\_intr          = \mbox{\hyperlink{hptiop_8c_a13219fc8dd309f96f98dc3e51fe58aeb}{hptiop\_intr\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01751}01751         .post\_msg          = \mbox{\hyperlink{hptiop_8c_a462739f9e552e52901c016377e6df245}{hptiop\_post\_msg\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01752}01752         .post\_req          = \mbox{\hyperlink{hptiop_8c_a8bae415b466065a762e7a7c0f8424766}{hptiop\_post\_req\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01753}01753         .do\_ioctl          = \mbox{\hyperlink{hptiop_8c_a78c0de5f6c544ab7b8c55e677625c7ba}{hptiop\_do\_ioctl\_itl}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01754}01754         .reset\_comm        = 0,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01755}01755 \};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01756}01756 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01757}\mbox{\hyperlink{hptiop_8c_aa1f30f542337f479339c0a70a4bc207e}{01757}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structhptiop__adapter__ops}{hptiop\_adapter\_ops}} \mbox{\hyperlink{hptiop_8c_aa1f30f542337f479339c0a70a4bc207e}{hptiop\_mv\_ops}} = \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01758}01758         .\mbox{\hyperlink{structhptiop__adapter__ops_ab450b25f8ae6774a87975b7b25f42bab}{family}}              = \mbox{\hyperlink{hptiop_8h_a051284e2ad6f5b036b7f2f65a67ca5d5a226c71cf287259ffed91498f95eb68c8}{MV\_BASED\_IOP}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01759}01759         .iop\_wait\_ready    = \mbox{\hyperlink{hptiop_8c_a40de42cb3722c2470bb3f73fb536a0d7}{hptiop\_wait\_ready\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01760}01760         .internal\_memalloc = \mbox{\hyperlink{hptiop_8c_a209ba476bf8ae0c591f6dfe3b15ed627}{hptiop\_internal\_memalloc\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01761}01761         .internal\_memfree  = \mbox{\hyperlink{hptiop_8c_a0557ead7d59015c82a2096b7eabfc99f}{hptiop\_internal\_memfree\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01762}01762         .alloc\_pci\_res     = \mbox{\hyperlink{hptiop_8c_a212c07f85c7db9c376313b6518b4e313}{hptiop\_alloc\_pci\_res\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01763}01763         .release\_pci\_res   = \mbox{\hyperlink{hptiop_8c_aa63b1085a6400898fc28f48d7de66b58}{hptiop\_release\_pci\_res\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01764}01764         .enable\_intr       = \mbox{\hyperlink{hptiop_8c_a1330ecf6c46771922de8d3defd1d8c98}{hptiop\_enable\_intr\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01765}01765         .disable\_intr      = \mbox{\hyperlink{hptiop_8c_aeafc85fc1e6a0d0d600716f2f40a89cd}{hptiop\_disable\_intr\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01766}01766         .get\_config        = \mbox{\hyperlink{hptiop_8c_a061c3cc2a90681139950599ccd09eeac}{hptiop\_get\_config\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01767}01767         .set\_config        = \mbox{\hyperlink{hptiop_8c_a0ef2d9ab8d0f6bd4c179e9cef15cfb72}{hptiop\_set\_config\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01768}01768         .iop\_intr          = \mbox{\hyperlink{hptiop_8c_a7c98625a2f224fab65d56a2ce5a43c13}{hptiop\_intr\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01769}01769         .post\_msg          = \mbox{\hyperlink{hptiop_8c_a3181f2b2390256b878898adaae695537}{hptiop\_post\_msg\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01770}01770         .post\_req          = \mbox{\hyperlink{hptiop_8c_a07df6d93ea49f77abe7006fefed275a3}{hptiop\_post\_req\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01771}01771         .do\_ioctl          = \mbox{\hyperlink{hptiop_8c_a2b3b347d3ce7d4ac6783af1101a0ab5a}{hptiop\_do\_ioctl\_mv}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01772}01772         .reset\_comm        = 0,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01773}01773 \};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01774}01774 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01775}\mbox{\hyperlink{hptiop_8c_a59387814025faa962ae1e23c84cbcb15}{01775}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structhptiop__adapter__ops}{hptiop\_adapter\_ops}} \mbox{\hyperlink{hptiop_8c_a59387814025faa962ae1e23c84cbcb15}{hptiop\_mvfrey\_ops}} = \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01776}01776         .\mbox{\hyperlink{structhptiop__adapter__ops_ab450b25f8ae6774a87975b7b25f42bab}{family}}              = \mbox{\hyperlink{hptiop_8h_a051284e2ad6f5b036b7f2f65a67ca5d5a880455e055812027783378b30bef9e49}{MVFREY\_BASED\_IOP}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01777}01777         .iop\_wait\_ready    = \mbox{\hyperlink{hptiop_8c_a8b8ef7cf08e29538e41eea78fc6a3809}{hptiop\_wait\_ready\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01778}01778         .internal\_memalloc = \mbox{\hyperlink{hptiop_8c_ad3a3e7a385a11b1d853423e62b0616dd}{hptiop\_internal\_memalloc\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01779}01779         .internal\_memfree  = \mbox{\hyperlink{hptiop_8c_a829a5e1946561481ed8dd8771d66dc49}{hptiop\_internal\_memfree\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01780}01780         .alloc\_pci\_res     = \mbox{\hyperlink{hptiop_8c_ae0b69252ec33dcbaf1827bb77eb06495}{hptiop\_alloc\_pci\_res\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01781}01781         .release\_pci\_res   = \mbox{\hyperlink{hptiop_8c_a16ad0749cf769f4c8a0efac2232526dd}{hptiop\_release\_pci\_res\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01782}01782         .enable\_intr       = \mbox{\hyperlink{hptiop_8c_a0ae59a843e2a28b5ae42d3b5830d4733}{hptiop\_enable\_intr\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01783}01783         .disable\_intr      = \mbox{\hyperlink{hptiop_8c_acd1921b59d2e2a83c40778d17a6ec104}{hptiop\_disable\_intr\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01784}01784         .get\_config        = \mbox{\hyperlink{hptiop_8c_abcd8eb624758757cc636f2d780a99aec}{hptiop\_get\_config\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01785}01785         .set\_config        = \mbox{\hyperlink{hptiop_8c_a02d1bf021ed9a588a0921c3e022ffc5a}{hptiop\_set\_config\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01786}01786         .iop\_intr          = \mbox{\hyperlink{hptiop_8c_a04dbd22e34b962a8c36012c381e14870}{hptiop\_intr\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01787}01787         .post\_msg          = \mbox{\hyperlink{hptiop_8c_adb1de9166be83597df16788f3e5394fd}{hptiop\_post\_msg\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01788}01788         .post\_req          = \mbox{\hyperlink{hptiop_8c_ae62d2ff2e69bfe7ffb8aa1b3225e31fb}{hptiop\_post\_req\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01789}01789         .do\_ioctl          = \mbox{\hyperlink{hptiop_8c_a41915c7e08cc85d998e5238dbee8dd9a}{hptiop\_do\_ioctl\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01790}01790         .reset\_comm        = \mbox{\hyperlink{hptiop_8c_a8b904eccd30a37e7429c87a2512791d1}{hptiop\_reset\_comm\_mvfrey}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01791}01791 \};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01792}01792 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01793}\mbox{\hyperlink{hptiop_8c_aad5ddc9ef1d26c03d621dfb7f3e55bc5}{01793}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{hptiop_8c_aad5ddc9ef1d26c03d621dfb7f3e55bc5}{hptiop\_pci\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01794}01794         \mbox{\hyperlink{hptiop_8c_a233dee63f005c51abbc2253360a99ece}{driver\_name}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01795}01795         \mbox{\hyperlink{hptiop_8c_ae7e65aa6d157aa4fe77078088d008b48}{driver\_methods}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01796}01796         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01797}01797 \};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01798}01798 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01799}\mbox{\hyperlink{hptiop_8c_ac56c1fdceceeab164b56007c6507d065}{01799}} \mbox{\hyperlink{hptiop_8c_ac56c1fdceceeab164b56007c6507d065}{DRIVER\_MODULE}}(hptiop, pci, \mbox{\hyperlink{hptiop_8c_aad5ddc9ef1d26c03d621dfb7f3e55bc5}{hptiop\_pci\_driver}}, \mbox{\hyperlink{hptiop_8c_ad2ecf100a270ce4c5bf751ab74cd4840}{hptiop\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01800}\mbox{\hyperlink{hptiop_8c_a9a0aa401002259eb14992abb1d1a726b}{01800}} \mbox{\hyperlink{hptiop_8c_a9a0aa401002259eb14992abb1d1a726b}{MODULE\_DEPEND}}(hptiop, cam, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01801}01801 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01802}\mbox{\hyperlink{hptiop_8c_a286b040e8acd5dcbc5362fb63440cf3b}{01802}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a286b040e8acd5dcbc5362fb63440cf3b}{hptiop\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01803}01803 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01804}01804         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01805}01805         u\_int32\_t id;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01806}01806         \textcolor{keyword}{static} \textcolor{keywordtype}{char} buf[256];}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01807}01807         \textcolor{keywordtype}{int} sas = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01808}01808         \textcolor{keyword}{struct }\mbox{\hyperlink{structhptiop__adapter__ops}{hptiop\_adapter\_ops}} *ops;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01809}01809 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01810}01810         \textcolor{keywordflow}{if} (pci\_get\_vendor(dev) != 0x1103)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01811}01811                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01812}01812 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01813}01813         \textcolor{keywordtype}{id} = pci\_get\_device(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01814}01814 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01815}01815         \textcolor{keywordflow}{switch} (\textcolor{keywordtype}{id}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01816}01816                 \textcolor{keywordflow}{case} 0x4520:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01817}01817                 \textcolor{keywordflow}{case} 0x4521:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01818}01818                 \textcolor{keywordflow}{case} 0x4522:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01819}01819                         sas = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01820}01820                 \textcolor{keywordflow}{case} 0x3620:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01821}01821                 \textcolor{keywordflow}{case} 0x3622:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01822}01822                 \textcolor{keywordflow}{case} 0x3640:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01823}01823                         ops = \&\mbox{\hyperlink{hptiop_8c_a59387814025faa962ae1e23c84cbcb15}{hptiop\_mvfrey\_ops}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01824}01824                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01825}01825                 \textcolor{keywordflow}{case} 0x4210:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01826}01826                 \textcolor{keywordflow}{case} 0x4211:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01827}01827                 \textcolor{keywordflow}{case} 0x4310:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01828}01828                 \textcolor{keywordflow}{case} 0x4311:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01829}01829                 \textcolor{keywordflow}{case} 0x4320:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01830}01830                 \textcolor{keywordflow}{case} 0x4321:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01831}01831                 \textcolor{keywordflow}{case} 0x4322:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01832}01832                         sas = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01833}01833                 \textcolor{keywordflow}{case} 0x3220:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01834}01834                 \textcolor{keywordflow}{case} 0x3320:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01835}01835                 \textcolor{keywordflow}{case} 0x3410:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01836}01836                 \textcolor{keywordflow}{case} 0x3520:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01837}01837                 \textcolor{keywordflow}{case} 0x3510:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01838}01838                 \textcolor{keywordflow}{case} 0x3511:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01839}01839                 \textcolor{keywordflow}{case} 0x3521:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01840}01840                 \textcolor{keywordflow}{case} 0x3522:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01841}01841                 \textcolor{keywordflow}{case} 0x3530:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01842}01842                 \textcolor{keywordflow}{case} 0x3540:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01843}01843                 \textcolor{keywordflow}{case} 0x3560:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01844}01844                         ops = \&\mbox{\hyperlink{hptiop_8c_a4cd4d9f929f3d27fd6c5e1afeecdf060}{hptiop\_itl\_ops}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01845}01845                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01846}01846                 \textcolor{keywordflow}{case} 0x3020:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01847}01847                 \textcolor{keywordflow}{case} 0x3120:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01848}01848                 \textcolor{keywordflow}{case} 0x3122:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01849}01849                         ops = \&\mbox{\hyperlink{hptiop_8c_aa1f30f542337f479339c0a70a4bc207e}{hptiop\_mv\_ops}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01850}01850                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01851}01851                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01852}01852                         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01853}01853         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01854}01854 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01855}01855         device\_printf(dev, \textcolor{stringliteral}{"{}adapter at PCI \%d:\%d:\%d, IRQ \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01856}01856                 pci\_get\_bus(dev), pci\_get\_slot(dev),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01857}01857                 pci\_get\_function(dev), pci\_get\_irq(dev));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01858}01858 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01859}01859         sprintf(buf, \textcolor{stringliteral}{"{}RocketRAID \%x \%s Controller\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01860}01860                                 \textcolor{keywordtype}{id}, sas ? \textcolor{stringliteral}{"{}SAS"{}} : \textcolor{stringliteral}{"{}SATA"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01861}01861         device\_set\_desc\_copy(dev, buf);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01862}01862 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01863}01863         hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01864}01864         bzero(hba, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01865}01865         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}} = \mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01866}01866 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01867}01867         \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hba-\/>ops=\%p\(\backslash\)n"{}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01868}01868         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01869}01869 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01870}01870 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01871}\mbox{\hyperlink{hptiop_8c_a511e182131c7e2214829ca5192e6e5f1}{01871}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a511e182131c7e2214829ca5192e6e5f1}{hptiop\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01872}01872 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01873}01873         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01874}01874         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__get__config}{hpt\_iop\_request\_get\_config}}  iop\_config;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01875}01875         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__set__config}{hpt\_iop\_request\_set\_config}}  set\_config;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01876}01876         \textcolor{keywordtype}{int} rid = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01877}01877         \textcolor{keyword}{struct }cam\_devq *devq;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01878}01878         \textcolor{keyword}{struct }ccb\_setasync ccb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01879}01879         u\_int32\_t unit = device\_get\_unit(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01880}01880 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01881}01881         device\_printf(dev, \textcolor{stringliteral}{"{}\%d RocketRAID 3xxx/4xxx controller driver \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01882}01882                         unit, \mbox{\hyperlink{hptiop_8c_ac880efb9c4695be8b2cb389284d7180d}{driver\_version}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01883}01883 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01884}01884         \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: attach(\%d, \%d/\%d/\%d) ops=\%p\(\backslash\)n"{}}, unit,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01885}01885                 pci\_get\_bus(dev), pci\_get\_slot(dev),}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01886}01886                 pci\_get\_function(dev), hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01887}01887 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01888}01888         pci\_enable\_busmaster(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01889}01889         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}} = dev;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01890}01890         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae553598b60a21191b32dca1b52e50612}{pciunit}} = unit;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01891}01891 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01892}01892         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_ab46e9529425a2aec043b1bcfe83a4eee}{alloc\_pci\_res}}(hba))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01893}01893                 \textcolor{keywordflow}{return} ENXIO;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01894}01894 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01895}01895         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a274a52807b62113f33d5a9e9f6b94380}{iop\_wait\_ready}}(hba, 2000)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01896}01896                 device\_printf(dev, \textcolor{stringliteral}{"{}adapter is not ready\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01897}01897                 \textcolor{keywordflow}{goto} release\_pci\_res;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01898}01898         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01899}01899 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01900}01900         mtx\_init(\&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abe74dc60da621ae9f17688204b6ab1b8}{lock}}, \textcolor{stringliteral}{"{}hptioplock"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01901}01901 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01902}01902         \textcolor{keywordflow}{if} (bus\_dma\_tag\_create(bus\_get\_dma\_tag(dev),\textcolor{comment}{/* PCI parent */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01903}01903                         1,  \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01904}01904                         0, \textcolor{comment}{/* boundary */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01905}01905                         BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* lowaddr */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01906}01906                         BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* highaddr */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01907}01907                         NULL, NULL,         \textcolor{comment}{/* filter, filterarg */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01908}01908                         BUS\_SPACE\_MAXSIZE\_32BIT,    \textcolor{comment}{/* maxsize */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01909}01909                         BUS\_SPACE\_UNRESTRICTED, \textcolor{comment}{/* nsegments */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01910}01910                         BUS\_SPACE\_MAXSIZE\_32BIT,    \textcolor{comment}{/* maxsegsize */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01911}01911                         0,      \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01912}01912                         NULL,   \textcolor{comment}{/* lockfunc */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01913}01913                         NULL,       \textcolor{comment}{/* lockfuncarg */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01914}01914                         \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}}   \textcolor{comment}{/* tag */}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01915}01915         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01916}01916                 device\_printf(dev, \textcolor{stringliteral}{"{}alloc parent\_dmat failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01917}01917                 \textcolor{keywordflow}{goto} release\_pci\_res;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01918}01918         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01919}01919 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01920}01920         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_ab450b25f8ae6774a87975b7b25f42bab}{family}} == \mbox{\hyperlink{hptiop_8h_a051284e2ad6f5b036b7f2f65a67ca5d5a226c71cf287259ffed91498f95eb68c8}{MV\_BASED\_IOP}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01921}01921                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a230539099ec677b95fd18df3200522ab}{internal\_memalloc}}(hba)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01922}01922                         device\_printf(dev, \textcolor{stringliteral}{"{}alloc srb\_dmat failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01923}01923                         \textcolor{keywordflow}{goto} destroy\_parent\_tag;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01924}01924                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01925}01925         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01926}01926         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01927}01927         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a65673035b0484b7ce399f71dec25a31b}{get\_config}}(hba, \&iop\_config)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01928}01928                 device\_printf(dev, \textcolor{stringliteral}{"{}get iop config failed.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01929}01929                 \textcolor{keywordflow}{goto} get\_config\_failed;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01930}01930         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01931}01931 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01932}01932         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab841d537375e0ccd63e1f7b62c25264d}{firmware\_version}} = iop\_config.\mbox{\hyperlink{structhpt__iop__request__get__config_a28029b704c1b40b284960cafb1994c75}{firmware\_version}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01933}01933         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aad564436e8b8e1de05d63e6a72ff6369}{interface\_version}} = iop\_config.\mbox{\hyperlink{structhpt__iop__request__get__config_a27b90bbde9bf9eacc8c057555dc2980d}{interface\_version}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01934}01934         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a48b372f78699063e8a57cd7bb7806c91}{max\_requests}} = iop\_config.\mbox{\hyperlink{structhpt__iop__request__get__config_a87d8f9a5b3e506510b11a04e0f2cc6bc}{max\_requests}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01935}01935         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aaa33eb6bf09c94362703f4d343aec177}{max\_devices}} = iop\_config.\mbox{\hyperlink{structhpt__iop__request__get__config_a72b70aaff43ea411d0739c39d7409238}{max\_devices}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01936}01936         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af4bb2c5a8e0418021b0b4b6fadf2bb60}{max\_request\_size}} = iop\_config.\mbox{\hyperlink{structhpt__iop__request__get__config_a0a1169b3ea97d075e16ff4a3a9d60e55}{request\_size}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01937}01937         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae8418386fd855f4988ea5343fe48aef6}{max\_sg\_count}} = iop\_config.\mbox{\hyperlink{structhpt__iop__request__get__config_ac084e954ffe3192ff6ff49b797c10122}{max\_sg\_count}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01938}01938 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01939}01939         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_ab450b25f8ae6774a87975b7b25f42bab}{family}} == \mbox{\hyperlink{hptiop_8h_a051284e2ad6f5b036b7f2f65a67ca5d5a880455e055812027783378b30bef9e49}{MVFREY\_BASED\_IOP}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01940}01940                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a230539099ec677b95fd18df3200522ab}{internal\_memalloc}}(hba)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01941}01941                         device\_printf(dev, \textcolor{stringliteral}{"{}alloc srb\_dmat failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01942}01942                         \textcolor{keywordflow}{goto} destroy\_parent\_tag;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01943}01943                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01944}01944                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a25526f059d4624bc1c6ac62781a882f7}{reset\_comm}}(hba)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01945}01945                         device\_printf(dev, \textcolor{stringliteral}{"{}reset comm failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01946}01946                         \textcolor{keywordflow}{goto} get\_config\_failed;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01947}01947                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01948}01948         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01949}01949 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01950}01950         \textcolor{keywordflow}{if} (bus\_dma\_tag\_create(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}},\textcolor{comment}{/* parent */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01951}01951                         4,  \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01952}01952                         BUS\_SPACE\_MAXADDR\_32BIT+1, \textcolor{comment}{/* boundary */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01953}01953                         BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* lowaddr */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01954}01954                         BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* highaddr */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01955}01955                         NULL, NULL,         \textcolor{comment}{/* filter, filterarg */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01956}01956                         PAGE\_SIZE * (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae8418386fd855f4988ea5343fe48aef6}{max\_sg\_count}}-\/1),  \textcolor{comment}{/* maxsize */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01957}01957                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae8418386fd855f4988ea5343fe48aef6}{max\_sg\_count}},  \textcolor{comment}{/* nsegments */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01958}01958                         0x20000,    \textcolor{comment}{/* maxsegsize */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01959}01959                         BUS\_DMA\_ALLOCNOW,       \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01960}01960                         busdma\_lock\_mutex,  \textcolor{comment}{/* lockfunc */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01961}01961                         \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abe74dc60da621ae9f17688204b6ab1b8}{lock}},     \textcolor{comment}{/* lockfuncarg */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01962}01962                         \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}   \textcolor{comment}{/* tag */}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01963}01963         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01964}01964                 device\_printf(dev, \textcolor{stringliteral}{"{}alloc io\_dmat failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01965}01965                 \textcolor{keywordflow}{goto} get\_config\_failed;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01966}01966         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01967}01967 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01968}01968         \textcolor{keywordflow}{if} (bus\_dma\_tag\_create(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}},\textcolor{comment}{/* parent */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01969}01969                         1,  \textcolor{comment}{/* alignment */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01970}01970                         0, \textcolor{comment}{/* boundary */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01971}01971                         BUS\_SPACE\_MAXADDR\_32BIT,    \textcolor{comment}{/* lowaddr */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01972}01972                         BUS\_SPACE\_MAXADDR,  \textcolor{comment}{/* highaddr */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01973}01973                         NULL, NULL,         \textcolor{comment}{/* filter, filterarg */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01974}01974                         \mbox{\hyperlink{hptiop_8h_a4d9ca6e7527ebb62e24b3cd373475095}{HPT\_SRB\_MAX\_SIZE}} * \mbox{\hyperlink{hptiop_8h_ac60d3542d4775c219ede6abb4b895913}{HPT\_SRB\_MAX\_QUEUE\_SIZE}} + 0x20,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01975}01975                         1,  \textcolor{comment}{/* nsegments */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01976}01976                         BUS\_SPACE\_MAXSIZE\_32BIT,    \textcolor{comment}{/* maxsegsize */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01977}01977                         0,      \textcolor{comment}{/* flags */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01978}01978                         NULL,   \textcolor{comment}{/* lockfunc */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01979}01979                         NULL,       \textcolor{comment}{/* lockfuncarg */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01980}01980                         \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}}  \textcolor{comment}{/* tag */}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01981}01981         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01982}01982                 device\_printf(dev, \textcolor{stringliteral}{"{}alloc srb\_dmat failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01983}01983                 \textcolor{keywordflow}{goto} destroy\_io\_dmat;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01984}01984         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01985}01985 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01986}01986         \textcolor{keywordflow}{if} (bus\_dmamem\_alloc(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}}, (\textcolor{keywordtype}{void} **)\&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed75a081904581ead10fa8f1aa869903}{uncached\_ptr}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01987}01987                         BUS\_DMA\_WAITOK | BUS\_DMA\_COHERENT,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01988}01988                         \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a772507fc1c081e32c3cc1ad83426bcb9}{srb\_dmamap}}) != 0)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01989}01989         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01990}01990                 device\_printf(dev, \textcolor{stringliteral}{"{}srb bus\_dmamem\_alloc failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01991}01991                 \textcolor{keywordflow}{goto} destroy\_srb\_dmat;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01992}01992         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01993}01993 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01994}01994         \textcolor{keywordflow}{if} (bus\_dmamap\_load(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01995}01995                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a772507fc1c081e32c3cc1ad83426bcb9}{srb\_dmamap}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed75a081904581ead10fa8f1aa869903}{uncached\_ptr}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01996}01996                         (\mbox{\hyperlink{hptiop_8h_a4d9ca6e7527ebb62e24b3cd373475095}{HPT\_SRB\_MAX\_SIZE}} * \mbox{\hyperlink{hptiop_8h_ac60d3542d4775c219ede6abb4b895913}{HPT\_SRB\_MAX\_QUEUE\_SIZE}}) + 0x20,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01997}01997                         \mbox{\hyperlink{hptiop_8c_a5ec1b25890414d3b478b6b96b218f293}{hptiop\_map\_srb}}, hba, 0))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01998}01998         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l01999}01999                 device\_printf(dev, \textcolor{stringliteral}{"{}bus\_dmamap\_load failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02000}02000                 \textcolor{keywordflow}{goto} srb\_dmamem\_free;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02001}02001         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02002}02002 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02003}02003         \textcolor{keywordflow}{if} ((devq = cam\_simq\_alloc(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a48b372f78699063e8a57cd7bb7806c91}{max\_requests}} -\/ 1 )) == NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02004}02004                 device\_printf(dev, \textcolor{stringliteral}{"{}cam\_simq\_alloc failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02005}02005                 \textcolor{keywordflow}{goto} srb\_dmamap\_unload;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02006}02006         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02007}02007 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02008}02008         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}} = cam\_sim\_alloc(\mbox{\hyperlink{hptiop_8c_abd319b92f54d07d4ff3c0b2ff5daede0}{hptiop\_action}}, \mbox{\hyperlink{hptiop_8c_a01154a5a613bff8740b830654b7952b0}{hptiop\_poll}}, \mbox{\hyperlink{hptiop_8c_a233dee63f005c51abbc2253360a99ece}{driver\_name}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02009}02009                         hba, unit, \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_abe74dc60da621ae9f17688204b6ab1b8}{lock}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a48b372f78699063e8a57cd7bb7806c91}{max\_requests}} -\/ 1, 1, devq);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02010}02010         \textcolor{keywordflow}{if} (!hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02011}02011                 device\_printf(dev, \textcolor{stringliteral}{"{}cam\_sim\_alloc failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02012}02012                 cam\_simq\_free(devq);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02013}02013                 \textcolor{keywordflow}{goto} srb\_dmamap\_unload;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02014}02014         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02015}02015         \mbox{\hyperlink{hptiop_8h_a83b2e372546b54275d6807cb21c3ac11}{hptiop\_lock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02016}02016         \textcolor{keywordflow}{if} (xpt\_bus\_register(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}, dev, 0) != CAM\_SUCCESS)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02017}02017         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02018}02018                 device\_printf(dev, \textcolor{stringliteral}{"{}xpt\_bus\_register failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02019}02019                 \textcolor{keywordflow}{goto} free\_cam\_sim;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02020}02020         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02021}02021 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02022}02022         \textcolor{keywordflow}{if} (xpt\_create\_path(\&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af35e9f6a2e0a7b4a01bb19703215361a}{path}}, \textcolor{comment}{/*periph */} NULL,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02023}02023                         cam\_sim\_path(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}), CAM\_TARGET\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02024}02024                         CAM\_LUN\_WILDCARD) != CAM\_REQ\_CMP) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02025}02025                 device\_printf(dev, \textcolor{stringliteral}{"{}xpt\_create\_path failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02026}02026                 \textcolor{keywordflow}{goto} deregister\_xpt\_bus;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02027}02027         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02028}02028         \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02029}02029 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02030}02030         bzero(\&set\_config, \textcolor{keyword}{sizeof}(set\_config));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02031}02031         set\_config.\mbox{\hyperlink{structhpt__iop__request__set__config_ad5b9db8eb23bcc1e1a9eb1a61fc812c6}{iop\_id}} = unit;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02032}02032         set\_config.\mbox{\hyperlink{structhpt__iop__request__set__config_ab69831e9812f582e7001564b50eb770c}{vbus\_id}} = cam\_sim\_path(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02033}02033         set\_config.\mbox{\hyperlink{structhpt__iop__request__set__config_ac371bfa395d97c0972be3610ab83be7a}{max\_host\_request\_size}} = \mbox{\hyperlink{hptiop_8h_a9118fb6d19aea46813e830153759f7c1}{HPT\_SRB\_MAX\_REQ\_SIZE}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02034}02034 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02035}02035         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a3a76cda42a5d815e447827f30a003712}{set\_config}}(hba, \&set\_config)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02036}02036                 device\_printf(dev, \textcolor{stringliteral}{"{}set iop config failed.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02037}02037                 \textcolor{keywordflow}{goto} free\_hba\_path;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02038}02038         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02039}02039 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02040}02040         memset(\&ccb, 0, \textcolor{keyword}{sizeof}(ccb));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02041}02041         xpt\_setup\_ccb(\&ccb.ccb\_h, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af35e9f6a2e0a7b4a01bb19703215361a}{path}}, \textcolor{comment}{/*priority*/}5);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02042}02042         ccb.ccb\_h.func\_code = XPT\_SASYNC\_CB;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02043}02043         ccb.event\_enable = (AC\_FOUND\_DEVICE | AC\_LOST\_DEVICE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02044}02044         ccb.callback = \mbox{\hyperlink{hptiop_8c_accd0539257fec63cdbf39bbf3545357a}{hptiop\_async}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02045}02045         ccb.callback\_arg = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02046}02046         xpt\_action((\textcolor{keyword}{union} ccb *)\&ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02047}02047 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02048}02048         rid = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02049}02049         \textcolor{keywordflow}{if} ((hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a89b695c3e580c72d9c709c0ad26198ff}{irq\_res}} = bus\_alloc\_resource\_any(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02050}02050                         \&rid, RF\_SHAREABLE | RF\_ACTIVE)) == NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02051}02051                 device\_printf(dev, \textcolor{stringliteral}{"{}allocate irq failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02052}02052                 \textcolor{keywordflow}{goto} free\_hba\_path;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02053}02053         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02054}02054 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02055}02055         \textcolor{keywordflow}{if} (bus\_setup\_intr(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a89b695c3e580c72d9c709c0ad26198ff}{irq\_res}}, INTR\_TYPE\_CAM | INTR\_MPSAFE,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02056}02056                                 NULL, \mbox{\hyperlink{hptiop_8c_ab12ae96e159575efae6a33c30d5e4ac6}{hptiop\_pci\_intr}}, hba, \&hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a8514333e4d357b84da6b47afe5abdf0c}{irq\_handle}}))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02057}02057         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02058}02058                 device\_printf(dev, \textcolor{stringliteral}{"{}allocate intr function failed!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02059}02059                 \textcolor{keywordflow}{goto} free\_irq\_resource;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02060}02060         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02061}02061 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02062}02062         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02063}02063                         \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4acd2a8119a015b458ea08bceac3725271}{IOPMU\_INBOUND\_MSG0\_START\_BACKGROUND\_TASK}}, 5000)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02064}02064                 device\_printf(dev, \textcolor{stringliteral}{"{}fail to start background task\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02065}02065                 \textcolor{keywordflow}{goto} teartown\_irq\_resource;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02066}02066         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02067}02067 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02068}02068         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a9eaffaeb700c46d24d36f061a6799965}{enable\_intr}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02069}02069         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad291e684b6de84c07e3d82aae57aea7c}{initialized}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02070}02070 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02071}02071         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a08dcff8e673b473b78238921e31a4e50}{ioctl\_dev}} = make\_dev(\&\mbox{\hyperlink{hptiop_8c_a6d2aed3bb16582a2e3b462e7613fe2a9}{hptiop\_cdevsw}}, unit,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02072}02072                                 UID\_ROOT, GID\_WHEEL \textcolor{comment}{/*GID\_OPERATOR*/},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02073}02073                                 S\_IRUSR | S\_IWUSR, \textcolor{stringliteral}{"{}\%s\%d"{}}, \mbox{\hyperlink{hptiop_8c_a233dee63f005c51abbc2253360a99ece}{driver\_name}}, unit);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02074}02074 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02075}02075 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02076}02076         \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02077}02077 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02078}02078 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02079}02079 teartown\_irq\_resource:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02080}02080         bus\_teardown\_intr(dev, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a89b695c3e580c72d9c709c0ad26198ff}{irq\_res}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a8514333e4d357b84da6b47afe5abdf0c}{irq\_handle}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02081}02081 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02082}02082 free\_irq\_resource:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02083}02083         bus\_release\_resource(dev, SYS\_RES\_IRQ, 0, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a89b695c3e580c72d9c709c0ad26198ff}{irq\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02084}02084 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02085}02085         \mbox{\hyperlink{hptiop_8h_a83b2e372546b54275d6807cb21c3ac11}{hptiop\_lock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02086}02086 free\_hba\_path:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02087}02087         xpt\_free\_path(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af35e9f6a2e0a7b4a01bb19703215361a}{path}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02088}02088 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02089}02089 deregister\_xpt\_bus:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02090}02090         xpt\_bus\_deregister(cam\_sim\_path(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02091}02091 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02092}02092 free\_cam\_sim:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02093}02093         cam\_sim\_free(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}, \textcolor{comment}{/*free devq*/} TRUE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02094}02094         \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02095}02095 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02096}02096 srb\_dmamap\_unload:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02097}02097         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed75a081904581ead10fa8f1aa869903}{uncached\_ptr}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02098}02098                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a772507fc1c081e32c3cc1ad83426bcb9}{srb\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02099}02099 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02100}02100 srb\_dmamem\_free:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02101}02101         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed75a081904581ead10fa8f1aa869903}{uncached\_ptr}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02102}02102                 bus\_dmamem\_free(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02103}02103                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed75a081904581ead10fa8f1aa869903}{uncached\_ptr}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a772507fc1c081e32c3cc1ad83426bcb9}{srb\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02104}02104 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02105}02105 destroy\_srb\_dmat:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02106}02106         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02107}02107                 bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02108}02108 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02109}02109 destroy\_io\_dmat:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02110}02110         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02111}02111                 bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02112}02112 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02113}02113 get\_config\_failed:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02114}02114         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_a54f674d060f605e1fe683f47b3a43435}{internal\_memfree}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02115}02115 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02116}02116 destroy\_parent\_tag:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02117}02117         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02118}02118                 bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02119}02119 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02120}02120 release\_pci\_res:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02121}02121         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_ac0ebcf2bfedf4d16b42c0a6af4af6333}{release\_pci\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02122}02122                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_ac0ebcf2bfedf4d16b42c0a6af4af6333}{release\_pci\_res}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02123}02123 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02124}02124         \textcolor{keywordflow}{return} ENXIO;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02125}02125 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02126}02126 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02127}\mbox{\hyperlink{hptiop_8c_a0ab9f1a29b35e42f8d3ea0733f5b27b8}{02127}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a0ab9f1a29b35e42f8d3ea0733f5b27b8}{hptiop\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02128}02128 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02129}02129         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02130}02130         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02131}02131         \textcolor{keywordtype}{int} error = EBUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02132}02132 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02133}02133         \mbox{\hyperlink{hptiop_8h_a83b2e372546b54275d6807cb21c3ac11}{hptiop\_lock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02134}02134         \textcolor{keywordflow}{for} (i = 0; i < hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aaa33eb6bf09c94362703f4d343aec177}{max\_devices}}; i++)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02135}02135                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_ad51c9dd74d0df49c6504f6ca1559ab14}{hptiop\_os\_query\_remove\_device}}(hba, i)) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02136}02136                         device\_printf(dev, \textcolor{stringliteral}{"{}\%d file system is busy. id=\%d"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02137}02137                                                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae553598b60a21191b32dca1b52e50612}{pciunit}}, i);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02138}02138                         \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02139}02139                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02140}02140 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02141}02141         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{hptiop_8c_a8e63219aa3c18ef2c73466bc944c16ee}{hptiop\_shutdown}}(dev)) != 0)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02142}02142                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02143}02143         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02144}02144                 \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4ab8d259dc0983744763b6e64d84ac3b5d}{IOPMU\_INBOUND\_MSG0\_STOP\_BACKGROUND\_TASK}}, 60000))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02145}02145                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02146}02146         \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02147}02147 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02148}02148         \mbox{\hyperlink{hptiop_8c_a2d5b731e857f14aab6950ca1eae2ba01}{hptiop\_release\_resource}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02149}02149         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02150}02150 out:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02151}02151         \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02152}02152         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02153}02153 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02154}02154 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02155}\mbox{\hyperlink{hptiop_8c_a8e63219aa3c18ef2c73466bc944c16ee}{02155}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_a8e63219aa3c18ef2c73466bc944c16ee}{hptiop\_shutdown}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02156}02156 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02157}02157         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02158}02158 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02159}02159         \textcolor{keywordtype}{int} error = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02160}02160 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02161}02161         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a0a68d64270349b6298dc007ace698fdf}{flag}} \& \mbox{\hyperlink{hptiop_8h_a004c6cae8a04af235108d6fdd1ed3892}{HPT\_IOCTL\_FLAG\_OPEN}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02162}02162                 device\_printf(dev, \textcolor{stringliteral}{"{}\%d device is busy"{}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae553598b60a21191b32dca1b52e50612}{pciunit}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02163}02163                 \textcolor{keywordflow}{return} EBUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02164}02164         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02165}02165 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02166}02166         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_ab53a9e4c695b1e9eadf9c47d05c19567}{disable\_intr}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02167}02167 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02168}02168         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4aee99c098b041ed554fa03fb36d8185bb}{IOPMU\_INBOUND\_MSG0\_SHUTDOWN}}, 60000))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02169}02169                 error = EBUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02170}02170 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02171}02171         \textcolor{keywordflow}{return} error;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02172}02172 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02173}02173 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02174}\mbox{\hyperlink{hptiop_8c_ab12ae96e159575efae6a33c30d5e4ac6}{02174}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_ab12ae96e159575efae6a33c30d5e4ac6}{hptiop\_pci\_intr}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02175}02175 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02176}02176         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)arg;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02177}02177         \mbox{\hyperlink{hptiop_8h_a83b2e372546b54275d6807cb21c3ac11}{hptiop\_lock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02178}02178         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_abda9ee4d8c5697af115a5ce14cc42224}{iop\_intr}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02179}02179         \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02180}02180 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02181}02181 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02182}\mbox{\hyperlink{hptiop_8c_a01154a5a613bff8740b830654b7952b0}{02182}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a01154a5a613bff8740b830654b7952b0}{hptiop\_poll}}(\textcolor{keyword}{struct} cam\_sim *\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02183}02183 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02184}02184         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02185}02185 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02186}02186         hba = cam\_sim\_softc(\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02187}02187         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_abda9ee4d8c5697af115a5ce14cc42224}{iop\_intr}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02188}02188 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02189}02189 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02190}\mbox{\hyperlink{hptiop_8c_accd0539257fec63cdbf39bbf3545357a}{02190}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_accd0539257fec63cdbf39bbf3545357a}{hptiop\_async}}(\textcolor{keywordtype}{void} * callback\_arg, u\_int32\_t code,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02191}02191                                         \textcolor{keyword}{struct} cam\_path * \mbox{\hyperlink{structhpt__iop__hba_af35e9f6a2e0a7b4a01bb19703215361a}{path}}, \textcolor{keywordtype}{void} * arg)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02192}02192 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02193}02193 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02194}02194 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02195}\mbox{\hyperlink{hptiop_8c_a9dd8bc814795727303cf45b92f04abd5}{02195}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a9dd8bc814795727303cf45b92f04abd5}{hptiop\_enable\_intr\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02196}02196 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02197}02197         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_intmask,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02198}02198                 \string~(\mbox{\hyperlink{hptiop_8h_a2a3423948f5222aeabca28d2bfbad0b7}{IOPMU\_OUTBOUND\_INT\_POSTQUEUE}} | \mbox{\hyperlink{hptiop_8h_a3a5b2e6a36c2fa58e3cc436e681e1c5a}{IOPMU\_OUTBOUND\_INT\_MSG0}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02199}02199 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02200}02200 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02201}\mbox{\hyperlink{hptiop_8c_a1330ecf6c46771922de8d3defd1d8c98}{02201}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a1330ecf6c46771922de8d3defd1d8c98}{hptiop\_enable\_intr\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02202}02202 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02203}02203         u\_int32\_t int\_mask;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02204}02204 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02205}02205         int\_mask = \mbox{\hyperlink{hptiop_8c_a6996424934d7085df6b8fc161ce23103}{BUS\_SPACE\_RD4\_MV0}}(outbound\_intmask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02206}02206                         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02207}02207         int\_mask |= \mbox{\hyperlink{hptiop_8h_adb4fb4c0219e82a21793edaa884cc25b}{MVIOP\_MU\_OUTBOUND\_INT\_POSTQUEUE}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02208}02208                         | \mbox{\hyperlink{hptiop_8h_a5bd750c2936310ae0db9a04712b1c558}{MVIOP\_MU\_OUTBOUND\_INT\_MSG}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02209}02209         \mbox{\hyperlink{hptiop_8c_ac4513b5ce2febcb5d7f4cea03cfda7d1}{BUS\_SPACE\_WRT4\_MV0}}(outbound\_intmask,int\_mask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02210}02210 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02211}02211 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02212}\mbox{\hyperlink{hptiop_8c_a0ae59a843e2a28b5ae42d3b5830d4733}{02212}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a0ae59a843e2a28b5ae42d3b5830d4733}{hptiop\_enable\_intr\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02213}02213 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02214}02214         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(f0\_doorbell\_enable, \mbox{\hyperlink{hptiop_8h_a7b8596c9a1711cfa54ebfc0aadbe7c9a}{CPU\_TO\_F0\_DRBL\_MSG\_A\_BIT}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02215}02215         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(f0\_doorbell\_enable);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02216}02216 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02217}02217         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(isr\_enable, 0x1);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02218}02218         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(isr\_enable);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02219}02219 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02220}02220         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(pcie\_f0\_int\_enable, 0x1010);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02221}02221         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(pcie\_f0\_int\_enable);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02222}02222 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02223}02223 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02224}\mbox{\hyperlink{hptiop_8c_a59e253c4995d8f05b69c3a44876872e8}{02224}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a59e253c4995d8f05b69c3a44876872e8}{hptiop\_disable\_intr\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02225}02225 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02226}02226         u\_int32\_t int\_mask;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02227}02227 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02228}02228         int\_mask = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_intmask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02229}02229 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02230}02230         int\_mask |= \mbox{\hyperlink{hptiop_8h_a2a3423948f5222aeabca28d2bfbad0b7}{IOPMU\_OUTBOUND\_INT\_POSTQUEUE}} | \mbox{\hyperlink{hptiop_8h_a3a5b2e6a36c2fa58e3cc436e681e1c5a}{IOPMU\_OUTBOUND\_INT\_MSG0}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02231}02231         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(outbound\_intmask, int\_mask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02232}02232         \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(outbound\_intstatus);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02233}02233 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02234}02234 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02235}\mbox{\hyperlink{hptiop_8c_aeafc85fc1e6a0d0d600716f2f40a89cd}{02235}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_aeafc85fc1e6a0d0d600716f2f40a89cd}{hptiop\_disable\_intr\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02236}02236 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02237}02237         u\_int32\_t int\_mask;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02238}02238         int\_mask = \mbox{\hyperlink{hptiop_8c_a6996424934d7085df6b8fc161ce23103}{BUS\_SPACE\_RD4\_MV0}}(outbound\_intmask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02239}02239         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02240}02240         int\_mask \&= \string~(\mbox{\hyperlink{hptiop_8h_a5bd750c2936310ae0db9a04712b1c558}{MVIOP\_MU\_OUTBOUND\_INT\_MSG}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02241}02241                         | \mbox{\hyperlink{hptiop_8h_adb4fb4c0219e82a21793edaa884cc25b}{MVIOP\_MU\_OUTBOUND\_INT\_POSTQUEUE}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02242}02242         \mbox{\hyperlink{hptiop_8c_ac4513b5ce2febcb5d7f4cea03cfda7d1}{BUS\_SPACE\_WRT4\_MV0}}(outbound\_intmask,int\_mask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02243}02243         \mbox{\hyperlink{hptiop_8c_a6996424934d7085df6b8fc161ce23103}{BUS\_SPACE\_RD4\_MV0}}(outbound\_intmask);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02244}02244 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02245}02245 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02246}\mbox{\hyperlink{hptiop_8c_acd1921b59d2e2a83c40778d17a6ec104}{02246}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_acd1921b59d2e2a83c40778d17a6ec104}{hptiop\_disable\_intr\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02247}02247 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02248}02248         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(f0\_doorbell\_enable, 0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02249}02249         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(f0\_doorbell\_enable);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02250}02250 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02251}02251         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(isr\_enable, 0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02252}02252         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(isr\_enable);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02253}02253 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02254}02254         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(pcie\_f0\_int\_enable, 0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02255}02255         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(pcie\_f0\_int\_enable);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02256}02256 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02257}02257 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02258}\mbox{\hyperlink{hptiop_8c_a779d871219879cfa96b1e21ebb7f921a}{02258}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a779d871219879cfa96b1e21ebb7f921a}{hptiop\_reset\_adapter}}(\textcolor{keywordtype}{void} *argv)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02259}02259 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02260}02260         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)argv;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02261}02261         \textcolor{keywordflow}{if} (\mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4a5385621483349cf2bcf6e8ada83508c3}{IOPMU\_INBOUND\_MSG0\_RESET}}, 60000))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02262}02262                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02263}02263         \mbox{\hyperlink{hptiop_8c_a02029f49f447f618f56ab785d2a9f653}{hptiop\_send\_sync\_msg}}(hba, \mbox{\hyperlink{hptiop_8h_a81376c36938a6a130734e3ac9702ecf4acd2a8119a015b458ea08bceac3725271}{IOPMU\_INBOUND\_MSG0\_START\_BACKGROUND\_TASK}}, 5000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02264}02264 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02265}02265 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02266}\mbox{\hyperlink{hptiop_8c_aa3886f88344f47a4ddddfa2a4d4b5795}{02266}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} *\mbox{\hyperlink{hptiop_8c_aa3886f88344f47a4ddddfa2a4d4b5795}{hptiop\_get\_srb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02267}02267 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02268}02268         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} * srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02269}02269 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02270}02270         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a9483190b6a41e0ed2000ecd66b68ddfa}{srb\_list}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02271}02271                 srb = \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a9483190b6a41e0ed2000ecd66b68ddfa}{srb\_list}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02272}02272                 \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a9483190b6a41e0ed2000ecd66b68ddfa}{srb\_list}} = srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a11cc6e9e99dbe2e9545fdc20a847055b}{next}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02273}02273                 \textcolor{keywordflow}{return} srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02274}02274         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02275}02275 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02276}02276         \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02277}02277 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02278}02278 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02279}\mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{02279}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02280}02280 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02281}02281         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a11cc6e9e99dbe2e9545fdc20a847055b}{next}} = \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a9483190b6a41e0ed2000ecd66b68ddfa}{srb\_list}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02282}02282         \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a9483190b6a41e0ed2000ecd66b68ddfa}{srb\_list}} = srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02283}02283 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02284}02284 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02285}\mbox{\hyperlink{hptiop_8c_abd319b92f54d07d4ff3c0b2ff5daede0}{02285}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_abd319b92f54d07d4ff3c0b2ff5daede0}{hptiop\_action}}(\textcolor{keyword}{struct} cam\_sim *sim, \textcolor{keyword}{union} \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}} *\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02286}02286 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02287}02287         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)cam\_sim\_softc(\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02288}02288         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} * srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02289}02289         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02290}02290 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02291}02291         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccb\_h.func\_code) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02292}02292 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02293}02293         \textcolor{keywordflow}{case} XPT\_SCSI\_IO:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02294}02294                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccb\_h.target\_lun != 0 ||}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02295}02295                         \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccb\_h.target\_id >= \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_aaa33eb6bf09c94362703f4d343aec177}{max\_devices}} ||}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02296}02296                         (\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccb\_h.flags \& CAM\_CDB\_PHYS))}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02297}02297                 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02298}02298                         \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccb\_h.status = CAM\_TID\_INVALID;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02299}02299                         xpt\_done(\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02300}02300                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02301}02301                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02302}02302 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02303}02303                 \textcolor{keywordflow}{if} ((srb = \mbox{\hyperlink{hptiop_8c_aa3886f88344f47a4ddddfa2a4d4b5795}{hptiop\_get\_srb}}(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}})) == NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02304}02304                         device\_printf(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}srb allocated failed"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02305}02305                         \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccb\_h.status = CAM\_REQ\_CMP\_ERR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02306}02306                         xpt\_done(\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02307}02307                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02308}02308                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02309}02309 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02310}02310                 srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}} = \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02311}02311                 error = bus\_dmamap\_load\_ccb(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02312}02312                                             srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02313}02313                                             \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02314}02314                                             \mbox{\hyperlink{hptiop_8c_aa5cffd68f571912219ada0e54f0d1fd4}{hptiop\_post\_scsi\_command}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02315}02315                                             srb,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02316}02316                                             0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02317}02317 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02318}02318                 \textcolor{keywordflow}{if} (error \&\& error != EINPROGRESS) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02319}02319                         device\_printf(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02320}02320                                 \textcolor{stringliteral}{"{}\%d bus\_dmamap\_load error \%d"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02321}02321                                 \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_ae553598b60a21191b32dca1b52e50612}{pciunit}}, error);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02322}02322                         xpt\_freeze\_simq(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}, 1);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02323}02323                         \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccb\_h.status = CAM\_REQ\_CMP\_ERR;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02324}02324                         \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}, srb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02325}02325                         xpt\_done(\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02326}02326                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02327}02327                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02328}02328 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02329}02329                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02330}02330 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02331}02331         \textcolor{keywordflow}{case} XPT\_RESET\_BUS:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02332}02332                 device\_printf(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}reset adapter"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02333}02333                 \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a57062802270c571180e4c8ff29ebd271}{msg\_done}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02334}02334                 \mbox{\hyperlink{hptiop_8c_a779d871219879cfa96b1e21ebb7f921a}{hptiop\_reset\_adapter}}(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02335}02335                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02336}02336 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02337}02337         \textcolor{keywordflow}{case} XPT\_GET\_TRAN\_SETTINGS:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02338}02338         \textcolor{keywordflow}{case} XPT\_SET\_TRAN\_SETTINGS:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02339}02339                 \mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccb\_h.status = CAM\_FUNC\_NOTAVAIL;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02340}02340                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02341}02341 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02342}02342         \textcolor{keywordflow}{case} XPT\_CALC\_GEOMETRY:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02343}02343                 cam\_calc\_geometry(\&\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}}-\/>ccg, 1);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02344}02344                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02345}02345 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02346}02346         \textcolor{keywordflow}{case} XPT\_PATH\_INQ:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02347}02347         \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02348}02348                 \textcolor{keyword}{struct }ccb\_pathinq *cpi = \&ccb-\/>cpi;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02349}02349 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02350}02350                 cpi-\/>version\_num = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02351}02351                 cpi-\/>hba\_inquiry = PI\_SDTR\_ABLE;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02352}02352                 cpi-\/>target\_sprt = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02353}02353                 cpi-\/>hba\_misc = PIM\_NOBUSRESET;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02354}02354                 cpi-\/>hba\_eng\_cnt = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02355}02355                 cpi-\/>max\_target = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aaa33eb6bf09c94362703f4d343aec177}{max\_devices}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02356}02356                 cpi-\/>max\_lun = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02357}02357                 cpi-\/>unit\_number = cam\_sim\_unit(sim);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02358}02358                 cpi-\/>bus\_id = cam\_sim\_bus(sim);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02359}02359                 cpi-\/>initiator\_id = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aaa33eb6bf09c94362703f4d343aec177}{max\_devices}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02360}02360                 cpi-\/>base\_transfer\_speed = 3300;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02361}02361 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02362}02362                 strlcpy(cpi-\/>sim\_vid, \textcolor{stringliteral}{"{}FreeBSD"{}}, SIM\_IDLEN);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02363}02363                 strlcpy(cpi-\/>hba\_vid, \textcolor{stringliteral}{"{}HPT   "{}}, HBA\_IDLEN);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02364}02364                 strlcpy(cpi-\/>dev\_name, cam\_sim\_name(sim), DEV\_IDLEN);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02365}02365                 cpi-\/>transport = XPORT\_SPI;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02366}02366                 cpi-\/>transport\_version = 2;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02367}02367                 cpi-\/>protocol = PROTO\_SCSI;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02368}02368                 cpi-\/>protocol\_version = SCSI\_REV\_2;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02369}02369                 cpi-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02370}02370                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02371}02371         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02372}02372 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02373}02373         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02374}02374                 ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02375}02375                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02376}02376         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02377}02377 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02378}02378         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02379}02379         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02380}02380 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02381}02381 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02382}\mbox{\hyperlink{hptiop_8c_a8bae415b466065a762e7a7c0f8424766}{02382}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a8bae415b466065a762e7a7c0f8424766}{hptiop\_post\_req\_itl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02383}02383                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02384}02384                                 bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nsegs)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02385}02385 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02386}02386         \textcolor{keywordtype}{int} idx;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02387}02387         \textcolor{keyword}{union }ccb *ccb = srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02388}02388         u\_int8\_t *cdb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02389}02389 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02390}02390         \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.flags \& CAM\_CDB\_POINTER)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02391}02391                 cdb = ccb-\/>csio.cdb\_io.cdb\_ptr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02392}02392         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02393}02393                 cdb = ccb-\/>csio.cdb\_io.cdb\_bytes;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02394}02394 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02395}02395         \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}ccb=\%p \%x-\/\%x-\/\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02396}02396                 ccb, *(u\_int32\_t *)cdb, *((u\_int32\_t *)cdb+1), *((u\_int32\_t *)cdb+2)));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02397}02397 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02398}02398         \textcolor{keywordflow}{if} (srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a7eab7e26bbf9cad4a7c3f41f831cf28f}{srb\_flag}} \& \mbox{\hyperlink{hptiop_8h_a379b2bde2cf19cc8346b97764e5037f7}{HPT\_SRB\_FLAG\_HIGH\_MEM\_ACESS}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02399}02399                 u\_int32\_t iop\_req32;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02400}02400                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02401}02401 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02402}02402                 iop\_req32 = \mbox{\hyperlink{hptiop_8c_a93008d1daf4bed87c94be23ab807b0dc}{BUS\_SPACE\_RD4\_ITL}}(inbound\_queue);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02403}02403 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02404}02404                 \textcolor{keywordflow}{if} (iop\_req32 == \mbox{\hyperlink{hptiop_8h_a283df53d44ec2d4fa07d1d268ba947e9}{IOPMU\_QUEUE\_EMPTY}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02405}02405                         device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}invalid req offset\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02406}02406                         ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02407}02407                         bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02408}02408                         \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(hba, srb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02409}02409                         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02410}02410                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02411}02411                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02412}02412 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02413}02413                 \textcolor{keywordflow}{if} (ccb-\/>csio.dxfer\_len \&\& nsegs > 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02414}02414                         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}} *psg = req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_a76e59a91fb16d622a9d2f6f58b8c9bbc}{sg\_list}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02415}02415                         \textcolor{keywordflow}{for} (idx = 0; idx < nsegs; idx++, psg++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02416}02416                                 psg-\/>\mbox{\hyperlink{structhpt__iopsg_ae4757f944054d02004d2ff3a10bb596d}{pci\_address}} = (u\_int64\_t)segs[idx].ds\_addr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02417}02417                                 psg-\/>\mbox{\hyperlink{structhpt__iopsg_acd7900e6dc6f21d4e1fa8992881591da}{size}} = segs[idx].ds\_len;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02418}02418                                 psg-\/>\mbox{\hyperlink{structhpt__iopsg_adc86638f2e1f0cf56d039c8ec3b18e9b}{eot}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02419}02419                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02420}02420                         psg[-\/1].\mbox{\hyperlink{structhpt__iopsg_adc86638f2e1f0cf56d039c8ec3b18e9b}{eot}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02421}02421                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02422}02422 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02423}02423                 bcopy(cdb, req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_a86a9aba65b698f5c03666db5717e29ef}{cdb}}, ccb-\/>csio.cdb\_len);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02424}02424 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02425}02425                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} =}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02426}02426                                 \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}}, sg\_list)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02427}02427                                 + nsegs*\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02428}02428                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea2bd73ea3a1ceedafbb413146997f4624}{IOP\_REQUEST\_TYPE\_SCSI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02429}02429                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02430}02430                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02431}02431                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = (u\_int64\_t)(\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02432}02432                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}} = ccb-\/>csio.dxfer\_len;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02433}02433                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_a829198bcab5a6ffd95ab7a2c7c20dcd3}{channel}} =  0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02434}02434                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_a46b2486419493ab6231ab8bf5e2d50a8}{target}} =  ccb-\/>ccb\_h.target\_id;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02435}02435                 req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_a46434a11fe7b903fde75e8a76f582591}{lun}} =  ccb-\/>ccb\_h.target\_lun;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02436}02436 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02437}02437                 bus\_space\_write\_region\_1(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab40c57d48637a6e8bd74b9b118f0543e}{bar0t}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a1dde510e8a52d847b0871111652ac151}{bar0h}}, iop\_req32,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02438}02438                         (u\_int8\_t *)\&req, req.\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02439}02439 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02440}02440                 \textcolor{keywordflow}{if} ((ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) == CAM\_DIR\_IN) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02441}02441                         bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02442}02442                                 srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02443}02443                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02444}02444                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) == CAM\_DIR\_OUT)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02445}02445                         bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02446}02446                                 srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02447}02447 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02448}02448                 \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(inbound\_queue,iop\_req32);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02449}02449         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02450}02450                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02451}02451 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02452}02452                 req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *)srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02453}02453                 \textcolor{keywordflow}{if} (ccb-\/>csio.dxfer\_len \&\& nsegs > 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02454}02454                         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}} *psg = req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a76e59a91fb16d622a9d2f6f58b8c9bbc}{sg\_list}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02455}02455                         \textcolor{keywordflow}{for} (idx = 0; idx < nsegs; idx++, psg++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02456}02456                                 psg-\/>\mbox{\hyperlink{structhpt__iopsg_ae4757f944054d02004d2ff3a10bb596d}{pci\_address}} = }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02457}02457                                         (u\_int64\_t)segs[idx].ds\_addr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02458}02458                                 psg-\/>\mbox{\hyperlink{structhpt__iopsg_acd7900e6dc6f21d4e1fa8992881591da}{size}} = segs[idx].ds\_len;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02459}02459                                 psg-\/>\mbox{\hyperlink{structhpt__iopsg_adc86638f2e1f0cf56d039c8ec3b18e9b}{eot}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02460}02460                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02461}02461                         psg[-\/1].\mbox{\hyperlink{structhpt__iopsg_adc86638f2e1f0cf56d039c8ec3b18e9b}{eot}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02462}02462                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02463}02463 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02464}02464                 bcopy(cdb, req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a86a9aba65b698f5c03666db5717e29ef}{cdb}}, ccb-\/>csio.cdb\_len);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02465}02465 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02466}02466                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea2bd73ea3a1ceedafbb413146997f4624}{IOP\_REQUEST\_TYPE\_SCSI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02467}02467                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02468}02468                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}} = ccb-\/>csio.dxfer\_len;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02469}02469                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a829198bcab5a6ffd95ab7a2c7c20dcd3}{channel}} =  0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02470}02470                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a46b2486419493ab6231ab8bf5e2d50a8}{target}} =  ccb-\/>ccb\_h.target\_id;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02471}02471                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a46434a11fe7b903fde75e8a76f582591}{lun}} =  ccb-\/>ccb\_h.target\_lun;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02472}02472                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} =}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02473}02473                         \mbox{\hyperlink{hptiop_8h_a636c8c2b2cdfdea90d5007e9932eb17c}{offsetof}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}}, sg\_list)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02474}02474                         + nsegs*\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02475}02475                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = (u\_int64\_t)srb-\/>\mbox{\hyperlink{structhpt__iop__srb_ad40e355523aeb3bcc59052cf0d95a7ad}{index}} |}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02476}02476                                                 \mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02477}02477                 req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a022be7800a09b509ad416b14bb47f755}{IOP\_REQUEST\_FLAG\_OUTPUT\_CONTEXT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02478}02478 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02479}02479                 if ((ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) == CAM\_DIR\_IN) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02480}02480                         bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02481}02481                                 srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02482}02482                 \}\textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) == CAM\_DIR\_OUT) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02483}02483                         bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02484}02484                                 srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02485}02485                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02486}02486 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02487}02487                 \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ab841d537375e0ccd63e1f7b62c25264d}{firmware\_version}} > 0x01020000}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02488}02488                         || hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aad564436e8b8e1de05d63e6a72ff6369}{interface\_version}} > 0x01020000) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02489}02489                         u\_int32\_t size\_bits;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02490}02490 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02491}02491                         \textcolor{keywordflow}{if} (req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} < 256)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02492}02492                                 size\_bits = \mbox{\hyperlink{hptiop_8h_ac355dfe15d12063d73448af85e6a69e9}{IOPMU\_QUEUE\_REQUEST\_SIZE\_BIT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02493}02493                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} < 512)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02494}02494                                 size\_bits = \mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02495}02495                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02496}02496                                 size\_bits = \mbox{\hyperlink{hptiop_8h_ac355dfe15d12063d73448af85e6a69e9}{IOPMU\_QUEUE\_REQUEST\_SIZE\_BIT}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02497}02497                                                 | \mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02498}02498 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02499}02499                         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(inbound\_queue,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02500}02500                                 (u\_int32\_t)srb-\/>\mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}} | size\_bits);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02501}02501                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02502}02502                         \mbox{\hyperlink{hptiop_8c_a3699192d1ae01a5b1c9aa436720e96fe}{BUS\_SPACE\_WRT4\_ITL}}(inbound\_queue, (u\_int32\_t)srb-\/>\mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02503}02503                                 |\mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02504}02504         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02505}02505 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02506}02506 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02507}\mbox{\hyperlink{hptiop_8c_a07df6d93ea49f77abe7006fefed275a3}{02507}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a07df6d93ea49f77abe7006fefed275a3}{hptiop\_post\_req\_mv}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02508}02508                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02509}02509                                 bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nsegs)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02510}02510 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02511}02511         \textcolor{keywordtype}{int} idx, \mbox{\hyperlink{structhpt__iopsg_acd7900e6dc6f21d4e1fa8992881591da}{size}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02512}02512         \textcolor{keyword}{union }ccb *ccb = srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02513}02513         u\_int8\_t *cdb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02514}02514         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02515}02515         u\_int64\_t req\_phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02516}02516 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02517}02517         req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *)srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02518}02518         req\_phy = srb-\/>\mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02519}02519 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02520}02520         \textcolor{keywordflow}{if} (ccb-\/>csio.dxfer\_len \&\& nsegs > 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02521}02521                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}} *psg = req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a76e59a91fb16d622a9d2f6f58b8c9bbc}{sg\_list}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02522}02522                 \textcolor{keywordflow}{for} (idx = 0; idx < nsegs; idx++, psg++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02523}02523                         psg-\/>\mbox{\hyperlink{structhpt__iopsg_ae4757f944054d02004d2ff3a10bb596d}{pci\_address}} = (u\_int64\_t)segs[idx].ds\_addr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02524}02524                         psg-\/>\mbox{\hyperlink{structhpt__iopsg_acd7900e6dc6f21d4e1fa8992881591da}{size}} = segs[idx].ds\_len;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02525}02525                         psg-\/>\mbox{\hyperlink{structhpt__iopsg_adc86638f2e1f0cf56d039c8ec3b18e9b}{eot}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02526}02526                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02527}02527                 psg[-\/1].\mbox{\hyperlink{structhpt__iopsg_adc86638f2e1f0cf56d039c8ec3b18e9b}{eot}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02528}02528         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02529}02529         \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.flags \& CAM\_CDB\_POINTER)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02530}02530                 cdb = ccb-\/>csio.cdb\_io.cdb\_ptr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02531}02531         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02532}02532                 cdb = ccb-\/>csio.cdb\_io.cdb\_bytes;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02533}02533 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02534}02534         bcopy(cdb, req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a86a9aba65b698f5c03666db5717e29ef}{cdb}}, ccb-\/>csio.cdb\_len);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02535}02535         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea2bd73ea3a1ceedafbb413146997f4624}{IOP\_REQUEST\_TYPE\_SCSI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02536}02536         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02537}02537         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}} = ccb-\/>csio.dxfer\_len;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02538}02538         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a829198bcab5a6ffd95ab7a2c7c20dcd3}{channel}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02539}02539         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a46b2486419493ab6231ab8bf5e2d50a8}{target}} =  ccb-\/>ccb\_h.target\_id;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02540}02540         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a46434a11fe7b903fde75e8a76f582591}{lun}} =  ccb-\/>ccb\_h.target\_lun;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02541}02541         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02542}02542                                 -\/ sizeof(struct \mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02543}02543                                 + nsegs * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02544}02544         \textcolor{keywordflow}{if} ((ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) == CAM\_DIR\_IN) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02545}02545                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02546}02546                         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02547}02547         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02548}02548         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) == CAM\_DIR\_OUT)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02549}02549                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02550}02550                         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02551}02551         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = (u\_int64\_t)srb-\/>\mbox{\hyperlink{structhpt__iop__srb_ad40e355523aeb3bcc59052cf0d95a7ad}{index}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02552}02552                                         << \mbox{\hyperlink{hptiop_8h_a9c7b953397bd6d59bfa582331b6e43ad}{MVIOP\_REQUEST\_NUMBER\_START\_BIT}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02553}02553                                         | \mbox{\hyperlink{hptiop_8h_a44309c791e627467b04b661bd077e6e1}{MVIOP\_CMD\_TYPE\_SCSI}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02554}02554         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a022be7800a09b509ad416b14bb47f755}{IOP\_REQUEST\_FLAG\_OUTPUT\_CONTEXT}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02555}02555         \mbox{\hyperlink{structhpt__iopsg_acd7900e6dc6f21d4e1fa8992881591da}{size}} = req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} >> 8;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02556}02556         \mbox{\hyperlink{hptiop_8c_a45f4092bb9ec1d9cb545dece7ffd2002}{hptiop\_mv\_inbound\_write}}(req\_phy}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02557}02557                         | \mbox{\hyperlink{hptiop_8h_a29c36a52a32cbdd04c6256480c1fa38a}{MVIOP\_MU\_QUEUE\_ADDR\_HOST\_BIT}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02558}02558                         | imin(3, \mbox{\hyperlink{structhpt__iopsg_acd7900e6dc6f21d4e1fa8992881591da}{size}}), hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02559}02559 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02560}02560 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02561}\mbox{\hyperlink{hptiop_8c_ae62d2ff2e69bfe7ffb8aa1b3225e31fb}{02561}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_ae62d2ff2e69bfe7ffb8aa1b3225e31fb}{hptiop\_post\_req\_mvfrey}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02562}02562                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02563}02563                                 bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nsegs)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02564}02564 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02565}02565         \textcolor{keywordtype}{int} idx, index;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02566}02566         \textcolor{keyword}{union }ccb *ccb = srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02567}02567         u\_int8\_t *cdb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02568}02568         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *req;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02569}02569         u\_int64\_t req\_phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02570}02570 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02571}02571         req = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}} *)srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02572}02572         req\_phy = srb-\/>\mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02573}02573 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02574}02574         \textcolor{keywordflow}{if} (ccb-\/>csio.dxfer\_len \&\& nsegs > 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02575}02575                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}} *psg = req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a76e59a91fb16d622a9d2f6f58b8c9bbc}{sg\_list}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02576}02576                 \textcolor{keywordflow}{for} (idx = 0; idx < nsegs; idx++, psg++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02577}02577                         psg-\/>\mbox{\hyperlink{structhpt__iopsg_ae4757f944054d02004d2ff3a10bb596d}{pci\_address}} = (u\_int64\_t)segs[idx].ds\_addr | 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02578}02578                         psg-\/>\mbox{\hyperlink{structhpt__iopsg_acd7900e6dc6f21d4e1fa8992881591da}{size}} = segs[idx].ds\_len;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02579}02579                         psg-\/>\mbox{\hyperlink{structhpt__iopsg_adc86638f2e1f0cf56d039c8ec3b18e9b}{eot}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02580}02580                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02581}02581                 psg[-\/1].\mbox{\hyperlink{structhpt__iopsg_adc86638f2e1f0cf56d039c8ec3b18e9b}{eot}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02582}02582         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02583}02583         \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.flags \& CAM\_CDB\_POINTER)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02584}02584                 cdb = ccb-\/>csio.cdb\_io.cdb\_ptr;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02585}02585         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02586}02586                 cdb = ccb-\/>csio.cdb\_io.cdb\_bytes;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02587}02587 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02588}02588         bcopy(cdb, req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a86a9aba65b698f5c03666db5717e29ef}{cdb}}, ccb-\/>csio.cdb\_len);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02589}02589         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} = \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea2bd73ea3a1ceedafbb413146997f4624}{IOP\_REQUEST\_TYPE\_SCSI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02590}02590         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_abc691d4e5784f0b8047fe84d3fff2f0c}{result}} = \mbox{\hyperlink{hptiop_8h_ac69b76ec040cd7e0fc7425f1b10ddebea28c2ce9f3bb085599d602431d994e554}{IOP\_RESULT\_PENDING}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02591}02591         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a07b2e82db8b29fe1df7a69e943015256}{dataxfer\_length}} = ccb-\/>csio.dxfer\_len;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02592}02592         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a829198bcab5a6ffd95ab7a2c7c20dcd3}{channel}} = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02593}02593         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a46b2486419493ab6231ab8bf5e2d50a8}{target}} = ccb-\/>ccb\_h.target\_id;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02594}02594         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_a46434a11fe7b903fde75e8a76f582591}{lun}} = ccb-\/>ccb\_h.target\_lun;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02595}02595         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__request__scsi__command}{hpt\_iop\_request\_scsi\_command}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02596}02596                                 -\/ sizeof(struct \mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02597}02597                                 + nsegs * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iopsg}{hpt\_iopsg}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02598}02598         \textcolor{keywordflow}{if} ((ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) == CAM\_DIR\_IN) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02599}02599                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02600}02600                         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02601}02601         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02602}02602         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ccb-\/>ccb\_h.flags \& CAM\_DIR\_MASK) == CAM\_DIR\_OUT)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02603}02603                 bus\_dmamap\_sync(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02604}02604                         srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}}, BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02605}02605 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02606}02606         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a6705d535e141785806e0c4af285e8498}{flags}} = \mbox{\hyperlink{hptiop_8h_a022be7800a09b509ad416b14bb47f755}{IOP\_REQUEST\_FLAG\_OUTPUT\_CONTEXT}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02607}02607                                                 | \mbox{\hyperlink{hptiop_8h_a2f87167873ace8ea3bd7ef96269c592b}{IOP\_REQUEST\_FLAG\_ADDR\_BITS}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02608}02608                                                 | ((req\_phy >> 16) \& 0xffff0000);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02609}02609         req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a2ae8db8ea86704a05bf76e02a802caf5}{context}} = ((req\_phy \& 0xffffffff) << 32 )}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02610}02610                                                 | srb-\/>\mbox{\hyperlink{structhpt__iop__srb_ad40e355523aeb3bcc59052cf0d95a7ad}{index}} << 4}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02611}02611                                                 | \mbox{\hyperlink{hptiop_8h_a343d56ebce42c639dfa3dbe95c6873ff}{IOPMU\_QUEUE\_ADDR\_HOST\_BIT}} | req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02612}02612 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02613}02613         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}}++;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02614}02614         index = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \& 0x3fff;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02615}02615 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02616}02616         \textcolor{keywordflow}{if} (index == hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02617}02617                 index = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02618}02618                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \&= \string~0x3fff;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02619}02619                 hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}} \string^= \mbox{\hyperlink{hptiop_8h_aa18eef56905b1a3d0e9b2fb18408e5dc}{CL\_POINTER\_TOGGLE}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02620}02620         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02621}02621 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02622}02622         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a830c7050d573bee1cd75a0d62dc1801e}{inlist}}[index].\mbox{\hyperlink{structmvfrey__inlist__entry_a63102365a7c0d43838170dbd0702779d}{addr}} = req\_phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02623}02623         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a830c7050d573bee1cd75a0d62dc1801e}{inlist}}[index].\mbox{\hyperlink{structmvfrey__inlist__entry_a70ed61b1fe374bf14cdedd387833229d}{intrfc\_len}} = (req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_a19f2232450b8f6c3e5f664b9aa5cec1f}{size}} + 3) / 4;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02624}02624 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02625}02625         \mbox{\hyperlink{hptiop_8c_adbab6b098ab983c639be1a4a1d1a9b6e}{BUS\_SPACE\_WRT4\_MVFREY2}}(inbound\_write\_ptr, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a5f04fb5c249d047f5d58bd305f5b146b}{inlist\_wptr}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02626}02626         \mbox{\hyperlink{hptiop_8c_a0fc601b8735e0c5e85232c1604f6e34b}{BUS\_SPACE\_RD4\_MVFREY2}}(inbound\_write\_ptr);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02627}02627 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02628}02628         \textcolor{keywordflow}{if} (req-\/>\mbox{\hyperlink{structhpt__iop__request__scsi__command_af995eaa8413797e459152cc0dfa8e95b}{header}}.\mbox{\hyperlink{structhpt__iop__request__header_ab411688cc1b6db71b78f8d56e779c8cb}{type}} == \mbox{\hyperlink{hptiop_8h_abf3be755b5b29ac2b7f4189eb62d974ea2bd73ea3a1ceedafbb413146997f4624}{IOP\_REQUEST\_TYPE\_SCSI\_COMMAND}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02629}02629                 callout\_reset(\&srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a3d8f13da89070461946bb931eb462ebe}{timeout}}, 20 * hz, \mbox{\hyperlink{hptiop_8c_a779d871219879cfa96b1e21ebb7f921a}{hptiop\_reset\_adapter}}, hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02630}02630         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02631}02631 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02632}02632 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02633}\mbox{\hyperlink{hptiop_8c_a7ac25bbd4618b70feeda470a6cbeb4c2}{02633}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_aa5cffd68f571912219ada0e54f0d1fd4}{hptiop\_post\_scsi\_command}}(\textcolor{keywordtype}{void} *arg, bus\_dma\_segment\_t *segs,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02634}02634                                         \textcolor{keywordtype}{int} nsegs, \textcolor{keywordtype}{int} error)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02635}02635 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02636}02636         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *)arg;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02637}02637         \textcolor{keyword}{union }ccb *ccb = srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a1a4ed454a9f5fa09926d17cfc420c933}{ccb}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02638}02638         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba = \mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}-\/>\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02639}02639 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02640}02640         \textcolor{keywordflow}{if} (error || nsegs > hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae8418386fd855f4988ea5343fe48aef6}{max\_sg\_count}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02641}02641                 \mbox{\hyperlink{hptiop_8h_a133ce0e6493302ec03be196ebc1ca36e}{KdPrint}}((\textcolor{stringliteral}{"{}hptiop: func\_code=\%x tid=\%x lun=\%jx nsegs=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02642}02642                         ccb-\/>ccb\_h.func\_code,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02643}02643                         ccb-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02644}02644                         (uintmax\_t)ccb-\/>ccb\_h.target\_lun, nsegs));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02645}02645                 ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02646}02646                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, \mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02647}02647                 \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(hba, \mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02648}02648                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02649}02649                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02650}02650         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02651}02651 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02652}02652         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a7cac0e9a084ded7b99f5b00037dcaed9}{ops}}-\/>\mbox{\hyperlink{structhptiop__adapter__ops_ae63966c64e4c23fea38b84b63fc16537}{post\_req}}(hba, \mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}, segs, nsegs);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02653}02653 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02654}02654 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02655}\mbox{\hyperlink{hptiop_8c_a72a5a91bfc36e60adb2f040157db2832}{02655}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a34f2ab765b22d8d0636539827de3842f}{hptiop\_mv\_map\_ctlcfg}}(\textcolor{keywordtype}{void} *arg, bus\_dma\_segment\_t *segs,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02656}02656                                 \textcolor{keywordtype}{int} nsegs, \textcolor{keywordtype}{int} error)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02657}02657 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02658}02658         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)arg;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02659}02659         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad590f540fdf40e4055a14741f2c369bf}{ctlcfgcmd\_phy}} = ((u\_int64\_t)segs-\/>ds\_addr + 0x1F) }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02660}02660                                 \& \string~(u\_int64\_t)0x1F;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02661}02661         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}} = (u\_int8\_t *)(((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}} + 0x1F)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02662}02662                                 \& \string~0x1F);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02663}02663 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02664}02664 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02665}\mbox{\hyperlink{hptiop_8c_ab893748b4eeec0c5f963ed7319aed872}{02665}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a41c6f098ae3013a79bea622b49646472}{hptiop\_mvfrey\_map\_ctlcfg}}(\textcolor{keywordtype}{void} *arg, bus\_dma\_segment\_t *segs,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02666}02666                                 \textcolor{keywordtype}{int} nsegs, \textcolor{keywordtype}{int} error)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02667}02667 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02668}02668         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)arg;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02669}02669         \textcolor{keywordtype}{char} *p;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02670}02670         u\_int64\_t phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02671}02671         u\_int32\_t \mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}} = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a81ec5455069733ab8f13c4c28f9a1f11}{list\_count}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02672}02672 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02673}02673         phy = ((u\_int64\_t)segs-\/>ds\_addr + 0x1F) }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02674}02674                                 \& \string~(u\_int64\_t)0x1F;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02675}02675         p = (u\_int8\_t *)(((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}} + 0x1F)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02676}02676                                 \& \string~0x1F);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02677}02677         }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02678}02678         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ad590f540fdf40e4055a14741f2c369bf}{ctlcfgcmd\_phy}} = phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02679}02679         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}} = p;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02680}02680 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02681}02681         p += 0x800;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02682}02682         phy += 0x800;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02683}02683 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02684}02684         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a830c7050d573bee1cd75a0d62dc1801e}{inlist}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structmvfrey__inlist__entry}{mvfrey\_inlist\_entry}} *)p;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02685}02685         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a1c735b868e0b5e3d54f362f800562d75}{inlist\_phy}} = phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02686}02686 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02687}02687         p += list\_count * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structmvfrey__inlist__entry}{mvfrey\_inlist\_entry}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02688}02688         phy += list\_count * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structmvfrey__inlist__entry}{mvfrey\_inlist\_entry}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02689}02689 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02690}02690         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a6e3f70cba2b70a607840e0e086fa4e4c}{outlist}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structmvfrey__outlist__entry}{mvfrey\_outlist\_entry}} *)p;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02691}02691         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_a737874a3e50aeaa88aa88283f0cb2923}{outlist\_phy}} = phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02692}02692 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02693}02693         p += list\_count * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structmvfrey__outlist__entry}{mvfrey\_outlist\_entry}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02694}02694         phy += list\_count * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structmvfrey__outlist__entry}{mvfrey\_outlist\_entry}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02695}02695 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02696}02696         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_ad13dbdbca1e9980adec5a20b7a0c8cef}{outlist\_cptr}} = (u\_int32\_t *)p;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02697}02697         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ac1fa8c37cbbbee93041a1cb5d4659371}{u}}.\mbox{\hyperlink{structhpt__iop__hba_a643ba455e7a9fa8495cb2021536dd785}{mvfrey}}.\mbox{\hyperlink{structhpt__iop__hba_aedda6130a9d26ab911bf0781672ff23d}{outlist\_cptr\_phy}} = phy;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02698}02698 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02699}02699 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02700}\mbox{\hyperlink{hptiop_8c_a38569d4d48fdf066a69a9ba3720691bb}{02700}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a5ec1b25890414d3b478b6b96b218f293}{hptiop\_map\_srb}}(\textcolor{keywordtype}{void} *arg, bus\_dma\_segment\_t *segs,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02701}02701                                 \textcolor{keywordtype}{int} nsegs, \textcolor{keywordtype}{int} error)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02702}02702 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02703}02703         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * hba = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *)arg;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02704}02704         bus\_addr\_t phy\_addr = (segs-\/>ds\_addr + 0x1F) \& \string~(bus\_addr\_t)0x1F;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02705}02705         \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb, *tmp\_srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02706}02706         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02707}02707 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02708}02708         \textcolor{keywordflow}{if} (error || nsegs == 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02709}02709                 device\_printf(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}hptiop\_map\_srb error"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02710}02710                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02711}02711         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02712}02712 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02713}02713         \textcolor{comment}{/* map srb */}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02714}02714         srb = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02715}02715                 (((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_aed75a081904581ead10fa8f1aa869903}{uncached\_ptr}} + 0x1F)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02716}02716                 \& \string~(\textcolor{keywordtype}{unsigned} long)0x1F);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02717}02717 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02718}02718         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{hptiop_8h_ac60d3542d4775c219ede6abb4b895913}{HPT\_SRB\_MAX\_QUEUE\_SIZE}}; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02719}02719                 tmp\_srb = (\textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02720}02720                                         ((\textcolor{keywordtype}{char} *)srb + i * \mbox{\hyperlink{hptiop_8h_a4d9ca6e7527ebb62e24b3cd373475095}{HPT\_SRB\_MAX\_SIZE}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02721}02721                 \textcolor{keywordflow}{if} (((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})tmp\_srb \& 0x1F) == 0) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02722}02722                         \textcolor{keywordflow}{if} (bus\_dmamap\_create(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02723}02723                                                 0, \&tmp\_srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}})) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02724}02724                                 device\_printf(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}dmamap create failed"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02725}02725                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02726}02726                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02727}02727 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02728}02728                         bzero(tmp\_srb, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02729}02729                         tmp\_srb-\/>\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}} = \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02730}02730                         tmp\_srb-\/>\mbox{\hyperlink{structhpt__iop__srb_ad40e355523aeb3bcc59052cf0d95a7ad}{index}} = i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02731}02731                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}} == 0) \{\textcolor{comment}{/*itl iop*/}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02732}02732                                 tmp\_srb-\/>\mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}} = (u\_int64\_t)(u\_int32\_t)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02733}02733                                                         (\mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}} >> 5);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02734}02734                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}} \& \mbox{\hyperlink{hptiop_8h_a74a0fef563db74329774a3682ef20087}{IOPMU\_MAX\_MEM\_SUPPORT\_MASK\_32G}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02735}02735                                         tmp\_srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a7eab7e26bbf9cad4a7c3f41f831cf28f}{srb\_flag}} =}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02736}02736                                                 \mbox{\hyperlink{hptiop_8h_a379b2bde2cf19cc8346b97764e5037f7}{HPT\_SRB\_FLAG\_HIGH\_MEM\_ACESS}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02737}02737                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02738}02738                                 tmp\_srb-\/>\mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}} = \mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02739}02739                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02740}02740 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02741}02741                         callout\_init\_mtx(\&tmp\_srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a3d8f13da89070461946bb931eb462ebe}{timeout}}, \&\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_abe74dc60da621ae9f17688204b6ab1b8}{lock}}, 0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02742}02742                         \mbox{\hyperlink{hptiop_8c_ae11ed70b934f0dc11c42da933723755e}{hptiop\_free\_srb}}(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}, tmp\_srb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02743}02743                         \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}[i] = tmp\_srb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02744}02744                         \mbox{\hyperlink{structhpt__iop__srb_aa7278b537b64bd731450aad446cedde7}{phy\_addr}} += \mbox{\hyperlink{hptiop_8h_a4d9ca6e7527ebb62e24b3cd373475095}{HPT\_SRB\_MAX\_SIZE}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02745}02745                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02746}02746                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02747}02747                         device\_printf(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}invalid alignment"{}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02748}02748                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02749}02749                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02750}02750         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02751}02751 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02752}02752 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02753}\mbox{\hyperlink{hptiop_8c_a311fb980172d10d1016562ace4d1a30b}{02753}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a311fb980172d10d1016562ace4d1a30b}{hptiop\_os\_message\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}, u\_int32\_t msg)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02754}02754 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02755}02755         \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a57062802270c571180e4c8ff29ebd271}{msg\_done}} = 1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02756}02756 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02757}02757 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02758}\mbox{\hyperlink{hptiop_8c_ad51c9dd74d0df49c6504f6ca1559ab14}{02758}} \textcolor{keyword}{static}  \textcolor{keywordtype}{int} \mbox{\hyperlink{hptiop_8c_ad51c9dd74d0df49c6504f6ca1559ab14}{hptiop\_os\_query\_remove\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} * \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02759}02759                                                 \textcolor{keywordtype}{int} target\_id)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02760}02760 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02761}02761         \textcolor{keyword}{struct }cam\_periph       *periph = NULL;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02762}02762         \textcolor{keyword}{struct }cam\_path         *path;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02763}02763         \textcolor{keywordtype}{int}                     status, retval = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02764}02764 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02765}02765         status = xpt\_create\_path(\&path, NULL, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}-\/>path\_id, target\_id, 0);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02766}02766 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02767}02767         \textcolor{keywordflow}{if} (status == CAM\_REQ\_CMP) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02768}02768                 \textcolor{keywordflow}{if} ((periph = cam\_periph\_find(path, \textcolor{stringliteral}{"{}da"{}})) != NULL) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02769}02769                         \textcolor{keywordflow}{if} (periph-\/>refcount >= 1) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02770}02770                                 device\_printf(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, \textcolor{stringliteral}{"{}\%d ,"{}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02771}02771                                         \textcolor{stringliteral}{"{}target\_id=0x\%x,"{}}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02772}02772                                         \textcolor{stringliteral}{"{}refcount=\%d"{}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02773}02773                                     hba-\/>\mbox{\hyperlink{structhpt__iop__hba_ae553598b60a21191b32dca1b52e50612}{pciunit}}, target\_id, periph-\/>refcount);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02774}02774                                 retval = -\/1;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02775}02775                         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02776}02776                 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02777}02777                 xpt\_free\_path(path);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02778}02778         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02779}02779         \textcolor{keywordflow}{return} retval;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02780}02780 \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02781}02781 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02782}\mbox{\hyperlink{hptiop_8c_a2d5b731e857f14aab6950ca1eae2ba01}{02782}} \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{hptiop_8c_a2d5b731e857f14aab6950ca1eae2ba01}{hptiop\_release\_resource}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhpt__iop__hba}{hpt\_iop\_hba}} *hba)}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02783}02783 \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02784}02784         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02785}02785 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02786}02786         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a08dcff8e673b473b78238921e31a4e50}{ioctl\_dev}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02787}02787                 destroy\_dev(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a08dcff8e673b473b78238921e31a4e50}{ioctl\_dev}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02788}02788 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02789}02789         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af35e9f6a2e0a7b4a01bb19703215361a}{path}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02790}02790                 \textcolor{keyword}{struct }ccb\_setasync ccb;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02791}02791 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02792}02792                 memset(\&ccb, 0, \textcolor{keyword}{sizeof}(ccb));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02793}02793                 xpt\_setup\_ccb(\&ccb.ccb\_h, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af35e9f6a2e0a7b4a01bb19703215361a}{path}}, \textcolor{comment}{/*priority*/}5);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02794}02794                 ccb.ccb\_h.func\_code = XPT\_SASYNC\_CB;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02795}02795                 ccb.event\_enable = 0;}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02796}02796                 ccb.callback = \mbox{\hyperlink{hptiop_8c_accd0539257fec63cdbf39bbf3545357a}{hptiop\_async}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02797}02797                 ccb.callback\_arg = hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}};}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02798}02798                 xpt\_action((\textcolor{keyword}{union} ccb *)\&ccb);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02799}02799                 xpt\_free\_path(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_af35e9f6a2e0a7b4a01bb19703215361a}{path}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02800}02800         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02801}02801 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02802}02802         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a8514333e4d357b84da6b47afe5abdf0c}{irq\_handle}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02803}02803                 bus\_teardown\_intr(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a89b695c3e580c72d9c709c0ad26198ff}{irq\_res}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a8514333e4d357b84da6b47afe5abdf0c}{irq\_handle}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02804}02804 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02805}02805         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02806}02806                 \mbox{\hyperlink{hptiop_8h_a83b2e372546b54275d6807cb21c3ac11}{hptiop\_lock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02807}02807                 xpt\_bus\_deregister(cam\_sim\_path(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}));}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02808}02808                 cam\_sim\_free(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_aed27cb842ba887c1a682f7ec680c86ea}{sim}}, TRUE);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02809}02809                 \mbox{\hyperlink{hptiop_8h_aac3011cddc68a3ac553b138aeb8f109b}{hptiop\_unlock\_adapter}}(hba);}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02810}02810         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02811}02811 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02812}02812         \textcolor{keywordflow}{if} (hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02813}02813                 bus\_dmamap\_unload(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02814}02814                 bus\_dmamem\_free(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}},}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02815}02815                                         hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a5ca28af5fdf312d94b86694ddf4f7150}{ctlcfg\_ptr}}, hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a6b5c1e3ae47b01236d9c9a22fef117d9}{ctlcfg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02816}02816                 bus\_dma\_tag\_destroy(hba-\/>\mbox{\hyperlink{structhpt__iop__hba_a2d320abcbfb50e0e1380101a38e0305e}{ctlcfg\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02817}02817         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02818}02818 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02819}02819         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{hptiop_8h_ac60d3542d4775c219ede6abb4b895913}{HPT\_SRB\_MAX\_QUEUE\_SIZE}}; i++) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02820}02820                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhpt__iop__srb}{hpt\_iop\_srb}} *srb = \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a8e3ff752d72a088adf0070ace6f0dd74}{srb}}[i];}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02821}02821                 \textcolor{keywordflow}{if} (srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02822}02822                         bus\_dmamap\_destroy(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}}, srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a71f70371bc5fc56f881fe6c697cca5de}{dma\_map}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02823}02823                 callout\_drain(\&srb-\/>\mbox{\hyperlink{structhpt__iop__srb_a3d8f13da89070461946bb931eb462ebe}{timeout}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02824}02824         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02825}02825 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02826}02826         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}}) \{}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02827}02827                 bus\_dmamap\_unload(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}}, \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a772507fc1c081e32c3cc1ad83426bcb9}{srb\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02828}02828                 bus\_dmamap\_destroy(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}}, \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a772507fc1c081e32c3cc1ad83426bcb9}{srb\_dmamap}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02829}02829                 bus\_dma\_tag\_destroy(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_adb99927b216a5dc5a9edab00e764d5aa}{srb\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02830}02830         \}}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02831}02831 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02832}02832         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02833}02833                 bus\_dma\_tag\_destroy(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a95255167d84c6a9298ed59c436f811b5}{io\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02834}02834 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02835}02835         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02836}02836                 bus\_dma\_tag\_destroy(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_ae282071ef77b425f91192b3551ca4e81}{parent\_dmat}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02837}02837 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02838}02838         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a89b695c3e580c72d9c709c0ad26198ff}{irq\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02839}02839                 bus\_release\_resource(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_IRQ,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02840}02840                                         0, \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a89b695c3e580c72d9c709c0ad26198ff}{irq\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02841}02841 }
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02842}02842         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02843}02843                 bus\_release\_resource(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02844}02844                                         \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_ad8f3f5c2a1719199ffd0246d8a26829b}{bar0\_rid}}, \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a57cda87b8b3560d5b59b1cb3f4122239}{bar0\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02845}02845         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}})}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02846}02846                 bus\_release\_resource(\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acade4b8e073de5723809dc71025a1449}{pcidev}}, SYS\_RES\_MEMORY,}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02847}02847                                         \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_a51fe2bfc9fd44742f034d3c1d36aaaba}{bar2\_rid}}, \mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_acc7a2d211ff58a13455aaafaa6945450}{bar2\_res}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02848}02848         mtx\_destroy(\&\mbox{\hyperlink{structhpt__iop__srb_ac23edc8d90e07f22ee95d1986b5a5407}{hba}}-\/>\mbox{\hyperlink{structhpt__iop__hba_abe74dc60da621ae9f17688204b6ab1b8}{lock}});}
\DoxyCodeLine{\Hypertarget{hptiop_8c_source_l02849}02849 \}}

\end{DoxyCode}
