\hypertarget{aic7xxx_8c_source}{}\doxysection{aic7xxx.\+c}
\label{aic7xxx_8c_source}\index{dev/aic7xxx/aic7xxx.c@{dev/aic7xxx/aic7xxx.c}}
\mbox{\hyperlink{aic7xxx_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00002}00002 \textcolor{comment}{ * Core routines and tables shareable across OS platforms.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00004}00004 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/3-\/Clause}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00006}00006 \textcolor{comment}{ * Copyright (c) 1994-\/2002 Justin T. Gibbs.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00007}00007 \textcolor{comment}{ * Copyright (c) 2000-\/2002 Adaptec Inc.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00008}00008 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00010}00010 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00011}00011 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00012}00012 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00013}00013 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions, and the following disclaimer,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00015}00015 \textcolor{comment}{ *    without modification.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00016}00016 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce at minimum a disclaimer}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00017}00017 \textcolor{comment}{ *    substantially similar to the "{}NO WARRANTY"{} disclaimer below}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00018}00018 \textcolor{comment}{ *    ("{}Disclaimer"{}) and any redistribution must be conditioned upon}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00019}00019 \textcolor{comment}{ *    including a substantially similar Disclaimer requirement for further}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00020}00020 \textcolor{comment}{ *    binary redistribution.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00021}00021 \textcolor{comment}{ * 3. Neither the names of the above-\/listed copyright holders nor the names}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00022}00022 \textcolor{comment}{ *    of any contributors may be used to endorse or promote products derived}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00023}00023 \textcolor{comment}{ *    from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00024}00024 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00025}00025 \textcolor{comment}{ * Alternatively, this software may be distributed under the terms of the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00026}00026 \textcolor{comment}{ * GNU General Public License ("{}GPL"{}) version 2 as published by the Free}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00027}00027 \textcolor{comment}{ * Software Foundation.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00028}00028 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00029}00029 \textcolor{comment}{ * NO WARRANTY}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00030}00030 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00031}00031 \textcolor{comment}{ * "{}AS IS"{} AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00032}00032 \textcolor{comment}{ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00033}00033 \textcolor{comment}{ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00034}00034 \textcolor{comment}{ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00035}00035 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00036}00036 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00037}00037 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00038}00038 \textcolor{comment}{ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00039}00039 \textcolor{comment}{ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00040}00040 \textcolor{comment}{ * POSSIBILITY OF SUCH DAMAGES.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00041}00041 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00042}00042 \textcolor{comment}{ * \$Id: //depot/aic7xxx/aic7xxx/aic7xxx.c\#155 \$}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00043}00043 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00045}00045 \textcolor{preprocessor}{\#ifdef \_\_linux\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00046}00046 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{aic7xxx__osm_8h}{aic7xxx\_osm.h}}"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00047}00047 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{aic7xxx__inline_8h}{aic7xxx\_inline.h}}"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00048}00048 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{aicasm__insformat_8h}{aicasm/aicasm\_insformat.h}}"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00049}00049 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00051}\mbox{\hyperlink{aic7xxx_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00051}} \mbox{\hyperlink{aic7xxx_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{aic7xxx__osm_8h}{dev/aic7xxx/aic7xxx\_osm.h}}>}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{aic7xxx__inline_8h}{dev/aic7xxx/aic7xxx\_inline.h}}>}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{aicasm__insformat_8h}{dev/aic7xxx/aicasm/aicasm\_insformat.h}}>}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00055}00055 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00056}00056 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00057}00057 \textcolor{comment}{/****************************** Softc Data ************************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00058}\mbox{\hyperlink{aic7xxx_8c_ac676ce904ae03bd150794ea5f260c522}{00058}} \textcolor{keyword}{struct }ahc\_softc\_tailq \mbox{\hyperlink{aic7xxx_8c_ac676ce904ae03bd150794ea5f260c522}{ahc\_tailq}} = TAILQ\_HEAD\_INITIALIZER(\mbox{\hyperlink{aic7xxx_8c_ac676ce904ae03bd150794ea5f260c522}{ahc\_tailq}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00060}00060 \textcolor{comment}{/***************************** Lookup Tables **********************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00061}\mbox{\hyperlink{aic7xxx_8c_a1a46ae02c019b865c592943ecc390bec}{00061}} \textcolor{keywordtype}{char} *\mbox{\hyperlink{aic7xxx_8c_a1a46ae02c019b865c592943ecc390bec}{ahc\_chip\_names}}[] =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00062}00062 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00063}00063         \textcolor{stringliteral}{"{}NONE"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00064}00064         \textcolor{stringliteral}{"{}aic7770"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00065}00065         \textcolor{stringliteral}{"{}aic7850"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00066}00066         \textcolor{stringliteral}{"{}aic7855"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00067}00067         \textcolor{stringliteral}{"{}aic7859"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00068}00068         \textcolor{stringliteral}{"{}aic7860"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00069}00069         \textcolor{stringliteral}{"{}aic7870"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00070}00070         \textcolor{stringliteral}{"{}aic7880"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00071}00071         \textcolor{stringliteral}{"{}aic7895"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00072}00072         \textcolor{stringliteral}{"{}aic7895C"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00073}00073         \textcolor{stringliteral}{"{}aic7890/91"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00074}00074         \textcolor{stringliteral}{"{}aic7896/97"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00075}00075         \textcolor{stringliteral}{"{}aic7892"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00076}00076         \textcolor{stringliteral}{"{}aic7899"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00077}00077 \};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00079}00079 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00080}00080 \textcolor{comment}{ * Hardware error codes.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00081}00081 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00082}\mbox{\hyperlink{structahc__hard__error__entry}{00082}} \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__hard__error__entry}{ahc\_hard\_error\_entry}} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00083}\mbox{\hyperlink{structahc__hard__error__entry_abed32e56bcfb5a633c1d63ee0a34a005}{00083}}         uint8\_t \mbox{\hyperlink{structahc__hard__error__entry_abed32e56bcfb5a633c1d63ee0a34a005}{errno}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00084}\mbox{\hyperlink{structahc__hard__error__entry_a541ac50d2fcad0a0c9b86d204bedff95}{00084}}         \textcolor{keywordtype}{char} *\mbox{\hyperlink{structahc__hard__error__entry_a541ac50d2fcad0a0c9b86d204bedff95}{errmesg}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00085}00085 \};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00087}\mbox{\hyperlink{aic7xxx_8c_a4787a7b4ac1c918c3c19d0e366569e8e}{00087}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__hard__error__entry}{ahc\_hard\_error\_entry}} \mbox{\hyperlink{aic7xxx_8c_a4787a7b4ac1c918c3c19d0e366569e8e}{ahc\_hard\_errors}}[] = \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00088}00088         \{ \mbox{\hyperlink{aic7xxx__reg_8h_a75d04078a7800cd421b32b98b0a91567}{ILLHADDR}},     \textcolor{stringliteral}{"{}Illegal Host Access"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00089}00089         \{ \mbox{\hyperlink{aic7xxx__reg_8h_afe55b4cfd7e655f2f709a3082370fe14}{ILLSADDR}},     \textcolor{stringliteral}{"{}Illegal Sequencer Address referrenced"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00090}00090         \{ \mbox{\hyperlink{aic79xx__reg_8h_ac164cad561bd2b9fb13bc53a7fd404e9}{ILLOPCODE}},   \textcolor{stringliteral}{"{}Illegal Opcode in sequencer program"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00091}00091         \{ \mbox{\hyperlink{aic79xx__reg_8h_afe2338566b58f0d9020966bc02bc2ade}{SQPARERR}},     \textcolor{stringliteral}{"{}Sequencer Parity Error"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00092}00092         \{ \mbox{\hyperlink{aic79xx__reg_8h_ad18901fef79c6eb9c8149007fd111abf}{DPARERR}},       \textcolor{stringliteral}{"{}Data-\/path Parity Error"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00093}00093         \{ \mbox{\hyperlink{aic79xx__reg_8h_a09d9fe8aa61407bfc245f959f2a8c16e}{MPARERR}},       \textcolor{stringliteral}{"{}Scratch or SCB Memory Parity Error"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00094}00094         \{ \mbox{\hyperlink{aic7xxx__reg_8h_ae8d3342d97f281c8be6542a70634c95f}{PCIERRSTAT}}, \textcolor{stringliteral}{"{}PCI Error detected"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00095}00095         \{ \mbox{\hyperlink{aic79xx__reg_8h_a5579cdf393f7f747d0767365955e2b26}{CIOPARERR}},   \textcolor{stringliteral}{"{}CIOBUS Parity Error"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00096}00096 \};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00097}\mbox{\hyperlink{aic7xxx_8c_a4b8707dbc306bee29d54eaea3a12dc0e}{00097}} \textcolor{keyword}{static} \textcolor{keyword}{const} u\_int \mbox{\hyperlink{aic7xxx_8c_a4b8707dbc306bee29d54eaea3a12dc0e}{num\_errors}} = \mbox{\hyperlink{aic79xx_8h_aa9e5902d5e89cfba6fb560b7dad31cf6}{NUM\_ELEMENTS}}(\mbox{\hyperlink{aic7xxx_8c_a4787a7b4ac1c918c3c19d0e366569e8e}{ahc\_hard\_errors}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00099}\mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{00099}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__phase__table__entry}{ahc\_phase\_table\_entry}} \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[] =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00100}00100 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00101}00101         \{ \mbox{\hyperlink{aic79xx__reg_8h_a1e8ae6ff485803e6ebe13d67283fdb89}{P\_DATAOUT}},   MSG\_NOOP,               \textcolor{stringliteral}{"{}in Data-\/out phase"{}}     \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00102}00102         \{ \mbox{\hyperlink{aic79xx__reg_8h_a80819bc1b3fdf2dc321d9f014c324f1f}{P\_DATAIN}},     MSG\_INITIATOR\_DET\_ERR,  \textcolor{stringliteral}{"{}in Data-\/in phase"{}}      \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00103}00103         \{ \mbox{\hyperlink{aic79xx__reg_8h_a7273508ee32483258f58b8295d375b99}{P\_DATAOUT\_DT}},     MSG\_NOOP,               \textcolor{stringliteral}{"{}in DT Data-\/out phase"{}}  \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00104}00104         \{ \mbox{\hyperlink{aic79xx__reg_8h_a79a0cabab255cc476136a72d125230f2}{P\_DATAIN\_DT}},       MSG\_INITIATOR\_DET\_ERR,  \textcolor{stringliteral}{"{}in DT Data-\/in phase"{}}   \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00105}00105         \{ \mbox{\hyperlink{aic79xx__reg_8h_adffec6b54edc26f2229aed48add65676}{P\_COMMAND}},   MSG\_NOOP,               \textcolor{stringliteral}{"{}in Command phase"{}}      \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00106}00106         \{ \mbox{\hyperlink{aic79xx__reg_8h_af8aa57a40c3ae80362a3815c2dd02461}{P\_MESGOUT}},   MSG\_NOOP,               \textcolor{stringliteral}{"{}in Message-\/out phase"{}}  \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00107}00107         \{ \mbox{\hyperlink{aic79xx__reg_8h_a05e2e0a7fc073f1e71cc98a5a1392140}{P\_STATUS}},     MSG\_INITIATOR\_DET\_ERR,  \textcolor{stringliteral}{"{}in Status phase"{}}       \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00108}00108         \{ \mbox{\hyperlink{aic79xx__reg_8h_aa62d3b62a4fec478f16f01817f71f88e}{P\_MESGIN}},     MSG\_PARITY\_ERROR,       \textcolor{stringliteral}{"{}in Message-\/in phase"{}}   \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00109}00109         \{ \mbox{\hyperlink{aic79xx__reg_8h_a693ff4c5876c93e8452035f86e4acefb}{P\_BUSFREE}},   MSG\_NOOP,               \textcolor{stringliteral}{"{}while idle"{}}            \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00110}00110         \{ 0,            MSG\_NOOP,               \textcolor{stringliteral}{"{}in unknown phase"{}}      \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00111}00111 \};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00113}00113 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00114}00114 \textcolor{comment}{ * In most cases we only wish to itterate over real phases, so}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00115}00115 \textcolor{comment}{ * exclude the last element from the count.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00116}00116 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00117}\mbox{\hyperlink{aic7xxx_8c_affc490c45bd148300acc26e210a1f2c2}{00117}} \textcolor{keyword}{static} \textcolor{keyword}{const} u\_int \mbox{\hyperlink{aic7xxx_8c_affc490c45bd148300acc26e210a1f2c2}{num\_phases}} = \mbox{\hyperlink{aic79xx_8h_aa9e5902d5e89cfba6fb560b7dad31cf6}{NUM\_ELEMENTS}}(\mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}) -\/ 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00119}00119 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00120}00120 \textcolor{comment}{ * Valid SCSIRATE values.  (p. 3-\/17)}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00121}00121 \textcolor{comment}{ * Provides a mapping of transfer periods in ns to the proper value to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00122}00122 \textcolor{comment}{ * stick in the scsixfer reg.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00123}00123 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00124}\mbox{\hyperlink{aic7xxx_8c_a67c4e74dd2aa22393c529eba6d5f3ddf}{00124}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} \mbox{\hyperlink{aic7xxx_8c_a67c4e74dd2aa22393c529eba6d5f3ddf}{ahc\_syncrates}}[] =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00125}00125 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00126}00126       \textcolor{comment}{/* ultra2    fast/ultra  period     rate */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00127}00127         \{ 0x42,      0x000,      9,      \textcolor{stringliteral}{"{}80.0"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00128}00128         \{ 0x03,      0x000,     10,      \textcolor{stringliteral}{"{}40.0"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00129}00129         \{ 0x04,      0x000,     11,      \textcolor{stringliteral}{"{}33.0"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00130}00130         \{ 0x05,      0x100,     12,      \textcolor{stringliteral}{"{}20.0"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00131}00131         \{ 0x06,      0x110,     15,      \textcolor{stringliteral}{"{}16.0"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00132}00132         \{ 0x07,      0x120,     18,      \textcolor{stringliteral}{"{}13.4"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00133}00133         \{ 0x08,      0x000,     25,      \textcolor{stringliteral}{"{}10.0"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00134}00134         \{ 0x19,      0x010,     31,      \textcolor{stringliteral}{"{}8.0"{}}  \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00135}00135         \{ 0x1a,      0x020,     37,      \textcolor{stringliteral}{"{}6.67"{}} \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00136}00136         \{ 0x1b,      0x030,     43,      \textcolor{stringliteral}{"{}5.7"{}}  \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00137}00137         \{ 0x1c,      0x040,     50,      \textcolor{stringliteral}{"{}5.0"{}}  \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00138}00138         \{ 0x00,      0x050,     56,      \textcolor{stringliteral}{"{}4.4"{}}  \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00139}00139         \{ 0x00,      0x060,     62,      \textcolor{stringliteral}{"{}4.0"{}}  \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00140}00140         \{ 0x00,      0x070,     68,      \textcolor{stringliteral}{"{}3.6"{}}  \},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00141}00141         \{ 0x00,      0x000,      0,      NULL   \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00142}00142 \};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00143}00143 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00144}00144 \textcolor{comment}{/* Our Sequencer Program */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00145}00145 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{aic7xxx__seq_8h}{aic7xxx\_seq.h}}"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00146}00146 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00147}00147 \textcolor{comment}{/**************************** Function Declarations ***************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00148}00148 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_ae2f558b5a17a2ae39292b46ae742e14f}{ahc\_force\_renegotiation}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00149}00149                                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00150}00150 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}}*}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00151}00151                         \mbox{\hyperlink{aic7xxx_8c_a6b94ed6a6d432af1c6e73de284d2437c}{ahc\_alloc\_tstate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00152}00152                                          u\_int scsi\_id, \textcolor{keywordtype}{char} channel);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00153}00153 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00154}00154 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             ahc\_free\_tstate(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00155}00155                                         u\_int scsi\_id, \textcolor{keywordtype}{char} channel, \textcolor{keywordtype}{int} force);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00156}00156 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00157}00157 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}}*}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00158}00158                         \mbox{\hyperlink{aic7xxx_8c_a2515ac67caba10332267408695efc84f}{ahc\_devlimited\_syncrate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00159}00159                                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00160}00160                                                 u\_int *\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00161}00161                                                 u\_int *ppr\_options,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00162}00162                                                 \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}} role);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00163}00163 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a669f21fc681d64c8b9b12d87ba874a8c}{ahc\_update\_pending\_scbs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00164}00164 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a58ddd232933fb66f2cab3d543f7ccc35}{ahc\_fetch\_devinfo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00165}00165                                           \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00166}00166 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_abe961e0048c16d782614a37806151386}{ahc\_scb\_devinfo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00167}00167                                         \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00168}00168                                         \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a99fb434ac77fcfbde1cf06317005009d}{ahc\_assert\_atn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00170}00170 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a54bc35f4377d46ab801dd00cb61d16ee}{ahc\_setup\_initiator\_msgout}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00171}00171                                                    \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00172}00172                                                    \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00173}00173 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_ad94f65976c5556974bc6593e0c6aeedc}{ahc\_build\_transfer\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00174}00174                                                \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00175}00175 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a38e25102198d675f9d8b3f6bceea7dfa}{ahc\_construct\_sdtr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00176}00176                                            \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00177}00177                                            u\_int \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, u\_int offset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00178}00178 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_aeb0fb8c8fa65c7080c721739d4c235eb}{ahc\_construct\_wdtr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00179}00179                                            \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00180}00180                                            u\_int bus\_width);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00181}00181 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a482dd999c42168fb4dccea82c4442ef0}{ahc\_construct\_ppr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00182}00182                                           \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00183}00183                                           u\_int \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, u\_int offset,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00184}00184                                           u\_int bus\_width, u\_int ppr\_options);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00185}00185 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a515ae1248f2e8f09eb0ac2ca816a214d}{ahc\_clear\_msg\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00186}00186 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_afa00cf489b7e851f882fc08f90c17574}{ahc\_handle\_proto\_violation}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00187}00187 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a4f3aa3e651fac361937174d6e8c41bc2}{ahc\_handle\_message\_phase}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00188}\mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106}{00188}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00189}\mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106acfdceb20b6056d5f930eded906b45da7}{00189}}         \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106acfdceb20b6056d5f930eded906b45da7}{AHCMSG\_1B}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00190}\mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106a5c2c37c99312227baf2ee766f6119a71}{00190}}         \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106a5c2c37c99312227baf2ee766f6119a71}{AHCMSG\_2B}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00191}00191         \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00192}\mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{00192}} \} \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106}{ahc\_msgtype}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00193}00193 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106}{ahc\_msgtype}} type,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00194}00194                                      u\_int msgval, \textcolor{keywordtype}{int} full);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00195}00195 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{aic7xxx_8c_aee5e2cd3064ffa085d3604ea3ff1715d}{ahc\_parse\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00196}00196                                       \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00197}00197 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{aic7xxx_8c_a054a815fc86e150fff22f21281764302}{ahc\_handle\_msg\_reject}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00198}00198                                               \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00199}00199 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a9b10951ff4d788ca30c37748249dcf95}{ahc\_handle\_ign\_wide\_residue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00200}00200                                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00201}00201 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a70b8981d8d1874b53dc20ed487bf9a09}{ahc\_reinitialize\_dataptrs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00202}00202 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_ad7f416f60ce374a2ad34574734442235}{ahc\_handle\_devreset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00203}00203                                             \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00204}00204                                             cam\_status status, \textcolor{keywordtype}{char} *message,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00205}00205                                             \textcolor{keywordtype}{int} verbose\_level);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00206}00206 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00207}00207 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             ahc\_setup\_target\_msgin(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00208}00208                                                \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00209}00209                                                \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00210}00210 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00211}00211 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00212}\mbox{\hyperlink{aic7xxx_8c_ad38522c285453b97b32e08be78e65c02}{00212}} \textcolor{keyword}{static} bus\_dmamap\_callback\_t    \mbox{\hyperlink{aic7xxx_8c_ad38522c285453b97b32e08be78e65c02}{ahc\_dmamap\_cb}}; }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00213}00213 \textcolor{keyword}{static} \textcolor{keywordtype}{void}                     \mbox{\hyperlink{aic7xxx_8c_a1ff1ab015ccf9f4195ceafd71139326e}{ahc\_build\_free\_scb\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00214}00214 \textcolor{keyword}{static} \textcolor{keywordtype}{int}                      \mbox{\hyperlink{aic7xxx_8c_a06f89ace331dd4710329a542edbcec01}{ahc\_init\_scbdata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00215}00215 \textcolor{keyword}{static} \textcolor{keywordtype}{void}                     \mbox{\hyperlink{aic7xxx_8c_a7e4b79ab4b1d8f9001a0890ffa8ed4e8}{ahc\_fini\_scbdata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00216}00216 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a94560cd706dc174a8cbf2836249046e2}{ahc\_qinfifo\_requeue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00217}00217                                             \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *prev\_scb,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00218}00218                                             \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00219}00219 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{aic7xxx_8c_a3f041082fe273355fcffc4ea3ea66ba6}{ahc\_qinfifo\_count}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00220}00220 \textcolor{keyword}{static} u\_int            \mbox{\hyperlink{aic7xxx_8c_aef300d0337432abdf393f372c7d0cf50}{ahc\_rem\_scb\_from\_disc\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00221}00221                                                    u\_int prev, u\_int scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00222}00222 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a25dbd585d391e6e4ec69585a9c3e392b}{ahc\_add\_curscb\_to\_free\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00223}00223 \textcolor{keyword}{static} u\_int            \mbox{\hyperlink{aic7xxx_8c_a8a7c20309d70bbcbaaede262009ed982}{ahc\_rem\_wscb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00224}00224                                      u\_int scbpos, u\_int prev);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00225}00225 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a3d9e47549867f4ef718bd13e7c59681b}{ahc\_reset\_current\_bus}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00226}00226 \textcolor{preprocessor}{\#ifdef AHC\_DUMP\_SEQ}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00227}00227 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             ahc\_dumpseq(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00228}00228 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00229}00229 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{aic7xxx_8c_afad04e6d810b9d879954b50645e2f103}{ahc\_loadseq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00230}00230 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{aic7xxx_8c_a2b57079fe580108ed09601d570c88949}{ahc\_check\_patch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00231}00231                                         \textcolor{keyword}{struct} \mbox{\hyperlink{structpatch}{patch}} **start\_patch,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00232}00232                                         u\_int start\_instr, u\_int *skip\_addr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00233}00233 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{aic7xxx_8c_a731b4bf030367aeb08fc43e93104568d}{ahc\_download\_instr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00234}00234                                            u\_int instrptr, uint8\_t *dconsts);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00235}00235 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{aic7xxx_8c_af614ba6bdf89e039365e33644d9d70f7}{ahc\_other\_scb\_timeout}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00236}00236                                               \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00237}00237                                               \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *other\_scb);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00238}00238 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00239}00239 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             ahc\_queue\_lstate\_event(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00240}00240                                                \textcolor{keyword}{struct} ahc\_tmode\_lstate *lstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00241}00241                                                u\_int initiator\_id,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00242}00242                                                u\_int event\_type,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00243}00243                                                u\_int event\_arg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00244}00244 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             ahc\_update\_scsiid(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00245}00245                                           u\_int targid\_mask);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00246}00246 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              ahc\_handle\_target\_cmd(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00247}00247                                               \textcolor{keyword}{struct} \mbox{\hyperlink{structtarget__cmd}{target\_cmd}} *cmd);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00248}00248 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00249}00249 \textcolor{comment}{/************************* Sequencer Execution Control ************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00250}00250 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00251}00251 \textcolor{comment}{ * Restart the sequencer program from address zero}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00252}00252 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00253}00253 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00254}\mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{00254}} \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00255}00255 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00256}00256 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00257}00257         \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00259}00259         \textcolor{comment}{/* No more pending messages. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00260}00260         \mbox{\hyperlink{aic7xxx_8c_a515ae1248f2e8f09eb0ac2ca816a214d}{ahc\_clear\_msg\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00262}00262         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5ab4a127f8d3de2d9e05937be836098b}{SCSISIGO}}, 0);             \textcolor{comment}{/* De-\/assert BSY */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00263}00263         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}, MSG\_NOOP);        \textcolor{comment}{/* No message to send */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00264}00264         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a44b64519799d158d8bac4e20460fe50f}{BITBUCKET}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00265}00265         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}}, \mbox{\hyperlink{aic79xx__reg_8h_a693ff4c5876c93e8452035f86e4acefb}{P\_BUSFREE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00266}00266         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a0108c7ce82af6260f8e7f6b165b1743c}{SAVED\_SCSIID}}, 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00267}00267         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_abc9d7d3c29d1a241838c7708ede0ce4e}{SAVED\_LUN}}, 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00269}00269         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00270}00270 \textcolor{comment}{         * Ensure that the sequencer's idea of TQINPOS}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00271}00271 \textcolor{comment}{         * matches our own.  The sequencer increments TQINPOS}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00272}00272 \textcolor{comment}{         * only after it sees a DMA complete and a reset could}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00273}00273 \textcolor{comment}{         * occur before the increment leaving the kernel to believe}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00274}00274 \textcolor{comment}{         * the command arrived but the sequencer to not.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00275}00275 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00276}00276         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_acb94e78c58a2d45f8042f6d578d29df5}{TQINPOS}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00278}00278         \textcolor{comment}{/* Always allow reselection */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00279}00279         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00280}00280                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8da1b58b6c1f22bff54431431b06a8e6}{SCSISEQ\_TEMPLATE}}) \& (\mbox{\hyperlink{aic79xx__reg_8h_a5130b53e9a5c5ef1cf67782e27aafe44}{ENSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a79ddc1008bee9be3dabf244839710e29}{ENRSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a73f4f4cb70a503ed678c662d81f59ac4}{ENAUTOATNP}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00281}00281         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aadbdbc552450a562c9354f1638a63ed2a}{AHC\_CMD\_CHAN}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00282}00282                 \textcolor{comment}{/* Ensure that no DMA operations are in progress */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00283}00283                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a9150e12874528e99f93a916bfa135902}{CCSCBCNT}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00284}00284                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab2bd01060650341868887d3a032c92e8}{CCSGCTL}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00285}00285                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a727af43bd7de51dc87de777faa25a2ae}{CCSCBCTL}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00286}00286         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00287}00287         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00288}00288 \textcolor{comment}{         * If we were in the process of DMA'ing SCB data into}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00289}00289 \textcolor{comment}{         * an SCB, replace that SCB on the free list.  This prevents}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00290}00290 \textcolor{comment}{         * an SCB leak.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00291}00291 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00292}00292         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a508d7288d36d2b95d1b614868e6ce073}{SEQ\_FLAGS2}}) \& \mbox{\hyperlink{aic7xxx__reg_8h_a1796828c65764a40e6d2d6cc09c5ca20}{SCB\_DMA}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00293}00293                 \mbox{\hyperlink{aic7xxx_8c_a25dbd585d391e6e4ec69585a9c3e392b}{ahc\_add\_curscb\_to\_free\_list}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00294}00294                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a508d7288d36d2b95d1b614868e6ce073}{SEQ\_FLAGS2}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00295}00295                          \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a508d7288d36d2b95d1b614868e6ce073}{SEQ\_FLAGS2}}) \& \string~\mbox{\hyperlink{aic7xxx__reg_8h_a1796828c65764a40e6d2d6cc09c5ca20}{SCB\_DMA}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00296}00296         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00298}00298         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00299}00299 \textcolor{comment}{         * Clear any pending sequencer interrupt.  It is no}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00300}00300 \textcolor{comment}{         * longer relevant since we're resetting the Program}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00301}00301 \textcolor{comment}{         * Counter.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00302}00302 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00303}00303         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_afe8d33af3cc220a2696e735171f7639c}{CLRSEQINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00305}00305         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a87a374624203c51a0bc9ed4286907fbc}{MWI\_RESIDUAL}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00306}00306         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4d65228d61c0e3a8c669dcaebb662830}{SEQCTL}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a82d5e6ad317e321b0e37d26031519df1}{seqctl}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00307}00307         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a174c1b97635e3f30f94c888b47436dc5}{SEQADDR0}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00308}00308         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_abeaf863227b4bb81888cf9ebc4249625}{SEQADDR1}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00310}00310         \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00311}00311 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00313}00313 \textcolor{comment}{/************************* Input/Output Queues ********************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00314}00314 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00315}\mbox{\hyperlink{aic7xxx_8c_a31af5e3fc920c37807d5c5cd162199f6}{00315}} \mbox{\hyperlink{aic7xxx_8c_a31af5e3fc920c37807d5c5cd162199f6}{ahc\_run\_qoutfifo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00316}00316 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00317}00317         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00318}00318         u\_int  scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00320}00320         \mbox{\hyperlink{aic7xxx__inline_8h_a3a2d0df6e542da6c60fb9e682ca99558}{ahc\_sync\_qoutfifo}}(ahc, BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00321}00321         \textcolor{keywordflow}{while} (ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}}] != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00322}00322                 scb\_index = ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00323}00323                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}} \& 0x03) == 0x03) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00324}00324                         u\_int modnext;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00326}00326                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00327}00327 \textcolor{comment}{                         * Clear 32bits of QOUTFIFO at a time}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00328}00328 \textcolor{comment}{                         * so that we don't clobber an incoming}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00329}00329 \textcolor{comment}{                         * byte DMA to the array on architectures}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00330}00330 \textcolor{comment}{                         * that only support 32bit load and store}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00331}00331 \textcolor{comment}{                         * operations.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00332}00332 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00333}00333                         modnext = ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}} \& \string~0x3;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00334}00334                         *((uint32\_t *)(\&ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}}[modnext])) = 0xFFFFFFFFUL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00335}00335                         \mbox{\hyperlink{aic__osm__lib_8h_a47db40ebfae51fce980f7cfdb0dd280c}{aic\_dmamap\_sync}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a6dc0a81da5759d51c9f663b35aed8f98}{shared\_data\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00336}00336                                         ahc-\/>\mbox{\hyperlink{structahc__softc_aaa85e4b192dffdaa3a3a335ba8dbbdfe}{shared\_data\_dmamap}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00337}00337                                         \textcolor{comment}{/*offset*/}modnext, \textcolor{comment}{/*len*/}4,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00338}00338                                         BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00339}00339                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00340}00340                 ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00341}00341 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00342}00342                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00343}00343                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00344}00344                         printf(\textcolor{stringliteral}{"{}\%s: WARNING no command for scb \%d "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00345}00345                                \textcolor{stringliteral}{"{}(cmdcmplt)\(\backslash\)nQOUTPOS = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00346}00346                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), scb\_index,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00347}00347                                (ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}} -\/ 1) \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00348}00348                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00349}00349                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00351}00351                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00352}00352 \textcolor{comment}{                 * Save off the residual}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00353}00353 \textcolor{comment}{                 * if there is one.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00354}00354 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00355}00355                 \mbox{\hyperlink{aic7xxx__inline_8h_a47f5ef9cf4b3820881a2c0a92992c45e}{ahc\_update\_residual}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00356}00356                 \mbox{\hyperlink{aic7xxx__osm_8c_a356313da77941be8f5afdf35318ff0e1}{ahc\_done}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00357}00357         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00358}00358 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00360}00360 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00361}\mbox{\hyperlink{aic7xxx_8c_aa1345b5633cbdff897473aa29668c6e0}{00361}} \mbox{\hyperlink{aic7xxx_8c_aa1345b5633cbdff897473aa29668c6e0}{ahc\_run\_untagged\_queues}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00362}00362 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00363}00363         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00364}00364 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00365}00365         \textcolor{keywordflow}{for} (i = 0; i < 16; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00366}00366                 \mbox{\hyperlink{aic7xxx_8c_aaaa4d5d55d25a99340a34eac9c7889f3}{ahc\_run\_untagged\_queue}}(ahc, \&ahc-\/>\mbox{\hyperlink{structahc__softc_a8cca91fe9f77d975985c3cf85d11de46}{untagged\_queues}}[i]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00367}00367 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00368}00368 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00369}00369 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00370}\mbox{\hyperlink{aic7xxx_8c_aaaa4d5d55d25a99340a34eac9c7889f3}{00370}} \mbox{\hyperlink{aic7xxx_8c_aaaa4d5d55d25a99340a34eac9c7889f3}{ahc\_run\_untagged\_queue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} scb\_tailq *queue)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00371}00371 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00372}00372         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00373}00373 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00374}00374         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a5db2d1e6c19e6354f37e8c5acd870eb2}{untagged\_queue\_lock}} != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00375}00375                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00377}00377         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}} = TAILQ\_FIRST(queue)) != NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00378}00378          \&\& (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ad0ce2db7e532c67e4f358a676e732b79}{SCB\_ACTIVE}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00379}00379                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ad0ce2db7e532c67e4f358a676e732b79}{SCB\_ACTIVE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00380}00380                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00381}00381 \textcolor{comment}{                 * Timers are disabled while recovery is in progress.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00382}00382 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00383}00383                 \mbox{\hyperlink{aic__osm__lib_8h_aded5cc49c2fece51a21c20f9b78633ad}{aic\_scb\_timer\_start}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00384}00384                 \mbox{\hyperlink{aic7xxx__inline_8h_a3dbccba7b81b8892ddadd68481ae49f4}{ahc\_queue\_scb}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00385}00385         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00386}00386 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00387}00387 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00388}00388 \textcolor{comment}{/************************* Interrupt Handling *********************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00389}00389 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00390}\mbox{\hyperlink{aic7xxx_8c_ab465074eca8081e8f9a6fa3aed4c1e08}{00390}} \mbox{\hyperlink{aic7xxx_8c_ab465074eca8081e8f9a6fa3aed4c1e08}{ahc\_handle\_brkadrint}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00391}00391 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00392}00392         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00393}00393 \textcolor{comment}{         * We upset the sequencer :-\/(}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00394}00394 \textcolor{comment}{         * Lookup the error message}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00395}00395 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00396}00396         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00397}00397         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00398}00398 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00399}00399         error = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8fe83ac76edc595f6b98cd4a4127aed5}{ERROR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00400}00400         \textcolor{keywordflow}{for} (i = 0; error != 1 \&\& i < \mbox{\hyperlink{aic7xxx_8c_a4b8707dbc306bee29d54eaea3a12dc0e}{num\_errors}}; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00401}00401                 error >>= 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00402}00402         printf(\textcolor{stringliteral}{"{}\%s: brkadrint, \%s at seqaddr = 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00403}00403                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), \mbox{\hyperlink{aic7xxx_8c_a4787a7b4ac1c918c3c19d0e366569e8e}{ahc\_hard\_errors}}[i].errmesg,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00404}00404                \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a174c1b97635e3f30f94c888b47436dc5}{SEQADDR0}}) |}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00405}00405                (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_abeaf863227b4bb81888cf9ebc4249625}{SEQADDR1}}) << 8));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00407}00407         \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00408}00408 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00409}00409         \textcolor{comment}{/* Tell everyone that this HBA is no longer available */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00410}00410         \mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{ahc\_abort\_scbs}}(ahc, CAM\_TARGET\_WILDCARD, \mbox{\hyperlink{aic79xx_8h_ac9dcdba2096f6b3adab742b8b1a256c2}{ALL\_CHANNELS}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00411}00411                        CAM\_LUN\_WILDCARD, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3ac76018baf54734513ce07029ab5ac3}{ROLE\_UNKNOWN}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00412}00412                        CAM\_NO\_HBA);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00413}00413 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00414}00414         \textcolor{comment}{/* Disable all interrupt sources by resetting the controller */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00415}00415         \mbox{\hyperlink{aic7xxx_8c_a4d932ba85942891cfc0f7aa94f210b29}{ahc\_shutdown}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00416}00416 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00417}00417 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00418}00418 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00419}\mbox{\hyperlink{aic7xxx_8c_a1446abf4918434845be9f1126dce928e}{00419}} \mbox{\hyperlink{aic7xxx_8c_a1446abf4918434845be9f1126dce928e}{ahc\_handle\_seqint}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int intstat)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00420}00420 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00421}00421         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00422}00422         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00423}00423 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00424}00424         \mbox{\hyperlink{aic7xxx_8c_a58ddd232933fb66f2cab3d543f7ccc35}{ahc\_fetch\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00426}00426         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00427}00427 \textcolor{comment}{         * Clear the upper byte that holds SEQINT status}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00428}00428 \textcolor{comment}{         * codes and clear the SEQINT bit. We will unpause}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00429}00429 \textcolor{comment}{         * the sequencer, if appropriate, after servicing}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00430}00430 \textcolor{comment}{         * the request.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00431}00431 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00432}00432         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_afe8d33af3cc220a2696e735171f7639c}{CLRSEQINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00433}00433         \textcolor{keywordflow}{switch} (intstat \& \mbox{\hyperlink{aic7xxx__reg_8h_a7f5f9f17bccdc1ea86cb290322b28b83}{SEQINT\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00434}00434         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_a4d423654b2947b2761884f9f1dc31f00}{BAD\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00435}00435         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00436}00436                 u\_int  scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00437}00437                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhardware__scb}{hardware\_scb}} *hscb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00438}00438 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00439}00439                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00440}00440 \textcolor{comment}{                 * Set the default return value to 0 (don't}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00441}00441 \textcolor{comment}{                 * send sense).  The sense code will change}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00442}00442 \textcolor{comment}{                 * this if needed.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00443}00443 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00444}00444                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3ec5d6001e3f6782a68417d611766b33}{RETURN\_1}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00445}00445 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00446}00446                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00447}00447 \textcolor{comment}{                 * The sequencer will notify us when a command}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00448}00448 \textcolor{comment}{                 * has an error that would be of interest to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00449}00449 \textcolor{comment}{                 * the kernel.  This allows us to leave the sequencer}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00450}00450 \textcolor{comment}{                 * running in the common case of command completes}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00451}00451 \textcolor{comment}{                 * without error.  The sequencer will already have}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00452}00452 \textcolor{comment}{                 * dma'd the SCB back up to us, so we can reference}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00453}00453 \textcolor{comment}{                 * the in kernel copy directly.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00454}00454 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00455}00455                 scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00456}00456                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00457}00457                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00458}00458                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00459}00459                         printf(\textcolor{stringliteral}{"{}ahc\_intr -\/ referenced scb "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00460}00460                                \textcolor{stringliteral}{"{}not valid during seqint 0x\%x scb(\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00461}00461                                intstat, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00462}00462                         \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00463}00463                         panic(\textcolor{stringliteral}{"{}for safety"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00464}00464                         \textcolor{keywordflow}{goto} unpause;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00465}00465                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00467}00467                 hscb = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}; }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00469}00469                 \textcolor{comment}{/* Don't want to clobber the original sense code */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00470}00470                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116abe2d7ff364f616c0f6dce1621e444b78}{SCB\_SENSE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00471}00471                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00472}00472 \textcolor{comment}{                         * Clear the SCB\_SENSE Flag and have}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00473}00473 \textcolor{comment}{                         * the sequencer do a normal command}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00474}00474 \textcolor{comment}{                         * complete.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00475}00475 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00476}00476                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \&= \string~SCB\_SENSE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00477}00477                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, CAM\_AUTOSENSE\_FAIL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00478}00478                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00479}00479                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00480}00480                 \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, CAM\_SCSI\_STATUS\_ERROR);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00481}00481                 \textcolor{comment}{/* Freeze the queue until the client sees the error. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00482}00482                 \mbox{\hyperlink{aic7xxx_8c_ae8a25a1ebebbda161251b87e5f0b5e9b}{ahc\_freeze\_devq}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00483}00483                 \mbox{\hyperlink{aic__osm__lib_8h_ae64ada1cd2c51ce61826f9a2423c729f}{aic\_freeze\_scb}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00484}00484                 \mbox{\hyperlink{aic__osm__lib_8h_a32f9b45cba79901558a5c4977f685ef4}{aic\_set\_scsi\_status}}(\mbox{\hyperlink{structscb}{scb}}, hscb-\/>\mbox{\hyperlink{structhardware__scb_ae212297c91da823a0c6dc55c7b06e8e3}{shared\_data}}.\mbox{\hyperlink{structhardware__scb_af1ad4aece26f02502ab0aa90105cc61a}{status}}.\mbox{\hyperlink{structstatus__pkt_a19ec29d1792dd5ba11d852b650b8ae64}{scsi\_status}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00485}00485                 \textcolor{keywordflow}{switch} (hscb-\/>\mbox{\hyperlink{structhardware__scb_ae212297c91da823a0c6dc55c7b06e8e3}{shared\_data}}.\mbox{\hyperlink{structhardware__scb_af1ad4aece26f02502ab0aa90105cc61a}{status}}.\mbox{\hyperlink{structstatus__pkt_a19ec29d1792dd5ba11d852b650b8ae64}{scsi\_status}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00486}00486                 \textcolor{keywordflow}{case} SCSI\_STATUS\_OK:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00487}00487                         printf(\textcolor{stringliteral}{"{}\%s: Interrupted for staus of 0???\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00488}00488                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00489}00489                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00490}00490                 \textcolor{keywordflow}{case} SCSI\_STATUS\_CMD\_TERMINATED:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00491}00491                 \textcolor{keywordflow}{case} SCSI\_STATUS\_CHECK\_COND:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00492}00492                 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00493}00493                         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}} *sg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00494}00494                         \textcolor{keyword}{struct }scsi\_sense *sc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00495}00495                         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *targ\_info;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00496}00496                         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00497}00497                         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__transinfo}{ahc\_transinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00498}00498 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00499}00499                         \textcolor{keywordflow}{if} (ahc\_debug \& AHC\_SHOW\_SENSE) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00500}00500                                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00501}00501                                 printf(\textcolor{stringliteral}{"{}SCB \%d: requests Check Status\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00502}00502                                        \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00503}00503                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00504}00504 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00506}00506                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a7c44b8adfa41905f4a2f1b792d6f1c0e}{aic\_perform\_autosense}}(\mbox{\hyperlink{structscb}{scb}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00507}00507                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00508}00508 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00509}00509                         targ\_info = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00510}00510                                                         devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00511}00511                                                         devinfo.\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00512}00512                                                         devinfo.\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00513}00513                                                         \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00514}00514                         tinfo = \&targ\_info-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00515}00515                         sg = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00516}00516                         sc = (\textcolor{keyword}{struct }scsi\_sense *)(\&hscb-\/>\mbox{\hyperlink{structhardware__scb_ae212297c91da823a0c6dc55c7b06e8e3}{shared\_data}}.\mbox{\hyperlink{structhardware__scb_a14efe9660ffe2cce917f1c0a16921efc}{cdb}}); }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00517}00517                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00518}00518 \textcolor{comment}{                         * Save off the residual if there is one.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00519}00519 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00520}00520                         \mbox{\hyperlink{aic7xxx__inline_8h_a47f5ef9cf4b3820881a2c0a92992c45e}{ahc\_update\_residual}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00521}00521 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00522}00522                         \textcolor{keywordflow}{if} (ahc\_debug \& AHC\_SHOW\_SENSE) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00523}00523                                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00524}00524                                 printf(\textcolor{stringliteral}{"{}Sending Sense\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00525}00525                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00526}00526 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00527}00527                         sg-\/>\mbox{\hyperlink{structahc__dma__seg_a698746716df808d8ad04cdb532eedc23}{addr}} = \mbox{\hyperlink{aic7xxx__inline_8h_a5a7dca592f4e2ab7e6827abdd0f57bb2}{ahc\_get\_sense\_bufaddr}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00528}00528                         sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}} = \mbox{\hyperlink{aic__osm__lib_8h_a4a7e1bbd1e33be37ebde27ba358cd266}{aic\_get\_sense\_bufsize}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00529}00529                         sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}} |= \mbox{\hyperlink{aic7xxx_8h_ae5d3e51af41dfbe657da890323dd5360}{AHC\_DMA\_LAST\_SEG}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00531}00531                         \textcolor{comment}{/* Fixup byte order */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00532}00532                         sg-\/>\mbox{\hyperlink{structahc__dma__seg_a698746716df808d8ad04cdb532eedc23}{addr}} = \mbox{\hyperlink{aic__osm__lib_8h_af9fcf6e15aaf52b98b0e2e9fda5e33d8}{aic\_htole32}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a698746716df808d8ad04cdb532eedc23}{addr}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00533}00533                         sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}} = \mbox{\hyperlink{aic__osm__lib_8h_af9fcf6e15aaf52b98b0e2e9fda5e33d8}{aic\_htole32}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00534}00534 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00535}00535                         sc-\/>opcode = REQUEST\_SENSE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00536}00536                         sc-\/>byte2 = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00537}00537                         \textcolor{keywordflow}{if} (tinfo-\/>\mbox{\hyperlink{structahc__transinfo_a2fc7287057c602891a37345021293853}{protocol\_version}} <= SCSI\_REV\_2}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00538}00538                          \&\& \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}}) < 8)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00539}00539                                 sc-\/>byte2 = \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}}) << 5;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00540}00540                         sc-\/>unused[0] = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00541}00541                         sc-\/>unused[1] = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00542}00542                         sc-\/>length = sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00543}00543                         sc-\/>control = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00544}00544 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00545}00545                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00546}00546 \textcolor{comment}{                         * We can't allow the target to disconnect.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00547}00547 \textcolor{comment}{                         * This will be an untagged transaction and}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00548}00548 \textcolor{comment}{                         * having the target disconnect will make this}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00549}00549 \textcolor{comment}{                         * transaction indestinguishable from outstanding}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00550}00550 \textcolor{comment}{                         * tagged transactions.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00551}00551 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00552}00552                         hscb-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00553}00553 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00554}00554                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00555}00555 \textcolor{comment}{                         * This request sense could be because the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00556}00556 \textcolor{comment}{                         * the device lost power or in some other}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00557}00557 \textcolor{comment}{                         * way has lost our transfer negotiations.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00558}00558 \textcolor{comment}{                         * Renegotiate if appropriate.  Unit attention}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00559}00559 \textcolor{comment}{                         * errors will be reported before any data}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00560}00560 \textcolor{comment}{                         * phases occur.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00561}00561 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00562}00562                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a903a7d135ee0c675180295bb03f33011}{aic\_get\_residual}}(\mbox{\hyperlink{structscb}{scb}}) }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00563}00563                          == \mbox{\hyperlink{aic__osm__lib_8h_aafa3967a4195122f59e15a2ee11be5ab}{aic\_get\_transfer\_length}}(\mbox{\hyperlink{structscb}{scb}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00564}00564                                 \mbox{\hyperlink{aic7xxx_8c_a15ffc86f240511f385020b670e21eb15}{ahc\_update\_neg\_request}}(ahc, \&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00565}00565                                                        tstate, targ\_info,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00566}00566                                                        \mbox{\hyperlink{aic7xxx_8h_a4c521b818b5228aacca55283b14509aea6668e21270f998ea20298e1f70c563c3}{AHC\_NEG\_IF\_NON\_ASYNC}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00567}00567                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00568}00568                         \textcolor{keywordflow}{if} (tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_ab3ed80880685ed5e70e778f0e0cd580e}{auto\_negotiate}} \& devinfo.\mbox{\hyperlink{structahc__devinfo_a53529d990371fdbd81f9828ae2ea0485}{target\_mask}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00569}00569                                 hscb-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} |= \mbox{\hyperlink{aic79xx__reg_8h_aa0450131583d41582497643e1c7d0369}{MK\_MESSAGE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00570}00570                                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \&= \string~SCB\_NEGOTIATE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00571}00571                                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a74a01505207b28705952cd462418c54c}{SCB\_AUTO\_NEGOTIATE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00572}00572                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00573}00573                         hscb-\/>\mbox{\hyperlink{structhardware__scb_a4cddac5a897ed416676a31331f372d23}{cdb\_len}} = \textcolor{keyword}{sizeof}(*sc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00574}00574                         hscb-\/>\mbox{\hyperlink{structhardware__scb_a725729afe221927f58c4bae09007c981}{dataptr}} = sg-\/>\mbox{\hyperlink{structahc__dma__seg_a698746716df808d8ad04cdb532eedc23}{addr}}; }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00575}00575                         hscb-\/>\mbox{\hyperlink{structhardware__scb_a46c2f314a3f946135c7c438972b50888}{datacnt}} = sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00576}00576                         hscb-\/>\mbox{\hyperlink{structhardware__scb_a02d4c583482881c8ca27fc46820f4ff6}{sgptr}} = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_abc25133eecf30874436ff01990c52467}{sg\_list\_phys}} | \mbox{\hyperlink{aic79xx__reg_8h_a8114078b739311bb4a7d3b781d55b4d9}{SG\_FULL\_RESID}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00577}00577                         hscb-\/>\mbox{\hyperlink{structhardware__scb_a02d4c583482881c8ca27fc46820f4ff6}{sgptr}} = \mbox{\hyperlink{aic__osm__lib_8h_af9fcf6e15aaf52b98b0e2e9fda5e33d8}{aic\_htole32}}(hscb-\/>\mbox{\hyperlink{structhardware__scb_a02d4c583482881c8ca27fc46820f4ff6}{sgptr}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00578}00578                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_aea888a6f4a6df72dd669e37ad50fc9a6}{sg\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00579}00579                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116abe2d7ff364f616c0f6dce1621e444b78}{SCB\_SENSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00580}00580                         \mbox{\hyperlink{aic7xxx_8c_a94475d8eb8cca74f3f9583eda535e5d9}{ahc\_qinfifo\_requeue\_tail}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00581}00581                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3ec5d6001e3f6782a68417d611766b33}{RETURN\_1}}, \mbox{\hyperlink{aic79xx__reg_8h_ad09d572e4080567962d99e06b61ec229}{SEND\_SENSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00582}00582                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00583}00583 \textcolor{comment}{                         * Ensure we have enough time to actually}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00584}00584 \textcolor{comment}{                         * retrieve the sense, but only schedule}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00585}00585 \textcolor{comment}{                         * the timer if we are not in recovery or}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00586}00586 \textcolor{comment}{                         * this is a recovery SCB that is allowed}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00587}00587 \textcolor{comment}{                         * to have an active timer.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00588}00588 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00589}00589                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a44f8e4af1ecb85887176065bfe6b5349}{recovery\_scbs}} == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00590}00590                          || (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ae37965a9b45c0e29840d1996520121dc}{SCB\_RECOVERY\_SCB}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00591}00591                                 \mbox{\hyperlink{aic__osm__lib_8h_aa3e5e5f11a6e2093901936356f6f68af}{aic\_scb\_timer\_reset}}(\mbox{\hyperlink{structscb}{scb}}, 5 * 1000);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00592}00592                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00593}00593                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00594}00594                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00595}00595                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00596}00596                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00597}00597                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00598}00598         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00599}00599         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_a82364b047b41d18199c9372ace974305}{NO\_MATCH}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00600}00600         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00601}00601                 \textcolor{comment}{/* Ensure we don't leave the selection hardware on */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00602}00602                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00603}00603                          \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}) \& (\mbox{\hyperlink{aic79xx__reg_8h_a5130b53e9a5c5ef1cf67782e27aafe44}{ENSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a79ddc1008bee9be3dabf244839710e29}{ENRSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a73f4f4cb70a503ed678c662d81f59ac4}{ENAUTOATNP}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00604}00604 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00605}00605                 printf(\textcolor{stringliteral}{"{}\%s:\%c:\%d: no active SCB for reconnecting "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00606}00606                        \textcolor{stringliteral}{"{}target -\/ issuing BUS DEVICE RESET\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00607}00607                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo.\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00608}00608                 printf(\textcolor{stringliteral}{"{}SAVED\_SCSIID == 0x\%x, SAVED\_LUN == 0x\%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00609}00609                        \textcolor{stringliteral}{"{}ARG\_1 == 0x\%x ACCUM = 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00610}00610                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a0108c7ce82af6260f8e7f6b165b1743c}{SAVED\_SCSIID}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_abc9d7d3c29d1a241838c7708ede0ce4e}{SAVED\_LUN}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00611}00611                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a98c86d6a95b33257a7ce710885fbeb00}{ARG\_1}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac3e2febb13bfdbee4c98e7e8dd3e256e}{ACCUM}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00612}00612                 printf(\textcolor{stringliteral}{"{}SEQ\_FLAGS == 0x\%x, SCBPTR == 0x\%x, BTT == 0x\%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00613}00613                        \textcolor{stringliteral}{"{}SINDEX == 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00614}00614                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00615}00615                        \mbox{\hyperlink{aic7xxx_8c_aa71002135f4ba7350e887b4f93942ece}{ahc\_index\_busy\_tcl}}(ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00616}00616                             \mbox{\hyperlink{aic79xx_8h_a7d650f0ba38347753d66928363306341}{BUILD\_TCL}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a0108c7ce82af6260f8e7f6b165b1743c}{SAVED\_SCSIID}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00617}00617                                       \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_abc9d7d3c29d1a241838c7708ede0ce4e}{SAVED\_LUN}}))),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00618}00618                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6ab61aec4b921a3e3f5e886d039945e3}{SINDEX}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00619}00619                 printf(\textcolor{stringliteral}{"{}SCSIID == 0x\%x, SCB\_SCSIID == 0x\%x, SCB\_LUN == 0x\%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00620}00620                        \textcolor{stringliteral}{"{}SCB\_TAG == 0x\%x, SCB\_CONTROL == 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00621}00621                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ac41cdf130fdc7b5a17b8d4a75c0c4943}{SCSIID}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c82257e3dc3203046a2cfc8f60a8b62}{SCB\_SCSIID}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00622}00622                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71a69c23bfda16efd48dda0abb7649fe}{SCB\_LUN}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00623}00623                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00624}00624                 printf(\textcolor{stringliteral}{"{}SCSIBUSL == 0x\%x, SCSISIGI == 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00625}00625                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4de405da994a996c3df67693729e7e42}{SCSIBUSL}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00626}00626                 printf(\textcolor{stringliteral}{"{}SXFRCTL0 == 0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00627}00627                 printf(\textcolor{stringliteral}{"{}SEQCTL == 0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4d65228d61c0e3a8c669dcaebb662830}{SEQCTL}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00628}00628                 \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00629}00629                 ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[0] = MSG\_BUS\_DEV\_RESET;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00630}00630                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00631}00631                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00632}00632                 ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64ac904c43fe6c4e179d4289e72abb2e4e8}{MSG\_TYPE\_INITIATOR\_MSGOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00633}00633                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}, \mbox{\hyperlink{aic79xx__reg_8h_a8f4dfbff3c1984e0a76bdd80c1fff1bd}{HOST\_MSG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00634}00634                 \mbox{\hyperlink{aic7xxx_8c_a99fb434ac77fcfbde1cf06317005009d}{ahc\_assert\_atn}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00635}00635                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00636}00636         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00637}00637         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_accadf94402bd509820cb8b792a916ba5}{SEND\_REJECT}}: }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00638}00638         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00639}00639                 u\_int rejbyte = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac3e2febb13bfdbee4c98e7e8dd3e256e}{ACCUM}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00640}00640                 printf(\textcolor{stringliteral}{"{}\%s:\%c:\%d: Warning -\/ unknown message received from "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00641}00641                        \textcolor{stringliteral}{"{}target (0x\%x).  Rejecting\(\backslash\)n"{}}, }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00642}00642                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo.\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, rejbyte);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00643}00643                 \textcolor{keywordflow}{break}; }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00644}00644         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00645}00645         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_a13180e7551979f7ae8deac61f3c60248}{PROTO\_VIOLATION}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00646}00646         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00647}00647                 \mbox{\hyperlink{aic7xxx_8c_afa00cf489b7e851f882fc08f90c17574}{ahc\_handle\_proto\_violation}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00648}00648                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00649}00649         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00650}00650         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_a8912484efca002ee7e4e9e92e66933ef}{IGN\_WIDE\_RES}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00651}00651                 \mbox{\hyperlink{aic7xxx_8c_a9b10951ff4d788ca30c37748249dcf95}{ahc\_handle\_ign\_wide\_residue}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00652}00652                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00653}00653         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_a9ab7303c3a4fd6b57b22a50f9c591838}{PDATA\_REINIT}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00654}00654                 \mbox{\hyperlink{aic7xxx_8c_a70b8981d8d1874b53dc20ed487bf9a09}{ahc\_reinitialize\_dataptrs}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00655}00655                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00656}00656         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_ae47034fe17e3e02c78338066c11b98eb}{BAD\_PHASE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00657}00657         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00658}00658                 u\_int lastphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00659}00659 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00660}00660                 lastphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00661}00661                 printf(\textcolor{stringliteral}{"{}\%s:\%c:\%d: unknown scsi bus phase \%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00662}00662                        \textcolor{stringliteral}{"{}lastphase = 0x\%x.  Attempting to continue\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00663}00663                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo.\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00664}00664                        lastphase, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00665}00665                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00666}00666         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00667}00667         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_a7f8721ffba4441def7bf293955688dde}{MISSED\_BUSFREE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00668}00668         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00669}00669                 u\_int lastphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00670}00670 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00671}00671                 lastphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00672}00672                 printf(\textcolor{stringliteral}{"{}\%s:\%c:\%d: Missed busfree. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00673}00673                        \textcolor{stringliteral}{"{}Lastphase = 0x\%x, Curphase = 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00674}00674                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo.\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00675}00675                        lastphase, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00676}00676                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00677}00677                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00678}00678         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00679}00679         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_aa24469c8cc3f7dbbdbfd83362e7db9c2}{HOST\_MSG\_LOOP}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00680}00680         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00681}00681                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00682}00682 \textcolor{comment}{                 * The sequencer has encountered a message phase}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00683}00683 \textcolor{comment}{                 * that requires host assistance for completion.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00684}00684 \textcolor{comment}{                 * While handling the message phase(s), we will be}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00685}00685 \textcolor{comment}{                 * notified by the sequencer after each byte is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00686}00686 \textcolor{comment}{                 * transferred so we can track bus phase changes.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00687}00687 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00688}00688 \textcolor{comment}{                 * If this is the first time we've seen a HOST\_MSG\_LOOP}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00689}00689 \textcolor{comment}{                 * interrupt, initialize the state of the host message}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00690}00690 \textcolor{comment}{                 * loop.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00691}00691 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00692}00692                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} == \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64affd76f64d6051bb432e968a2227bc6bd}{MSG\_TYPE\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00693}00693                         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00694}00694                         u\_int scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00695}00695                         u\_int bus\_phase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00696}00696 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00697}00697                         bus\_phase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_aea6cfd941193dfb218cbf1e20f2279cb}{PHASE\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00698}00698                         \textcolor{keywordflow}{if} (bus\_phase != \mbox{\hyperlink{aic79xx__reg_8h_aa62d3b62a4fec478f16f01817f71f88e}{P\_MESGIN}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00699}00699                          \&\& bus\_phase != \mbox{\hyperlink{aic79xx__reg_8h_af8aa57a40c3ae80362a3815c2dd02461}{P\_MESGOUT}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00700}00700                                 printf(\textcolor{stringliteral}{"{}ahc\_intr: HOST\_MSG\_LOOP bad "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00701}00701                                        \textcolor{stringliteral}{"{}phase 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00702}00702                                       bus\_phase);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00703}00703                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00704}00704 \textcolor{comment}{                                 * Probably transitioned to bus free before}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00705}00705 \textcolor{comment}{                                 * we got here.  Just punt the message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00706}00706 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00707}00707                                 \mbox{\hyperlink{aic7xxx_8c_a77920c2be2bda9100b97cbd841b5464c}{ahc\_clear\_intstat}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00708}00708                                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00709}00709                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00710}00710                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00711}00711 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00712}00712                         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00713}00713                         \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00714}00714                         \textcolor{keywordflow}{if} (devinfo.\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}} == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00715}00715                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00716}00716                                         panic(\textcolor{stringliteral}{"{}HOST\_MSG\_LOOP with "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00717}00717                                               \textcolor{stringliteral}{"{}invalid SCB \%x\(\backslash\)n"{}}, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00718}00718 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00719}00719                                 \textcolor{keywordflow}{if} (bus\_phase == \mbox{\hyperlink{aic79xx__reg_8h_af8aa57a40c3ae80362a3815c2dd02461}{P\_MESGOUT}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00720}00720                                         \mbox{\hyperlink{aic7xxx_8c_a54bc35f4377d46ab801dd00cb61d16ee}{ahc\_setup\_initiator\_msgout}}(ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00721}00721                                                                    \&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00722}00722                                                                    \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00723}00723                                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00724}00724                                         ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00725}00725                                             \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64aa66e8b3ff71c587a3be6c56741053543}{MSG\_TYPE\_INITIATOR\_MSGIN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00726}00726                                         ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00727}00727                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00728}00728                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00729}00729 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00730}00730                         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00731}00731                                 \textcolor{keywordflow}{if} (bus\_phase == \mbox{\hyperlink{aic79xx__reg_8h_af8aa57a40c3ae80362a3815c2dd02461}{P\_MESGOUT}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00732}00732                                         ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00733}00733                                             \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64ae69b690e896b9c0bfce09e3164a71a58}{MSG\_TYPE\_TARGET\_MSGOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00734}00734                                         ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00735}00735                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00736}00736                                 \textcolor{keywordflow}{else} }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00737}00737                                         ahc\_setup\_target\_msgin(ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00738}00738                                                                \&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00739}00739                                                                \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00740}00740                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00741}00741 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00742}00742                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00743}00743 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00744}00744                 \mbox{\hyperlink{aic7xxx_8c_a4f3aa3e651fac361937174d6e8c41bc2}{ahc\_handle\_message\_phase}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00745}00745                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00746}00746         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00747}00747         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic7xxx__reg_8h_a44920e207fdfa348276b785c923b1b57}{PERR\_DETECTED}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00748}00748         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00749}00749                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00750}00750 \textcolor{comment}{                 * If we've cleared the parity error interrupt}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00751}00751 \textcolor{comment}{                 * but the sequencer still believes that SCSIPERR}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00752}00752 \textcolor{comment}{                 * is true, it must be that the parity error is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00753}00753 \textcolor{comment}{                 * for the currently presented byte on the bus,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00754}00754 \textcolor{comment}{                 * and we are not in a phase (data-\/in) where we will}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00755}00755 \textcolor{comment}{                 * eventually ack this byte.  Ack the byte and}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00756}00756 \textcolor{comment}{                 * throw it away in the hope that the target will}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00757}00757 \textcolor{comment}{                 * take us to message out to deliver the appropriate}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00758}00758 \textcolor{comment}{                 * error message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00759}00759 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00760}00760                 \textcolor{keywordflow}{if} ((intstat \& \mbox{\hyperlink{aic79xx__reg_8h_a6f930ae61bc1a12d05b7f46f1b23383b}{SCSIINT}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00761}00761                  \&\& (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a02e1fe4793727dacf1d2b776af131c55}{SSTAT1}}) \& \mbox{\hyperlink{aic79xx__reg_8h_adc4c3136435a2ae077f3affe551d100c}{SCSIPERR}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00762}00762                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00763}00763                                 u\_int curphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00764}00764 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00765}00765                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00766}00766 \textcolor{comment}{                                 * The hardware will only let you ack bytes}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00767}00767 \textcolor{comment}{                                 * if the expected phase in SCSISIGO matches}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00768}00768 \textcolor{comment}{                                 * the current phase.  Make sure this is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00769}00769 \textcolor{comment}{                                 * currently the case.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00770}00770 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00771}00771                                 curphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_aea6cfd941193dfb218cbf1e20f2279cb}{PHASE\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00772}00772                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}}, curphase);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00773}00773                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5ab4a127f8d3de2d9e05937be836098b}{SCSISIGO}}, curphase);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00774}00774                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00775}00775                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& (\mbox{\hyperlink{aic79xx__reg_8h_a78fa9046671b12064fc657d100d061dc}{CDI}}|\mbox{\hyperlink{aic79xx__reg_8h_a80e5d8004faf31ff4b1e30e7a8ae2a79}{MSGI}})) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00776}00776                                 \textcolor{keywordtype}{int} wait;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00777}00777 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00778}00778                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00779}00779 \textcolor{comment}{                                 * In a data phase.  Faster to bitbucket}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00780}00780 \textcolor{comment}{                                 * the data than to individually ack each}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00781}00781 \textcolor{comment}{                                 * byte.  This is also the only strategy}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00782}00782 \textcolor{comment}{                                 * that will work with AUTOACK enabled.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00783}00783 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00784}00784                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00785}00785                                          \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}}) | \mbox{\hyperlink{aic79xx__reg_8h_a44b64519799d158d8bac4e20460fe50f}{BITBUCKET}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00786}00786                                 wait = 5000;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00787}00787                                 \textcolor{keywordflow}{while} (-\/-\/wait != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00788}00788                                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00789}00789                                           \& (\mbox{\hyperlink{aic79xx__reg_8h_a78fa9046671b12064fc657d100d061dc}{CDI}}|\mbox{\hyperlink{aic79xx__reg_8h_a80e5d8004faf31ff4b1e30e7a8ae2a79}{MSGI}})) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00790}00790                                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00791}00791                                         \mbox{\hyperlink{aic__osm__lib_8h_a23559a914641f4b70a959f25b8281c87}{aic\_delay}}(100);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00792}00792                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00793}00793                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00794}00794                                          \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a44b64519799d158d8bac4e20460fe50f}{BITBUCKET}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00795}00795                                 \textcolor{keywordflow}{if} (wait == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00796}00796                                         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00797}00797                                         u\_int   scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00798}00798 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00799}00799                                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00800}00800                                         printf(\textcolor{stringliteral}{"{}Unable to clear parity error.  "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00801}00801                                                \textcolor{stringliteral}{"{}Resetting bus.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00802}00802                                         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00803}00803                                         \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00804}00804                                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00805}00805                                                 \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00806}00806                                                     CAM\_UNCOR\_PARITY);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00807}00807                                         \mbox{\hyperlink{aic7xxx_8c_ac9e6be5168888f595fce1e51193b9938}{ahc\_reset\_channel}}(ahc, devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00808}00808                                                           \textcolor{comment}{/*init reset*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00809}00809                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00810}00810                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00811}00811                                 \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a02162a656348425c4b55305c36762776}{SCSIDATL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00812}00812                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00813}00813                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00814}00814                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00815}00815         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00816}00816         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_a71b59e9e65a8625df1d0af2143664c52}{DATA\_OVERRUN}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00817}00817         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00818}00818                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00819}00819 \textcolor{comment}{                 * When the sequencer detects an overrun, it}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00820}00820 \textcolor{comment}{                 * places the controller in "{}BITBUCKET"{} mode}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00821}00821 \textcolor{comment}{                 * and allows the target to complete its transfer.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00822}00822 \textcolor{comment}{                 * Unfortunately, none of the counters get updated}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00823}00823 \textcolor{comment}{                 * when the controller is in this mode, so we have}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00824}00824 \textcolor{comment}{                 * no way of knowing how large the overrun was.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00825}00825 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00826}00826                 u\_int scbindex = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00827}00827                 u\_int lastphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00828}00828                 u\_int i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00829}00829 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00830}00830                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scbindex);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00831}00831                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx_8c_affc490c45bd148300acc26e210a1f2c2}{num\_phases}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00832}00832                         \textcolor{keywordflow}{if} (lastphase == \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[i].phase)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00833}00833                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00834}00834                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00835}00835                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00836}00836                 printf(\textcolor{stringliteral}{"{}data overrun detected \%s."{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00837}00837                        \textcolor{stringliteral}{"{}  Tag == 0x\%x.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00838}00838                        \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[i].phasemsg,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00839}00839                        \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00840}00840                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00841}00841                 printf(\textcolor{stringliteral}{"{}\%s seen Data Phase.  Length = \%ld.  NumSGs = \%d.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00842}00842                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a0b6af1e7145ae4b7d2a3e7f21351fd03}{DPHASE}} ? \textcolor{stringliteral}{"{}Have"{}} : \textcolor{stringliteral}{"{}Haven't"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00843}00843                        \mbox{\hyperlink{aic__osm__lib_8h_aafa3967a4195122f59e15a2ee11be5ab}{aic\_get\_transfer\_length}}(\mbox{\hyperlink{structscb}{scb}}), \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_aea888a6f4a6df72dd669e37ad50fc9a6}{sg\_count}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00844}00844                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_aea888a6f4a6df72dd669e37ad50fc9a6}{sg\_count}} > 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00845}00845                         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_aea888a6f4a6df72dd669e37ad50fc9a6}{sg\_count}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00846}00846                                 printf(\textcolor{stringliteral}{"{}sg[\%d] -\/ Addr 0x\%x\%x : Length \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00847}00847                                        i,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00848}00848                                        (\mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}[i].len) >> 24}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00849}00849                                         \& \mbox{\hyperlink{aic79xx__reg_8h_aa7ebae5f84cc920f7b7ab178b1d4e36b}{SG\_HIGH\_ADDR\_BITS}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00850}00850                                        \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}[i].addr),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00851}00851                                        \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}[i].len)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00852}00852                                        \& \mbox{\hyperlink{aic7xxx_8h_ad9d7f41a161867bcdb98ac3b8d0af9e5}{AHC\_SG\_LEN\_MASK}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00853}00853                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00854}00854                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00855}00855                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00856}00856 \textcolor{comment}{                 * Set this and it will take effect when the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00857}00857 \textcolor{comment}{                 * target does a command complete.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00858}00858 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00859}00859                 \mbox{\hyperlink{aic7xxx_8c_ae8a25a1ebebbda161251b87e5f0b5e9b}{ahc\_freeze\_devq}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00860}00860                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116abe2d7ff364f616c0f6dce1621e444b78}{SCB\_SENSE}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00861}00861                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, CAM\_DATA\_RUN\_ERR);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00862}00862                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00863}00863                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \&= \string~SCB\_SENSE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00864}00864                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, CAM\_AUTOSENSE\_FAIL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00865}00865                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00866}00866                 \mbox{\hyperlink{aic__osm__lib_8h_ae64ada1cd2c51ce61826f9a2423c729f}{aic\_freeze\_scb}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00867}00867 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00868}00868                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00869}00869                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00870}00870 \textcolor{comment}{                         * Clear the channel in case we return}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00871}00871 \textcolor{comment}{                         * to data phase later.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00872}00872 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00873}00873                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00874}00874                                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) | \mbox{\hyperlink{aic7xxx__reg_8h_accc02a8eb1c560b6bf0b157690c63ee2}{CLRSTCNT}}|\mbox{\hyperlink{aic79xx__reg_8h_aa806232116e24b0a0abf743ff816dc80}{CLRCHN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00875}00875                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00876}00876                                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) | \mbox{\hyperlink{aic7xxx__reg_8h_accc02a8eb1c560b6bf0b157690c63ee2}{CLRSTCNT}}|\mbox{\hyperlink{aic79xx__reg_8h_aa806232116e24b0a0abf743ff816dc80}{CLRCHN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00877}00877                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00878}00878                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aceb69a3ab3fe20bfae4ff595ff7aaa69}{AHC\_39BIT\_ADDRESSING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00879}00879                         u\_int dscommand1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00880}00880 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00881}00881                         \textcolor{comment}{/* Ensure HHADDR is 0 for future DMA operations. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00882}00882                         dscommand1 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a33fce670ba44a1d6e2f094a9c33fe6bd}{DSCOMMAND1}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00883}00883                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a33fce670ba44a1d6e2f094a9c33fe6bd}{DSCOMMAND1}}, dscommand1 | \mbox{\hyperlink{aic7xxx__reg_8h_a022593749f22218aa90283dc4ff214eb}{HADDLDSEL0}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00884}00884                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8eb96d5aa9bcb938d02057e4fe207dcc}{HADDR}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00885}00885                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a33fce670ba44a1d6e2f094a9c33fe6bd}{DSCOMMAND1}}, dscommand1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00886}00886                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00887}00887                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00888}00888         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00889}00889         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx__reg_8h_a9e3e26aef29ce9ccf568b2fb36b5b874}{MKMSG\_FAILED}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00890}00890         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00891}00891                 u\_int scbindex;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00892}00892 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00893}00893                 printf(\textcolor{stringliteral}{"{}\%s:\%c:\%d:\%d: Attempt to issue message failed\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00894}00894                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo.\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00895}00895                        devinfo.\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00896}00896                 scbindex = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00897}00897                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scbindex);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00898}00898                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} != NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00899}00899                  \&\& (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ae37965a9b45c0e29840d1996520121dc}{SCB\_RECOVERY\_SCB}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00900}00900                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00901}00901 \textcolor{comment}{                         * Ensure that we didn't put a second instance of this}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00902}00902 \textcolor{comment}{                         * SCB into the QINFIFO.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00903}00903 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00904}00904                         \mbox{\hyperlink{aic7xxx_8c_a6854c2ec2b22382f77741bf98681bcef}{ahc\_search\_qinfifo}}(ahc, \mbox{\hyperlink{aic79xx_8h_a6c0f4b6b37cc0fae8e266811c5ca3815}{SCB\_GET\_TARGET}}(ahc, \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00905}00905                                            \mbox{\hyperlink{aic79xx_8h_aaf5c2a354d6e634b1839c579f220ed69}{SCB\_GET\_CHANNEL}}(ahc, \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00906}00906                                            \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}}), \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00907}00907                                            \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}}, \textcolor{comment}{/*status*/}0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00908}00908                                            \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba6a669222275dfa60191329abcbbe7d6d}{SEARCH\_REMOVE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00909}00909                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00910}00910         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00911}00911         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic7xxx__reg_8h_a149932a612ead12b31498eb8ab0f7d19}{NO\_FREE\_SCB}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00912}00912         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00913}00913                 printf(\textcolor{stringliteral}{"{}\%s: No free or disconnected SCBs\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00914}00914                 \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00915}00915                 panic(\textcolor{stringliteral}{"{}for safety"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00916}00916                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00917}00917         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00918}00918         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic7xxx__reg_8h_ab90d735580f6752676bd95d4b7af5b88}{SCB\_MISMATCH}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00919}00919         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00920}00920                 u\_int scbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00921}00921 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00922}00922                 scbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00923}00923                 printf(\textcolor{stringliteral}{"{}Bogus TAG after DMA.  SCBPTR \%d, tag \%d, our tag \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00924}00924                        scbptr, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a98c86d6a95b33257a7ce710885fbeb00}{ARG\_1}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00925}00925                        ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5534736125c7fdb93b5dd4690a89617d}{hscbs}}[scbptr].\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00926}00926                 \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00927}00927                 panic(\textcolor{stringliteral}{"{}for safety"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00928}00928                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00929}00929         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00930}00930         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic7xxx__reg_8h_a494da497b677da05f7a302152fafd248}{OUT\_OF\_RANGE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00931}00931         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00932}00932                 printf(\textcolor{stringliteral}{"{}\%s: BTT calculation out of range\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00933}00933                 printf(\textcolor{stringliteral}{"{}SAVED\_SCSIID == 0x\%x, SAVED\_LUN == 0x\%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00934}00934                        \textcolor{stringliteral}{"{}ARG\_1 == 0x\%x ACCUM = 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00935}00935                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a0108c7ce82af6260f8e7f6b165b1743c}{SAVED\_SCSIID}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_abc9d7d3c29d1a241838c7708ede0ce4e}{SAVED\_LUN}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00936}00936                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a98c86d6a95b33257a7ce710885fbeb00}{ARG\_1}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac3e2febb13bfdbee4c98e7e8dd3e256e}{ACCUM}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00937}00937                 printf(\textcolor{stringliteral}{"{}SEQ\_FLAGS == 0x\%x, SCBPTR == 0x\%x, BTT == 0x\%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00938}00938                        \textcolor{stringliteral}{"{}SINDEX == 0x\%x\(\backslash\)n, A == 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00939}00939                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00940}00940                        \mbox{\hyperlink{aic7xxx_8c_aa71002135f4ba7350e887b4f93942ece}{ahc\_index\_busy\_tcl}}(ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00941}00941                             \mbox{\hyperlink{aic79xx_8h_a7d650f0ba38347753d66928363306341}{BUILD\_TCL}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a0108c7ce82af6260f8e7f6b165b1743c}{SAVED\_SCSIID}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00942}00942                                       \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_abc9d7d3c29d1a241838c7708ede0ce4e}{SAVED\_LUN}}))),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00943}00943                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6ab61aec4b921a3e3f5e886d039945e3}{SINDEX}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00944}00944                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac3e2febb13bfdbee4c98e7e8dd3e256e}{ACCUM}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00945}00945                 printf(\textcolor{stringliteral}{"{}SCSIID == 0x\%x, SCB\_SCSIID == 0x\%x, SCB\_LUN == 0x\%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00946}00946                        \textcolor{stringliteral}{"{}SCB\_TAG == 0x\%x, SCB\_CONTROL == 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00947}00947                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ac41cdf130fdc7b5a17b8d4a75c0c4943}{SCSIID}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c82257e3dc3203046a2cfc8f60a8b62}{SCB\_SCSIID}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00948}00948                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71a69c23bfda16efd48dda0abb7649fe}{SCB\_LUN}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00949}00949                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00950}00950                 printf(\textcolor{stringliteral}{"{}SCSIBUSL == 0x\%x, SCSISIGI == 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00951}00951                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4de405da994a996c3df67693729e7e42}{SCSIBUSL}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00952}00952                 \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00953}00953                 panic(\textcolor{stringliteral}{"{}for safety"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00954}00954                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00955}00955         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00956}00956         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00957}00957                 printf(\textcolor{stringliteral}{"{}ahc\_intr: seqint, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00958}00958                        \textcolor{stringliteral}{"{}intstat == 0x\%x, scsisigi = 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00959}00959                        intstat, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00960}00960                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00961}00961         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00962}00962 unpause:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00963}00963         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00964}00964 \textcolor{comment}{         *  The sequencer is paused immediately on}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00965}00965 \textcolor{comment}{         *  a SEQINT, so we should restart it when}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00966}00966 \textcolor{comment}{         *  we're done.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00967}00967 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00968}00968         \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00969}00969 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00970}00970 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00971}00971 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00972}\mbox{\hyperlink{aic7xxx_8c_ab535423dc4f4658a46aa1c35ed6a7183}{00972}} \mbox{\hyperlink{aic7xxx_8c_ab535423dc4f4658a46aa1c35ed6a7183}{ahc\_handle\_scsiint}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int intstat)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00973}00973 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00974}00974         u\_int   scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00975}00975         u\_int   status0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00976}00976         u\_int   status;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00977}00977         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00978}00978         \textcolor{keywordtype}{char}    cur\_channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00979}00979         \textcolor{keywordtype}{char}    intr\_channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00980}00980 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00981}00981         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00982}00982          \&\& ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) \& \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}}) != 0))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00983}00983                 cur\_channel = \textcolor{charliteral}{'B'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00984}00984         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00985}00985                 cur\_channel = \textcolor{charliteral}{'A'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00986}00986         intr\_channel = cur\_channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00987}00987 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00988}00988         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00989}00989                 status0 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac4a01506a711aa2647d57131c0ac3e3e}{SSTAT0}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a27b97ec0cf304bb9771c814bbcc8269c}{IOERR}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00990}00990         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00991}00991                 status0 = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00992}00992         status = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a02e1fe4793727dacf1d2b776af131c55}{SSTAT1}}) \& (\mbox{\hyperlink{aic79xx__reg_8h_a175e062bf5386d68d2bce36eaab60359}{SELTO}}|\mbox{\hyperlink{aic79xx__reg_8h_aa8bfa2598f99260b64356ba403b575ac}{SCSIRSTI}}|\mbox{\hyperlink{aic79xx__reg_8h_aa7eaea88f202e7b42991a065f09e1cab}{BUSFREE}}|\mbox{\hyperlink{aic79xx__reg_8h_adc4c3136435a2ae077f3affe551d100c}{SCSIPERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00993}00993         \textcolor{keywordflow}{if} (status == 0 \&\& status0 == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00994}00994                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00995}00995                         \textcolor{comment}{/* Try the other channel */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00996}00996                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) \string^ \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00997}00997                         status = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a02e1fe4793727dacf1d2b776af131c55}{SSTAT1}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00998}00998                                \& (\mbox{\hyperlink{aic79xx__reg_8h_a175e062bf5386d68d2bce36eaab60359}{SELTO}}|\mbox{\hyperlink{aic79xx__reg_8h_aa8bfa2598f99260b64356ba403b575ac}{SCSIRSTI}}|\mbox{\hyperlink{aic79xx__reg_8h_aa7eaea88f202e7b42991a065f09e1cab}{BUSFREE}}|\mbox{\hyperlink{aic79xx__reg_8h_adc4c3136435a2ae077f3affe551d100c}{SCSIPERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l00999}00999                         intr\_channel = (cur\_channel == \textcolor{charliteral}{'A'}) ? \textcolor{charliteral}{'B'} : \textcolor{charliteral}{'A'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01000}01000                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01001}01001                 \textcolor{keywordflow}{if} (status == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01002}01002                         printf(\textcolor{stringliteral}{"{}\%s: Spurious SCSI interrupt\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01003}01003                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_af296256906c9d978cf8f9c97668e3894}{CLRSCSIINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01004}01004                         \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01005}01005                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01006}01006                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01007}01007         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01008}01008 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01009}01009         \textcolor{comment}{/* Make sure the sequencer is in a safe location. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01010}01010         \mbox{\hyperlink{aic7xxx_8c_a71410b7cd014e87227c1ba9697bef195}{ahc\_clear\_critical\_section}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01011}01011 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01012}01012         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01013}01013         \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01014}01014         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} != NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01015}01015          \&\& (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a34d55bcc334ec9cacfab339669a19a0c}{NOT\_IDENTIFIED}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01016}01016                 \mbox{\hyperlink{structscb}{scb}} = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01017}01017 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01018}01018         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01019}01019          \&\& (status0 \& \mbox{\hyperlink{aic79xx__reg_8h_a27b97ec0cf304bb9771c814bbcc8269c}{IOERR}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01020}01020                 \textcolor{keywordtype}{int} now\_lvd;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01021}01021 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01022}01022                 now\_lvd = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a13f2a38e33c766ee5a8ff2d5b5e6dd55}{ENAB40}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01023}01023                 printf(\textcolor{stringliteral}{"{}\%s: Transceiver State Has Changed to \%s mode\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01024}01024                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), now\_lvd ? \textcolor{stringliteral}{"{}LVD"{}} : \textcolor{stringliteral}{"{}SE"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01025}01025                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71f63ed92fccce012183d6df19993581}{CLRSINT0}}, \mbox{\hyperlink{aic79xx__reg_8h_ac10d2708eeb95f740d5f09fc74e9527b}{CLRIOERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01026}01026                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01027}01027 \textcolor{comment}{                 * When transitioning to SE mode, the reset line}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01028}01028 \textcolor{comment}{                 * glitches, triggering an arbitration bug in some}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01029}01029 \textcolor{comment}{                 * Ultra2 controllers.  This bug is cleared when we}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01030}01030 \textcolor{comment}{                 * assert the reset line.  Since a reset glitch has}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01031}01031 \textcolor{comment}{                 * already occurred with this transition and a}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01032}01032 \textcolor{comment}{                 * transceiver state change is handled just like}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01033}01033 \textcolor{comment}{                 * a bus reset anyway, asserting the reset line}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01034}01034 \textcolor{comment}{                 * ourselves is safe.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01035}01035 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01036}01036                 \mbox{\hyperlink{aic7xxx_8c_ac9e6be5168888f595fce1e51193b9938}{ahc\_reset\_channel}}(ahc, intr\_channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01037}01037                                  \textcolor{comment}{/*Initiate Reset*/}now\_lvd == 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01038}01038         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((status \& \mbox{\hyperlink{aic79xx__reg_8h_aa8bfa2598f99260b64356ba403b575ac}{SCSIRSTI}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01039}01039                 printf(\textcolor{stringliteral}{"{}\%s: Someone reset channel \%c\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01040}01040                         \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), intr\_channel);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01041}01041                 \textcolor{keywordflow}{if} (intr\_channel != cur\_channel)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01042}01042                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) \string^ \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01043}01043                 \mbox{\hyperlink{aic7xxx_8c_ac9e6be5168888f595fce1e51193b9938}{ahc\_reset\_channel}}(ahc, intr\_channel, \textcolor{comment}{/*Initiate Reset*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01044}01044         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((status \& \mbox{\hyperlink{aic79xx__reg_8h_adc4c3136435a2ae077f3affe551d100c}{SCSIPERR}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01045}01045                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01046}01046 \textcolor{comment}{                 * Determine the bus phase and queue an appropriate message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01047}01047 \textcolor{comment}{                 * SCSIPERR is latched true as soon as a parity error}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01048}01048 \textcolor{comment}{                 * occurs.  If the sequencer acked the transfer that}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01049}01049 \textcolor{comment}{                 * caused the parity error and the currently presented}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01050}01050 \textcolor{comment}{                 * transfer on the bus has correct parity, SCSIPERR will}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01051}01051 \textcolor{comment}{                 * be cleared by CLRSCSIPERR.  Use this to determine if}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01052}01052 \textcolor{comment}{                 * we should look at the last phase the sequencer recorded,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01053}01053 \textcolor{comment}{                 * or the current phase presented on the bus.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01054}01054 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01055}01055                 \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01056}01056                 u\_int   mesg\_out;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01057}01057                 u\_int   curphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01058}01058                 u\_int   errorphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01059}01059                 u\_int   lastphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01060}01060                 u\_int   scsirate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01061}01061                 u\_int   i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01062}01062                 u\_int   sstat2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01063}01063                 \textcolor{keywordtype}{int}     silent;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01064}01064 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01065}01065                 lastphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01066}01066                 curphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_aea6cfd941193dfb218cbf1e20f2279cb}{PHASE\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01067}01067                 sstat2 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad6acf83a7db41603ff029c718c402f03}{SSTAT2}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01068}01068                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_af3ec5076a098ed52e079165d0ed39308}{CLRSCSIPERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01069}01069                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01070}01070 \textcolor{comment}{                 * For all phases save DATA, the sequencer won't}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01071}01071 \textcolor{comment}{                 * automatically ack a byte that has a parity error}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01072}01072 \textcolor{comment}{                 * in it.  So the only way that the current phase}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01073}01073 \textcolor{comment}{                 * could be 'data-\/in' is if the parity error is for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01074}01074 \textcolor{comment}{                 * an already acked byte in the data phase.  During}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01075}01075 \textcolor{comment}{                 * synchronous data-\/in transfers, we may actually}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01076}01076 \textcolor{comment}{                 * ack bytes before latching the current phase in}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01077}01077 \textcolor{comment}{                 * LASTPHASE, leading to the discrepancy between}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01078}01078 \textcolor{comment}{                 * curphase and lastphase.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01079}01079 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01080}01080                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a02e1fe4793727dacf1d2b776af131c55}{SSTAT1}}) \& \mbox{\hyperlink{aic79xx__reg_8h_adc4c3136435a2ae077f3affe551d100c}{SCSIPERR}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01081}01081                  || curphase == \mbox{\hyperlink{aic79xx__reg_8h_a80819bc1b3fdf2dc321d9f014c324f1f}{P\_DATAIN}} || curphase == \mbox{\hyperlink{aic79xx__reg_8h_a79a0cabab255cc476136a72d125230f2}{P\_DATAIN\_DT}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01082}01082                         errorphase = curphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01083}01083                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01084}01084                         errorphase = lastphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01085}01085 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01086}01086                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx_8c_affc490c45bd148300acc26e210a1f2c2}{num\_phases}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01087}01087                         \textcolor{keywordflow}{if} (errorphase == \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[i].phase)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01088}01088                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01089}01089                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01090}01090                 mesg\_out = \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[i].\mbox{\hyperlink{structahc__phase__table__entry_a7ef88915bd5dc0df85829bf4cb37d253}{mesg\_out}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01091}01091                 silent = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01092}01092                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01093}01093                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic79xx_8h_af0d6c1c01fb0b2193b5bc1b4aca7c7c9}{SCB\_IS\_SILENT}}(\mbox{\hyperlink{structscb}{scb}}))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01094}01094                                 silent = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01095}01095                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01096}01096                                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01097}01097                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a88c86473d7e704f9f8a57fdda60a08aa}{SCB\_TRANSMISSION\_ERROR}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01098}01098                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01099}01099                         printf(\textcolor{stringliteral}{"{}\%s:\%c:\%d: "{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), intr\_channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01100}01100                                \mbox{\hyperlink{aic79xx_8h_a9227348864b51c7312382787bb426918}{SCSIID\_TARGET}}(ahc, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a0108c7ce82af6260f8e7f6b165b1743c}{SAVED\_SCSIID}})));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01101}01101                 scsirate = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ad9560ac8db2ff0d8cf17c17769b6988c}{SCSIRATE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01102}01102                 \textcolor{keywordflow}{if} (silent == \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01103}01103                         printf(\textcolor{stringliteral}{"{}parity error detected \%s. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01104}01104                                \textcolor{stringliteral}{"{}SEQADDR(0x\%x) SCSIRATE(0x\%x)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01105}01105                                \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[i].phasemsg,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01106}01106                                \mbox{\hyperlink{aic7xxx__inline_8h_a980a18a2a92545197d06cff324d2b7b8}{ahc\_inw}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a174c1b97635e3f30f94c888b47436dc5}{SEQADDR0}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01107}01107                                scsirate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01108}01108                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01109}01109                                 \textcolor{keywordflow}{if} ((sstat2 \& \mbox{\hyperlink{aic7xxx__reg_8h_a434ce3851aec60c21918d5a8ac9a8642}{CRCVALERR}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01110}01110                                         printf(\textcolor{stringliteral}{"{}\(\backslash\)tCRC Value Mismatch\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01111}01111                                 \textcolor{keywordflow}{if} ((sstat2 \& \mbox{\hyperlink{aic7xxx__reg_8h_a5208a88a5a05750717c8e72aa512203a}{CRCENDERR}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01112}01112                                         printf(\textcolor{stringliteral}{"{}\(\backslash\)tNo terminal CRC packet "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01113}01113                                                \textcolor{stringliteral}{"{}recevied\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01114}01114                                 \textcolor{keywordflow}{if} ((sstat2 \& \mbox{\hyperlink{aic7xxx__reg_8h_a98d58036cbcc206842b30a6efe83653b}{CRCREQERR}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01115}01115                                         printf(\textcolor{stringliteral}{"{}\(\backslash\)tIllegal CRC packet "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01116}01116                                                \textcolor{stringliteral}{"{}request\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01117}01117                                 \textcolor{keywordflow}{if} ((sstat2 \& \mbox{\hyperlink{aic7xxx__reg_8h_ade2d8672c33ee9b4c295f939e288b744}{DUAL\_EDGE\_ERR}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01118}01118                                         printf(\textcolor{stringliteral}{"{}\(\backslash\)tUnexpected \%sDT Data Phase\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01119}01119                                                (scsirate \& \mbox{\hyperlink{aic7xxx__reg_8h_ac0cd45f69595a70aa99286918fb3c6ab}{SINGLE\_EDGE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01120}01120                                              ? \textcolor{stringliteral}{"{}"{}} : \textcolor{stringliteral}{"{}non-\/"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01121}01121                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01122}01122                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01123}01123 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01124}01124                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01125}01125                  \&\& (sstat2 \& \mbox{\hyperlink{aic7xxx__reg_8h_ade2d8672c33ee9b4c295f939e288b744}{DUAL\_EDGE\_ERR}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01126}01126                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01127}01127 \textcolor{comment}{                         * This error applies regardless of}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01128}01128 \textcolor{comment}{                         * data direction, so ignore the value}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01129}01129 \textcolor{comment}{                         * in the phase table.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01130}01130 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01131}01131                         mesg\_out = MSG\_INITIATOR\_DET\_ERR;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01132}01132                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01133}01133 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01134}01134                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01135}01135 \textcolor{comment}{                 * We've set the hardware to assert ATN if we   }}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01136}01136 \textcolor{comment}{                 * get a parity error on "{}in"{} phases, so all we  }}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01137}01137 \textcolor{comment}{                 * need to do is stuff the message buffer with}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01138}01138 \textcolor{comment}{                 * the appropriate message.  "{}In"{} phases have set}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01139}01139 \textcolor{comment}{                 * mesg\_out to something other than MSG\_NOP.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01140}01140 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01141}01141                 \textcolor{keywordflow}{if} (mesg\_out != MSG\_NOOP) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01142}01142                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} != \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64affd76f64d6051bb432e968a2227bc6bd}{MSG\_TYPE\_NONE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01143}01143                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a18cc0e5cec7f75d4c666c304d51bd451}{send\_msg\_perror}} = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01144}01144                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01145}01145                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}, mesg\_out);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01146}01146                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01147}01147                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01148}01148 \textcolor{comment}{                 * Force a renegotiation with this target just in}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01149}01149 \textcolor{comment}{                 * case we are out of sync for some external reason}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01150}01150 \textcolor{comment}{                 * unknown (or unreported) by the target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01151}01151 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01152}01152                 \mbox{\hyperlink{aic7xxx_8c_a58ddd232933fb66f2cab3d543f7ccc35}{ahc\_fetch\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01153}01153                 \mbox{\hyperlink{aic7xxx_8c_ae2f558b5a17a2ae39292b46ae742e14f}{ahc\_force\_renegotiation}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01154}01154 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01155}01155                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_af296256906c9d978cf8f9c97668e3894}{CLRSCSIINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01156}01156                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01157}01157         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((status \& \mbox{\hyperlink{aic79xx__reg_8h_a175e062bf5386d68d2bce36eaab60359}{SELTO}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01158}01158                 u\_int   scbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01159}01159 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01160}01160                 \textcolor{comment}{/* Stop the selection */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01161}01161                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01162}01162 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01163}01163                 \textcolor{comment}{/* No more pending messages */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01164}01164                 \mbox{\hyperlink{aic7xxx_8c_a515ae1248f2e8f09eb0ac2ca816a214d}{ahc\_clear\_msg\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01165}01165 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01166}01166                 \textcolor{comment}{/* Clear interrupt state */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01167}01167                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a7c2bfc5988ee9d3637cc2172b7c88b3d}{ENBUSFREE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01168}01168                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_a28f102903890295c33aa69588ec5766d}{CLRSELTIMEO}}|\mbox{\hyperlink{aic79xx__reg_8h_adcad4f02fc1722767a891c52c1fa3ee1}{CLRBUSFREE}}|\mbox{\hyperlink{aic79xx__reg_8h_af3ec5076a098ed52e079165d0ed39308}{CLRSCSIPERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01169}01169 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01170}01170                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01171}01171 \textcolor{comment}{                 * Although the driver does not care about the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01172}01172 \textcolor{comment}{                 * 'Selection in Progress' status bit, the busy}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01173}01173 \textcolor{comment}{                 * LED does.  SELINGO is only cleared by a successful}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01174}01174 \textcolor{comment}{                 * selection, so we must manually clear it to insure}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01175}01175 \textcolor{comment}{                 * the LED turns off just incase no future successful}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01176}01176 \textcolor{comment}{                 * selections occur (e.g. no devices on the bus).}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01177}01177 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01178}01178                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71f63ed92fccce012183d6df19993581}{CLRSINT0}}, \mbox{\hyperlink{aic79xx__reg_8h_ab475cc92ef1a6aee317e06518d61fbe6}{CLRSELINGO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01179}01179 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01180}01180                 scbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aed8758122c520c918c257c19e01d0a91}{WAITING\_SCBH}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01181}01181                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01182}01182                 scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01183}01183 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01184}01184                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01185}01185                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01186}01186                         printf(\textcolor{stringliteral}{"{}\%s: ahc\_intr -\/ referenced scb not "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01187}01187                                \textcolor{stringliteral}{"{}valid during SELTO scb(\%d, \%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01188}01188                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), scbptr, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01189}01189                         \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01190}01190                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01191}01191                         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01192}01192 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01193}01193                         \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_SELTO) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01194}01194                                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01195}01195                                 printf(\textcolor{stringliteral}{"{}Saw Selection Timeout for SCB 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01196}01196                                        scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01197}01197                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01198}01198 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01199}01199                         \mbox{\hyperlink{aic7xxx_8c_abe961e0048c16d782614a37806151386}{ahc\_scb\_devinfo}}(ahc, \&devinfo, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01200}01200                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, CAM\_SEL\_TIMEOUT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01201}01201                         \mbox{\hyperlink{aic7xxx_8c_ae8a25a1ebebbda161251b87e5f0b5e9b}{ahc\_freeze\_devq}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01202}01202 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01203}01203                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01204}01204 \textcolor{comment}{                         * Cancel any pending transactions on the device}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01205}01205 \textcolor{comment}{                         * now that it seems to be missing.  This will}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01206}01206 \textcolor{comment}{                         * also revert us to async/narrow transfers until}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01207}01207 \textcolor{comment}{                         * we can renegotiate with the device.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01208}01208 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01209}01209                         \mbox{\hyperlink{aic7xxx_8c_ad7f416f60ce374a2ad34574734442235}{ahc\_handle\_devreset}}(ahc, \&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01210}01210                                             CAM\_SEL\_TIMEOUT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01211}01211                                             \textcolor{stringliteral}{"{}Selection Timeout"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01212}01212                                             \textcolor{comment}{/*verbose\_level*/}1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01213}01213                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01214}01214                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_af296256906c9d978cf8f9c97668e3894}{CLRSCSIINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01215}01215                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01216}01216         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((status \& \mbox{\hyperlink{aic79xx__reg_8h_aa7eaea88f202e7b42991a065f09e1cab}{BUSFREE}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01217}01217                 \&\& (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a7c2bfc5988ee9d3637cc2172b7c88b3d}{ENBUSFREE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01218}01218                 \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01219}01219                 u\_int   lastphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01220}01220                 u\_int   saved\_scsiid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01221}01221                 u\_int   saved\_lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01222}01222                 u\_int   \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01223}01223                 u\_int   initiator\_role\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01224}01224                 \textcolor{keywordtype}{char}    \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01225}01225                 \textcolor{keywordtype}{int}     printerror;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01226}01226 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01227}01227                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01228}01228 \textcolor{comment}{                 * Clear our selection hardware as soon as possible.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01229}01229 \textcolor{comment}{                 * We may have an entry in the waiting Q for this target,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01230}01230 \textcolor{comment}{                 * that is affected by this busfree and we don't want to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01231}01231 \textcolor{comment}{                 * go about selecting the target while we handle the event.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01232}01232 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01233}01233                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01234}01234                          \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}) \& (\mbox{\hyperlink{aic79xx__reg_8h_a5130b53e9a5c5ef1cf67782e27aafe44}{ENSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a79ddc1008bee9be3dabf244839710e29}{ENRSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a73f4f4cb70a503ed678c662d81f59ac4}{ENAUTOATNP}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01235}01235 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01236}01236                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01237}01237 \textcolor{comment}{                 * Disable busfree interrupts and clear the busfree}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01238}01238 \textcolor{comment}{                 * interrupt status.  We do this here so that several}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01239}01239 \textcolor{comment}{                 * bus transactions occur prior to clearing the SCSIINT}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01240}01240 \textcolor{comment}{                 * latch.  It can take a bit for the clearing to take effect.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01241}01241 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01242}01242                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a7c2bfc5988ee9d3637cc2172b7c88b3d}{ENBUSFREE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01243}01243                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_adcad4f02fc1722767a891c52c1fa3ee1}{CLRBUSFREE}}|\mbox{\hyperlink{aic79xx__reg_8h_af3ec5076a098ed52e079165d0ed39308}{CLRSCSIPERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01244}01244 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01245}01245                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01246}01246 \textcolor{comment}{                 * Look at what phase we were last in.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01247}01247 \textcolor{comment}{                 * If its message out, chances are pretty good}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01248}01248 \textcolor{comment}{                 * that the busfree was in response to one of}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01249}01249 \textcolor{comment}{                 * our abort requests.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01250}01250 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01251}01251                 lastphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01252}01252                 saved\_scsiid = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a0108c7ce82af6260f8e7f6b165b1743c}{SAVED\_SCSIID}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01253}01253                 saved\_lun = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_abc9d7d3c29d1a241838c7708ede0ce4e}{SAVED\_LUN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01254}01254                 \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}} = \mbox{\hyperlink{aic79xx_8h_a9227348864b51c7312382787bb426918}{SCSIID\_TARGET}}(ahc, saved\_scsiid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01255}01255                 initiator\_role\_id = \mbox{\hyperlink{aic79xx_8h_a94f4eb3b38f3cb1a5956256d50d4d07a}{SCSIID\_OUR\_ID}}(saved\_scsiid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01256}01256                 \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}} = \mbox{\hyperlink{aic79xx_8h_a39aa9f7e14ae654e48418c5ca30c0475}{SCSIID\_CHANNEL}}(ahc, saved\_scsiid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01257}01257                 \mbox{\hyperlink{aic7xxx_8c_ab107b6458f30083b4a6cca6f965daa35}{ahc\_compile\_devinfo}}(\&devinfo, initiator\_role\_id,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01258}01258                                     \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, saved\_lun, \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01259}01259                 printerror = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01260}01260 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01261}01261                 \textcolor{keywordflow}{if} (lastphase == \mbox{\hyperlink{aic79xx__reg_8h_af8aa57a40c3ae80362a3815c2dd02461}{P\_MESGOUT}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01262}01262                         u\_int tag;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01263}01263 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01264}01264                         tag = \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01265}01265                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106acfdceb20b6056d5f930eded906b45da7}{AHCMSG\_1B}}, MSG\_ABORT\_TAG, \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01266}01266                          || \mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106acfdceb20b6056d5f930eded906b45da7}{AHCMSG\_1B}}, MSG\_ABORT, \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01267}01267                                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} -\/ 1]}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01268}01268                                  == MSG\_ABORT\_TAG)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01269}01269                                         tag = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01270}01270                                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01271}01271                                 printf(\textcolor{stringliteral}{"{}SCB \%d -\/ Abort\%s Completed.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01272}01272                                        \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}}, tag == \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}} ?}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01273}01273                                        \textcolor{stringliteral}{"{}"{}} : \textcolor{stringliteral}{"{} Tag"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01274}01274                                 \mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{ahc\_abort\_scbs}}(ahc, \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01275}01275                                                saved\_lun, tag,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01276}01276                                                \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01277}01277                                                CAM\_REQ\_ABORTED);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01278}01278                                 printerror = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01279}01279                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106acfdceb20b6056d5f930eded906b45da7}{AHCMSG\_1B}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01280}01280                                                 MSG\_BUS\_DEV\_RESET, \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01281}01281 \textcolor{preprocessor}{\#ifdef \_\_FreeBSD\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01282}01282                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01283}01283 \textcolor{comment}{                                 * Don't mark the user's request for this BDR}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01284}01284 \textcolor{comment}{                                 * as completing with CAM\_BDR\_SENT.  CAM3}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01285}01285 \textcolor{comment}{                                 * specifies CAM\_REQ\_CMP.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01286}01286 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01287}01287                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} != NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01288}01288                                  \&\& \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a99f99fe2737984d6ababf6ab2c29a1f8}{io\_ctx}}-\/>ccb\_h.func\_code== XPT\_RESET\_DEV}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01289}01289                                  \&\& \mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(ahc, \mbox{\hyperlink{structscb}{scb}}, \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01290}01290                                                   CAM\_LUN\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01291}01291                                                   \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01292}01292                                                   \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01293}01293                                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, CAM\_REQ\_CMP);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01294}01294                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01295}01295 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01296}01296                                 \mbox{\hyperlink{aic7xxx_8c_ab107b6458f30083b4a6cca6f965daa35}{ahc\_compile\_devinfo}}(\&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01297}01297                                                     initiator\_role\_id,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01298}01298                                                     \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01299}01299                                                     CAM\_LUN\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01300}01300                                                     \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01301}01301                                                     \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01302}01302                                 \mbox{\hyperlink{aic7xxx_8c_ad7f416f60ce374a2ad34574734442235}{ahc\_handle\_devreset}}(ahc, \&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01303}01303                                                     CAM\_BDR\_SENT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01304}01304                                                     \textcolor{stringliteral}{"{}Bus Device Reset"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01305}01305                                                     \textcolor{comment}{/*verbose\_level*/}0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01306}01306                                 printerror = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01307}01307                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01308}01308                                                 MSG\_EXT\_PPR, \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01309}01309                                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01310}01310                                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01311}01311 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01312}01312                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01313}01313 \textcolor{comment}{                                 * PPR Rejected.  Try non-\/ppr negotiation}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01314}01314 \textcolor{comment}{                                 * and retry command.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01315}01315 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01316}01316                                 tinfo = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01317}01317                                                             devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01318}01318                                                             devinfo.\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01319}01319                                                             devinfo.\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01320}01320                                                             \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01321}01321                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_ae4a9048adaa61966bf0445d887489193}{transport\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01322}01322                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ae4a9048adaa61966bf0445d887489193}{transport\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01323}01323                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01324}01324                                 \mbox{\hyperlink{aic7xxx_8c_a94475d8eb8cca74f3f9583eda535e5d9}{ahc\_qinfifo\_requeue\_tail}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01325}01325                                 printerror = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01326}01326                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01327}01327                                                 MSG\_EXT\_WDTR, \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01328}01328                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01329}01329 \textcolor{comment}{                                 * Negotiation Rejected.  Go-\/narrow and}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01330}01330 \textcolor{comment}{                                 * retry command.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01331}01331 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01332}01332                                 \mbox{\hyperlink{aic7xxx_8c_a65c15f50e1c31142e27333e6ac02d33c}{ahc\_set\_width}}(ahc, \&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01333}01333                                               MSG\_EXT\_WDTR\_BUS\_8\_BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01334}01334                                               \mbox{\hyperlink{aic7xxx_8h_aa9b0102b222a80d7b614019a37b36a17}{AHC\_TRANS\_CUR}}|\mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01335}01335                                               \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01336}01336                                 \mbox{\hyperlink{aic7xxx_8c_a94475d8eb8cca74f3f9583eda535e5d9}{ahc\_qinfifo\_requeue\_tail}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01337}01337                                 printerror = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01338}01338                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01339}01339                                                 MSG\_EXT\_SDTR, \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01340}01340                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01341}01341 \textcolor{comment}{                                 * Negotiation Rejected.  Go-\/async and}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01342}01342 \textcolor{comment}{                                 * retry command.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01343}01343 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01344}01344                                 \mbox{\hyperlink{aic7xxx_8c_a14cd17a8eac81f514d0fed679f48b18f}{ahc\_set\_syncrate}}(ahc, \&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01345}01345                                                 \textcolor{comment}{/*syncrate*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01346}01346                                                 \textcolor{comment}{/*period*/}0, \textcolor{comment}{/*offset*/}0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01347}01347                                                 \textcolor{comment}{/*ppr\_options*/}0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01348}01348                                                 \mbox{\hyperlink{aic7xxx_8h_aa9b0102b222a80d7b614019a37b36a17}{AHC\_TRANS\_CUR}}|\mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01349}01349                                                 \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01350}01350                                 \mbox{\hyperlink{aic7xxx_8c_a94475d8eb8cca74f3f9583eda535e5d9}{ahc\_qinfifo\_requeue\_tail}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01351}01351                                 printerror = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01352}01352                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01353}01353                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01354}01354                 \textcolor{keywordflow}{if} (printerror != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01355}01355                         u\_int i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01356}01356 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01357}01357                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01358}01358                                 u\_int tag;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01359}01359 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01360}01360                                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& \mbox{\hyperlink{aic79xx__reg_8h_a34277a2cfa29c38262ffa54c112c79a5}{TAG\_ENB}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01361}01361                                         tag = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01362}01362                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01363}01363                                         tag = \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01364}01364                                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01365}01365                                 \mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{ahc\_abort\_scbs}}(ahc, target, channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01366}01366                                                \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}}), tag,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01367}01367                                                \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01368}01368                                                CAM\_UNEXP\_BUSFREE);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01369}01369                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01370}01370                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01371}01371 \textcolor{comment}{                                 * We had not fully identified this connection,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01372}01372 \textcolor{comment}{                                 * so we cannot abort anything.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01373}01373 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01374}01374                                 printf(\textcolor{stringliteral}{"{}\%s: "{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01375}01375                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01376}01376                         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx_8c_affc490c45bd148300acc26e210a1f2c2}{num\_phases}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01377}01377                                 \textcolor{keywordflow}{if} (lastphase == \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[i].phase)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01378}01378                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01379}01379                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01380}01380                         \textcolor{keywordflow}{if} (lastphase != \mbox{\hyperlink{aic79xx__reg_8h_a693ff4c5876c93e8452035f86e4acefb}{P\_BUSFREE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01381}01381                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01382}01382 \textcolor{comment}{                                 * Renegotiate with this device at the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01383}01383 \textcolor{comment}{                                 * next opportunity just in case this busfree}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01384}01384 \textcolor{comment}{                                 * is due to a negotiation mismatch with the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01385}01385 \textcolor{comment}{                                 * device.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01386}01386 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01387}01387                                 \mbox{\hyperlink{aic7xxx_8c_ae2f558b5a17a2ae39292b46ae742e14f}{ahc\_force\_renegotiation}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01388}01388                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01389}01389                         printf(\textcolor{stringliteral}{"{}Unexpected busfree \%s\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01390}01390                                \textcolor{stringliteral}{"{}SEQADDR == 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01391}01391                                \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[i].phasemsg,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01392}01392                                \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a174c1b97635e3f30f94c888b47436dc5}{SEQADDR0}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01393}01393                                 | (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_abeaf863227b4bb81888cf9ebc4249625}{SEQADDR1}}) << 8));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01394}01394                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01395}01395                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_af296256906c9d978cf8f9c97668e3894}{CLRSCSIINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01396}01396                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01397}01397         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01398}01398                 printf(\textcolor{stringliteral}{"{}\%s: Missing case in ahc\_handle\_scsiint. status = \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01399}01399                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), status);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01400}01400                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_af296256906c9d978cf8f9c97668e3894}{CLRSCSIINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01401}01401         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01402}01402 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01403}01403 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01404}01404 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01405}01405 \textcolor{comment}{ * Force renegotiation to occur the next time we initiate}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01406}01406 \textcolor{comment}{ * a command to the current device.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01407}01407 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01408}01408 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01409}\mbox{\hyperlink{aic7xxx_8c_ae2f558b5a17a2ae39292b46ae742e14f}{01409}} \mbox{\hyperlink{aic7xxx_8c_ae2f558b5a17a2ae39292b46ae742e14f}{ahc\_force\_renegotiation}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01410}01410 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01411}01411         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *targ\_info;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01412}01412         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01413}01413 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01414}01414         targ\_info = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01415}01415                                         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01416}01416                                         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01417}01417                                         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01418}01418                                         \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01419}01419         \mbox{\hyperlink{aic7xxx_8c_a15ffc86f240511f385020b670e21eb15}{ahc\_update\_neg\_request}}(ahc, devinfo, tstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01420}01420                                targ\_info, \mbox{\hyperlink{aic7xxx_8h_a4c521b818b5228aacca55283b14509aea6668e21270f998ea20298e1f70c563c3}{AHC\_NEG\_IF\_NON\_ASYNC}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01421}01421 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01422}01422 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01423}\mbox{\hyperlink{aic7xxx_8c_ac95bef2f57346e80ecd2cd6d8aafe9bb}{01423}} \textcolor{preprocessor}{\#define AHC\_MAX\_STEPS 2000}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01424}01424 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01425}\mbox{\hyperlink{aic7xxx_8c_a71410b7cd014e87227c1ba9697bef195}{01425}} \mbox{\hyperlink{aic7xxx_8c_a71410b7cd014e87227c1ba9697bef195}{ahc\_clear\_critical\_section}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01426}01426 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01427}01427         \textcolor{keywordtype}{int}     stepping;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01428}01428         \textcolor{keywordtype}{int}     steps;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01429}01429         u\_int   simode0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01430}01430         u\_int   simode1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01431}01431 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01432}01432         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_ad24b9b4a908f532c16c2efe992557af4}{num\_critical\_sections}} == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01433}01433                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01434}01434 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01435}01435         stepping = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01436}01436         steps = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01437}01437         simode0 = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01438}01438         simode1 = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01439}01439         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01440}01440                 \textcolor{keyword}{struct  }\mbox{\hyperlink{structcs}{cs}} *\mbox{\hyperlink{structcs}{cs}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01441}01441                 u\_int   seqaddr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01442}01442                 u\_int   i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01443}01443 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01444}01444                 seqaddr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a174c1b97635e3f30f94c888b47436dc5}{SEQADDR0}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01445}01445                         | (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_abeaf863227b4bb81888cf9ebc4249625}{SEQADDR1}}) << 8);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01446}01446 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01447}01447                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01448}01448 \textcolor{comment}{                 * Seqaddr represents the next instruction to execute, }}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01449}01449 \textcolor{comment}{                 * so we are really executing the instruction just}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01450}01450 \textcolor{comment}{                 * before it.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01451}01451 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01452}01452                 \mbox{\hyperlink{structcs}{cs}} = ahc-\/>\mbox{\hyperlink{structahc__softc_aae07eaa8c4e297910c5c6834f1ccb840}{critical\_sections}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01453}01453                 \textcolor{keywordflow}{for} (i = 0; i < ahc-\/>\mbox{\hyperlink{structahc__softc_ad24b9b4a908f532c16c2efe992557af4}{num\_critical\_sections}}; i++, \mbox{\hyperlink{structcs}{cs}}++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01454}01454                         }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01455}01455                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structcs}{cs}}-\/>\mbox{\hyperlink{structcs_ad6f6ebff0abfd0a6311f338a2829f810}{begin}} < seqaddr \&\& \mbox{\hyperlink{structcs}{cs}}-\/>\mbox{\hyperlink{structcs_ae62014f752d602994f8fb1cfadf4dbfb}{end}} >= seqaddr)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01456}01456                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01457}01457                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01458}01458 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01459}01459                 \textcolor{keywordflow}{if} (i == ahc-\/>\mbox{\hyperlink{structahc__softc_ad24b9b4a908f532c16c2efe992557af4}{num\_critical\_sections}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01460}01460                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01461}01461 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01462}01462                 \textcolor{keywordflow}{if} (steps > \mbox{\hyperlink{aic7xxx_8c_ac95bef2f57346e80ecd2cd6d8aafe9bb}{AHC\_MAX\_STEPS}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01463}01463                         printf(\textcolor{stringliteral}{"{}\%s: Infinite loop in critical section\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01464}01464                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01465}01465                         \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01466}01466                         panic(\textcolor{stringliteral}{"{}critical section loop"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01467}01467                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01468}01468 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01469}01469                 steps++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01470}01470                 \textcolor{keywordflow}{if} (stepping == \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01471}01471                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01472}01472 \textcolor{comment}{                         * Disable all interrupt sources so that the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01473}01473 \textcolor{comment}{                         * sequencer will not be stuck by a pausing}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01474}01474 \textcolor{comment}{                         * interrupt condition while we attempt to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01475}01475 \textcolor{comment}{                         * leave a critical section.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01476}01476 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01477}01477                         simode0 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9344c699b91d4bbc64b87dea3d35fa2b}{SIMODE0}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01478}01478                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9344c699b91d4bbc64b87dea3d35fa2b}{SIMODE0}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01479}01479                         simode1 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01480}01480                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01481}01481                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01482}01482 \textcolor{comment}{                                 * On DT class controllers, we}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01483}01483 \textcolor{comment}{                                 * use the enhanced busfree logic.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01484}01484 \textcolor{comment}{                                 * Unfortunately we cannot re-\/enable}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01485}01485 \textcolor{comment}{                                 * busfree detection within the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01486}01486 \textcolor{comment}{                                 * current connection, so we must}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01487}01487 \textcolor{comment}{                                 * leave it on while single stepping.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01488}01488 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01489}01489                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, simode1 \& \mbox{\hyperlink{aic79xx__reg_8h_a7c2bfc5988ee9d3637cc2172b7c88b3d}{ENBUSFREE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01490}01490                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01491}01491                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01492}01492                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_af296256906c9d978cf8f9c97668e3894}{CLRSCSIINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01493}01493                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4d65228d61c0e3a8c669dcaebb662830}{SEQCTL}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a82d5e6ad317e321b0e37d26031519df1}{seqctl}} | \mbox{\hyperlink{aic79xx__reg_8h_a70be2dc5c8bdc85b027ea6118753cca1}{STEP}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01494}01494                         stepping = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01495}01495                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01496}01496                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01497}01497                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_adcad4f02fc1722767a891c52c1fa3ee1}{CLRBUSFREE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01498}01498                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_af296256906c9d978cf8f9c97668e3894}{CLRSCSIINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01499}01499                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01500}01500                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c67c3aa8365be698224acf38de9a509}{HCNTRL}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a19e5110bebc18dc39c5b94cc69279414}{unpause}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01501}01501                 \textcolor{keywordflow}{while} (!\mbox{\hyperlink{aic7xxx__inline_8h_a6a93bff50c0eea23f77e26b312499a19}{ahc\_is\_paused}}(ahc))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01502}01502                         \mbox{\hyperlink{aic__osm__lib_8h_a23559a914641f4b70a959f25b8281c87}{aic\_delay}}(200);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01503}01503         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01504}01504         \textcolor{keywordflow}{if} (stepping) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01505}01505                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9344c699b91d4bbc64b87dea3d35fa2b}{SIMODE0}}, simode0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01506}01506                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, simode1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01507}01507                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4d65228d61c0e3a8c669dcaebb662830}{SEQCTL}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a82d5e6ad317e321b0e37d26031519df1}{seqctl}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01508}01508         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01509}01509 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01510}01510 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01511}01511 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01512}01512 \textcolor{comment}{ * Clear any pending interrupt status.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01513}01513 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01514}01514 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01515}\mbox{\hyperlink{aic7xxx_8c_a77920c2be2bda9100b97cbd841b5464c}{01515}} \mbox{\hyperlink{aic7xxx_8c_a77920c2be2bda9100b97cbd841b5464c}{ahc\_clear\_intstat}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01516}01516 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01517}01517         \textcolor{comment}{/* Clear any interrupt conditions this may have caused */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01518}01518         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_a28f102903890295c33aa69588ec5766d}{CLRSELTIMEO}}|\mbox{\hyperlink{aic79xx__reg_8h_aa1acf1fb1f937d50339492cd01f0996e}{CLRATNO}}|\mbox{\hyperlink{aic79xx__reg_8h_aec3377ec8f4cb17eff4a967da260c60a}{CLRSCSIRSTI}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01519}01519                                 |\mbox{\hyperlink{aic79xx__reg_8h_adcad4f02fc1722767a891c52c1fa3ee1}{CLRBUSFREE}}|\mbox{\hyperlink{aic79xx__reg_8h_af3ec5076a098ed52e079165d0ed39308}{CLRSCSIPERR}}|\mbox{\hyperlink{aic7xxx__reg_8h_a18b5535f58b975b474571177b6643a26}{CLRPHASECHG}}|}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01520}01520                                 \mbox{\hyperlink{aic79xx__reg_8h_ac558195521dabf23f453d27ec5381ae0}{CLRREQINIT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01521}01521         \mbox{\hyperlink{aic7xxx__osm_8h_a277e6e5fb1f6eee84ee7d2399ebd5b83}{ahc\_flush\_device\_writes}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01522}01522         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71f63ed92fccce012183d6df19993581}{CLRSINT0}}, \mbox{\hyperlink{aic79xx__reg_8h_a4e171a8fe4fe0b6175353fe7fe85f3a8}{CLRSELDO}}|\mbox{\hyperlink{aic79xx__reg_8h_a0555e066cc5da54f55e10ec09c02ba2f}{CLRSELDI}}|\mbox{\hyperlink{aic79xx__reg_8h_ab475cc92ef1a6aee317e06518d61fbe6}{CLRSELINGO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01523}01523         \mbox{\hyperlink{aic7xxx__osm_8h_a277e6e5fb1f6eee84ee7d2399ebd5b83}{ahc\_flush\_device\_writes}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01524}01524         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_af296256906c9d978cf8f9c97668e3894}{CLRSCSIINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01525}01525         \mbox{\hyperlink{aic7xxx__osm_8h_a277e6e5fb1f6eee84ee7d2399ebd5b83}{ahc\_flush\_device\_writes}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01526}01526 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01527}01527 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01528}01528 \textcolor{comment}{/**************************** Debugging Routines ******************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01529}01529 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01530}01530 uint32\_t ahc\_debug = AHC\_DEBUG\_OPTS;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01531}01531 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01532}01532 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01533}01533 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01534}\mbox{\hyperlink{aic7xxx_8c_a066f650cb0857046e104d11e10e6412d}{01534}} \mbox{\hyperlink{aic7xxx_8c_a066f650cb0857046e104d11e10e6412d}{ahc\_print\_scb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01535}01535 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01536}01536         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01537}01537 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01538}01538         \textcolor{keyword}{struct }\mbox{\hyperlink{structhardware__scb}{hardware\_scb}} *hscb = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01539}01539 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01540}01540         printf(\textcolor{stringliteral}{"{}scb:\%p control:0x\%x scsiid:0x\%x lun:\%d cdb\_len:\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01541}01541                (\textcolor{keywordtype}{void} *)\mbox{\hyperlink{structscb}{scb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01542}01542                hscb-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01543}01543                hscb-\/>\mbox{\hyperlink{structhardware__scb_a1402a3a67b19b5baa7bbf698ebe2f66e}{scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01544}01544                hscb-\/>\mbox{\hyperlink{structhardware__scb_a42b9ff4c95b0f358ab14cec0c1322049}{lun}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01545}01545                hscb-\/>\mbox{\hyperlink{structhardware__scb_a4cddac5a897ed416676a31331f372d23}{cdb\_len}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01546}01546         printf(\textcolor{stringliteral}{"{}Shared Data: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01547}01547         \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(hscb-\/>\mbox{\hyperlink{structhardware__scb_ae212297c91da823a0c6dc55c7b06e8e3}{shared\_data}}.\mbox{\hyperlink{structhardware__scb_a14efe9660ffe2cce917f1c0a16921efc}{cdb}}); i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01548}01548                 printf(\textcolor{stringliteral}{"{}\%\#02x"{}}, hscb-\/>\mbox{\hyperlink{structhardware__scb_ae212297c91da823a0c6dc55c7b06e8e3}{shared\_data}}.\mbox{\hyperlink{structhardware__scb_a14efe9660ffe2cce917f1c0a16921efc}{cdb}}[i]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01549}01549         printf(\textcolor{stringliteral}{"{}        dataptr:\%\#x datacnt:\%\#x sgptr:\%\#x tag:\%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01550}01550                 \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(hscb-\/>\mbox{\hyperlink{structhardware__scb_a725729afe221927f58c4bae09007c981}{dataptr}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01551}01551                 \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(hscb-\/>\mbox{\hyperlink{structhardware__scb_a46c2f314a3f946135c7c438972b50888}{datacnt}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01552}01552                 \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(hscb-\/>\mbox{\hyperlink{structhardware__scb_a02d4c583482881c8ca27fc46820f4ff6}{sgptr}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01553}01553                 hscb-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01554}01554         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_aea888a6f4a6df72dd669e37ad50fc9a6}{sg\_count}} > 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01555}01555                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_aea888a6f4a6df72dd669e37ad50fc9a6}{sg\_count}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01556}01556                         printf(\textcolor{stringliteral}{"{}sg[\%d] -\/ Addr 0x\%x\%x : Length \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01557}01557                                i,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01558}01558                                (\mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}[i].len) >> 24}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01559}01559                                 \& \mbox{\hyperlink{aic79xx__reg_8h_aa7ebae5f84cc920f7b7ab178b1d4e36b}{SG\_HIGH\_ADDR\_BITS}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01560}01560                                \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}[i].addr),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01561}01561                                \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}[i].len));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01562}01562                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01563}01563         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01564}01564 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01565}01565 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01566}01566 \textcolor{comment}{/************************* Transfer Negotiation *******************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01567}01567 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01568}01568 \textcolor{comment}{ * Allocate per target mode instance (ID we respond to as a target)}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01569}01569 \textcolor{comment}{ * transfer negotiation data structures.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01570}01570 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01571}01571 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01572}\mbox{\hyperlink{aic7xxx_8c_a6b94ed6a6d432af1c6e73de284d2437c}{01572}} \mbox{\hyperlink{aic7xxx_8c_a6b94ed6a6d432af1c6e73de284d2437c}{ahc\_alloc\_tstate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int scsi\_id, \textcolor{keywordtype}{char} channel)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01573}01573 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01574}01574         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *master\_tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01575}01575         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01576}01576         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01577}01577 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01578}01578         master\_tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01579}01579         \textcolor{keywordflow}{if} (channel == \textcolor{charliteral}{'B'}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01580}01580                 scsi\_id += 8;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01581}01581                 master\_tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}} + 8];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01582}01582         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01583}01583         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[scsi\_id] != NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01584}01584          \&\& ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[scsi\_id] != master\_tstate)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01585}01585                 panic(\textcolor{stringliteral}{"{}\%s: ahc\_alloc\_tstate -\/ Target already allocated"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01586}01586                       \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01587}01587         tstate = (\textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}}*)malloc(\textcolor{keyword}{sizeof}(*tstate),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01588}01588                                                    M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01589}01589         \textcolor{keywordflow}{if} (tstate == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01590}01590                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01591}01591 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01592}01592         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01593}01593 \textcolor{comment}{         * If we have allocated a master tstate, copy user settings from}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01594}01594 \textcolor{comment}{         * the master tstate (taken from SRAM or the EEPROM) for this}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01595}01595 \textcolor{comment}{         * channel, but reset our current and goal settings to async/narrow}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01596}01596 \textcolor{comment}{         * until an initiator talks to us.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01597}01597 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01598}01598         \textcolor{keywordflow}{if} (master\_tstate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01599}01599                 memcpy(tstate, master\_tstate, \textcolor{keyword}{sizeof}(*tstate));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01600}01600                 memset(tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}, 0, \textcolor{keyword}{sizeof}(tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01601}01601                 tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01602}01602                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx_8h_ae8098627314ca3d2e7835222fe50750f}{AHC\_NUM\_TARGETS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01603}01603                         memset(\&tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a693c4c705858aedec59537cb7ccbe7f8}{transinfo}}[i].\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}, 0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01604}01604                               \textcolor{keyword}{sizeof}(tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a693c4c705858aedec59537cb7ccbe7f8}{transinfo}}[i].\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01605}01605                         memset(\&tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a693c4c705858aedec59537cb7ccbe7f8}{transinfo}}[i].\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}, 0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01606}01606                               \textcolor{keyword}{sizeof}(tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a693c4c705858aedec59537cb7ccbe7f8}{transinfo}}[i].\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01607}01607                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01608}01608         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01609}01609                 memset(tstate, 0, \textcolor{keyword}{sizeof}(*tstate));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01610}01610         ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[scsi\_id] = tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01611}01611         \textcolor{keywordflow}{return} (tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01612}01612 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01613}01613 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01614}01614 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01615}01615 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01616}01616 \textcolor{comment}{ * Free per target mode instance (ID we respond to as a target)}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01617}01617 \textcolor{comment}{ * transfer negotiation data structures.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01618}01618 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01619}01619 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01620}01620 ahc\_free\_tstate(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int scsi\_id, \textcolor{keywordtype}{char} channel, \textcolor{keywordtype}{int} force)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01621}01621 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01622}01622         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01623}01623 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01624}01624         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01625}01625 \textcolor{comment}{         * Don't clean up our "{}master"{} tstate.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01626}01626 \textcolor{comment}{         * It has our default user settings.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01627}01627 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01628}01628         \textcolor{keywordflow}{if} (((channel == \textcolor{charliteral}{'B'} \&\& scsi\_id == ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01629}01629           || (channel == \textcolor{charliteral}{'A'} \&\& scsi\_id == ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}}))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01630}01630          \&\& force == \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01631}01631                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01632}01632 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01633}01633         \textcolor{keywordflow}{if} (channel == \textcolor{charliteral}{'B'})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01634}01634                 scsi\_id += 8;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01635}01635         tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[scsi\_id];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01636}01636         \textcolor{keywordflow}{if} (tstate != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01637}01637                 free(tstate, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01638}01638         ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[scsi\_id] = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01639}01639 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01640}01640 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01641}01641 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01642}01642 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01643}01643 \textcolor{comment}{ * Called when we have an active connection to a target on the bus,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01644}01644 \textcolor{comment}{ * this function finds the nearest syncrate to the input period limited}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01645}01645 \textcolor{comment}{ * by the capabilities of the bus connectivity of and sync settings for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01646}01646 \textcolor{comment}{ * the target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01647}01647 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01648}01648 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01649}\mbox{\hyperlink{aic7xxx_8c_a2515ac67caba10332267408695efc84f}{01649}} \mbox{\hyperlink{aic7xxx_8c_a2515ac67caba10332267408695efc84f}{ahc\_devlimited\_syncrate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01650}01650                         \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01651}01651                         u\_int *\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, u\_int *ppr\_options, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}} role)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01652}01652 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01653}01653         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__transinfo}{ahc\_transinfo}} *transinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01654}01654         u\_int   maxsync;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01655}01655 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01656}01656         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01657}01657                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a13f2a38e33c766ee5a8ff2d5b5e6dd55}{ENAB40}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01658}01658                  \&\& (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad6acf83a7db41603ff029c718c402f03}{SSTAT2}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a1061c26ceffd3a80d55bb9daf5612c04}{EXP\_ACTIVE}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01659}01659                         maxsync = \mbox{\hyperlink{aic7xxx_8h_ace9d9d53ac243488b59724edcc1e92e0}{AHC\_SYNCRATE\_DT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01660}01660                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01661}01661                         maxsync = \mbox{\hyperlink{aic7xxx_8h_a37c2dc152e71c7edc2063628a5f65538}{AHC\_SYNCRATE\_ULTRA}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01662}01662                         \textcolor{comment}{/* Can't do DT on an SE bus */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01663}01663                         *\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} \&= \string~MSG\_EXT\_PPR\_DT\_REQ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01664}01664                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01665}01665         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa34aea214e5532909fcbc36fa43124389}{AHC\_ULTRA}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01666}01666                 maxsync = \mbox{\hyperlink{aic7xxx_8h_a37c2dc152e71c7edc2063628a5f65538}{AHC\_SYNCRATE\_ULTRA}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01667}01667         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01668}01668                 maxsync = \mbox{\hyperlink{aic7xxx_8h_a90acdb1379d78d10a06ab5b06498cfc3}{AHC\_SYNCRATE\_FAST}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01669}01669         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01670}01670         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01671}01671 \textcolor{comment}{         * Never allow a value higher than our current goal}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01672}01672 \textcolor{comment}{         * period otherwise we may allow a target initiated}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01673}01673 \textcolor{comment}{         * negotiation to go above the limit as set by the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01674}01674 \textcolor{comment}{         * user.  In the case of an initiator initiated}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01675}01675 \textcolor{comment}{         * sync negotiation, we limit based on the user}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01676}01676 \textcolor{comment}{         * setting.  This allows the system to still accept}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01677}01677 \textcolor{comment}{         * incoming negotiations even if target initiated}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01678}01678 \textcolor{comment}{         * negotiation is not performed.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01679}01679 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01680}01680         \textcolor{keywordflow}{if} (role == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01681}01681                 transinfo = \&tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01682}01682         \textcolor{keywordflow}{else} }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01683}01683                 transinfo = \&tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01684}01684         *\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} \&= transinfo-\/>\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01685}01685         \textcolor{keywordflow}{if} (transinfo-\/>\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} == MSG\_EXT\_WDTR\_BUS\_8\_BIT) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01686}01686                 maxsync = \mbox{\hyperlink{aic79xx_8h_afa99ec4acc4ecb2dc3c2d05da15d0e3f}{MAX}}(maxsync, \mbox{\hyperlink{aic7xxx_8h_ae5ad67985275c4b501cb7ee4d05531c3}{AHC\_SYNCRATE\_ULTRA2}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01687}01687                 *\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} \&= \string~MSG\_EXT\_PPR\_DT\_REQ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01688}01688         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01689}01689         \textcolor{keywordflow}{if} (transinfo-\/>\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01690}01690                 *\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01691}01691                 *\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01692}01692                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01693}01693         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01694}01694         *\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = \mbox{\hyperlink{aic79xx_8h_afa99ec4acc4ecb2dc3c2d05da15d0e3f}{MAX}}(*\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}}, transinfo-\/>\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01695}01695         \textcolor{keywordflow}{return} (\mbox{\hyperlink{aic7xxx_8c_a34d257b9f9392d3b1bb3f094a1cff8cb}{ahc\_find\_syncrate}}(ahc, \mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}}, \mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}}, maxsync));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01696}01696 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01697}01697 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01698}01698 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01699}01699 \textcolor{comment}{ * Look up the valid period to SCSIRATE conversion in our table.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01700}01700 \textcolor{comment}{ * Return the period and offset that should be sent to the target}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01701}01701 \textcolor{comment}{ * if this was the beginning of an SDTR.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01702}01702 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01703}01703 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01704}\mbox{\hyperlink{aic7xxx_8c_a34d257b9f9392d3b1bb3f094a1cff8cb}{01704}} \mbox{\hyperlink{aic7xxx_8c_a34d257b9f9392d3b1bb3f094a1cff8cb}{ahc\_find\_syncrate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int *\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01705}01705                   u\_int *ppr\_options, u\_int maxsync)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01706}01706 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01707}01707         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *syncrate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01708}01708 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01709}01709         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01710}01710                 *ppr\_options \&= \string~MSG\_EXT\_PPR\_DT\_REQ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01711}01711 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01712}01712         \textcolor{comment}{/* Skip all DT only entries if DT is not available */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01713}01713         \textcolor{keywordflow}{if} ((*ppr\_options \& MSG\_EXT\_PPR\_DT\_REQ) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01714}01714          \&\& maxsync < \mbox{\hyperlink{aic7xxx_8h_ae5ad67985275c4b501cb7ee4d05531c3}{AHC\_SYNCRATE\_ULTRA2}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01715}01715                 maxsync = \mbox{\hyperlink{aic7xxx_8h_ae5ad67985275c4b501cb7ee4d05531c3}{AHC\_SYNCRATE\_ULTRA2}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01716}01716 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01717}01717         \textcolor{keywordflow}{for} (syncrate = \&\mbox{\hyperlink{aic7xxx_8c_a67c4e74dd2aa22393c529eba6d5f3ddf}{ahc\_syncrates}}[maxsync];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01718}01718              syncrate-\/>\mbox{\hyperlink{structahc__syncrate_aea60f2cec631d8b30a02d50e0d0712fe}{rate}} != NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01719}01719              syncrate++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01720}01720                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01721}01721 \textcolor{comment}{                 * The Ultra2 table doesn't go as low}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01722}01722 \textcolor{comment}{                 * as for the Fast/Ultra cards.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01723}01723 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01724}01724                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01725}01725                  \&\& (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a797bdd437c9493ea4c62449cc9084ad7}{sxfr\_u2}} == 0))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01726}01726                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01727}01727 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01728}01728                 \textcolor{keywordflow}{if} (*period <= syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01729}01729                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01730}01730 \textcolor{comment}{                         * When responding to a target that requests}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01731}01731 \textcolor{comment}{                         * sync, the requested rate may fall between}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01732}01732 \textcolor{comment}{                         * two rates that we can output, but still be}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01733}01733 \textcolor{comment}{                         * a rate that we can receive.  Because of this,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01734}01734 \textcolor{comment}{                         * we want to respond to the target with}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01735}01735 \textcolor{comment}{                         * the same rate that it sent to us even}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01736}01736 \textcolor{comment}{                         * if the period we use to send data to it}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01737}01737 \textcolor{comment}{                         * is lower.  Only lower the response period}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01738}01738 \textcolor{comment}{                         * if we must.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01739}01739 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01740}01740                         \textcolor{keywordflow}{if} (syncrate == \&\mbox{\hyperlink{aic7xxx_8c_a67c4e74dd2aa22393c529eba6d5f3ddf}{ahc\_syncrates}}[maxsync])}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01741}01741                                 *\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} = syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01742}01742 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01743}01743                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01744}01744 \textcolor{comment}{                         * At some speeds, we only support}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01745}01745 \textcolor{comment}{                         * ST transfers.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01746}01746 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01747}01747                         \textcolor{keywordflow}{if} ((syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a797bdd437c9493ea4c62449cc9084ad7}{sxfr\_u2}} \& \mbox{\hyperlink{aic7xxx_8h_a336d78d0c5be3fc97d8fd60e4bf4770b}{ST\_SXFR}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01748}01748                                 *ppr\_options \&= \string~MSG\_EXT\_PPR\_DT\_REQ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01749}01749                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01750}01750                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01751}01751         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01752}01752 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01753}01753         \textcolor{keywordflow}{if} ((*\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01754}01754          || (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_aea60f2cec631d8b30a02d50e0d0712fe}{rate}} == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01755}01755          || ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01756}01756           \&\& (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a797bdd437c9493ea4c62449cc9084ad7}{sxfr\_u2}} == 0))) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01757}01757                 \textcolor{comment}{/* Use asynchronous transfers. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01758}01758                 *\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01759}01759                 syncrate = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01760}01760                 *ppr\_options \&= \string~MSG\_EXT\_PPR\_DT\_REQ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01761}01761         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01762}01762         \textcolor{keywordflow}{return} (syncrate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01763}01763 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01764}01764 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01765}01765 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01766}01766 \textcolor{comment}{ * Convert from an entry in our syncrate table to the SCSI equivalent}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01767}01767 \textcolor{comment}{ * sync "{}period"{} factor.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01768}01768 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01769}01769 u\_int}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01770}\mbox{\hyperlink{aic7xxx_8c_a8d8240160a5a2f67489bc6610e92376f}{01770}} \mbox{\hyperlink{aic7xxx_8c_a8d8240160a5a2f67489bc6610e92376f}{ahc\_find\_period}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int scsirate, u\_int maxsync)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01771}01771 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01772}01772         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *syncrate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01773}01773 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01774}01774         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01775}01775                 scsirate \&= \mbox{\hyperlink{aic7xxx__reg_8h_aa3f3b227e1322c5f172b78402d34fdfc}{SXFR\_ULTRA2}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01776}01776         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01777}01777                 scsirate \&= \mbox{\hyperlink{aic7xxx__reg_8h_aef00b93d94c946e14c2016bdea9941e0}{SXFR}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01778}01778 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01779}01779         syncrate = \&\mbox{\hyperlink{aic7xxx_8c_a67c4e74dd2aa22393c529eba6d5f3ddf}{ahc\_syncrates}}[maxsync];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01780}01780         \textcolor{keywordflow}{while} (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_aea60f2cec631d8b30a02d50e0d0712fe}{rate}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01781}01781                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01782}01782                         \textcolor{keywordflow}{if} (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a797bdd437c9493ea4c62449cc9084ad7}{sxfr\_u2}} == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01783}01783                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01784}01784                         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (scsirate == (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a797bdd437c9493ea4c62449cc9084ad7}{sxfr\_u2}} \& \mbox{\hyperlink{aic7xxx__reg_8h_aa3f3b227e1322c5f172b78402d34fdfc}{SXFR\_ULTRA2}}))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01785}01785                                 \textcolor{keywordflow}{return} (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01786}01786                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (scsirate == (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_ab39c48ff868aac20905321638a54bdf0}{sxfr}} \& \mbox{\hyperlink{aic7xxx__reg_8h_aef00b93d94c946e14c2016bdea9941e0}{SXFR}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01787}01787                                 \textcolor{keywordflow}{return} (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01788}01788                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01789}01789                 syncrate++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01790}01790         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01791}01791         \textcolor{keywordflow}{return} (0); \textcolor{comment}{/* async */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01792}01792 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01793}01793 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01794}01794 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01795}01795 \textcolor{comment}{ * Truncate the given synchronous offset to a value the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01796}01796 \textcolor{comment}{ * current adapter type and syncrate are capable of.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01797}01797 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01798}01798 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01799}\mbox{\hyperlink{aic7xxx_8c_ac8e19a9aca1951d13657fb0ce515a544}{01799}} \mbox{\hyperlink{aic7xxx_8c_ac8e19a9aca1951d13657fb0ce515a544}{ahc\_validate\_offset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01800}01800                     \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01801}01801                     \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *syncrate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01802}01802                     u\_int *offset, \textcolor{keywordtype}{int} wide, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}} role)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01803}01803 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01804}01804         u\_int maxoffset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01805}01805 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01806}01806         \textcolor{comment}{/* Limit offset to what we can do */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01807}01807         \textcolor{keywordflow}{if} (syncrate == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01808}01808                 maxoffset = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01809}01809         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01810}01810                 maxoffset = \mbox{\hyperlink{aic7xxx__reg_8h_a3d25429bb5d9ad8310d34b315aa72ebd}{MAX\_OFFSET\_ULTRA2}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01811}01811         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01812}01812                 \textcolor{keywordflow}{if} (wide)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01813}01813                         maxoffset = \mbox{\hyperlink{aic7xxx__reg_8h_a08c68389e5e1ebee64cb2e916f231254}{MAX\_OFFSET\_16BIT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01814}01814                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01815}01815                         maxoffset = \mbox{\hyperlink{aic7xxx__reg_8h_aed4c5e4b91766ec61d55d0fcd0aa3961}{MAX\_OFFSET\_8BIT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01816}01816         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01817}01817         *offset = \mbox{\hyperlink{aic79xx_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(*offset, maxoffset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01818}01818         \textcolor{keywordflow}{if} (tinfo != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01819}01819                 \textcolor{keywordflow}{if} (role == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01820}01820                         *offset = \mbox{\hyperlink{aic79xx_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(*offset, tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01821}01821                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01822}01822                         *offset = \mbox{\hyperlink{aic79xx_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(*offset, tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01823}01823         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01824}01824 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01825}01825 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01826}01826 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01827}01827 \textcolor{comment}{ * Truncate the given transfer width parameter to a value the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01828}01828 \textcolor{comment}{ * current adapter type is capable of.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01829}01829 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01830}01830 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01831}\mbox{\hyperlink{aic7xxx_8c_a30892559fc3bf735708f01b27e60b73a}{01831}} \mbox{\hyperlink{aic7xxx_8c_a30892559fc3bf735708f01b27e60b73a}{ahc\_validate\_width}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01832}01832                    u\_int *bus\_width, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}} role)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01833}01833 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01834}01834         \textcolor{keywordflow}{switch} (*bus\_width) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01835}01835         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01836}01836                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01837}01837                         \textcolor{comment}{/* Respond Wide */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01838}01838                         *bus\_width = MSG\_EXT\_WDTR\_BUS\_16\_BIT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01839}01839                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01840}01840                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01841}01841                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01842}01842         \textcolor{keywordflow}{case} MSG\_EXT\_WDTR\_BUS\_8\_BIT:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01843}01843                 *bus\_width = MSG\_EXT\_WDTR\_BUS\_8\_BIT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01844}01844                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01845}01845         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01846}01846         \textcolor{keywordflow}{if} (tinfo != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01847}01847                 \textcolor{keywordflow}{if} (role == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01848}01848                         *bus\_width = \mbox{\hyperlink{aic79xx_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}}, *bus\_width);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01849}01849                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01850}01850                         *bus\_width = \mbox{\hyperlink{aic79xx_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}}, *bus\_width);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01851}01851         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01852}01852 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01853}01853 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01854}01854 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01855}01855 \textcolor{comment}{ * Update the bitmask of targets for which the controller should}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01856}01856 \textcolor{comment}{ * negotiate with at the next convenient opportunity.  This currently}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01857}01857 \textcolor{comment}{ * means the next time we send the initial identify messages for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01858}01858 \textcolor{comment}{ * a new transaction.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01859}01859 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01860}01860 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01861}\mbox{\hyperlink{aic7xxx_8c_a15ffc86f240511f385020b670e21eb15}{01861}} \mbox{\hyperlink{aic7xxx_8c_a15ffc86f240511f385020b670e21eb15}{ahc\_update\_neg\_request}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01862}01862                        \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01863}01863                        \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo, \mbox{\hyperlink{aic7xxx_8h_a4c521b818b5228aacca55283b14509ae}{ahc\_neg\_type}} neg\_type)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01864}01864 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01865}01865         u\_int auto\_negotiate\_orig;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01866}01866 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01867}01867         auto\_negotiate\_orig = tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_ab3ed80880685ed5e70e778f0e0cd580e}{auto\_negotiate}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01868}01868         \textcolor{keywordflow}{if} (neg\_type == \mbox{\hyperlink{aic7xxx_8h_a4c521b818b5228aacca55283b14509aea8e13738aa9017859d1ded44cc97576ec}{AHC\_NEG\_ALWAYS}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01869}01869                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01870}01870 \textcolor{comment}{                 * Force our "{}current"{} settings to be}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01871}01871 \textcolor{comment}{                 * unknown so that unless a bus reset}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01872}01872 \textcolor{comment}{                 * occurs the need to renegotiate is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01873}01873 \textcolor{comment}{                 * recorded persistently.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01874}01874 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01875}01875                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01876}01876                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} = \mbox{\hyperlink{aic7xxx_8h_a89bfde18f8af3488b6e50419beecad97}{AHC\_WIDTH\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01877}01877                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = \mbox{\hyperlink{aic7xxx_8h_a6606d3ff15e15d55f3cfcbfba0e7ba97}{AHC\_PERIOD\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01878}01878                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} = \mbox{\hyperlink{aic7xxx_8h_aaf684ded40fdf632d83b3cb70e5d0a61}{AHC\_OFFSET\_UNKNOWN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01879}01879         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01880}01880         \textcolor{keywordflow}{if} (tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} != tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01881}01881          || tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} != tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01882}01882          || tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} != tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01883}01883          || tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} != tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01884}01884          || (neg\_type == \mbox{\hyperlink{aic7xxx_8h_a4c521b818b5228aacca55283b14509aea6668e21270f998ea20298e1f70c563c3}{AHC\_NEG\_IF\_NON\_ASYNC}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01885}01885           \&\& (tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01886}01886            || tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} != MSG\_EXT\_WDTR\_BUS\_8\_BIT}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01887}01887            || tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} != 0)))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01888}01888                 tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_ab3ed80880685ed5e70e778f0e0cd580e}{auto\_negotiate}} |= devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a53529d990371fdbd81f9828ae2ea0485}{target\_mask}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01889}01889         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01890}01890                 tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_ab3ed80880685ed5e70e778f0e0cd580e}{auto\_negotiate}} \&= \string~devinfo-\/>target\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01891}01891 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01892}01892         \textcolor{keywordflow}{return} (auto\_negotiate\_orig != tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_ab3ed80880685ed5e70e778f0e0cd580e}{auto\_negotiate}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01893}01893 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01894}01894 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01895}01895 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01896}01896 \textcolor{comment}{ * Update the user/goal/curr tables of synchronous negotiation}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01897}01897 \textcolor{comment}{ * parameters as well as, in the case of a current or active update,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01898}01898 \textcolor{comment}{ * any data structures on the host controller.  In the case of an}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01899}01899 \textcolor{comment}{ * active update, the specified target is currently talking to us on}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01900}01900 \textcolor{comment}{ * the bus, so the transfer parameter update must take effect}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01901}01901 \textcolor{comment}{ * immediately.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01902}01902 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01903}01903 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01904}\mbox{\hyperlink{aic7xxx_8c_a14cd17a8eac81f514d0fed679f48b18f}{01904}} \mbox{\hyperlink{aic7xxx_8c_a14cd17a8eac81f514d0fed679f48b18f}{ahc\_set\_syncrate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01905}01905                  \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *syncrate, u\_int \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01906}01906                  u\_int offset, u\_int ppr\_options, u\_int type, \textcolor{keywordtype}{int} paused)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01907}01907 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01908}01908         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01909}01909         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01910}01910         u\_int   old\_period;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01911}01911         u\_int   old\_offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01912}01912         u\_int   old\_ppr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01913}01913         \textcolor{keywordtype}{int}     active;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01914}01914         \textcolor{keywordtype}{int}     update\_needed;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01915}01915 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01916}01916         active = (type \& \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}}) == \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01917}01917         update\_needed = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01918}01918 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01919}01919         \textcolor{keywordflow}{if} (syncrate == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01920}01920                 period = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01921}01921                 offset = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01922}01922         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01923}01923 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01924}01924         tinfo = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01925}01925                                     devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01926}01926 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01927}01927         \textcolor{keywordflow}{if} ((type \& \mbox{\hyperlink{aic7xxx_8h_addc412b6d9cd086c81ac8fc262a70a3c}{AHC\_TRANS\_USER}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01928}01928                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = period;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01929}01929                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} = offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01930}01930                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} = ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01931}01931         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01932}01932 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01933}01933         \textcolor{keywordflow}{if} ((type \& \mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01934}01934                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = period;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01935}01935                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} = offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01936}01936                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} = ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01937}01937         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01938}01938 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01939}01939         old\_period = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01940}01940         old\_offset = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01941}01941         old\_ppr    = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01942}01942 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01943}01943         \textcolor{keywordflow}{if} ((type \& \mbox{\hyperlink{aic7xxx_8h_aa9b0102b222a80d7b614019a37b36a17}{AHC\_TRANS\_CUR}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01944}01944          \&\& (old\_period != period}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01945}01945           || old\_offset != offset}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01946}01946           || old\_ppr != ppr\_options)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01947}01947                 u\_int   scsirate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01948}01948 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01949}01949                 update\_needed++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01950}01950                 scsirate = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a1378db336f05164a5f2a05a120348cce}{scsirate}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01951}01951                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01952}01952                         scsirate \&= \string~(\mbox{\hyperlink{aic7xxx__reg_8h_aa3f3b227e1322c5f172b78402d34fdfc}{SXFR\_ULTRA2}}|\mbox{\hyperlink{aic7xxx__reg_8h_ac0cd45f69595a70aa99286918fb3c6ab}{SINGLE\_EDGE}}|\mbox{\hyperlink{aic7xxx__reg_8h_af92cf9c9a3a0bb55c122e1d7c93736f9}{ENABLE\_CRC}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01953}01953                         \textcolor{keywordflow}{if} (syncrate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01954}01954                                 scsirate |= syncrate-\/>\mbox{\hyperlink{structahc__syncrate_a797bdd437c9493ea4c62449cc9084ad7}{sxfr\_u2}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01955}01955                                 \textcolor{keywordflow}{if} ((ppr\_options \& MSG\_EXT\_PPR\_DT\_REQ) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01956}01956                                         scsirate |= \mbox{\hyperlink{aic7xxx__reg_8h_af92cf9c9a3a0bb55c122e1d7c93736f9}{ENABLE\_CRC}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01957}01957                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01958}01958                                         scsirate |= \mbox{\hyperlink{aic7xxx__reg_8h_ac0cd45f69595a70aa99286918fb3c6ab}{SINGLE\_EDGE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01959}01959                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01960}01960                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01961}01961                         scsirate \&= \string~(\mbox{\hyperlink{aic7xxx__reg_8h_aef00b93d94c946e14c2016bdea9941e0}{SXFR}}|\mbox{\hyperlink{aic7xxx__reg_8h_afa673b3ff239dc142d26b52cf6629fc7}{SOFS}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01962}01962                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01963}01963 \textcolor{comment}{                         * Ensure Ultra mode is set properly for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01964}01964 \textcolor{comment}{                         * this target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01965}01965 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01966}01966                         tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} \&= \string~devinfo-\/>target\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01967}01967                         \textcolor{keywordflow}{if} (syncrate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01968}01968                                 \textcolor{keywordflow}{if} (syncrate-\/>\mbox{\hyperlink{structahc__syncrate_ab39c48ff868aac20905321638a54bdf0}{sxfr}} \& \mbox{\hyperlink{aic7xxx_8h_a8d47e203ea08dc9c51f9ced5e84ce450}{ULTRA\_SXFR}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01969}01969                                         tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} |=}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01970}01970                                                 devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a53529d990371fdbd81f9828ae2ea0485}{target\_mask}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01971}01971                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01972}01972                                 scsirate |= syncrate-\/>\mbox{\hyperlink{structahc__syncrate_ab39c48ff868aac20905321638a54bdf0}{sxfr}} \& \mbox{\hyperlink{aic7xxx__reg_8h_aef00b93d94c946e14c2016bdea9941e0}{SXFR}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01973}01973                                 scsirate |= offset \& \mbox{\hyperlink{aic7xxx__reg_8h_afa673b3ff239dc142d26b52cf6629fc7}{SOFS}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01974}01974                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01975}01975                         \textcolor{keywordflow}{if} (active) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01976}01976                                 u\_int sxfrctl0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01977}01977 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01978}01978                                 sxfrctl0 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01979}01979                                 sxfrctl0 \&= \string~FAST20;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01980}01980                                 \textcolor{keywordflow}{if} (tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} \& devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a53529d990371fdbd81f9828ae2ea0485}{target\_mask}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01981}01981                                         sxfrctl0 |= \mbox{\hyperlink{aic7xxx__reg_8h_a5a06a5aeb67975ace1a6892dae668119}{FAST20}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01982}01982                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}, sxfrctl0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01983}01983                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01984}01984                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01985}01985                 \textcolor{keywordflow}{if} (active) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01986}01986                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ad9560ac8db2ff0d8cf17c17769b6988c}{SCSIRATE}}, scsirate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01987}01987                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01988}01988                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ad05488376159180bfe3fb6d8a5875196}{SCSIOFFSET}}, offset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01989}01989                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01990}01990 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01991}01991                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a1378db336f05164a5f2a05a120348cce}{scsirate}} = scsirate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01992}01992                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = period;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01993}01993                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} = offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01994}01994                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} = ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01995}01995 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01996}01996                 \mbox{\hyperlink{aic7xxx__osm_8c_a56f943b1be6fa50429a3c2d356ef0ee2}{ahc\_send\_async}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01997}01997                                CAM\_LUN\_WILDCARD, AC\_TRANSFER\_NEG, NULL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01998}01998                 \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l01999}01999                         \textcolor{keywordflow}{if} (offset != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02000}02000                                 printf(\textcolor{stringliteral}{"{}\%s: target \%d synchronous at \%sMHz\%s, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02001}02001                                        \textcolor{stringliteral}{"{}offset = 0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02002}02002                                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, syncrate-\/>\mbox{\hyperlink{structahc__syncrate_aea60f2cec631d8b30a02d50e0d0712fe}{rate}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02003}02003                                        (ppr\_options \& MSG\_EXT\_PPR\_DT\_REQ)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02004}02004                                        ? \textcolor{stringliteral}{"{} DT"{}} : \textcolor{stringliteral}{"{}"{}}, offset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02005}02005                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02006}02006                                 printf(\textcolor{stringliteral}{"{}\%s: target \%d using "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02007}02007                                        \textcolor{stringliteral}{"{}asynchronous transfers\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02008}02008                                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02009}02009                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02010}02010                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02011}02011         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02012}02012 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02013}02013         update\_needed += \mbox{\hyperlink{aic7xxx_8c_a15ffc86f240511f385020b670e21eb15}{ahc\_update\_neg\_request}}(ahc, devinfo, tstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02014}02014                                                 tinfo, \mbox{\hyperlink{aic7xxx_8h_a4c521b818b5228aacca55283b14509aeab2a9b5d3b1f817d7f0b2e5e63a7281bc}{AHC\_NEG\_TO\_GOAL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02015}02015 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02016}02016         \textcolor{keywordflow}{if} (update\_needed)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02017}02017                 \mbox{\hyperlink{aic7xxx_8c_a669f21fc681d64c8b9b12d87ba874a8c}{ahc\_update\_pending\_scbs}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02018}02018 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02019}02019 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02020}02020 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02021}02021 \textcolor{comment}{ * Update the user/goal/curr tables of wide negotiation}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02022}02022 \textcolor{comment}{ * parameters as well as, in the case of a current or active update,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02023}02023 \textcolor{comment}{ * any data structures on the host controller.  In the case of an}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02024}02024 \textcolor{comment}{ * active update, the specified target is currently talking to us on}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02025}02025 \textcolor{comment}{ * the bus, so the transfer parameter update must take effect}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02026}02026 \textcolor{comment}{ * immediately.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02027}02027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02028}02028 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02029}\mbox{\hyperlink{aic7xxx_8c_a65c15f50e1c31142e27333e6ac02d33c}{02029}} \mbox{\hyperlink{aic7xxx_8c_a65c15f50e1c31142e27333e6ac02d33c}{ahc\_set\_width}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02030}02030               u\_int width, u\_int type, \textcolor{keywordtype}{int} paused)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02031}02031 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02032}02032         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02033}02033         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02034}02034         u\_int   oldwidth;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02035}02035         \textcolor{keywordtype}{int}     active;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02036}02036         \textcolor{keywordtype}{int}     update\_needed;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02037}02037 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02038}02038         active = (type \& \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}}) == \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02039}02039         update\_needed = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02040}02040         tinfo = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02041}02041                                     devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02042}02042 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02043}02043         \textcolor{keywordflow}{if} ((type \& \mbox{\hyperlink{aic7xxx_8h_addc412b6d9cd086c81ac8fc262a70a3c}{AHC\_TRANS\_USER}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02044}02044                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} = width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02045}02045 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02046}02046         \textcolor{keywordflow}{if} ((type \& \mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02047}02047                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} = width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02048}02048 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02049}02049         oldwidth = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02050}02050         \textcolor{keywordflow}{if} ((type \& \mbox{\hyperlink{aic7xxx_8h_aa9b0102b222a80d7b614019a37b36a17}{AHC\_TRANS\_CUR}}) != 0 \&\& oldwidth != width) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02051}02051                 u\_int   scsirate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02052}02052 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02053}02053                 update\_needed++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02054}02054                 scsirate =  tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a1378db336f05164a5f2a05a120348cce}{scsirate}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02055}02055                 scsirate \&= \string~WIDEXFER;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02056}02056                 \textcolor{keywordflow}{if} (width == MSG\_EXT\_WDTR\_BUS\_16\_BIT)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02057}02057                         scsirate |= \mbox{\hyperlink{aic79xx__reg_8h_a096d38ef8e25aa844778401eb1f69f01}{WIDEXFER}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02058}02058 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02059}02059                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a1378db336f05164a5f2a05a120348cce}{scsirate}} = scsirate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02060}02060 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02061}02061                 \textcolor{keywordflow}{if} (active)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02062}02062                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ad9560ac8db2ff0d8cf17c17769b6988c}{SCSIRATE}}, scsirate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02063}02063 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02064}02064                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} = width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02065}02065 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02066}02066                 \mbox{\hyperlink{aic7xxx__osm_8c_a56f943b1be6fa50429a3c2d356ef0ee2}{ahc\_send\_async}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02067}02067                                CAM\_LUN\_WILDCARD, AC\_TRANSFER\_NEG, NULL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02068}02068                 \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02069}02069                         printf(\textcolor{stringliteral}{"{}\%s: target \%d using \%dbit transfers\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02070}02070                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02071}02071                                8 * (0x01 << width));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02072}02072                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02073}02073         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02074}02074 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02075}02075         update\_needed += \mbox{\hyperlink{aic7xxx_8c_a15ffc86f240511f385020b670e21eb15}{ahc\_update\_neg\_request}}(ahc, devinfo, tstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02076}02076                                                 tinfo, \mbox{\hyperlink{aic7xxx_8h_a4c521b818b5228aacca55283b14509aeab2a9b5d3b1f817d7f0b2e5e63a7281bc}{AHC\_NEG\_TO\_GOAL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02077}02077         \textcolor{keywordflow}{if} (update\_needed)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02078}02078                 \mbox{\hyperlink{aic7xxx_8c_a669f21fc681d64c8b9b12d87ba874a8c}{ahc\_update\_pending\_scbs}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02079}02079 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02080}02080 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02081}02081 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02082}02082 \textcolor{comment}{ * Update the current state of tagged queuing for a given target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02083}02083 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02084}02084 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02085}\mbox{\hyperlink{aic7xxx_8c_a8257e88a9e6ea148b3698568dfaa5a54}{02085}} \mbox{\hyperlink{aic7xxx_8c_a8257e88a9e6ea148b3698568dfaa5a54}{ahc\_set\_tags}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02086}02086              \mbox{\hyperlink{aic7xxx_8h_a03aef35b7c3678e000586006c792e88d}{ahc\_queue\_alg}} alg)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02087}02087 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02088}02088         \mbox{\hyperlink{aic7xxx__osm_8c_ac19ed12dd7ba27883ca9d82aa018e318}{ahc\_platform\_set\_tags}}(ahc, devinfo, alg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02089}02089         \mbox{\hyperlink{aic7xxx__osm_8c_a56f943b1be6fa50429a3c2d356ef0ee2}{ahc\_send\_async}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02090}02090                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}}, AC\_TRANSFER\_NEG, \&alg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02091}02091 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02092}02092 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02093}02093 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02094}02094 \textcolor{comment}{ * When the transfer settings for a connection change, update any}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02095}02095 \textcolor{comment}{ * in-\/transit SCBs to contain the new data so the hardware will}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02096}02096 \textcolor{comment}{ * be set correctly during future (re)selections.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02097}02097 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02098}02098 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02099}\mbox{\hyperlink{aic7xxx_8c_a669f21fc681d64c8b9b12d87ba874a8c}{02099}} \mbox{\hyperlink{aic7xxx_8c_a669f21fc681d64c8b9b12d87ba874a8c}{ahc\_update\_pending\_scbs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02100}02100 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02101}02101         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *pending\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02102}02102         \textcolor{keywordtype}{int}     pending\_scb\_count;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02103}02103         \textcolor{keywordtype}{int}     i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02104}02104         \textcolor{keywordtype}{int}     paused;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02105}02105         u\_int   saved\_scbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02106}02106 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02107}02107         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02108}02108 \textcolor{comment}{         * Traverse the pending SCB list and ensure that all of the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02109}02109 \textcolor{comment}{         * SCBs there have the proper settings.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02110}02110 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02111}02111         pending\_scb\_count = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02112}02112         LIST\_FOREACH(pending\_scb, \&ahc-\/>pending\_scbs, \mbox{\hyperlink{aic79xx_8h_a08d5b7a26a4fe44c4684fe5098ba19b1}{pending\_links}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02113}02113                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02114}02114                 \textcolor{keyword}{struct }\mbox{\hyperlink{structhardware__scb}{hardware\_scb}} *pending\_hscb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02115}02115                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02116}02116                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02117}02117 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02118}02118                 \mbox{\hyperlink{aic7xxx_8c_abe961e0048c16d782614a37806151386}{ahc\_scb\_devinfo}}(ahc, \&devinfo, pending\_scb);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02119}02119                 tinfo = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc, devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02120}02120                                             devinfo.\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02121}02121                                             devinfo.\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02122}02122                 pending\_hscb = pending\_scb-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02123}02123                 pending\_hscb-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \&= \string~ULTRAENB;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02124}02124                 \textcolor{keywordflow}{if} ((tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} \& devinfo.\mbox{\hyperlink{structahc__devinfo_a53529d990371fdbd81f9828ae2ea0485}{target\_mask}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02125}02125                         pending\_hscb-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} |= \mbox{\hyperlink{aic7xxx__reg_8h_a9c6e04e0abf594ed2e231f542a432960}{ULTRAENB}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02126}02126                 pending\_hscb-\/>\mbox{\hyperlink{structhardware__scb_ae6c1a1a86561e8336e63b46710d99f7d}{scsirate}} = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a1378db336f05164a5f2a05a120348cce}{scsirate}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02127}02127                 pending\_hscb-\/>\mbox{\hyperlink{structhardware__scb_ac4b5d3949dc3604b1e952067259991b5}{scsioffset}} = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02128}02128                 \textcolor{keywordflow}{if} ((tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_ab3ed80880685ed5e70e778f0e0cd580e}{auto\_negotiate}} \& devinfo.\mbox{\hyperlink{structahc__devinfo_a53529d990371fdbd81f9828ae2ea0485}{target\_mask}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02129}02129                  \&\& (pending\_scb-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a74a01505207b28705952cd462418c54c}{SCB\_AUTO\_NEGOTIATE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02130}02130                         pending\_scb-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \&= \string~SCB\_AUTO\_NEGOTIATE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02131}02131                         pending\_hscb-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \&= \string~MK\_MESSAGE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02132}02132                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02133}02133                 \mbox{\hyperlink{aic7xxx__inline_8h_aa8dbf6944a7af4c03fe8b13bbbff8c42}{ahc\_sync\_scb}}(ahc, pending\_scb,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02134}02134                              BUS\_DMASYNC\_PREREAD|BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02135}02135                 pending\_scb\_count++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02136}02136         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02137}02137 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02138}02138         \textcolor{keywordflow}{if} (pending\_scb\_count == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02139}02139                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02140}02140 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02141}02141         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx__inline_8h_a6a93bff50c0eea23f77e26b312499a19}{ahc\_is\_paused}}(ahc)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02142}02142                 paused = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02143}02143         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02144}02144                 paused = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02145}02145                 \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02146}02146         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02147}02147 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02148}02148         saved\_scbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02149}02149         \textcolor{comment}{/* Ensure that the hscbs down on the card match the new information */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02150}02150         \textcolor{keywordflow}{for} (i = 0; i < ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02151}02151                 \textcolor{keyword}{struct  }\mbox{\hyperlink{structhardware__scb}{hardware\_scb}} *pending\_hscb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02152}02152                 u\_int   \mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02153}02153                 u\_int   scb\_tag;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02154}02154 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02155}02155                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02156}02156                 scb\_tag = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02157}02157                 pending\_scb = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_tag);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02158}02158                 \textcolor{keywordflow}{if} (pending\_scb == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02159}02159                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02160}02160 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02161}02161                 pending\_hscb = pending\_scb-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02162}02162                 \mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02163}02163                 \mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \&= \string~(\mbox{\hyperlink{aic7xxx__reg_8h_a9c6e04e0abf594ed2e231f542a432960}{ULTRAENB}}|\mbox{\hyperlink{aic79xx__reg_8h_aa0450131583d41582497643e1c7d0369}{MK\_MESSAGE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02164}02164                 \mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} |= pending\_hscb-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& (\mbox{\hyperlink{aic7xxx__reg_8h_a9c6e04e0abf594ed2e231f542a432960}{ULTRAENB}}|\mbox{\hyperlink{aic79xx__reg_8h_aa0450131583d41582497643e1c7d0369}{MK\_MESSAGE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02165}02165                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}, \mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02166}02166                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a35ba5bd27805bcd1b723c0b47b730f29}{SCB\_SCSIRATE}}, pending\_hscb-\/>\mbox{\hyperlink{structhardware__scb_ae6c1a1a86561e8336e63b46710d99f7d}{scsirate}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02167}02167                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a22f4695bc646af6a46c7973460ca3d28}{SCB\_SCSIOFFSET}}, pending\_hscb-\/>\mbox{\hyperlink{structhardware__scb_ac4b5d3949dc3604b1e952067259991b5}{scsioffset}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02168}02168         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02169}02169         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, saved\_scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02170}02170 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02171}02171         \textcolor{keywordflow}{if} (paused == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02172}02172                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02173}02173 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02174}02174 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02175}02175 \textcolor{comment}{/**************************** Pathing Information *****************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02176}02176 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02177}\mbox{\hyperlink{aic7xxx_8c_a58ddd232933fb66f2cab3d543f7ccc35}{02177}} \mbox{\hyperlink{aic7xxx_8c_a58ddd232933fb66f2cab3d543f7ccc35}{ahc\_fetch\_devinfo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02178}02178 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02179}02179         u\_int   saved\_scsiid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02180}02180         \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}}    role;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02181}02181         \textcolor{keywordtype}{int}     our\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02182}02182 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02183}02183         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac4a01506a711aa2647d57131c0ac3e3e}{SSTAT0}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a9fec70a17d0bcef23cf03c45a7b7caba}{TARGET}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02184}02184                 role = \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02185}02185         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02186}02186                 role = \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02187}02187 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02188}02188         \textcolor{keywordflow}{if} (role == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02189}02189          \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaf0561c4f43660096e66cf1a293e375cb}{AHC\_MULTI\_TID}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02190}02190          \&\& (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02191}02191            \& (\mbox{\hyperlink{aic79xx__reg_8h_a46659d4a3b7bee865a19014088eeb365}{CMDPHASE\_PENDING}}|\mbox{\hyperlink{aic79xx__reg_8h_ab20a425c8d8462c56a6f68dc11fa1d74}{TARG\_CMD\_PENDING}}|\mbox{\hyperlink{aic79xx__reg_8h_abdcdcd854fd2e6df1debdc776c86c2fb}{NO\_DISCONNECT}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02192}02192                 \textcolor{comment}{/* We were selected, so pull our id from TARGIDIN */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02193}02193                 our\_id = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_abd30f0fdcda595ad7352c0008ca38a2f}{TARGIDIN}}) \& \mbox{\hyperlink{aic79xx__reg_8h_ab0602f28920b31b2015535b1a8c159e3}{OID}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02194}02194         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02195}02195                 our\_id = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a6bf22789cbeef6b8441952a601491577}{SCSIID\_ULTRA2}}) \& \mbox{\hyperlink{aic79xx__reg_8h_ab0602f28920b31b2015535b1a8c159e3}{OID}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02196}02196         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02197}02197                 our\_id = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ac41cdf130fdc7b5a17b8d4a75c0c4943}{SCSIID}}) \& \mbox{\hyperlink{aic79xx__reg_8h_ab0602f28920b31b2015535b1a8c159e3}{OID}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02198}02198 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02199}02199         saved\_scsiid = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a0108c7ce82af6260f8e7f6b165b1743c}{SAVED\_SCSIID}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02200}02200         \mbox{\hyperlink{aic7xxx_8c_ab107b6458f30083b4a6cca6f965daa35}{ahc\_compile\_devinfo}}(devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02201}02201                             our\_id,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02202}02202                             \mbox{\hyperlink{aic79xx_8h_a9227348864b51c7312382787bb426918}{SCSIID\_TARGET}}(ahc, saved\_scsiid),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02203}02203                             \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_abc9d7d3c29d1a241838c7708ede0ce4e}{SAVED\_LUN}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02204}02204                             \mbox{\hyperlink{aic79xx_8h_a39aa9f7e14ae654e48418c5ca30c0475}{SCSIID\_CHANNEL}}(ahc, saved\_scsiid),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02205}02205                             role);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02206}02206 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02207}02207 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02208}02208 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__phase__table__entry}{ahc\_phase\_table\_entry}}*}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02209}\mbox{\hyperlink{aic7xxx_8c_a1957934d386ed4b2885c64225ba8eb76}{02209}} \mbox{\hyperlink{aic7xxx_8c_a1957934d386ed4b2885c64225ba8eb76}{ahc\_lookup\_phase\_entry}}(\textcolor{keywordtype}{int} \mbox{\hyperlink{structahc__phase__table__entry_a68a202e82bf033a743ce6d4094355c71}{phase}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02210}02210 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02211}02211         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__phase__table__entry}{ahc\_phase\_table\_entry}} *entry;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02212}02212         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__phase__table__entry}{ahc\_phase\_table\_entry}} *last\_entry;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02213}02213 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02214}02214         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02215}02215 \textcolor{comment}{         * num\_phases doesn't include the default entry which}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02216}02216 \textcolor{comment}{         * will be returned if the phase doesn't match.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02217}02217 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02218}02218         last\_entry = \&\mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}[\mbox{\hyperlink{aic7xxx_8c_affc490c45bd148300acc26e210a1f2c2}{num\_phases}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02219}02219         \textcolor{keywordflow}{for} (entry = \mbox{\hyperlink{aic7xxx_8c_ae7a6b23a9da98a27ec05f316ddf3895a}{ahc\_phase\_table}}; entry < last\_entry; entry++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02220}02220                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structahc__phase__table__entry_a68a202e82bf033a743ce6d4094355c71}{phase}} == entry-\/>\mbox{\hyperlink{structahc__phase__table__entry_a68a202e82bf033a743ce6d4094355c71}{phase}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02221}02221                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02222}02222         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02223}02223         \textcolor{keywordflow}{return} (entry);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02224}02224 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02225}02225 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02226}02226 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02227}\mbox{\hyperlink{aic7xxx_8c_ab107b6458f30083b4a6cca6f965daa35}{02227}} \mbox{\hyperlink{aic7xxx_8c_ab107b6458f30083b4a6cca6f965daa35}{ahc\_compile\_devinfo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo, u\_int our\_id, u\_int target,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02228}02228                     u\_int lun, \textcolor{keywordtype}{char} channel, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}} role)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02229}02229 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02230}02230         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}} = our\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02231}02231         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}} = target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02232}02232         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}} = lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02233}02233         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a8ab779d3a4ce9e21e6d411db7ebcb0fc}{target\_offset}} = target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02234}02234         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}} = channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02235}02235         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}} = role;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02236}02236         \textcolor{keywordflow}{if} (channel == \textcolor{charliteral}{'B'})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02237}02237                 devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a8ab779d3a4ce9e21e6d411db7ebcb0fc}{target\_offset}} += 8;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02238}02238         devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a53529d990371fdbd81f9828ae2ea0485}{target\_mask}} = (0x01 << devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a8ab779d3a4ce9e21e6d411db7ebcb0fc}{target\_offset}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02239}02239 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02240}02240 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02241}02241 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02242}\mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{02242}} \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02243}02243 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02244}02244         printf(\textcolor{stringliteral}{"{}\%s:\%c:\%d:\%d: "{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02245}02245                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02246}02246 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02247}02247 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02248}02248 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02249}\mbox{\hyperlink{aic7xxx_8c_abe961e0048c16d782614a37806151386}{02249}} \mbox{\hyperlink{aic7xxx_8c_abe961e0048c16d782614a37806151386}{ahc\_scb\_devinfo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02250}02250                 \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02251}02251 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02252}02252         \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}}    role;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02253}02253         \textcolor{keywordtype}{int}     our\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02254}02254 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02255}02255         our\_id = \mbox{\hyperlink{aic79xx_8h_a94f4eb3b38f3cb1a5956256d50d4d07a}{SCSIID\_OUR\_ID}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a1402a3a67b19b5baa7bbf698ebe2f66e}{scsiid}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02256}02256         role = \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02257}02257         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_abf9bf179c52821bbf018a9edcaf09116a56237d30abbd9e806da82c95c6646c06}{SCB\_TARGET\_SCB}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02258}02258                 role = \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02259}02259         \mbox{\hyperlink{aic7xxx_8c_ab107b6458f30083b4a6cca6f965daa35}{ahc\_compile\_devinfo}}(devinfo, our\_id, \mbox{\hyperlink{aic79xx_8h_a6c0f4b6b37cc0fae8e266811c5ca3815}{SCB\_GET\_TARGET}}(ahc, \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02260}02260                             \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}}), \mbox{\hyperlink{aic79xx_8h_aaf5c2a354d6e634b1839c579f220ed69}{SCB\_GET\_CHANNEL}}(ahc, \mbox{\hyperlink{structscb}{scb}}), role);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02261}02261 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02262}02262 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02263}02263 \textcolor{comment}{/************************ Message Phase Processing ****************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02264}02264 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02265}\mbox{\hyperlink{aic7xxx_8c_a99fb434ac77fcfbde1cf06317005009d}{02265}} \mbox{\hyperlink{aic7xxx_8c_a99fb434ac77fcfbde1cf06317005009d}{ahc\_assert\_atn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02266}02266 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02267}02267         u\_int scsisigo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02268}02268 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02269}02269         scsisigo = \mbox{\hyperlink{aic79xx__reg_8h_a8b67b67628ae6f99f58b2b957e23b267}{ATNO}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02270}02270         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02271}02271                 scsisigo |= \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02272}02272         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5ab4a127f8d3de2d9e05937be836098b}{SCSISIGO}}, scsisigo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02273}02273 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02274}02274 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02275}02275 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02276}02276 \textcolor{comment}{ * When an initiator transaction with the MK\_MESSAGE flag either reconnects}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02277}02277 \textcolor{comment}{ * or enters the initial message out phase, we are interrupted.  Fill our}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02278}02278 \textcolor{comment}{ * outgoing message buffer with the appropriate message and beging handing}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02279}02279 \textcolor{comment}{ * the message phase(s) manually.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02280}02280 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02281}02281 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02282}\mbox{\hyperlink{aic7xxx_8c_a54bc35f4377d46ab801dd00cb61d16ee}{02282}} \mbox{\hyperlink{aic7xxx_8c_a54bc35f4377d46ab801dd00cb61d16ee}{ahc\_setup\_initiator\_msgout}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02283}02283                            \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02284}02284 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02285}02285         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02286}02286 \textcolor{comment}{         * To facilitate adding multiple messages together,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02287}02287 \textcolor{comment}{         * each routine should increment the index and len}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02288}02288 \textcolor{comment}{         * variables instead of setting them explicitly.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02289}02289 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02290}02290         ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02291}02291         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02292}02292 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02293}02293         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ade88549cda4d508712a6e7f76c17f03e}{SCB\_DEVICE\_RESET}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02294}02294          \&\& \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}) == MSG\_IDENTIFYFLAG) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02295}02295                 u\_int identify\_msg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02296}02296 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02297}02297                 identify\_msg = MSG\_IDENTIFYFLAG | \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02298}02298                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& \mbox{\hyperlink{aic79xx__reg_8h_afb77eaad3afc8782d93df745ec4e1433}{DISCENB}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02299}02299                         identify\_msg |= MSG\_IDENTIFY\_DISCFLAG;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02300}02300                 ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = identify\_msg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02301}02301                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02302}02302 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02303}02303                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& \mbox{\hyperlink{aic79xx__reg_8h_a34277a2cfa29c38262ffa54c112c79a5}{TAG\_ENB}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02304}02304                         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02305}02305                             \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& (\mbox{\hyperlink{aic79xx__reg_8h_a34277a2cfa29c38262ffa54c112c79a5}{TAG\_ENB}}|\mbox{\hyperlink{aic79xx__reg_8h_a60dc2c36c8e897b0711ef4fbd7822c7e}{SCB\_TAG\_TYPE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02306}02306                         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02307}02307                         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} += 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02308}02308                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02309}02309         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02310}02310 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02311}02311         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ade88549cda4d508712a6e7f76c17f03e}{SCB\_DEVICE\_RESET}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02312}02312                 ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_BUS\_DEV\_RESET;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02313}02313                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02314}02314                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02315}02315                 printf(\textcolor{stringliteral}{"{}Bus Device Reset Message Sent\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02316}02316                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02317}02317 \textcolor{comment}{                 * Clear our selection hardware in advance of}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02318}02318 \textcolor{comment}{                 * the busfree.  We may have an entry in the waiting}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02319}02319 \textcolor{comment}{                 * Q for this target, and we don't want to go about}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02320}02320 \textcolor{comment}{                 * selecting while we handle the busfree and blow it}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02321}02321 \textcolor{comment}{                 * away.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02322}02322 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02323}02323                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_acec8418886ca76cef8259ad48e991238}{ENSELO}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02324}02324         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a424e1866c42f369d2e336b8c6f96113c}{SCB\_ABORT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02325}02325                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& \mbox{\hyperlink{aic79xx__reg_8h_a34277a2cfa29c38262ffa54c112c79a5}{TAG\_ENB}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02326}02326                         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_ABORT\_TAG;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02327}02327                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02328}02328                         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_ABORT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02329}02329                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02330}02330                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02331}02331                 printf(\textcolor{stringliteral}{"{}Abort\%s Message Sent\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02332}02332                        (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& \mbox{\hyperlink{aic79xx__reg_8h_a34277a2cfa29c38262ffa54c112c79a5}{TAG\_ENB}}) != 0 ? \textcolor{stringliteral}{"{} Tag"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02333}02333                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02334}02334 \textcolor{comment}{                 * Clear our selection hardware in advance of}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02335}02335 \textcolor{comment}{                 * the busfree.  We may have an entry in the waiting}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02336}02336 \textcolor{comment}{                 * Q for this target, and we don't want to go about}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02337}02337 \textcolor{comment}{                 * selecting while we handle the busfree and blow it}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02338}02338 \textcolor{comment}{                 * away.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02339}02339 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02340}02340                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_acec8418886ca76cef8259ad48e991238}{ENSELO}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02341}02341         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& (\mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a74a01505207b28705952cd462418c54c}{SCB\_AUTO\_NEGOTIATE}}|\mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a47c99f52810199a00e177ba0f991868e}{SCB\_NEGOTIATE}})) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02342}02342                 \mbox{\hyperlink{aic7xxx_8c_ad94f65976c5556974bc6593e0c6aeedc}{ahc\_build\_transfer\_msg}}(ahc, devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02343}02343         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02344}02344                 printf(\textcolor{stringliteral}{"{}ahc\_intr: AWAITING\_MSG for an SCB that "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02345}02345                        \textcolor{stringliteral}{"{}does not have a waiting message\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02346}02346                 printf(\textcolor{stringliteral}{"{}SCSIID = \%x, target\_mask = \%x\(\backslash\)n"{}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a1402a3a67b19b5baa7bbf698ebe2f66e}{scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02347}02347                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a53529d990371fdbd81f9828ae2ea0485}{target\_mask}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02348}02348                 panic(\textcolor{stringliteral}{"{}SCB = \%d, SCB Control = \%x, MSG\_OUT = \%x "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02349}02349                       \textcolor{stringliteral}{"{}SCB flags = \%x"{}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02350}02350                       \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}), \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02351}02351         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02352}02352 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02353}02353         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02354}02354 \textcolor{comment}{         * Clear the MK\_MESSAGE flag from the SCB so we aren't}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02355}02355 \textcolor{comment}{         * asked to send this message again.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02356}02356 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02357}02357         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_aa0450131583d41582497643e1c7d0369}{MK\_MESSAGE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02358}02358         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \&= \string~MK\_MESSAGE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02359}02359         ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02360}02360         ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64ac904c43fe6c4e179d4289e72abb2e4e8}{MSG\_TYPE\_INITIATOR\_MSGOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02361}02361 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02362}02362 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02363}02363 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02364}02364 \textcolor{comment}{ * Build an appropriate transfer negotiation message for the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02365}02365 \textcolor{comment}{ * currently active target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02366}02366 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02367}02367 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02368}\mbox{\hyperlink{aic7xxx_8c_ad94f65976c5556974bc6593e0c6aeedc}{02368}} \mbox{\hyperlink{aic7xxx_8c_ad94f65976c5556974bc6593e0c6aeedc}{ahc\_build\_transfer\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02369}02369 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02370}02370         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02371}02371 \textcolor{comment}{         * We need to initiate transfer negotiations.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02372}02372 \textcolor{comment}{         * If our current and goal settings are identical,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02373}02373 \textcolor{comment}{         * we want to renegotiate due to a check condition.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02374}02374 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02375}02375         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02376}02376         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02377}02377         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *\mbox{\hyperlink{structahc__syncrate_aea60f2cec631d8b30a02d50e0d0712fe}{rate}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02378}02378         \textcolor{keywordtype}{int}     dowide;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02379}02379         \textcolor{keywordtype}{int}     dosync;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02380}02380         \textcolor{keywordtype}{int}     doppr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02381}02381         u\_int   \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02382}02382         u\_int   ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02383}02383         u\_int   offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02384}02384 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02385}02385         tinfo = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02386}02386                                     devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02387}02387         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02388}02388 \textcolor{comment}{         * Filter our period based on the current connection.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02389}02389 \textcolor{comment}{         * If we can't perform DT transfers on this segment (not in LVD}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02390}02390 \textcolor{comment}{         * mode for instance), then our decision to issue a PPR message}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02391}02391 \textcolor{comment}{         * may change.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02392}02392 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02393}02393         \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02394}02394         offset = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02395}02395         ppr\_options = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02396}02396         \textcolor{comment}{/* Target initiated PPR is not allowed in the SCSI spec */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02397}02397         \textcolor{keywordflow}{if} (devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}} == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02398}02398                 ppr\_options = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02399}02399         \mbox{\hyperlink{structahc__syncrate_aea60f2cec631d8b30a02d50e0d0712fe}{rate}} = \mbox{\hyperlink{aic7xxx_8c_a2515ac67caba10332267408695efc84f}{ahc\_devlimited\_syncrate}}(ahc, tinfo, \&\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02400}02400                                        \&ppr\_options, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02401}02401         dowide = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} != tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02402}02402         dosync = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} != offset || tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} != \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02403}02403         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02404}02404 \textcolor{comment}{         * Only use PPR if we have options that need it, even if the device}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02405}02405 \textcolor{comment}{         * claims to support it.  There might be an expander in the way}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02406}02406 \textcolor{comment}{         * that doesn't.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02407}02407 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02408}02408         doppr = ppr\_options != 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02409}02409 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02410}02410         \textcolor{keywordflow}{if} (!dowide \&\& !dosync \&\& !doppr) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02411}02411                 dowide = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} != MSG\_EXT\_WDTR\_BUS\_8\_BIT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02412}02412                 dosync = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} != 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02413}02413         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02414}02414 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02415}02415         \textcolor{keywordflow}{if} (!dowide \&\& !dosync \&\& !doppr) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02416}02416                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02417}02417 \textcolor{comment}{                 * Force async with a WDTR message if we have a wide bus,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02418}02418 \textcolor{comment}{                 * or just issue an SDTR with a 0 offset.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02419}02419 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02420}02420                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02421}02421                         dowide = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02422}02422                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02423}02423                         dosync = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02424}02424 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02425}02425                 \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02426}02426                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02427}02427                         printf(\textcolor{stringliteral}{"{}Ensuring async\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02428}02428                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02429}02429         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02430}02430 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02431}02431         \textcolor{comment}{/* Target initiated PPR is not allowed in the SCSI spec */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02432}02432         \textcolor{keywordflow}{if} (devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}} == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02433}02433                 doppr = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02434}02434 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02435}02435         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02436}02436 \textcolor{comment}{         * Both the PPR message and SDTR message require the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02437}02437 \textcolor{comment}{         * goal syncrate to be limited to what the target device}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02438}02438 \textcolor{comment}{         * is capable of handling (based on whether an LVD-\/>SE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02439}02439 \textcolor{comment}{         * expander is on the bus), so combine these two cases.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02440}02440 \textcolor{comment}{         * Regardless, guarantee that if we are using WDTR and SDTR}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02441}02441 \textcolor{comment}{         * messages that WDTR comes first.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02442}02442 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02443}02443         \textcolor{keywordflow}{if} (doppr || (dosync \&\& !dowide)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02444}02444                 offset = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02445}02445                 \mbox{\hyperlink{aic7xxx_8c_ac8e19a9aca1951d13657fb0ce515a544}{ahc\_validate\_offset}}(ahc, tinfo, \mbox{\hyperlink{structahc__syncrate_aea60f2cec631d8b30a02d50e0d0712fe}{rate}}, \&offset,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02446}02446                                     doppr ? tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02447}02447                                           : tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02448}02448                                     devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02449}02449                 \textcolor{keywordflow}{if} (doppr) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02450}02450                         \mbox{\hyperlink{aic7xxx_8c_a482dd999c42168fb4dccea82c4442ef0}{ahc\_construct\_ppr}}(ahc, devinfo, \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, offset,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02451}02451                                           tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}}, ppr\_options);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02452}02452                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02453}02453                         \mbox{\hyperlink{aic7xxx_8c_a38e25102198d675f9d8b3f6bceea7dfa}{ahc\_construct\_sdtr}}(ahc, devinfo, \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, offset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02454}02454                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02455}02455         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02456}02456                 \mbox{\hyperlink{aic7xxx_8c_aeb0fb8c8fa65c7080c721739d4c235eb}{ahc\_construct\_wdtr}}(ahc, devinfo, tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02457}02457         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02458}02458 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02459}02459 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02460}02460 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02461}02461 \textcolor{comment}{ * Build a synchronous negotiation message in our message}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02462}02462 \textcolor{comment}{ * buffer based on the input parameters.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02463}02463 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02464}02464 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02465}\mbox{\hyperlink{aic7xxx_8c_a38e25102198d675f9d8b3f6bceea7dfa}{02465}} \mbox{\hyperlink{aic7xxx_8c_a38e25102198d675f9d8b3f6bceea7dfa}{ahc\_construct\_sdtr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02466}02466                    u\_int \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, u\_int offset)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02467}02467 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02468}02468         \textcolor{keywordflow}{if} (offset == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02469}02469                 \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} = \mbox{\hyperlink{aic7xxx_8h_a62d039552296991e4969e1510098e94d}{AHC\_ASYNC\_XFER\_PERIOD}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02470}02470         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXTENDED;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02471}02471         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXT\_SDTR\_LEN;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02472}02472         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXT\_SDTR;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02473}02473         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02474}02474         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02475}02475         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} += 5;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02476}02476         \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02477}02477                 printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Sending SDTR period \%x, offset \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02478}02478                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02479}02479                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}}, \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, offset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02480}02480         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02481}02481 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02482}02482 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02483}02483 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02484}02484 \textcolor{comment}{ * Build a wide negotiation message in our message}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02485}02485 \textcolor{comment}{ * buffer based on the input parameters.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02486}02486 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02487}02487 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02488}\mbox{\hyperlink{aic7xxx_8c_aeb0fb8c8fa65c7080c721739d4c235eb}{02488}} \mbox{\hyperlink{aic7xxx_8c_aeb0fb8c8fa65c7080c721739d4c235eb}{ahc\_construct\_wdtr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02489}02489                    u\_int bus\_width)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02490}02490 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02491}02491         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXTENDED;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02492}02492         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXT\_WDTR\_LEN;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02493}02493         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXT\_WDTR;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02494}02494         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = bus\_width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02495}02495         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} += 4;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02496}02496         \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02497}02497                 printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Sending WDTR \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02498}02498                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02499}02499                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}}, bus\_width);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02500}02500         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02501}02501 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02502}02502 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02503}02503 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02504}02504 \textcolor{comment}{ * Build a parallel protocol request message in our message}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02505}02505 \textcolor{comment}{ * buffer based on the input parameters.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02506}02506 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02507}02507 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02508}\mbox{\hyperlink{aic7xxx_8c_a482dd999c42168fb4dccea82c4442ef0}{02508}} \mbox{\hyperlink{aic7xxx_8c_a482dd999c42168fb4dccea82c4442ef0}{ahc\_construct\_ppr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02509}02509                   u\_int \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, u\_int offset, u\_int bus\_width,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02510}02510                   u\_int ppr\_options)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02511}02511 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02512}02512         \textcolor{keywordflow}{if} (offset == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02513}02513                 \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} = \mbox{\hyperlink{aic7xxx_8h_a62d039552296991e4969e1510098e94d}{AHC\_ASYNC\_XFER\_PERIOD}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02514}02514         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXTENDED;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02515}02515         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXT\_PPR\_LEN;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02516}02516         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = MSG\_EXT\_PPR;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02517}02517         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02518}02518         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02519}02519         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02520}02520         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = bus\_width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02521}02521         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++] = ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02522}02522         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} += 8;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02523}02523         \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02524}02524                 printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Sending PPR bus\_width \%x, period \%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02525}02525                        \textcolor{stringliteral}{"{}offset \%x, ppr\_options \%x\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02526}02526                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02527}02527                        bus\_width, \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, offset, ppr\_options);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02528}02528         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02529}02529 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02530}02530 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02531}02531 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02532}02532 \textcolor{comment}{ * Clear any active message state.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02533}02533 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02534}02534 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02535}\mbox{\hyperlink{aic7xxx_8c_a515ae1248f2e8f09eb0ac2ca816a214d}{02535}} \mbox{\hyperlink{aic7xxx_8c_a515ae1248f2e8f09eb0ac2ca816a214d}{ahc\_clear\_msg\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02536}02536 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02537}02537         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02538}02538         ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02539}02539         ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64affd76f64d6051bb432e968a2227bc6bd}{MSG\_TYPE\_NONE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02540}02540         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a33824584d358faaa0935b48de2974e8d}{ATNI}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02541}02541                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02542}02542 \textcolor{comment}{                 * The target didn't care to respond to our}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02543}02543 \textcolor{comment}{                 * message request, so clear ATN.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02544}02544 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02545}02545                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_aa1acf1fb1f937d50339492cd01f0996e}{CLRATNO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02546}02546         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02547}02547         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}, MSG\_NOOP);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02548}02548         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a508d7288d36d2b95d1b614868e6ce073}{SEQ\_FLAGS2}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02549}02549                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a508d7288d36d2b95d1b614868e6ce073}{SEQ\_FLAGS2}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a16ce566658e66e81cc27156aa82dd736}{TARGET\_MSG\_PENDING}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02550}02550 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02551}02551 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02552}02552 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02553}\mbox{\hyperlink{aic7xxx_8c_afa00cf489b7e851f882fc08f90c17574}{02553}} \mbox{\hyperlink{aic7xxx_8c_afa00cf489b7e851f882fc08f90c17574}{ahc\_handle\_proto\_violation}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02554}02554 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02555}02555         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02556}02556         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02557}02557         u\_int   scbid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02558}02558         u\_int   seq\_flags;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02559}02559         u\_int   curphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02560}02560         u\_int   lastphase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02561}02561         \textcolor{keywordtype}{int}     found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02562}02562 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02563}02563         \mbox{\hyperlink{aic7xxx_8c_a58ddd232933fb66f2cab3d543f7ccc35}{ahc\_fetch\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02564}02564         scbid = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02565}02565         \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scbid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02566}02566         seq\_flags = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02567}02567         curphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_aea6cfd941193dfb218cbf1e20f2279cb}{PHASE\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02568}02568         lastphase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02569}02569         \textcolor{keywordflow}{if} ((seq\_flags \& \mbox{\hyperlink{aic79xx__reg_8h_a34d55bcc334ec9cacfab339669a19a0c}{NOT\_IDENTIFIED}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02570}02570                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02571}02571 \textcolor{comment}{                 * The reconnecting target either did not send an}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02572}02572 \textcolor{comment}{                 * identify message, or did, but we didn't find an SCB}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02573}02573 \textcolor{comment}{                 * to match.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02574}02574 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02575}02575                 \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02576}02576                 printf(\textcolor{stringliteral}{"{}Target did not send an IDENTIFY message. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02577}02577                        \textcolor{stringliteral}{"{}LASTPHASE = 0x\%x.\(\backslash\)n"{}}, lastphase);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02578}02578                 \mbox{\hyperlink{structscb}{scb}} = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02579}02579         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02580}02580                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02581}02581 \textcolor{comment}{                 * We don't seem to have an SCB active for this}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02582}02582 \textcolor{comment}{                 * transaction.  Print an error and reset the bus.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02583}02583 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02584}02584                 \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02585}02585                 printf(\textcolor{stringliteral}{"{}No SCB found during protocol violation\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02586}02586                 \textcolor{keywordflow}{goto} proto\_violation\_reset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02587}02587         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02588}02588                 \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, CAM\_SEQUENCE\_FAIL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02589}02589                 \textcolor{keywordflow}{if} ((seq\_flags \& \mbox{\hyperlink{aic79xx__reg_8h_a97271e2fdd9b1f9f28df2ade674d5ae6}{NO\_CDB\_SENT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02590}02590                         \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02591}02591                         printf(\textcolor{stringliteral}{"{}No or incomplete CDB sent to device.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02592}02592                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}) \& \mbox{\hyperlink{aic79xx__reg_8h_abe88b1b591e987d28e14bfee4d085718}{STATUS\_RCVD}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02593}02593                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02594}02594 \textcolor{comment}{                         * The target never bothered to provide status to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02595}02595 \textcolor{comment}{                         * us prior to completing the command.  Since we don't}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02596}02596 \textcolor{comment}{                         * know the disposition of this command, we must attempt}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02597}02597 \textcolor{comment}{                         * to abort it.  Assert ATN and prepare to send an abort}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02598}02598 \textcolor{comment}{                         * message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02599}02599 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02600}02600                         \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02601}02601                         printf(\textcolor{stringliteral}{"{}Completed command without status.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02602}02602                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02603}02603                         \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02604}02604                         printf(\textcolor{stringliteral}{"{}Unknown protocol violation.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02605}02605                         \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02606}02606                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02607}02607         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02608}02608         \textcolor{keywordflow}{if} ((lastphase \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a79a0cabab255cc476136a72d125230f2}{P\_DATAIN\_DT}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02609}02609          || lastphase == \mbox{\hyperlink{aic79xx__reg_8h_adffec6b54edc26f2229aed48add65676}{P\_COMMAND}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02610}02610 proto\_violation\_reset:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02611}02611                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02612}02612 \textcolor{comment}{                 * Target either went directly to data/command}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02613}02613 \textcolor{comment}{                 * phase or didn't respond to our ATN.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02614}02614 \textcolor{comment}{                 * The only safe thing to do is to blow}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02615}02615 \textcolor{comment}{                 * it away with a bus reset.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02616}02616 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02617}02617                 found = \mbox{\hyperlink{aic7xxx_8c_ac9e6be5168888f595fce1e51193b9938}{ahc\_reset\_channel}}(ahc, \textcolor{charliteral}{'A'}, \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02618}02618                 printf(\textcolor{stringliteral}{"{}\%s: Issued Channel \%c Bus Reset. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02619}02619                        \textcolor{stringliteral}{"{}\%d SCBs aborted\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), \textcolor{charliteral}{'A'}, found);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02620}02620         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02621}02621                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02622}02622 \textcolor{comment}{                 * Leave the selection hardware off in case}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02623}02623 \textcolor{comment}{                 * this abort attempt will affect yet to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02624}02624 \textcolor{comment}{                 * be sent commands.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02625}02625 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02626}02626                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02627}02627                          \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_acec8418886ca76cef8259ad48e991238}{ENSELO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02628}02628                 \mbox{\hyperlink{aic7xxx_8c_a99fb434ac77fcfbde1cf06317005009d}{ahc\_assert\_atn}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02629}02629                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}, \mbox{\hyperlink{aic79xx__reg_8h_a8f4dfbff3c1984e0a76bdd80c1fff1bd}{HOST\_MSG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02630}02630                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02631}02631                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02632}02632                         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[0] = MSG\_ABORT\_TASK;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02633}02633                         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02634}02634                         ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02635}02635                         ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64ac904c43fe6c4e179d4289e72abb2e4e8}{MSG\_TYPE\_INITIATOR\_MSGOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02636}02636                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02637}02637                         \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02638}02638                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a424e1866c42f369d2e336b8c6f96113c}{SCB\_ABORT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02639}02639                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02640}02640                 printf(\textcolor{stringliteral}{"{}Protocol violation \%s.  Attempting to abort.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02641}02641                        \mbox{\hyperlink{aic7xxx_8c_a1957934d386ed4b2885c64225ba8eb76}{ahc\_lookup\_phase\_entry}}(curphase)-\/>phasemsg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02642}02642         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02643}02643 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02644}02644 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02645}02645 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02646}02646 \textcolor{comment}{ * Manual message loop handler.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02647}02647 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02648}02648 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02649}\mbox{\hyperlink{aic7xxx_8c_a4f3aa3e651fac361937174d6e8c41bc2}{02649}} \mbox{\hyperlink{aic7xxx_8c_a4f3aa3e651fac361937174d6e8c41bc2}{ahc\_handle\_message\_phase}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02650}02650 \{ }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02651}02651         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02652}02652         u\_int   bus\_phase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02653}02653         \textcolor{keywordtype}{int}     end\_session;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02654}02654 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02655}02655         \mbox{\hyperlink{aic7xxx_8c_a58ddd232933fb66f2cab3d543f7ccc35}{ahc\_fetch\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02656}02656         end\_session = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02657}02657         bus\_phase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_aea6cfd941193dfb218cbf1e20f2279cb}{PHASE\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02658}02658 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02659}02659 reswitch:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02660}02660         \textcolor{keywordflow}{switch} (ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02661}02661         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64ac904c43fe6c4e179d4289e72abb2e4e8}{MSG\_TYPE\_INITIATOR\_MSGOUT}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02662}02662         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02663}02663                 \textcolor{keywordtype}{int} lastbyte;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02664}02664                 \textcolor{keywordtype}{int} phasemis;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02665}02665                 \textcolor{keywordtype}{int} msgdone;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02666}02666 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02667}02667                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02668}02668                         panic(\textcolor{stringliteral}{"{}HOST\_MSG\_LOOP interrupt with no active message"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02669}02669 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02670}02670 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02671}02671                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02672}02672                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02673}02673                         printf(\textcolor{stringliteral}{"{}INITIATOR\_MSG\_OUT"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02674}02674                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02675}02675 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02676}02676                 phasemis = bus\_phase != \mbox{\hyperlink{aic79xx__reg_8h_af8aa57a40c3ae80362a3815c2dd02461}{P\_MESGOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02677}02677                 \textcolor{keywordflow}{if} (phasemis) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02678}02678 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02679}02679                         \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02680}02680                                 printf(\textcolor{stringliteral}{"{} PHASEMIS \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02681}02681                                        \mbox{\hyperlink{aic7xxx_8c_a1957934d386ed4b2885c64225ba8eb76}{ahc\_lookup\_phase\_entry}}(bus\_phase)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02682}02682                                                              -\/>phasemsg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02683}02683                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02684}02684 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02685}02685                         \textcolor{keywordflow}{if} (bus\_phase == \mbox{\hyperlink{aic79xx__reg_8h_aa62d3b62a4fec478f16f01817f71f88e}{P\_MESGIN}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02686}02686                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02687}02687 \textcolor{comment}{                                 * Change gears and see if}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02688}02688 \textcolor{comment}{                                 * this messages is of interest to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02689}02689 \textcolor{comment}{                                 * us or should be passed back to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02690}02690 \textcolor{comment}{                                 * the sequencer.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02691}02691 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02692}02692                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_aa1acf1fb1f937d50339492cd01f0996e}{CLRATNO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02693}02693                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a18cc0e5cec7f75d4c666c304d51bd451}{send\_msg\_perror}} = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02694}02694                                 ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64aa66e8b3ff71c587a3be6c56741053543}{MSG\_TYPE\_INITIATOR\_MSGIN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02695}02695                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02696}02696                                 \textcolor{keywordflow}{goto} reswitch;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02697}02697                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02698}02698                         end\_session = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02699}02699                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02700}02700                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02701}02701 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02702}02702                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a18cc0e5cec7f75d4c666c304d51bd451}{send\_msg\_perror}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02703}02703                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_aa1acf1fb1f937d50339492cd01f0996e}{CLRATNO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02704}02704                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_ac558195521dabf23f453d27ec5381ae0}{CLRREQINIT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02705}02705 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02706}02706                         \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02707}02707                                 printf(\textcolor{stringliteral}{"{} byte 0x\%x\(\backslash\)n"{}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a18cc0e5cec7f75d4c666c304d51bd451}{send\_msg\_perror}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02708}02708 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02709}02709                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a02162a656348425c4b55305c36762776}{SCSIDATL}}, MSG\_PARITY\_ERROR);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02710}02710                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02711}02711                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02712}02712 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02713}02713                 msgdone = ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} == ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02714}02714                 \textcolor{keywordflow}{if} (msgdone) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02715}02715                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02716}02716 \textcolor{comment}{                         * The target has requested a retry.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02717}02717 \textcolor{comment}{                         * Re-\/assert ATN, reset our message index to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02718}02718 \textcolor{comment}{                         * 0, and try again.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02719}02719 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02720}02720                         ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02721}02721                         \mbox{\hyperlink{aic7xxx_8c_a99fb434ac77fcfbde1cf06317005009d}{ahc\_assert\_atn}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02722}02722                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02723}02723 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02724}02724                 lastbyte = ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} == (ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02725}02725                 \textcolor{keywordflow}{if} (lastbyte) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02726}02726                         \textcolor{comment}{/* Last byte is signified by dropping ATN */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02727}02727                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_aa1acf1fb1f937d50339492cd01f0996e}{CLRATNO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02728}02728                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02729}02729 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02730}02730                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02731}02731 \textcolor{comment}{                 * Clear our interrupt status and present}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02732}02732 \textcolor{comment}{                 * the next byte on the bus.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02733}02733 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02734}02734                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_ac558195521dabf23f453d27ec5381ae0}{CLRREQINIT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02735}02735 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02736}02736                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02737}02737                         printf(\textcolor{stringliteral}{"{} byte 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02738}02738                                ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02739}02739 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02740}02740                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a02162a656348425c4b55305c36762776}{SCSIDATL}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02741}02741                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02742}02742         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02743}02743         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64aa66e8b3ff71c587a3be6c56741053543}{MSG\_TYPE\_INITIATOR\_MSGIN}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02744}02744         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02745}02745                 \textcolor{keywordtype}{int} phasemis;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02746}02746                 \textcolor{keywordtype}{int} message\_done;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02747}02747 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02748}02748 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02749}02749                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02750}02750                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02751}02751                         printf(\textcolor{stringliteral}{"{}INITIATOR\_MSG\_IN"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02752}02752                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02753}02753 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02754}02754                 phasemis = bus\_phase != \mbox{\hyperlink{aic79xx__reg_8h_aa62d3b62a4fec478f16f01817f71f88e}{P\_MESGIN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02755}02755                 \textcolor{keywordflow}{if} (phasemis) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02756}02756 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02757}02757                         \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02758}02758                                 printf(\textcolor{stringliteral}{"{} PHASEMIS \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02759}02759                                        \mbox{\hyperlink{aic7xxx_8c_a1957934d386ed4b2885c64225ba8eb76}{ahc\_lookup\_phase\_entry}}(bus\_phase)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02760}02760                                                              -\/>phasemsg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02761}02761                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02762}02762 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02763}02763                         ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02764}02764                         \textcolor{keywordflow}{if} (bus\_phase == \mbox{\hyperlink{aic79xx__reg_8h_af8aa57a40c3ae80362a3815c2dd02461}{P\_MESGOUT}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02765}02765                          \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_a18cc0e5cec7f75d4c666c304d51bd451}{send\_msg\_perror}} == \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02766}02766                           || (ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02767}02767                            \&\& ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} == 0))) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02768}02768                                 ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64ac904c43fe6c4e179d4289e72abb2e4e8}{MSG\_TYPE\_INITIATOR\_MSGOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02769}02769                                 \textcolor{keywordflow}{goto} reswitch;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02770}02770                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02771}02771                         end\_session = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02772}02772                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02773}02773                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02774}02774 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02775}02775                 \textcolor{comment}{/* Pull the byte in without acking it */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02776}02776                 ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}}] = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4de405da994a996c3df67693729e7e42}{SCSIBUSL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02777}02777 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02778}02778                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02779}02779                         printf(\textcolor{stringliteral}{"{} byte 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02780}02780                                ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}}]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02781}02781 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02782}02782 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02783}02783                 message\_done = \mbox{\hyperlink{aic7xxx_8c_aee5e2cd3064ffa085d3604ea3ff1715d}{ahc\_parse\_msg}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02784}02784 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02785}02785                 \textcolor{keywordflow}{if} (message\_done) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02786}02786                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02787}02787 \textcolor{comment}{                         * Clear our incoming message buffer in case there}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02788}02788 \textcolor{comment}{                         * is another message following this one.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02789}02789 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02790}02790                         ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02791}02791 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02792}02792                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02793}02793 \textcolor{comment}{                         * If this message illicited a response,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02794}02794 \textcolor{comment}{                         * assert ATN so the target takes us to the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02795}02795 \textcolor{comment}{                         * message out phase.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02796}02796 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02797}02797                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02798}02798 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02799}02799                                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02800}02800                                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02801}02801                                         printf(\textcolor{stringliteral}{"{}Asserting ATN for response\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02802}02802                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02803}02803 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02804}02804                                 \mbox{\hyperlink{aic7xxx_8c_a99fb434ac77fcfbde1cf06317005009d}{ahc\_assert\_atn}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02805}02805                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02806}02806                 \} \textcolor{keywordflow}{else} }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02807}02807                         ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02808}02808 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02809}02809                 \textcolor{keywordflow}{if} (message\_done == \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631a40117f326a6239962ecce5b408c5e5b1}{MSGLOOP\_TERMINATED}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02810}02810                         end\_session = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02811}02811                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02812}02812                         \textcolor{comment}{/* Ack the byte */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02813}02813                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8f1dcedf1e01aea69c6d930f097efa6e}{CLRSINT1}}, \mbox{\hyperlink{aic79xx__reg_8h_ac558195521dabf23f453d27ec5381ae0}{CLRREQINIT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02814}02814                         \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a02162a656348425c4b55305c36762776}{SCSIDATL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02815}02815                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02816}02816                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02817}02817         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02818}02818         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64a09e5219a45772aa048f0175880353d07}{MSG\_TYPE\_TARGET\_MSGIN}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02819}02819         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02820}02820                 \textcolor{keywordtype}{int} msgdone;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02821}02821 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02822}02822                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02823}02823                         panic(\textcolor{stringliteral}{"{}Target MSGIN with no active message"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02824}02824 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02825}02825 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02826}02826                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02827}02827                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02828}02828                         printf(\textcolor{stringliteral}{"{}TARGET\_MSG\_IN"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02829}02829                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02830}02830 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02831}02831 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02832}02832                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02833}02833 \textcolor{comment}{                 * If we interrupted a mesgout session, the initiator}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02834}02834 \textcolor{comment}{                 * will not know this until our first REQ.  So, we}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02835}02835 \textcolor{comment}{                 * only honor mesgout requests after we've sent our}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02836}02836 \textcolor{comment}{                 * first byte.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02837}02837 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02838}02838                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a33824584d358faaa0935b48de2974e8d}{ATNI}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02839}02839                  \&\& ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} > 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02840}02840                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02841}02841 \textcolor{comment}{                         * Change gears and see if this messages is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02842}02842 \textcolor{comment}{                         * of interest to us or should be passed back}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02843}02843 \textcolor{comment}{                         * to the sequencer.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02844}02844 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02845}02845 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02846}02846                         \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02847}02847                                 printf(\textcolor{stringliteral}{"{} Honoring ATN Request.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02848}02848 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02849}02849                         ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64ae69b690e896b9c0bfce09e3164a71a58}{MSG\_TYPE\_TARGET\_MSGOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02850}02850 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02851}02851                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02852}02852 \textcolor{comment}{                         * Disable SCSI Programmed I/O during the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02853}02853 \textcolor{comment}{                         * phase change so as to avoid phantom REQs.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02854}02854 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02855}02855                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02856}02856                                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02857}02857 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02858}02858                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02859}02859 \textcolor{comment}{                         * Since SPIORDY asserts when ACK is asserted}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02860}02860 \textcolor{comment}{                         * for P\_MSGOUT, and SPIORDY's assertion triggered}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02861}02861 \textcolor{comment}{                         * our entry into this routine, wait for ACK to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02862}02862 \textcolor{comment}{                         * *de-\/assert* before changing phases.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02863}02863 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02864}02864                         \textcolor{keywordflow}{while} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_ae18944443d6fbd94dd7bd87b74b15337}{ACKI}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02865}02865                                 ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02866}02866 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02867}02867                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5ab4a127f8d3de2d9e05937be836098b}{SCSISIGO}}, \mbox{\hyperlink{aic79xx__reg_8h_af8aa57a40c3ae80362a3815c2dd02461}{P\_MESGOUT}} | \mbox{\hyperlink{aic79xx__reg_8h_a421bd623de678907d4bbdb3094b380e2}{BSYO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02868}02868 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02869}02869                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02870}02870 \textcolor{comment}{                         * All phase line changes require a bus}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02871}02871 \textcolor{comment}{                         * settle delay before REQ is asserted.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02872}02872 \textcolor{comment}{                         * [SCSI SPI4 10.7.1]}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02873}02873 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02874}02874                         \mbox{\hyperlink{aic7xxx__osm_8h_a277e6e5fb1f6eee84ee7d2399ebd5b83}{ahc\_flush\_device\_writes}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02875}02875                         \mbox{\hyperlink{aic__osm__lib_8h_a23559a914641f4b70a959f25b8281c87}{aic\_delay}}(\mbox{\hyperlink{aic7xxx_8h_a502da1b137577224435fb6362ffd3ac2}{AHC\_BUSSETTLE\_DELAY}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02876}02876 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02877}02877                         ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02878}02878                         \textcolor{comment}{/* Enable SCSI Programmed I/O to REQ for first byte */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02879}02879                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02880}02880                                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) | \mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02881}02881                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02882}02882                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02883}02883 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02884}02884                 msgdone = ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} == ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02885}02885                 \textcolor{keywordflow}{if} (msgdone) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02886}02886                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02887}02887                                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02888}02888                         end\_session = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02889}02889                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02890}02890                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02891}02891 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02892}02892                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02893}02893 \textcolor{comment}{                 * Present the next byte on the bus.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02894}02894 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02895}02895 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02896}02896                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02897}02897                         printf(\textcolor{stringliteral}{"{} byte 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02898}02898                                ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02899}02899 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02900}02900                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) | \mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02901}02901                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a02162a656348425c4b55305c36762776}{SCSIDATL}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}}++]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02902}02902                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02903}02903         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02904}02904         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64ae69b690e896b9c0bfce09e3164a71a58}{MSG\_TYPE\_TARGET\_MSGOUT}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02905}02905         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02906}02906                 \textcolor{keywordtype}{int} lastbyte;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02907}02907                 \textcolor{keywordtype}{int} msgdone;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02908}02908 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02909}02909 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02910}02910                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02911}02911                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02912}02912                         printf(\textcolor{stringliteral}{"{}TARGET\_MSG\_OUT"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02913}02913                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02914}02914 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02915}02915                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02916}02916 \textcolor{comment}{                 * The initiator signals that this is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02917}02917 \textcolor{comment}{                 * the last byte by dropping ATN.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02918}02918 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02919}02919                 lastbyte = (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a33824584d358faaa0935b48de2974e8d}{ATNI}}) == 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02920}02920 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02921}02921                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02922}02922 \textcolor{comment}{                 * Read the latched byte, but turn off SPIOEN first}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02923}02923 \textcolor{comment}{                 * so that we don't inadvertently cause a REQ for the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02924}02924 \textcolor{comment}{                 * next byte.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02925}02925 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02926}02926                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02927}02927                 ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}}] = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a02162a656348425c4b55305c36762776}{SCSIDATL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02928}02928 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02929}02929 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02930}02930                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02931}02931                         printf(\textcolor{stringliteral}{"{} byte 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02932}02932                                ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}}]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02933}02933 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02934}02934 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02935}02935                 msgdone = \mbox{\hyperlink{aic7xxx_8c_aee5e2cd3064ffa085d3604ea3ff1715d}{ahc\_parse\_msg}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02936}02936                 \textcolor{keywordflow}{if} (msgdone == \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631a40117f326a6239962ecce5b408c5e5b1}{MSGLOOP\_TERMINATED}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02937}02937                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02938}02938 \textcolor{comment}{                         * The message is *really* done in that it caused}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02939}02939 \textcolor{comment}{                         * us to go to bus free.  The sequencer has already}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02940}02940 \textcolor{comment}{                         * been reset at this point, so pull the ejection}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02941}02941 \textcolor{comment}{                         * handle.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02942}02942 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02943}02943                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02944}02944                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02945}02945                 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02946}02946                 ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02947}02947 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02948}02948                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02949}02949 \textcolor{comment}{                 * XXX Read spec about initiator dropping ATN too soon}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02950}02950 \textcolor{comment}{                 *     and use msgdone to detect it.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02951}02951 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02952}02952                 \textcolor{keywordflow}{if} (msgdone == \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631ae8cab40904d3158cab9e67d366200461}{MSGLOOP\_MSGCOMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02953}02953                         ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02954}02954 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02955}02955                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02956}02956 \textcolor{comment}{                         * If this message illicited a response, transition}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02957}02957 \textcolor{comment}{                         * to the Message in phase and send it.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02958}02958 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02959}02959                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02960}02960 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02961}02961                                 \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MESSAGES) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02962}02962                                         \mbox{\hyperlink{aic7xxx_8c_aaf05e532f1b1935c28c547b6585859ae}{ahc\_print\_devinfo}}(ahc, \&devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02963}02963                                         printf(\textcolor{stringliteral}{"{} preparing response.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02964}02964                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02965}02965 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02966}02966                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5ab4a127f8d3de2d9e05937be836098b}{SCSISIGO}}, \mbox{\hyperlink{aic79xx__reg_8h_aa62d3b62a4fec478f16f01817f71f88e}{P\_MESGIN}} | \mbox{\hyperlink{aic79xx__reg_8h_a421bd623de678907d4bbdb3094b380e2}{BSYO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02967}02967 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02968}02968                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02969}02969 \textcolor{comment}{                                 * All phase line changes require a bus}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02970}02970 \textcolor{comment}{                                 * settle delay before REQ is asserted.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02971}02971 \textcolor{comment}{                                 * [SCSI SPI4 10.7.1]  When transitioning}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02972}02972 \textcolor{comment}{                                 * from an OUT to an IN phase, we must}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02973}02973 \textcolor{comment}{                                 * also wait a data release delay to allow}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02974}02974 \textcolor{comment}{                                 * the initiator time to release the data}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02975}02975 \textcolor{comment}{                                 * lines. [SCSI SPI4 10.12]}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02976}02976 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02977}02977                                 \mbox{\hyperlink{aic7xxx__osm_8h_a277e6e5fb1f6eee84ee7d2399ebd5b83}{ahc\_flush\_device\_writes}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02978}02978                                 \mbox{\hyperlink{aic__osm__lib_8h_a23559a914641f4b70a959f25b8281c87}{aic\_delay}}(\mbox{\hyperlink{aic7xxx_8h_a502da1b137577224435fb6362ffd3ac2}{AHC\_BUSSETTLE\_DELAY}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02979}02979                                         + \mbox{\hyperlink{aic7xxx_8h_a8cf0dfdf8dc7a7dcc6e93856d437c750}{AHC\_DATARELEASE\_DELAY}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02980}02980 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02981}02981                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02982}02982 \textcolor{comment}{                                 * Enable SCSI Programmed I/O.  This will}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02983}02983 \textcolor{comment}{                                 * immediately cause SPIORDY to assert,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02984}02984 \textcolor{comment}{                                 * and the sequencer will call our message}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02985}02985 \textcolor{comment}{                                 * loop again.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02986}02986 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02987}02987                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02988}02988                                          \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) | \mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02989}02989                                 ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64a09e5219a45772aa048f0175880353d07}{MSG\_TYPE\_TARGET\_MSGIN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02990}02990                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02991}02991                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02992}02992                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02993}02993                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02994}02994 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02995}02995                 \textcolor{keywordflow}{if} (lastbyte)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02996}02996                         end\_session = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02997}02997                 \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02998}02998                         \textcolor{comment}{/* Ask for the next byte. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l02999}02999                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03000}03000                                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}) | \mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03001}03001                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03002}03002 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03003}03003                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03004}03004         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03005}03005         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03006}03006                 panic(\textcolor{stringliteral}{"{}Unknown REQINIT message type"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03007}03007         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03008}03008 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03009}03009         \textcolor{keywordflow}{if} (end\_session) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03010}03010                 \mbox{\hyperlink{aic7xxx_8c_a515ae1248f2e8f09eb0ac2ca816a214d}{ahc\_clear\_msg\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03011}03011                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3ec5d6001e3f6782a68417d611766b33}{RETURN\_1}}, \mbox{\hyperlink{aic79xx__reg_8h_aaf3c4a85bfb8f83ab190f5f450704e1b}{EXIT\_MSG\_LOOP}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03012}03012         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03013}03013                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3ec5d6001e3f6782a68417d611766b33}{RETURN\_1}}, \mbox{\hyperlink{aic7xxx__reg_8h_a0fc4f5dea9fe4c8b4659f4225d4a77ce}{CONT\_MSG\_LOOP}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03014}03014 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03015}03015 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03016}03016 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03017}03017 \textcolor{comment}{ * See if we sent a particular extended message to the target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03018}03018 \textcolor{comment}{ * If "{}full"{} is true, return true only if the target saw the full}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03019}03019 \textcolor{comment}{ * message.  If "{}full"{} is false, return true if the target saw at}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03020}03020 \textcolor{comment}{ * least the first byte of the message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03021}03021 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03022}03022 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03023}\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{03023}} \mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106}{ahc\_msgtype}} type, u\_int msgval, \textcolor{keywordtype}{int} full)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03024}03024 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03025}03025         \textcolor{keywordtype}{int} found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03026}03026         u\_int index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03027}03027 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03028}03028         found = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03029}03029         index = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03030}03030 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03031}03031         \textcolor{keywordflow}{while} (index < ahc-\/>msgout\_len) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03032}03032                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[index] == MSG\_EXTENDED) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03033}03033                         u\_int end\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03034}03034 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03035}03035                         end\_index = index + 1 + ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[index + 1];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03036}03036                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[index+2] == msgval}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03037}03037                          \&\& type == \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03038}03038                                 \textcolor{keywordflow}{if} (full) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03039}03039                                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} > end\_index)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03040}03040                                                 found = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03041}03041                                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} > index)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03042}03042                                         found = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03043}03043                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03044}03044                         index = end\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03045}03045                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[index] >= MSG\_SIMPLE\_TASK}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03046}03046                         \&\& ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[index] <= MSG\_IGN\_WIDE\_RESIDUE) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03047}03047                         \textcolor{comment}{/* Skip tag type and tag id or residue param*/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03048}03048                         index += 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03049}03049                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03050}03050                         \textcolor{comment}{/* Single byte message */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03051}03051                         \textcolor{keywordflow}{if} (type == \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106acfdceb20b6056d5f930eded906b45da7}{AHCMSG\_1B}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03052}03052                          \&\& ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[index] == msgval}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03053}03053                          \&\& ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} > index)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03054}03054                                 found = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03055}03055                         index++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03056}03056                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03057}03057 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03058}03058                 \textcolor{keywordflow}{if} (found)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03059}03059                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03060}03060         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03061}03061         \textcolor{keywordflow}{return} (found);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03062}03062 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03063}03063 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03064}03064 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03065}03065 \textcolor{comment}{ * Wait for a complete incoming message, parse it, and respond accordingly.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03066}03066 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03067}03067 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03068}\mbox{\hyperlink{aic7xxx_8c_aee5e2cd3064ffa085d3604ea3ff1715d}{03068}} \mbox{\hyperlink{aic7xxx_8c_aee5e2cd3064ffa085d3604ea3ff1715d}{ahc\_parse\_msg}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03069}03069 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03070}03070         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03071}03071         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03072}03072         \textcolor{keywordtype}{int}     reject;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03073}03073         \textcolor{keywordtype}{int}     done;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03074}03074         \textcolor{keywordtype}{int}     response;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03075}03075         u\_int   targ\_scsirate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03076}03076 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03077}03077         done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631a3e888af3fa22f6750bbe51ce3132162d}{MSGLOOP\_IN\_PROG}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03078}03078         response = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03079}03079         reject = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03080}03080         tinfo = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03081}03081                                     devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03082}03082         targ\_scsirate = tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a1378db336f05164a5f2a05a120348cce}{scsirate}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03083}03083 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03084}03084         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03085}03085 \textcolor{comment}{         * Parse as much of the message as is available,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03086}03086 \textcolor{comment}{         * rejecting it if we don't support it.  When}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03087}03087 \textcolor{comment}{         * the entire message is available and has been}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03088}03088 \textcolor{comment}{         * handled, return MSGLOOP\_MSGCOMPLETE, indicating}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03089}03089 \textcolor{comment}{         * that we have parsed an entire message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03090}03090 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03091}03091 \textcolor{comment}{         * In the case of extended messages, we accept the length}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03092}03092 \textcolor{comment}{         * byte outright and perform more checking once we know the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03093}03093 \textcolor{comment}{         * extended message type.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03094}03094 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03095}03095         \textcolor{keywordflow}{switch} (ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[0]) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03096}03096         \textcolor{keywordflow}{case} MSG\_DISCONNECT:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03097}03097         \textcolor{keywordflow}{case} MSG\_SAVEDATAPOINTER:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03098}03098         \textcolor{keywordflow}{case} MSG\_CMDCOMPLETE:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03099}03099         \textcolor{keywordflow}{case} MSG\_RESTOREPOINTERS:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03100}03100         \textcolor{keywordflow}{case} MSG\_IGN\_WIDE\_RESIDUE:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03101}03101                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03102}03102 \textcolor{comment}{                 * End our message loop as these are messages}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03103}03103 \textcolor{comment}{                 * the sequencer handles on its own.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03104}03104 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03105}03105                 done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631a40117f326a6239962ecce5b408c5e5b1}{MSGLOOP\_TERMINATED}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03106}03106                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03107}03107         \textcolor{keywordflow}{case} MSG\_MESSAGE\_REJECT:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03108}03108                 response = \mbox{\hyperlink{aic7xxx_8c_a054a815fc86e150fff22f21281764302}{ahc\_handle\_msg\_reject}}(ahc, devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03109}03109                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03110}03110         \textcolor{keywordflow}{case} MSG\_NOOP:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03111}03111                 done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631ae8cab40904d3158cab9e67d366200461}{MSGLOOP\_MSGCOMPLETE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03112}03112                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03113}03113         \textcolor{keywordflow}{case} MSG\_EXTENDED:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03114}03114         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03115}03115                 \textcolor{comment}{/* Wait for enough of the message to begin validation */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03116}03116                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} < 2)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03117}03117                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03118}03118                 \textcolor{keywordflow}{switch} (ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[2]) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03119}03119                 \textcolor{keywordflow}{case} MSG\_EXT\_SDTR:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03120}03120                 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03121}03121                         \textcolor{keyword}{struct   }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *syncrate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03122}03122                         u\_int    \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03123}03123                         u\_int    ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03124}03124                         u\_int    offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03125}03125                         u\_int    saved\_offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03126}03126                         }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03127}03127                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[1] != MSG\_EXT\_SDTR\_LEN) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03128}03128                                 reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03129}03129                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03130}03130                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03131}03131 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03132}03132                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03133}03133 \textcolor{comment}{                         * Wait until we have both args before validating}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03134}03134 \textcolor{comment}{                         * and acting on this message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03135}03135 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03136}03136 \textcolor{comment}{                         * Add one to MSG\_EXT\_SDTR\_LEN to account for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03137}03137 \textcolor{comment}{                         * the extended message preamble.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03138}03138 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03139}03139                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} < (MSG\_EXT\_SDTR\_LEN + 1))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03140}03140                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03141}03141 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03142}03142                         \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[3];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03143}03143                         ppr\_options = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03144}03144                         saved\_offset = offset = ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[4];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03145}03145                         syncrate = \mbox{\hyperlink{aic7xxx_8c_a2515ac67caba10332267408695efc84f}{ahc\_devlimited\_syncrate}}(ahc, tinfo, \&\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03146}03146                                                            \&ppr\_options,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03147}03147                                                            devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03148}03148                         \mbox{\hyperlink{aic7xxx_8c_ac8e19a9aca1951d13657fb0ce515a544}{ahc\_validate\_offset}}(ahc, tinfo, syncrate, \&offset,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03149}03149                                             targ\_scsirate \& \mbox{\hyperlink{aic79xx__reg_8h_a096d38ef8e25aa844778401eb1f69f01}{WIDEXFER}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03150}03150                                             devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03151}03151                         \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03152}03152                                 printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Received "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03153}03153                                        \textcolor{stringliteral}{"{}SDTR period \%x, offset \%x\(\backslash\)n\(\backslash\)t"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03154}03154                                        \textcolor{stringliteral}{"{}Filtered to period \%x, offset \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03155}03155                                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03156}03156                                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03157}03157                                        ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[3], saved\_offset,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03158}03158                                        \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, offset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03159}03159                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03160}03160                         \mbox{\hyperlink{aic7xxx_8c_a14cd17a8eac81f514d0fed679f48b18f}{ahc\_set\_syncrate}}(ahc, devinfo, }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03161}03161                                          syncrate, \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03162}03162                                          offset, ppr\_options,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03163}03163                                          \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}}|\mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03164}03164                                          \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03165}03165 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03166}03166                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03167}03167 \textcolor{comment}{                         * See if we initiated Sync Negotiation}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03168}03168 \textcolor{comment}{                         * and didn't have to fall down to async}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03169}03169 \textcolor{comment}{                         * transfers.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03170}03170 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03171}03171                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}}, MSG\_EXT\_SDTR, \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03172}03172                                 \textcolor{comment}{/* We started it */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03173}03173                                 \textcolor{keywordflow}{if} (saved\_offset != offset) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03174}03174                                         \textcolor{comment}{/* Went too low -\/ force async */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03175}03175                                         reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03176}03176                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03177}03177                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03178}03178                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03179}03179 \textcolor{comment}{                                 * Send our own SDTR in reply}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03180}03180 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03181}03181                                 \textcolor{keywordflow}{if} (bootverbose}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03182}03182                                  \&\& devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}} == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03183}03183                                         printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Target "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03184}03184                                                \textcolor{stringliteral}{"{}Initiated SDTR\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03185}03185                                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03186}03186                                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03187}03187                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03188}03188                                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03189}03189                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03190}03190                                 \mbox{\hyperlink{aic7xxx_8c_a38e25102198d675f9d8b3f6bceea7dfa}{ahc\_construct\_sdtr}}(ahc, devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03191}03191                                                    \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, offset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03192}03192                                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03193}03193                                 response = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03194}03194                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03195}03195                         done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631ae8cab40904d3158cab9e67d366200461}{MSGLOOP\_MSGCOMPLETE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03196}03196                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03197}03197                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03198}03198                 \textcolor{keywordflow}{case} MSG\_EXT\_WDTR:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03199}03199                 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03200}03200                         u\_int bus\_width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03201}03201                         u\_int saved\_width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03202}03202                         u\_int sending\_reply;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03203}03203 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03204}03204                         sending\_reply = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03205}03205                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[1] != MSG\_EXT\_WDTR\_LEN) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03206}03206                                 reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03207}03207                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03208}03208                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03209}03209 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03210}03210                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03211}03211 \textcolor{comment}{                         * Wait until we have our arg before validating}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03212}03212 \textcolor{comment}{                         * and acting on this message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03213}03213 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03214}03214 \textcolor{comment}{                         * Add one to MSG\_EXT\_WDTR\_LEN to account for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03215}03215 \textcolor{comment}{                         * the extended message preamble.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03216}03216 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03217}03217                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} < (MSG\_EXT\_WDTR\_LEN + 1))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03218}03218                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03219}03219 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03220}03220                         bus\_width = ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[3];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03221}03221                         saved\_width = bus\_width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03222}03222                         \mbox{\hyperlink{aic7xxx_8c_a30892559fc3bf735708f01b27e60b73a}{ahc\_validate\_width}}(ahc, tinfo, \&bus\_width,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03223}03223                                            devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03224}03224                         \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03225}03225                                 printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Received WDTR "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03226}03226                                        \textcolor{stringliteral}{"{}\%x filtered to \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03227}03227                                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03228}03228                                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03229}03229                                        saved\_width, bus\_width);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03230}03230                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03231}03231 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03232}03232                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}}, MSG\_EXT\_WDTR, \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03233}03233                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03234}03234 \textcolor{comment}{                                 * Don't send a WDTR back to the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03235}03235 \textcolor{comment}{                                 * target, since we asked first.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03236}03236 \textcolor{comment}{                                 * If the width went higher than our}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03237}03237 \textcolor{comment}{                                 * request, reject it.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03238}03238 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03239}03239                                 \textcolor{keywordflow}{if} (saved\_width > bus\_width) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03240}03240                                         reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03241}03241                                         printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): requested \%dBit "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03242}03242                                                \textcolor{stringliteral}{"{}transfers.  Rejecting...\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03243}03243                                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03244}03244                                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03245}03245                                                8 * (0x01 << bus\_width));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03246}03246                                         bus\_width = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03247}03247                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03248}03248                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03249}03249                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03250}03250 \textcolor{comment}{                                 * Send our own WDTR in reply}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03251}03251 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03252}03252                                 \textcolor{keywordflow}{if} (bootverbose}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03253}03253                                  \&\& devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}} == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03254}03254                                         printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Target "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03255}03255                                                \textcolor{stringliteral}{"{}Initiated WDTR\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03256}03256                                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03257}03257                                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03258}03258                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03259}03259                                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03260}03260                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03261}03261                                 \mbox{\hyperlink{aic7xxx_8c_aeb0fb8c8fa65c7080c721739d4c235eb}{ahc\_construct\_wdtr}}(ahc, devinfo, bus\_width);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03262}03262                                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03263}03263                                 response = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03264}03264                                 sending\_reply = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03265}03265                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03266}03266                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03267}03267 \textcolor{comment}{                         * After a wide message, we are async, but}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03268}03268 \textcolor{comment}{                         * some devices don't seem to honor this portion}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03269}03269 \textcolor{comment}{                         * of the spec.  Force a renegotiation of the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03270}03270 \textcolor{comment}{                         * sync component of our transfer agreement even}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03271}03271 \textcolor{comment}{                         * if our goal is async.  By updating our width}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03272}03272 \textcolor{comment}{                         * after forcing the negotiation, we avoid}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03273}03273 \textcolor{comment}{                         * renegotiating for width.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03274}03274 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03275}03275                         \mbox{\hyperlink{aic7xxx_8c_a15ffc86f240511f385020b670e21eb15}{ahc\_update\_neg\_request}}(ahc, devinfo, tstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03276}03276                                                tinfo, \mbox{\hyperlink{aic7xxx_8h_a4c521b818b5228aacca55283b14509aea8e13738aa9017859d1ded44cc97576ec}{AHC\_NEG\_ALWAYS}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03277}03277                         \mbox{\hyperlink{aic7xxx_8c_a65c15f50e1c31142e27333e6ac02d33c}{ahc\_set\_width}}(ahc, devinfo, bus\_width,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03278}03278                                       \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}}|\mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03279}03279                                       \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03280}03280                         \textcolor{keywordflow}{if} (sending\_reply == \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}} \&\& reject == \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03281}03281                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03282}03282 \textcolor{comment}{                                 * We will always have an SDTR to send.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03283}03283 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03284}03284                                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03285}03285                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03286}03286                                 \mbox{\hyperlink{aic7xxx_8c_ad94f65976c5556974bc6593e0c6aeedc}{ahc\_build\_transfer\_msg}}(ahc, devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03287}03287                                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03288}03288                                 response = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03289}03289                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03290}03290                         done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631ae8cab40904d3158cab9e67d366200461}{MSGLOOP\_MSGCOMPLETE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03291}03291                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03292}03292                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03293}03293                 \textcolor{keywordflow}{case} MSG\_EXT\_PPR:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03294}03294                 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03295}03295                         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__syncrate}{ahc\_syncrate}} *syncrate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03296}03296                         u\_int   \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03297}03297                         u\_int   offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03298}03298                         u\_int   bus\_width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03299}03299                         u\_int   ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03300}03300                         u\_int   saved\_width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03301}03301                         u\_int   saved\_offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03302}03302                         u\_int   saved\_ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03303}03303 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03304}03304                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[1] != MSG\_EXT\_PPR\_LEN) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03305}03305                                 reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03306}03306                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03307}03307                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03308}03308 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03309}03309                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03310}03310 \textcolor{comment}{                         * Wait until we have all args before validating}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03311}03311 \textcolor{comment}{                         * and acting on this message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03312}03312 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03313}03313 \textcolor{comment}{                         * Add one to MSG\_EXT\_PPR\_LEN to account for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03314}03314 \textcolor{comment}{                         * the extended message preamble.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03315}03315 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03316}03316                         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a269003a34de3c15385b8fea8d555eb36}{msgin\_index}} < (MSG\_EXT\_PPR\_LEN + 1))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03317}03317                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03318}03318 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03319}03319                         \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[3];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03320}03320                         offset = ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[5];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03321}03321                         bus\_width = ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[6];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03322}03322                         saved\_width = bus\_width;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03323}03323                         ppr\_options = ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[7];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03324}03324                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03325}03325 \textcolor{comment}{                         * According to the spec, a DT only}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03326}03326 \textcolor{comment}{                         * period factor with no DT option}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03327}03327 \textcolor{comment}{                         * set implies async.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03328}03328 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03329}03329                         \textcolor{keywordflow}{if} ((ppr\_options \& MSG\_EXT\_PPR\_DT\_REQ) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03330}03330                          \&\& \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} == 9)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03331}03331                                 offset = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03332}03332                         saved\_ppr\_options = ppr\_options;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03333}03333                         saved\_offset = offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03334}03334 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03335}03335                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03336}03336 \textcolor{comment}{                         * Mask out any options we don't support}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03337}03337 \textcolor{comment}{                         * on any controller.  Transfer options are}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03338}03338 \textcolor{comment}{                         * only available if we are negotiating wide.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03339}03339 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03340}03340                         ppr\_options \&= MSG\_EXT\_PPR\_DT\_REQ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03341}03341                         \textcolor{keywordflow}{if} (bus\_width == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03342}03342                                 ppr\_options = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03343}03343 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03344}03344                         \mbox{\hyperlink{aic7xxx_8c_a30892559fc3bf735708f01b27e60b73a}{ahc\_validate\_width}}(ahc, tinfo, \&bus\_width,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03345}03345                                            devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03346}03346                         syncrate = \mbox{\hyperlink{aic7xxx_8c_a2515ac67caba10332267408695efc84f}{ahc\_devlimited\_syncrate}}(ahc, tinfo, \&\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03347}03347                                                            \&ppr\_options,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03348}03348                                                            devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03349}03349                         \mbox{\hyperlink{aic7xxx_8c_ac8e19a9aca1951d13657fb0ce515a544}{ahc\_validate\_offset}}(ahc, tinfo, syncrate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03350}03350                                             \&offset, bus\_width,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03351}03351                                             devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03352}03352 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03353}03353                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}}, MSG\_EXT\_PPR, \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03354}03354                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03355}03355 \textcolor{comment}{                                 * If we are unable to do any of the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03356}03356 \textcolor{comment}{                                 * requested options (we went too low),}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03357}03357 \textcolor{comment}{                                 * then we'll have to reject the message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03358}03358 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03359}03359                                 \textcolor{keywordflow}{if} (saved\_width > bus\_width}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03360}03360                                  || saved\_offset != offset}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03361}03361                                  || saved\_ppr\_options != ppr\_options) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03362}03362                                         reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03363}03363                                         \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03364}03364                                         offset = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03365}03365                                         bus\_width = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03366}03366                                         ppr\_options = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03367}03367                                         syncrate = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03368}03368                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03369}03369                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03370}03370                                 \textcolor{keywordflow}{if} (devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}} != \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03371}03371                                         printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Target "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03372}03372                                                \textcolor{stringliteral}{"{}Initiated PPR\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03373}03373                                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03374}03374                                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03375}03375                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03376}03376                                         printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Initiator "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03377}03377                                                \textcolor{stringliteral}{"{}Initiated PPR\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03378}03378                                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03379}03379                                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03380}03380                                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03381}03381                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03382}03382                                 \mbox{\hyperlink{aic7xxx_8c_a482dd999c42168fb4dccea82c4442ef0}{ahc\_construct\_ppr}}(ahc, devinfo, \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, offset,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03383}03383                                                   bus\_width, ppr\_options);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03384}03384                                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03385}03385                                 response = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03386}03386                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03387}03387                         \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03388}03388                                 printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): Received PPR width \%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03389}03389                                        \textcolor{stringliteral}{"{}period \%x, offset \%x,options \%x\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03390}03390                                        \textcolor{stringliteral}{"{}\(\backslash\)tFiltered to width \%x, period \%x, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03391}03391                                        \textcolor{stringliteral}{"{}offset \%x, options \%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03392}03392                                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03393}03393                                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03394}03394                                        saved\_width, ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[3],}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03395}03395                                        saved\_offset, saved\_ppr\_options,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03396}03396                                        bus\_width, \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}}, offset, ppr\_options);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03397}03397                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03398}03398                         \mbox{\hyperlink{aic7xxx_8c_a65c15f50e1c31142e27333e6ac02d33c}{ahc\_set\_width}}(ahc, devinfo, bus\_width,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03399}03399                                       \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}}|\mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03400}03400                                       \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03401}03401                         \mbox{\hyperlink{aic7xxx_8c_a14cd17a8eac81f514d0fed679f48b18f}{ahc\_set\_syncrate}}(ahc, devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03402}03402                                          syncrate, \mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03403}03403                                          offset, ppr\_options,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03404}03404                                          \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}}|\mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03405}03405                                          \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03406}03406                         done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631ae8cab40904d3158cab9e67d366200461}{MSGLOOP\_MSGCOMPLETE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03407}03407                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03408}03408                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03409}03409                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03410}03410                         \textcolor{comment}{/* Unknown extended message.  Reject it. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03411}03411                         reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03412}03412                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03413}03413                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03414}03414                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03415}03415         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03416}03416 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03417}03417         \textcolor{keywordflow}{case} MSG\_BUS\_DEV\_RESET:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03418}03418                 \mbox{\hyperlink{aic7xxx_8c_ad7f416f60ce374a2ad34574734442235}{ahc\_handle\_devreset}}(ahc, devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03419}03419                                     CAM\_BDR\_SENT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03420}03420                                     \textcolor{stringliteral}{"{}Bus Device Reset Received"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03421}03421                                     \textcolor{comment}{/*verbose\_level*/}0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03422}03422                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03423}03423                 done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631a40117f326a6239962ecce5b408c5e5b1}{MSGLOOP\_TERMINATED}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03424}03424                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03425}03425         \textcolor{keywordflow}{case} MSG\_ABORT\_TAG:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03426}03426         \textcolor{keywordflow}{case} MSG\_ABORT:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03427}03427         \textcolor{keywordflow}{case} MSG\_CLEAR\_QUEUE:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03428}03428         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03429}03429                 \textcolor{keywordtype}{int} tag;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03430}03430 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03431}03431                 \textcolor{comment}{/* Target mode messages */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03432}03432                 \textcolor{keywordflow}{if} (devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}} != \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03433}03433                         reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03434}03434                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03435}03435                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03436}03436                 tag = \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03437}03437                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[0] == MSG\_ABORT\_TAG)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03438}03438                         tag = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa5314ac01683c43af0342431aabeb4d5}{INITIATOR\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03439}03439                 \mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{ahc\_abort\_scbs}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03440}03440                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}}, tag, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03441}03441                                CAM\_REQ\_ABORTED);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03442}03442 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03443}03443                 tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03444}03444                 \textcolor{keywordflow}{if} (tstate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03445}03445                         \textcolor{keyword}{struct }ahc\_tmode\_lstate* lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03446}03446 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03447}03447                         lstate = tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03448}03448                         \textcolor{keywordflow}{if} (lstate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03449}03449                                 ahc\_queue\_lstate\_event(ahc, lstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03450}03450                                                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03451}03451                                                        ahc-\/>\mbox{\hyperlink{structahc__softc_a945d3e42d539741990cc4deaa786fbb0}{msgin\_buf}}[0],}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03452}03452                                                        \textcolor{comment}{/*arg*/}tag);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03453}03453                                 ahc\_send\_lstate\_events(ahc, lstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03454}03454                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03455}03455                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03456}03456                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03457}03457                 done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631a40117f326a6239962ecce5b408c5e5b1}{MSGLOOP\_TERMINATED}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03458}03458                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03459}03459         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03460}03460 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03461}03461         \textcolor{keywordflow}{case} MSG\_TERM\_IO\_PROC:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03462}03462         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03463}03463                 reject = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03464}03464                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03465}03465         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03466}03466 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03467}03467         \textcolor{keywordflow}{if} (reject) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03468}03468                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03469}03469 \textcolor{comment}{                 * Setup to reject the message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03470}03470 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03471}03471                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03472}03472                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03473}03473                 ahc-\/>\mbox{\hyperlink{structahc__softc_a5ab64b723c1197ef5736eed02e05c8e7}{msgout\_buf}}[0] = MSG\_MESSAGE\_REJECT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03474}03474                 done = \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631ae8cab40904d3158cab9e67d366200461}{MSGLOOP\_MSGCOMPLETE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03475}03475                 response = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03476}03476         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03477}03477 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03478}03478         \textcolor{keywordflow}{if} (done != \mbox{\hyperlink{aic79xx_8h_a65ef422596bacb4f998a9a580409c631a3e888af3fa22f6750bbe51ce3132162d}{MSGLOOP\_IN\_PROG}} \&\& !response)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03479}03479                 \textcolor{comment}{/* Clear the outgoing message buffer */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03480}03480                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03481}03481 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03482}03482         \textcolor{keywordflow}{return} (done);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03483}03483 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03484}03484 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03485}03485 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03486}03486 \textcolor{comment}{ * Process a message reject message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03487}03487 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03488}03488 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03489}\mbox{\hyperlink{aic7xxx_8c_a054a815fc86e150fff22f21281764302}{03489}} \mbox{\hyperlink{aic7xxx_8c_a054a815fc86e150fff22f21281764302}{ahc\_handle\_msg\_reject}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03490}03490 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03491}03491         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03492}03492 \textcolor{comment}{         * What we care about here is if we had an}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03493}03493 \textcolor{comment}{         * outstanding SDTR or WDTR message for this}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03494}03494 \textcolor{comment}{         * target.  If we did, this is a signal that}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03495}03495 \textcolor{comment}{         * the target is refusing negotiation.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03496}03496 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03497}03497         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03498}03498         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03499}03499         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03500}03500         u\_int scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03501}03501         u\_int last\_msg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03502}03502         \textcolor{keywordtype}{int}   response = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03503}03503 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03504}03504         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03505}03505         \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03506}03506         tinfo = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03507}03507                                     devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03508}03508                                     devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03509}03509         \textcolor{comment}{/* Might be necessary */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03510}03510         last\_msg = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac6c0da1d1582568460c30a5d05b8507b}{LAST\_MSG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03511}03511 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03512}03512         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}}, MSG\_EXT\_PPR, \textcolor{comment}{/*full*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03513}03513                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03514}03514 \textcolor{comment}{                 * Target does not support the PPR message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03515}03515 \textcolor{comment}{                 * Attempt to negotiate SPI-\/2 style.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03516}03516 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03517}03517                 \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03518}03518                         printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): PPR Rejected. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03519}03519                                \textcolor{stringliteral}{"{}Trying WDTR/SDTR\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03520}03520                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03521}03521                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03522}03522                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03523}03523                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03524}03524                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_ae4a9048adaa61966bf0445d887489193}{transport\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03525}03525                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ae4a9048adaa61966bf0445d887489193}{transport\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03526}03526                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03527}03527                 ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03528}03528                 \mbox{\hyperlink{aic7xxx_8c_ad94f65976c5556974bc6593e0c6aeedc}{ahc\_build\_transfer\_msg}}(ahc, devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03529}03529                 ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03530}03530                 response = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03531}03531         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}}, MSG\_EXT\_WDTR, \textcolor{comment}{/*full*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03532}03532                 \textcolor{comment}{/* note 8bit xfers */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03533}03533                 printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): refuses WIDE negotiation.  Using "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03534}03534                        \textcolor{stringliteral}{"{}8bit transfers\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03535}03535                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03536}03536                 \mbox{\hyperlink{aic7xxx_8c_a65c15f50e1c31142e27333e6ac02d33c}{ahc\_set\_width}}(ahc, devinfo, MSG\_EXT\_WDTR\_BUS\_8\_BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03537}03537                               \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}}|\mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03538}03538                               \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03539}03539                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03540}03540 \textcolor{comment}{                 * No need to clear the sync rate.  If the target}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03541}03541 \textcolor{comment}{                 * did not accept the command, our syncrate is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03542}03542 \textcolor{comment}{                 * unaffected.  If the target started the negotiation,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03543}03543 \textcolor{comment}{                 * but rejected our response, we already cleared the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03544}03544 \textcolor{comment}{                 * sync rate before sending our WDTR.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03545}03545 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03546}03546                 \textcolor{keywordflow}{if} (tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} != tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03547}03547                         \textcolor{comment}{/* Start the sync negotiation */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03548}03548                         ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03549}03549                         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03550}03550                         \mbox{\hyperlink{aic7xxx_8c_ad94f65976c5556974bc6593e0c6aeedc}{ahc\_build\_transfer\_msg}}(ahc, devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03551}03551                         ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03552}03552                         response = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03553}03553                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03554}03554         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a62d2ab769aa49789da6b3ec13f86d513}{ahc\_sent\_msg}}(ahc, \mbox{\hyperlink{aic7xxx_8c_a8c1666233db8004cc6c7190312490106af23ac6445e6ac89d4cfb1a7ecc6fae35}{AHCMSG\_EXT}}, MSG\_EXT\_SDTR, \textcolor{comment}{/*full*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03555}03555                 \textcolor{comment}{/* note asynch xfers and clear flag */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03556}03556                 \mbox{\hyperlink{aic7xxx_8c_a14cd17a8eac81f514d0fed679f48b18f}{ahc\_set\_syncrate}}(ahc, devinfo, \textcolor{comment}{/*syncrate*/}NULL, \textcolor{comment}{/*period*/}0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03557}03557                                  \textcolor{comment}{/*offset*/}0, \textcolor{comment}{/*ppr\_options*/}0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03558}03558                                  \mbox{\hyperlink{aic7xxx_8h_accf25f5020bc852f785739ee5653d1b4}{AHC\_TRANS\_ACTIVE}}|\mbox{\hyperlink{aic7xxx_8h_a3c727b7b9caa1d9ad2bbc49714b1a147}{AHC\_TRANS\_GOAL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03559}03559                                  \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03560}03560                 printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): refuses synchronous negotiation. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03561}03561                        \textcolor{stringliteral}{"{}Using asynchronous transfers\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03562}03562                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03563}03563                        devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03564}03564         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& MSG\_SIMPLE\_TASK) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03565}03565                 \textcolor{keywordtype}{int} tag\_type;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03566}03566                 \textcolor{keywordtype}{int} mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03567}03567 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03568}03568                 tag\_type = (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \& MSG\_SIMPLE\_TASK);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03569}03569 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03570}03570                 \textcolor{keywordflow}{if} (tag\_type == MSG\_SIMPLE\_TASK) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03571}03571                         printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): refuses tagged commands.  "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03572}03572                                \textcolor{stringliteral}{"{}Performing non-\/tagged I/O\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03573}03573                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03574}03574                         \mbox{\hyperlink{aic7xxx_8c_a8257e88a9e6ea148b3698568dfaa5a54}{ahc\_set\_tags}}(ahc, devinfo, \mbox{\hyperlink{aic7xxx_8h_a03aef35b7c3678e000586006c792e88da7208cc121f008259baab462d10f99c1e}{AHC\_QUEUE\_NONE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03575}03575                         mask = \string~0x23;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03576}03576                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03577}03577                         printf(\textcolor{stringliteral}{"{}(\%s:\%c:\%d:\%d): refuses \%s tagged commands.  "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03578}03578                                \textcolor{stringliteral}{"{}Performing simple queue tagged I/O only\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03579}03579                                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03580}03580                                devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}}, tag\_type == MSG\_ORDERED\_TASK}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03581}03581                                ? \textcolor{stringliteral}{"{}ordered"{}} : \textcolor{stringliteral}{"{}head of queue"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03582}03582                         \mbox{\hyperlink{aic7xxx_8c_a8257e88a9e6ea148b3698568dfaa5a54}{ahc\_set\_tags}}(ahc, devinfo, \mbox{\hyperlink{aic7xxx_8h_a03aef35b7c3678e000586006c792e88da49bb4e42626f00b301ce9df3f6388c49}{AHC\_QUEUE\_BASIC}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03583}03583                         mask = \string~0x03;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03584}03584                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03585}03585 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03586}03586                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03587}03587 \textcolor{comment}{                 * Resend the identify for this CCB as the target}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03588}03588 \textcolor{comment}{                 * may believe that the selection is invalid otherwise.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03589}03589 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03590}03590                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03591}03591                          \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}) \& mask);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03592}03592                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} \&= mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03593}03593                 \mbox{\hyperlink{aic__osm__lib_8h_a568fc031718ca68a86bb4d35ed199a04}{aic\_set\_transaction\_tag}}(\mbox{\hyperlink{structscb}{scb}}, \textcolor{comment}{/*enabled*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03594}03594                                         \textcolor{comment}{/*type*/}MSG\_SIMPLE\_TASK);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03595}03595                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}, MSG\_IDENTIFYFLAG);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03596}03596                 \mbox{\hyperlink{aic7xxx_8c_a99fb434ac77fcfbde1cf06317005009d}{ahc\_assert\_atn}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03597}03597 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03598}03598                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03599}03599 \textcolor{comment}{                 * This transaction is now at the head of}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03600}03600 \textcolor{comment}{                 * the untagged queue for this target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03601}03601 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03602}03602                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aa9840bbf349029e67eedfebd36516d7e}{AHC\_SCB\_BTT}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03603}03603                         \textcolor{keyword}{struct }scb\_tailq *untagged\_q;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03604}03604 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03605}03605                         untagged\_q =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03606}03606                             \&(ahc-\/>\mbox{\hyperlink{structahc__softc_a8cca91fe9f77d975985c3cf85d11de46}{untagged\_queues}}[devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a8ab779d3a4ce9e21e6d411db7ebcb0fc}{target\_offset}}]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03607}03607                         TAILQ\_INSERT\_HEAD(untagged\_q, \mbox{\hyperlink{structscb}{scb}}, links.tqe);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03608}03608                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_abf9bf179c52821bbf018a9edcaf09116a6086163c4d0c26a4b700b9a989abe5c0}{SCB\_UNTAGGEDQ}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03609}03609                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03610}03610                 \mbox{\hyperlink{aic7xxx_8c_aab83d04171a61cdc3915e598bcc4b130}{ahc\_busy\_tcl}}(ahc, \mbox{\hyperlink{aic79xx_8h_a7d650f0ba38347753d66928363306341}{BUILD\_TCL}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a1402a3a67b19b5baa7bbf698ebe2f66e}{scsiid}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a67fc8f08f9a50945554b2bb1887cccd8}{lun}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03611}03611                              \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03612}03612 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03613}03613                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03614}03614 \textcolor{comment}{                 * Requeue all tagged commands for this target}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03615}03615 \textcolor{comment}{                 * currently in our possession so they can be}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03616}03616 \textcolor{comment}{                 * converted to untagged commands.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03617}03617 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03618}03618                 \mbox{\hyperlink{aic7xxx_8c_a6854c2ec2b22382f77741bf98681bcef}{ahc\_search\_qinfifo}}(ahc, \mbox{\hyperlink{aic79xx_8h_a6c0f4b6b37cc0fae8e266811c5ca3815}{SCB\_GET\_TARGET}}(ahc, \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03619}03619                                    \mbox{\hyperlink{aic79xx_8h_aaf5c2a354d6e634b1839c579f220ed69}{SCB\_GET\_CHANNEL}}(ahc, \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03620}03620                                    \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}}), \textcolor{comment}{/*tag*/}\mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03621}03621                                    \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}}, CAM\_REQUEUE\_REQ,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03622}03622                                    \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03623}03623         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03624}03624                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03625}03625 \textcolor{comment}{                 * Otherwise, we ignore it.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03626}03626 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03627}03627                 printf(\textcolor{stringliteral}{"{}\%s:\%c:\%d: Message reject for \%x -\/-\/ ignored\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03628}03628                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03629}03629                        last\_msg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03630}03630         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03631}03631         \textcolor{keywordflow}{return} (response);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03632}03632 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03633}03633 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03634}03634 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03635}03635 \textcolor{comment}{ * Process an ingnore wide residue message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03636}03636 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03637}03637 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03638}\mbox{\hyperlink{aic7xxx_8c_a9b10951ff4d788ca30c37748249dcf95}{03638}} \mbox{\hyperlink{aic7xxx_8c_a9b10951ff4d788ca30c37748249dcf95}{ahc\_handle\_ign\_wide\_residue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03639}03639 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03640}03640         u\_int scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03641}03641         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03642}03642 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03643}03643         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03644}03644         \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03645}03645         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03646}03646 \textcolor{comment}{         * XXX Actually check data direction in the sequencer?}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03647}03647 \textcolor{comment}{         * Perhaps add datadir to some spare bits in the hscb?}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03648}03648 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03649}03649         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a0b6af1e7145ae4b7d2a3e7f21351fd03}{DPHASE}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03650}03650          || \mbox{\hyperlink{aic__osm__lib_8h_a6481a7d736ee036b44b17cc28cb4d87b}{aic\_get\_transfer\_dir}}(\mbox{\hyperlink{structscb}{scb}}) != CAM\_DIR\_IN) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03651}03651                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03652}03652 \textcolor{comment}{                 * Ignore the message if we haven't}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03653}03653 \textcolor{comment}{                 * seen an appropriate data phase yet.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03654}03654 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03655}03655         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03656}03656                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03657}03657 \textcolor{comment}{                 * If the residual occurred on the last}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03658}03658 \textcolor{comment}{                 * transfer and the transfer request was}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03659}03659 \textcolor{comment}{                 * expected to end on an odd count, do}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03660}03660 \textcolor{comment}{                 * nothing.  Otherwise, subtract a byte}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03661}03661 \textcolor{comment}{                 * and update the residual count accordingly.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03662}03662 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03663}03663                 uint32\_t sgptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03664}03664 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03665}03665                 sgptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af6de740e4327ead9d8c8740637f3e8fe}{SCB\_RESIDUAL\_SGPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03666}03666                 \textcolor{keywordflow}{if} ((sgptr \& \mbox{\hyperlink{aic79xx__reg_8h_ac81c629d4e879f116477123c2978cb27}{SG\_LIST\_NULL}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03667}03667                  \&\& (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71a69c23bfda16efd48dda0abb7649fe}{SCB\_LUN}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a5e3dcc678c27cd2f9bcb0db5a1f8677c}{SCB\_XFERLEN\_ODD}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03668}03668                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03669}03669 \textcolor{comment}{                         * If the residual occurred on the last}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03670}03670 \textcolor{comment}{                         * transfer and the transfer request was}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03671}03671 \textcolor{comment}{                         * expected to end on an odd count, do}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03672}03672 \textcolor{comment}{                         * nothing.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03673}03673 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03674}03674                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03675}03675                         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}} *sg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03676}03676                         uint32\_t data\_cnt;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03677}03677                         uint32\_t sglen;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03678}03678 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03679}03679                         \textcolor{comment}{/* Pull in all of the sgptr */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03680}03680                         sgptr = \mbox{\hyperlink{aic7xxx__inline_8h_a762dbfc2c01973da84e9d4b8e1fe5418}{ahc\_inl}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af6de740e4327ead9d8c8740637f3e8fe}{SCB\_RESIDUAL\_SGPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03681}03681                         data\_cnt = \mbox{\hyperlink{aic7xxx__inline_8h_a762dbfc2c01973da84e9d4b8e1fe5418}{ahc\_inl}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa77a692181c32bb0aab6b024966afb61}{SCB\_RESIDUAL\_DATACNT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03682}03682 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03683}03683                         \textcolor{keywordflow}{if} ((sgptr \& \mbox{\hyperlink{aic79xx__reg_8h_ac81c629d4e879f116477123c2978cb27}{SG\_LIST\_NULL}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03684}03684                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03685}03685 \textcolor{comment}{                                 * The residual data count is not updated}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03686}03686 \textcolor{comment}{                                 * for the command run to completion case.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03687}03687 \textcolor{comment}{                                 * Explicitly zero the count.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03688}03688 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03689}03689                                 data\_cnt \&= \string~AHC\_SG\_LEN\_MASK;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03690}03690                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03691}03691 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03692}03692                         data\_cnt += 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03693}03693                         sgptr \&= \mbox{\hyperlink{aic79xx_8h_a9486fa4ef889b26b6d872d6bf29bd031}{SG\_PTR\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03694}03694 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03695}03695                         sg = \mbox{\hyperlink{aic7xxx__inline_8h_a2eaef82d78bf84652d5f7d1a7b54e417}{ahc\_sg\_bus\_to\_virt}}(\mbox{\hyperlink{structscb}{scb}}, sgptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03696}03696 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03697}03697                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03698}03698 \textcolor{comment}{                         * The residual sg ptr points to the next S/G}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03699}03699 \textcolor{comment}{                         * to load so we must go back one.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03700}03700 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03701}03701                         sg-\/-\/;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03702}03702                         sglen = \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}}) \& \mbox{\hyperlink{aic7xxx_8h_ad9d7f41a161867bcdb98ac3b8d0af9e5}{AHC\_SG\_LEN\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03703}03703                         \textcolor{keywordflow}{if} (sg != \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03704}03704                          \&\& sglen < (data\_cnt \& \mbox{\hyperlink{aic7xxx_8h_ad9d7f41a161867bcdb98ac3b8d0af9e5}{AHC\_SG\_LEN\_MASK}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03705}03705                                 sg-\/-\/;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03706}03706                                 sglen = \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03707}03707                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03708}03708 \textcolor{comment}{                                 * Preserve High Address and SG\_LIST bits}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03709}03709 \textcolor{comment}{                                 * while setting the count to 1.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03710}03710 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03711}03711                                 data\_cnt = 1 | (sglen \& (\string~AHC\_SG\_LEN\_MASK));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03712}03712 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03713}03713                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03714}03714 \textcolor{comment}{                                 * Increment sg so it points to the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03715}03715 \textcolor{comment}{                                 * "{}next"{} sg.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03716}03716 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03717}03717                                 sg++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03718}03718                                 sgptr = \mbox{\hyperlink{aic7xxx__inline_8h_a29cc3891e852c808cd737fc5177d0d3b}{ahc\_sg\_virt\_to\_bus}}(\mbox{\hyperlink{structscb}{scb}}, sg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03719}03719                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03720}03720                         \mbox{\hyperlink{aic7xxx__inline_8h_afff293f64a3a6e37a3b6edc407fde617}{ahc\_outl}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af6de740e4327ead9d8c8740637f3e8fe}{SCB\_RESIDUAL\_SGPTR}}, sgptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03721}03721                         \mbox{\hyperlink{aic7xxx__inline_8h_afff293f64a3a6e37a3b6edc407fde617}{ahc\_outl}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa77a692181c32bb0aab6b024966afb61}{SCB\_RESIDUAL\_DATACNT}}, data\_cnt);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03722}03722                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03723}03723 \textcolor{comment}{                         * Toggle the "{}oddness"{} of the transfer length}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03724}03724 \textcolor{comment}{                         * to handle this mid-\/transfer ignore wide}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03725}03725 \textcolor{comment}{                         * residue.  This ensures that the oddness is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03726}03726 \textcolor{comment}{                         * correct for subsequent data transfers.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03727}03727 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03728}03728                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71a69c23bfda16efd48dda0abb7649fe}{SCB\_LUN}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03729}03729                                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71a69c23bfda16efd48dda0abb7649fe}{SCB\_LUN}}) \string^ \mbox{\hyperlink{aic79xx__reg_8h_a5e3dcc678c27cd2f9bcb0db5a1f8677c}{SCB\_XFERLEN\_ODD}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03730}03730                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03731}03731         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03732}03732 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03733}03733 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03734}03734 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03735}03735 \textcolor{comment}{ * Reinitialize the data pointers for the active transfer}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03736}03736 \textcolor{comment}{ * based on its current residual.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03737}03737 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03738}03738 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03739}\mbox{\hyperlink{aic7xxx_8c_a70b8981d8d1874b53dc20ed487bf9a09}{03739}} \mbox{\hyperlink{aic7xxx_8c_a70b8981d8d1874b53dc20ed487bf9a09}{ahc\_reinitialize\_dataptrs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03740}03740 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03741}03741         \textcolor{keyword}{struct   }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03742}03742         \textcolor{keyword}{struct   }\mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}} *sg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03743}03743         u\_int    scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03744}03744         uint32\_t sgptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03745}03745         uint32\_t resid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03746}03746         uint32\_t dataptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03747}03747 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03748}03748         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03749}03749         \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03750}03750         sgptr = (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af6de740e4327ead9d8c8740637f3e8fe}{SCB\_RESIDUAL\_SGPTR}} + 3) << 24)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03751}03751               | (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af6de740e4327ead9d8c8740637f3e8fe}{SCB\_RESIDUAL\_SGPTR}} + 2) << 16)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03752}03752               | (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af6de740e4327ead9d8c8740637f3e8fe}{SCB\_RESIDUAL\_SGPTR}} + 1) << 8)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03753}03753               | \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af6de740e4327ead9d8c8740637f3e8fe}{SCB\_RESIDUAL\_SGPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03754}03754 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03755}03755         sgptr \&= \mbox{\hyperlink{aic79xx_8h_a9486fa4ef889b26b6d872d6bf29bd031}{SG\_PTR\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03756}03756         sg = \mbox{\hyperlink{aic7xxx__inline_8h_a2eaef82d78bf84652d5f7d1a7b54e417}{ahc\_sg\_bus\_to\_virt}}(\mbox{\hyperlink{structscb}{scb}}, sgptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03757}03757 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03758}03758         \textcolor{comment}{/* The residual sg\_ptr always points to the next sg */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03759}03759         sg-\/-\/;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03760}03760 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03761}03761         resid = (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa77a692181c32bb0aab6b024966afb61}{SCB\_RESIDUAL\_DATACNT}} + 2) << 16)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03762}03762               | (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa77a692181c32bb0aab6b024966afb61}{SCB\_RESIDUAL\_DATACNT}} + 1) << 8)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03763}03763               | \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa77a692181c32bb0aab6b024966afb61}{SCB\_RESIDUAL\_DATACNT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03764}03764 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03765}03765         dataptr = \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a698746716df808d8ad04cdb532eedc23}{addr}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03766}03766                 + (\mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}}) \& \mbox{\hyperlink{aic7xxx_8h_ad9d7f41a161867bcdb98ac3b8d0af9e5}{AHC\_SG\_LEN\_MASK}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03767}03767                 -\/ resid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03768}03768         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aceb69a3ab3fe20bfae4ff595ff7aaa69}{AHC\_39BIT\_ADDRESSING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03769}03769                 u\_int dscommand1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03770}03770 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03771}03771                 dscommand1 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a33fce670ba44a1d6e2f094a9c33fe6bd}{DSCOMMAND1}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03772}03772                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a33fce670ba44a1d6e2f094a9c33fe6bd}{DSCOMMAND1}}, dscommand1 | \mbox{\hyperlink{aic7xxx__reg_8h_a022593749f22218aa90283dc4ff214eb}{HADDLDSEL0}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03773}03773                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8eb96d5aa9bcb938d02057e4fe207dcc}{HADDR}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03774}03774                          (\mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}}) >> 24) \& \mbox{\hyperlink{aic79xx__reg_8h_aa7ebae5f84cc920f7b7ab178b1d4e36b}{SG\_HIGH\_ADDR\_BITS}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03775}03775                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a33fce670ba44a1d6e2f094a9c33fe6bd}{DSCOMMAND1}}, dscommand1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03776}03776         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03777}03777         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8eb96d5aa9bcb938d02057e4fe207dcc}{HADDR}} + 3, dataptr >> 24);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03778}03778         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8eb96d5aa9bcb938d02057e4fe207dcc}{HADDR}} + 2, dataptr >> 16);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03779}03779         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8eb96d5aa9bcb938d02057e4fe207dcc}{HADDR}} + 1, dataptr >> 8);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03780}03780         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8eb96d5aa9bcb938d02057e4fe207dcc}{HADDR}}, dataptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03781}03781         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_afd06707e0388ab28bdcb943683864986}{HCNT}} + 2, resid >> 16);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03782}03782         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_afd06707e0388ab28bdcb943683864986}{HCNT}} + 1, resid >> 8);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03783}03783         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_afd06707e0388ab28bdcb943683864986}{HCNT}}, resid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03784}03784         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03785}03785                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae34cf01d01068e4e4a71af02d3393fbc}{STCNT}} + 2, resid >> 16);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03786}03786                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae34cf01d01068e4e4a71af02d3393fbc}{STCNT}} + 1, resid >> 8);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03787}03787                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae34cf01d01068e4e4a71af02d3393fbc}{STCNT}}, resid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03788}03788         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03789}03789 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03790}03790 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03791}03791 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03792}03792 \textcolor{comment}{ * Handle the effects of issuing a bus device reset message.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03793}03793 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03794}03794 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03795}\mbox{\hyperlink{aic7xxx_8c_ad7f416f60ce374a2ad34574734442235}{03795}} \mbox{\hyperlink{aic7xxx_8c_ad7f416f60ce374a2ad34574734442235}{ahc\_handle\_devreset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03796}03796                     cam\_status status, \textcolor{keywordtype}{char} *message, \textcolor{keywordtype}{int} verbose\_level)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03797}03797 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03798}03798 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03799}03799         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}}* tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03800}03800         u\_int lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03801}03801 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03802}03802         \textcolor{keywordtype}{int} found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03803}03803 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03804}03804         found = \mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{ahc\_abort\_scbs}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03805}03805                                CAM\_LUN\_WILDCARD, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a987e75e05c4bd865ca38651ab75cc0f2}{role}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03806}03806                                status);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03807}03807 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03808}03808 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03809}03809         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03810}03810 \textcolor{comment}{         * Send an immediate notify ccb to all target mord peripheral}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03811}03811 \textcolor{comment}{         * drivers affected by this action.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03812}03812 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03813}03813         tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03814}03814         \textcolor{keywordflow}{if} (tstate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03815}03815                 \textcolor{keywordflow}{for} (lun = 0; lun < \mbox{\hyperlink{aic7xxx_8h_a4b4241cdde48f619222c98ca9ad15adf}{AHC\_NUM\_LUNS}}; lun++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03816}03816                         \textcolor{keyword}{struct }ahc\_tmode\_lstate* lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03817}03817 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03818}03818                         lstate = tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[lun];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03819}03819                         \textcolor{keywordflow}{if} (lstate == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03820}03820                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03821}03821 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03822}03822                         ahc\_queue\_lstate\_event(ahc, lstate, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a918decb2ea2a17f0acb9feaa900b9f97}{our\_scsiid}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03823}03823                                                MSG\_BUS\_DEV\_RESET, \textcolor{comment}{/*arg*/}0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03824}03824                         ahc\_send\_lstate\_events(ahc, lstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03825}03825                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03826}03826         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03827}03827 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03828}03828 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03829}03829         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03830}03830 \textcolor{comment}{         * Go back to async/narrow transfers and renegotiate.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03831}03831 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03832}03832         \mbox{\hyperlink{aic7xxx_8c_a65c15f50e1c31142e27333e6ac02d33c}{ahc\_set\_width}}(ahc, devinfo, MSG\_EXT\_WDTR\_BUS\_8\_BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03833}03833                       \mbox{\hyperlink{aic7xxx_8h_aa9b0102b222a80d7b614019a37b36a17}{AHC\_TRANS\_CUR}}, \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03834}03834         \mbox{\hyperlink{aic7xxx_8c_a14cd17a8eac81f514d0fed679f48b18f}{ahc\_set\_syncrate}}(ahc, devinfo, \textcolor{comment}{/*syncrate*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03835}03835                          \textcolor{comment}{/*period*/}0, \textcolor{comment}{/*offset*/}0, \textcolor{comment}{/*ppr\_options*/}0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03836}03836                          \mbox{\hyperlink{aic7xxx_8h_aa9b0102b222a80d7b614019a37b36a17}{AHC\_TRANS\_CUR}}, \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03837}03837 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03838}03838         \textcolor{keywordflow}{if} (status != CAM\_SEL\_TIMEOUT)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03839}03839                 \mbox{\hyperlink{aic7xxx__osm_8c_a56f943b1be6fa50429a3c2d356ef0ee2}{ahc\_send\_async}}(ahc, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03840}03840                                CAM\_LUN\_WILDCARD, AC\_SENT\_BDR, NULL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03841}03841 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03842}03842         \textcolor{keywordflow}{if} (message != NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03843}03843          \&\& (verbose\_level <= bootverbose))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03844}03844                 printf(\textcolor{stringliteral}{"{}\%s: \%s on \%c:\%d. \%d SCBs aborted\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03845}03845                        message, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, devinfo-\/>\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, found);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03846}03846 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03847}03847 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03848}03848 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03849}03849 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03850}03850 ahc\_setup\_target\_msgin(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} *devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03851}03851                        \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03852}03852 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03853}03853 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03854}03854         \textcolor{comment}{/*              }}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03855}03855 \textcolor{comment}{         * To facilitate adding multiple messages together,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03856}03856 \textcolor{comment}{         * each routine should increment the index and len}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03857}03857 \textcolor{comment}{         * variables instead of setting them explicitly.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03858}03858 \textcolor{comment}{         */}             }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03859}03859         ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03860}03860         ahc-\/>\mbox{\hyperlink{structahc__softc_a254c2bb7139853fa142d78bdde20d9dc}{msgout\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03861}03861 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03862}03862         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} != NULL \&\& (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a74a01505207b28705952cd462418c54c}{SCB\_AUTO\_NEGOTIATE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03863}03863                 \mbox{\hyperlink{aic7xxx_8c_ad94f65976c5556974bc6593e0c6aeedc}{ahc\_build\_transfer\_msg}}(ahc, devinfo);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03864}03864         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03865}03865                 panic(\textcolor{stringliteral}{"{}ahc\_intr: AWAITING target message with no message"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03866}03866 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03867}03867         ahc-\/>\mbox{\hyperlink{structahc__softc_ad3b35cf11aff851e33b3352e875184c2}{msgout\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03868}03868         ahc-\/>\mbox{\hyperlink{structahc__softc_aaa05f7061290fa8529d4ab7e24dba709}{msg\_type}} = \mbox{\hyperlink{aic79xx_8h_af4a2ffd6cd27e3ea846b8a5757491f64a09e5219a45772aa048f0175880353d07}{MSG\_TYPE\_TARGET\_MSGIN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03869}03869 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03870}03870 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03871}03871 \textcolor{comment}{/**************************** Initialization **********************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03872}03872 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03873}03873 \textcolor{comment}{ * Allocate a controller structure for a new device}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03874}03874 \textcolor{comment}{ * and perform initial initializion.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03875}03875 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03876}03876 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__softc}{ahc\_softc}} *}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03877}\mbox{\hyperlink{aic7xxx_8c_adb3765ad967c506510ad65417028ce86}{03877}} \mbox{\hyperlink{aic7xxx_8c_adb3765ad967c506510ad65417028ce86}{ahc\_alloc}}(\textcolor{keywordtype}{void} *platform\_arg, \textcolor{keywordtype}{char} *\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03878}03878 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03879}03879         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03880}03880         \textcolor{keywordtype}{int}     i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03881}03881 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03882}03882 \textcolor{preprocessor}{\#ifndef \_\_FreeBSD\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03883}03883         ahc = malloc(\textcolor{keyword}{sizeof}(*ahc), M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03884}03884         \textcolor{keywordflow}{if} (!ahc) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03885}03885                 printf(\textcolor{stringliteral}{"{}aic7xxx: cannot malloc softc!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03886}03886                 free(\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03887}03887                 \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03888}03888         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03889}03889 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03890}03890         ahc = device\_get\_softc((device\_t)platform\_arg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03891}03891 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03892}03892         memset(ahc, 0, \textcolor{keyword}{sizeof}(*ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03893}03893         ahc-\/>\mbox{\hyperlink{structahc__softc_a16a68aa4411fb500f136b17134c761ea}{seep\_config}} = malloc(\textcolor{keyword}{sizeof}(*ahc-\/>\mbox{\hyperlink{structahc__softc_a16a68aa4411fb500f136b17134c761ea}{seep\_config}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03894}03894                                   M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03895}03895         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a16a68aa4411fb500f136b17134c761ea}{seep\_config}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03896}03896 \textcolor{preprocessor}{\#ifndef \_\_FreeBSD\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03897}03897                 free(ahc, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03898}03898 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03899}03899                 free(\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03900}03900                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03901}03901         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03902}03902         LIST\_INIT(\&ahc-\/>pending\_scbs);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03903}03903         LIST\_INIT(\&ahc-\/>timedout\_scbs);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03904}03904         \textcolor{comment}{/* We don't know our unit number until the OSM sets it */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03905}03905         ahc-\/>\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}} = \mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03906}03906         ahc-\/>\mbox{\hyperlink{structahc__softc_ae1dc8e4bab1b56f5203ef1c09e24e6c2}{unit}} = -\/1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03907}03907         ahc-\/>\mbox{\hyperlink{structahc__softc_a807606e838d987214e677e99381665fb}{description}} = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03908}03908         ahc-\/>\mbox{\hyperlink{structahc__softc_ac0bf845349c1471c051e75630ed06c1e}{channel}} = \textcolor{charliteral}{'A'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03909}03909         ahc-\/>\mbox{\hyperlink{structahc__softc_a46d95a3bee922e3246d890273349d80c}{channel\_b}} = \textcolor{charliteral}{'B'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03910}03910         ahc-\/>\mbox{\hyperlink{structahc__softc_a8056f278977a4ddd3881da47c11fe3e8}{chip}} = \mbox{\hyperlink{aic7xxx_8h_aa571dbd167b1b4764be22d1efbc6fd12a4aac5013ba196af31af551059234382a}{AHC\_NONE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03911}03911         ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} = \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aae1d018a6fc46de78db2552480176533e}{AHC\_FENONE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03912}03912         ahc-\/>\mbox{\hyperlink{structahc__softc_afca907961287c918a87c5461d5af0da8}{bugs}} = \mbox{\hyperlink{aic7xxx_8h_a154aada7a0478476b42a055295542b59aae57a194d2c6017eecb0347415f1c5ca}{AHC\_BUGNONE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03913}03913         ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} = \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a5cb2ce69e9ce6c6b38662c0214b0b52b}{AHC\_FNONE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03914}03914         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03915}03915 \textcolor{comment}{         * Default to all error reporting enabled with the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03916}03916 \textcolor{comment}{         * sequencer operating at its fastest speed.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03917}03917 \textcolor{comment}{         * The bus attach code may modify this.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03918}03918 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03919}03919         ahc-\/>\mbox{\hyperlink{structahc__softc_a82d5e6ad317e321b0e37d26031519df1}{seqctl}} = \mbox{\hyperlink{aic79xx__reg_8h_abb75b12abb4d1e8e95ab050f9f1ac5b3}{FASTMODE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03920}03920 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03921}03921         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx_8h_ae8098627314ca3d2e7835222fe50750f}{AHC\_NUM\_TARGETS}}; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03922}03922                 TAILQ\_INIT(\&ahc-\/>\mbox{\hyperlink{structahc__softc_a8cca91fe9f77d975985c3cf85d11de46}{untagged\_queues}}[i]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03923}03923         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx__osm_8c_adada82ede5710e5827819b0ff9edde31}{ahc\_platform\_alloc}}(ahc, platform\_arg) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03924}03924                 \mbox{\hyperlink{aic7xxx_8c_a9e0849e4b431c5241cc1ab5a043d5249}{ahc\_free}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03925}03925                 ahc = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03926}03926         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03927}03927         \mbox{\hyperlink{aic7xxx__osm_8h_a058feb2b932a7caf20a33dc48244534c}{ahc\_lockinit}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03928}03928         \textcolor{keywordflow}{return} (ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03929}03929 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03930}03930 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03931}03931 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03932}\mbox{\hyperlink{aic7xxx_8c_af7aa9f83defc2dde170a76388dbf297b}{03932}} \mbox{\hyperlink{aic7xxx_8c_af7aa9f83defc2dde170a76388dbf297b}{ahc\_softc\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03933}03933 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03934}03934 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03935}03935         \textcolor{comment}{/* The IRQMS bit is only valid on VL and EISA chips */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03936}03936         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a8056f278977a4ddd3881da47c11fe3e8}{chip}} \& \mbox{\hyperlink{aic7xxx_8h_aa571dbd167b1b4764be22d1efbc6fd12a65f4a902a26f94adada3d4e13df682b1}{AHC\_PCI}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03937}03937                 ahc-\/>\mbox{\hyperlink{structahc__softc_a19e5110bebc18dc39c5b94cc69279414}{unpause}} = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c67c3aa8365be698224acf38de9a509}{HCNTRL}}) \& \mbox{\hyperlink{aic7xxx__reg_8h_a20940b675f73856744175fbc8481a7ac}{IRQMS}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03938}03938         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03939}03939                 ahc-\/>\mbox{\hyperlink{structahc__softc_a19e5110bebc18dc39c5b94cc69279414}{unpause}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03940}03940         ahc-\/>\mbox{\hyperlink{structahc__softc_af98bf693a06a402e836cb5dec7abbd68}{pause}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a19e5110bebc18dc39c5b94cc69279414}{unpause}} | \mbox{\hyperlink{aic79xx__reg_8h_a5666ac5930c9f903698073ab1fa694f7}{PAUSE}}; }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03941}03941         \textcolor{comment}{/* XXX The shared scb data stuff should be deprecated */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03942}03942         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03943}03943                 ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}} = malloc(\textcolor{keyword}{sizeof}(*ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03944}03944                                        M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03945}03945                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}} == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03946}03946                         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03947}03947                 memset(ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}, 0, \textcolor{keyword}{sizeof}(*ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03948}03948         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03949}03949 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03950}03950         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03951}03951 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03952}03952 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03953}03953 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03954}\mbox{\hyperlink{aic7xxx_8c_aa71f6af05ce4c5f3c5b48365eaaff22f}{03954}} \mbox{\hyperlink{aic7xxx_8c_aa71f6af05ce4c5f3c5b48365eaaff22f}{ahc\_softc\_insert}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03955}03955 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03956}03956         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__softc}{ahc\_softc}} *list\_ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03957}03957 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03958}03958 \textcolor{preprocessor}{\#if AIC\_PCI\_CONFIG > 0}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03959}03959         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03960}03960 \textcolor{comment}{         * Second Function PCI devices need to inherit some}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03961}03961 \textcolor{comment}{         * settings from function 0.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03962}03962 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03963}03963         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a8056f278977a4ddd3881da47c11fe3e8}{chip}} \& \mbox{\hyperlink{aic7xxx_8h_aa571dbd167b1b4764be22d1efbc6fd12ae59b35a0333cf249f9a073288f107c69}{AHC\_BUS\_MASK}}) == \mbox{\hyperlink{aic7xxx_8h_aa571dbd167b1b4764be22d1efbc6fd12a65f4a902a26f94adada3d4e13df682b1}{AHC\_PCI}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03964}03964          \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa8a1ad5ab1acd7e0f537f842feda631b8}{AHC\_MULTI\_FUNC}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03965}03965                 TAILQ\_FOREACH(list\_ahc, \&\mbox{\hyperlink{aic7xxx_8c_ac676ce904ae03bd150794ea5f260c522}{ahc\_tailq}}, links) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03966}03966                         \mbox{\hyperlink{aic__osm__lib_8h_a9df69f9a42005372ba0120220097c330}{aic\_dev\_softc\_t}} list\_pci;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03967}03967                         \mbox{\hyperlink{aic__osm__lib_8h_a9df69f9a42005372ba0120220097c330}{aic\_dev\_softc\_t}} pci;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03968}03968 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03969}03969                         list\_pci = list\_ahc-\/>\mbox{\hyperlink{structahc__softc_ab79251036827fdd955ae522a1e209afe}{dev\_softc}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03970}03970                         pci = ahc-\/>\mbox{\hyperlink{structahc__softc_ab79251036827fdd955ae522a1e209afe}{dev\_softc}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03971}03971                         \textcolor{keywordflow}{if} (aic\_get\_pci\_slot(list\_pci) == aic\_get\_pci\_slot(pci)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03972}03972                          \&\& aic\_get\_pci\_bus(list\_pci) == aic\_get\_pci\_bus(pci)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03973}03973                                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__softc}{ahc\_softc}} *master;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03974}03974                                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__softc}{ahc\_softc}} *slave;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03975}03975 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03976}03976                                 \textcolor{keywordflow}{if} (aic\_get\_pci\_function(list\_pci) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03977}03977                                         master = list\_ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03978}03978                                         slave = ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03979}03979                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03980}03980                                         master = ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03981}03981                                         slave = list\_ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03982}03982                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03983}03983                                 slave-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \&= \string~AHC\_BIOS\_ENABLED; }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03984}03984                                 slave-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |=}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03985}03985                                     master-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81af85ad17f28d20a3b92e112248daac4c0}{AHC\_BIOS\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03986}03986                                 slave-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \&= \string~AHC\_PRIMARY\_CHANNEL; }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03987}03987                                 slave-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |=}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03988}03988                                     master-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aafb6b59296c046bcbfb161b229e8eb09}{AHC\_PRIMARY\_CHANNEL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03989}03989                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03990}03990                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03991}03991                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03992}03992         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03993}03993 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03994}03994 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03995}03995         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03996}03996 \textcolor{comment}{         * Insertion sort into our list of softcs.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03997}03997 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03998}03998         list\_ahc = TAILQ\_FIRST(\&\mbox{\hyperlink{aic7xxx_8c_ac676ce904ae03bd150794ea5f260c522}{ahc\_tailq}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l03999}03999         \textcolor{keywordflow}{while} (list\_ahc != NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04000}04000             \&\& \mbox{\hyperlink{aic7xxx__osm_8c_ab4a618728909be98a7f58f1066a5348b}{ahc\_softc\_comp}}(ahc, list\_ahc) <= 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04001}04001                 list\_ahc = TAILQ\_NEXT(list\_ahc, links);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04002}04002         \textcolor{keywordflow}{if} (list\_ahc != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04003}04003                 TAILQ\_INSERT\_BEFORE(list\_ahc, ahc, links);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04004}04004         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04005}04005                 TAILQ\_INSERT\_TAIL(\&\mbox{\hyperlink{aic7xxx_8c_ac676ce904ae03bd150794ea5f260c522}{ahc\_tailq}}, ahc, links);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04006}04006         ahc-\/>\mbox{\hyperlink{structahc__softc_ae357b5be55cacbb13119c290c4744a99}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04007}04007 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04008}04008 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04009}04009 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04010}\mbox{\hyperlink{aic7xxx_8c_aea2958e5d4596c2568085f308cbb5b9c}{04010}} \mbox{\hyperlink{aic7xxx_8c_aea2958e5d4596c2568085f308cbb5b9c}{ahc\_set\_unit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{int} \mbox{\hyperlink{structahc__softc_ae1dc8e4bab1b56f5203ef1c09e24e6c2}{unit}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04011}04011 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04012}04012         ahc-\/>\mbox{\hyperlink{structahc__softc_ae1dc8e4bab1b56f5203ef1c09e24e6c2}{unit}} = \mbox{\hyperlink{structahc__softc_ae1dc8e4bab1b56f5203ef1c09e24e6c2}{unit}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04013}04013 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04014}04014 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04015}04015 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04016}\mbox{\hyperlink{aic7xxx_8c_a1553027be7c005b99ab31f7833fc6ba2}{04016}} \mbox{\hyperlink{aic7xxx_8c_a1553027be7c005b99ab31f7833fc6ba2}{ahc\_set\_name}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{char} *\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04017}04017 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04018}04018         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}} != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04019}04019                 free(ahc-\/>\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04020}04020         ahc-\/>\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}} = \mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04021}04021 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04022}04022 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04023}04023 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04024}\mbox{\hyperlink{aic7xxx_8c_a9e0849e4b431c5241cc1ab5a043d5249}{04024}} \mbox{\hyperlink{aic7xxx_8c_a9e0849e4b431c5241cc1ab5a043d5249}{ahc\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04025}04025 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04026}04026         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04027}04027 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04028}04028         ahc\_terminate\_recovery\_thread(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04029}04029         \textcolor{keywordflow}{switch} (ahc-\/>\mbox{\hyperlink{structahc__softc_ae357b5be55cacbb13119c290c4744a99}{init\_level}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04030}04030         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04031}04031         \textcolor{keywordflow}{case} 5:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04032}04032                 \mbox{\hyperlink{aic7xxx_8c_a4d932ba85942891cfc0f7aa94f210b29}{ahc\_shutdown}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04033}04033                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04034}04034         \textcolor{keywordflow}{case} 4:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04035}04035                 \mbox{\hyperlink{aic__osm__lib_8h_a81d9d134ee4fbcd15c6703646e10495e}{aic\_dmamap\_unload}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a6dc0a81da5759d51c9f663b35aed8f98}{shared\_data\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04036}04036                                   ahc-\/>\mbox{\hyperlink{structahc__softc_aaa85e4b192dffdaa3a3a335ba8dbbdfe}{shared\_data\_dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04037}04037                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04038}04038         \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04039}04039                 \mbox{\hyperlink{aic__osm__lib_8h_a86b3b896d8b728668a2bc292d55939af}{aic\_dmamem\_free}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a6dc0a81da5759d51c9f663b35aed8f98}{shared\_data\_dmat}}, ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04040}04040                                 ahc-\/>\mbox{\hyperlink{structahc__softc_aaa85e4b192dffdaa3a3a335ba8dbbdfe}{shared\_data\_dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04041}04041                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04042}04042         \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04043}04043                 \mbox{\hyperlink{aic__osm__lib_8h_a8d3814e3205b82c001096c6f078ccdc5}{aic\_dma\_tag\_destroy}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a6dc0a81da5759d51c9f663b35aed8f98}{shared\_data\_dmat}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04044}04044         \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04045}04045 \textcolor{preprocessor}{\#ifndef \_\_linux\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04046}04046                 \mbox{\hyperlink{aic__osm__lib_8h_a8d3814e3205b82c001096c6f078ccdc5}{aic\_dma\_tag\_destroy}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a061b8d3ef96d28d0c2c54e0efffba039}{buffer\_dmat}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04047}04047 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04048}04048                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04049}04049         \textcolor{keywordflow}{case} 0:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04050}04050                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04051}04051         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04052}04052 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04053}04053 \textcolor{preprocessor}{\#ifndef \_\_linux\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04054}04054         \mbox{\hyperlink{aic__osm__lib_8h_a8d3814e3205b82c001096c6f078ccdc5}{aic\_dma\_tag\_destroy}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a58a2e1f94c8641616286b06f9d0053ce}{parent\_dmat}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04055}04055 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04056}04056         \mbox{\hyperlink{aic7xxx__osm_8c_a6a6ced38c3b9893034527281530b5355}{ahc\_platform\_free}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04057}04057         \mbox{\hyperlink{aic7xxx_8c_a7e4b79ab4b1d8f9001a0890ffa8ed4e8}{ahc\_fini\_scbdata}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04058}04058         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx_8h_ae8098627314ca3d2e7835222fe50750f}{AHC\_NUM\_TARGETS}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04059}04059                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04060}04060 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04061}04061                 tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[i];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04062}04062                 \textcolor{keywordflow}{if} (tstate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04063}04063 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04064}04064                         \textcolor{keywordtype}{int} j;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04065}04065 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04066}04066                         \textcolor{keywordflow}{for} (j = 0; j < \mbox{\hyperlink{aic7xxx_8h_a4b4241cdde48f619222c98ca9ad15adf}{AHC\_NUM\_LUNS}}; j++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04067}04067                                 \textcolor{keyword}{struct }ahc\_tmode\_lstate *lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04068}04068 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04069}04069                                 lstate = tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[j];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04070}04070                                 \textcolor{keywordflow}{if} (lstate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04071}04071                                         xpt\_free\_path(lstate-\/>path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04072}04072                                         free(lstate, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04073}04073                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04074}04074                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04075}04075 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04076}04076                         free(tstate, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04077}04077                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04078}04078         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04079}04079 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04080}04080         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04081}04081                 xpt\_free\_path(ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}}-\/>path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04082}04082                 free(ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04083}04083         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04084}04084 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04085}04085         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}} != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04086}04086                 free(ahc-\/>\mbox{\hyperlink{structahc__softc_acdbbdc30c7fe3e5c3eb5e3985cde302f}{name}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04087}04087         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a16a68aa4411fb500f136b17134c761ea}{seep\_config}} != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04088}04088                 free(ahc-\/>\mbox{\hyperlink{structahc__softc_a16a68aa4411fb500f136b17134c761ea}{seep\_config}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04089}04089 \textcolor{preprocessor}{\#ifndef \_\_FreeBSD\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04090}04090         free(ahc, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04091}04091 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04092}04092         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04093}04093 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04094}04094 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04095}04095 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04096}\mbox{\hyperlink{aic7xxx_8c_a4d932ba85942891cfc0f7aa94f210b29}{04096}} \mbox{\hyperlink{aic7xxx_8c_a4d932ba85942891cfc0f7aa94f210b29}{ahc\_shutdown}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04097}04097 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04098}04098         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04099}04099         \textcolor{keywordtype}{int}     i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04100}04100 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04101}04101         ahc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structahc__softc}{ahc\_softc}} *)arg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04102}04102 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04103}04103         \textcolor{comment}{/* This will reset most registers to 0, but not all */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04104}04104         \mbox{\hyperlink{aic7xxx_8c_a80bbe01db2bbbe04296884d0ffdd67bc}{ahc\_reset}}(ahc, \textcolor{comment}{/*reinit*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04105}04105         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04106}04106         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04107}04107         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a487a6ebff378194279dbc8b46a9d4b48}{DSPCISTATUS}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04108}04108 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04109}04109         \textcolor{keywordflow}{for} (i = \mbox{\hyperlink{aic7xxx__reg_8h_a10b250cf79a9e35a914e00ea1869b198}{TARG\_SCSIRATE}}; i < \mbox{\hyperlink{aic7xxx__reg_8h_a06d5e5ae1239aef89165177db61af11f}{SCSICONF}}; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04110}04110                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, i, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04111}04111 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04112}04112 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04113}04113 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04114}04114 \textcolor{comment}{ * Reset the controller and record some information about it}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04115}04115 \textcolor{comment}{ * that is only available just after a reset.  If "{}reinit"{} is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04116}04116 \textcolor{comment}{ * non-\/zero, this reset occurred after initial configuration}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04117}04117 \textcolor{comment}{ * and the caller requests that the chip be fully reinitialized}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04118}04118 \textcolor{comment}{ * to a runable state.  Chip interrupts are *not* enabled after}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04119}04119 \textcolor{comment}{ * a reinitialization.  The caller must enable interrupts via}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04120}04120 \textcolor{comment}{ * ahc\_intr\_enable().}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04121}04121 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04122}04122 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04123}\mbox{\hyperlink{aic7xxx_8c_a80bbe01db2bbbe04296884d0ffdd67bc}{04123}} \mbox{\hyperlink{aic7xxx_8c_a80bbe01db2bbbe04296884d0ffdd67bc}{ahc\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{int} reinit)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04124}04124 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04125}04125         u\_int   sblkctl;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04126}04126         u\_int   sxfrctl1\_a, sxfrctl1\_b;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04127}04127         \textcolor{keywordtype}{int}     error;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04128}04128         \textcolor{keywordtype}{int}     wait;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04129}04129 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04130}04130         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04131}04131 \textcolor{comment}{         * Preserve the value of the SXFRCTL1 register for all channels.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04132}04132 \textcolor{comment}{         * It contains settings that affect termination and we don't want}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04133}04133 \textcolor{comment}{         * to disturb the integrity of the bus.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04134}04134 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04135}04135         \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04136}04136         sxfrctl1\_b = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04137}04137         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a8056f278977a4ddd3881da47c11fe3e8}{chip}} \& \mbox{\hyperlink{aic7xxx_8h_aa571dbd167b1b4764be22d1efbc6fd12a3bdba516898f9e100e98e4144690a6dd}{AHC\_CHIPID\_MASK}}) == \mbox{\hyperlink{aic7xxx_8h_aa571dbd167b1b4764be22d1efbc6fd12af18c0ebf092111e5153ee5474dd7ae25}{AHC\_AIC7770}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04138}04138                 u\_int sblkctl;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04139}04139 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04140}04140                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04141}04141 \textcolor{comment}{                 * Save channel B's settings in case this chip}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04142}04142 \textcolor{comment}{                 * is setup for TWIN channel operation.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04143}04143 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04144}04144                 sblkctl = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04145}04145                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, sblkctl | \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04146}04146                 sxfrctl1\_b = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04147}04147                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, sblkctl \& \string~\mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04148}04148         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04149}04149         sxfrctl1\_a = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04150}04150 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04151}04151         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c67c3aa8365be698224acf38de9a509}{HCNTRL}}, \mbox{\hyperlink{aic79xx__reg_8h_a152d725948aad82707a35054c15de46d}{CHIPRST}} | ahc-\/>\mbox{\hyperlink{structahc__softc_af98bf693a06a402e836cb5dec7abbd68}{pause}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04152}04152 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04153}04153         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04154}04154 \textcolor{comment}{         * Ensure that the reset has finished.  We delay 1000us}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04155}04155 \textcolor{comment}{         * prior to reading the register to make sure the chip}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04156}04156 \textcolor{comment}{         * has sufficiently completed its reset to handle register}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04157}04157 \textcolor{comment}{         * accesses.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04158}04158 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04159}04159         wait = 1000;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04160}04160         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04161}04161                 \mbox{\hyperlink{aic__osm__lib_8h_a23559a914641f4b70a959f25b8281c87}{aic\_delay}}(1000);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04162}04162         \} \textcolor{keywordflow}{while} (-\/-\/wait \&\& !(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c67c3aa8365be698224acf38de9a509}{HCNTRL}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a9183c118b14fd68a5a034aedca036e4d}{CHIPRSTACK}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04163}04163 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04164}04164         \textcolor{keywordflow}{if} (wait == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04165}04165                 printf(\textcolor{stringliteral}{"{}\%s: WARNING -\/ Failed chip reset!  "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04166}04166                        \textcolor{stringliteral}{"{}Trying to initialize anyway.\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04167}04167         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04168}04168         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c67c3aa8365be698224acf38de9a509}{HCNTRL}}, ahc-\/>\mbox{\hyperlink{structahc__softc_af98bf693a06a402e836cb5dec7abbd68}{pause}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04169}04169 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04170}04170         \textcolor{comment}{/* Determine channel configuration */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04171}04171         sblkctl = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) \& (\mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}}|\mbox{\hyperlink{aic79xx__reg_8h_a8b6b728206fbeed1b6b87e9775cf1282}{SELWIDE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04172}04172         \textcolor{comment}{/* No Twin Channel PCI cards */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04173}04173         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a8056f278977a4ddd3881da47c11fe3e8}{chip}} \& \mbox{\hyperlink{aic7xxx_8h_aa571dbd167b1b4764be22d1efbc6fd12a65f4a902a26f94adada3d4e13df682b1}{AHC\_PCI}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04174}04174                 sblkctl \&= \string~\mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04175}04175         \textcolor{keywordflow}{switch} (sblkctl) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04176}04176         \textcolor{keywordflow}{case} 0:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04177}04177                 \textcolor{comment}{/* Single Narrow Channel */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04178}04178                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04179}04179         \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04180}04180                 \textcolor{comment}{/* Wide Channel */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04181}04181                 ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} |= \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04182}04182                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04183}04183         \textcolor{keywordflow}{case} 8:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04184}04184                 \textcolor{comment}{/* Twin Channel */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04185}04185                 ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} |= \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04186}04186                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04187}04187         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04188}04188                 printf(\textcolor{stringliteral}{"{} Unsupported adapter type.  Ignoring\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04189}04189                 \textcolor{keywordflow}{return}(-\/1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04190}04190         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04191}04191 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04192}04192         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04193}04193 \textcolor{comment}{         * Reload sxfrctl1.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04194}04194 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04195}04195 \textcolor{comment}{         * We must always initialize STPWEN to 1 before we}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04196}04196 \textcolor{comment}{         * restore the saved values.  STPWEN is initialized}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04197}04197 \textcolor{comment}{         * to a tri-\/state condition which can only be cleared}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04198}04198 \textcolor{comment}{         * by turning it on.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04199}04199 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04200}04200         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04201}04201                 u\_int sblkctl;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04202}04202 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04203}04203                 sblkctl = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04204}04204                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, sblkctl | \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04205}04205                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}}, sxfrctl1\_b);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04206}04206                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, sblkctl \& \string~\mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04207}04207         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04208}04208         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}}, sxfrctl1\_a);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04209}04209 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04210}04210         error = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04211}04211         \textcolor{keywordflow}{if} (reinit != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04212}04212                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04213}04213 \textcolor{comment}{                 * If a recovery action has forced a chip reset,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04214}04214 \textcolor{comment}{                 * re-\/initialize the chip to our liking.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04215}04215 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04216}04216                 error = ahc-\/>\mbox{\hyperlink{structahc__softc_a7c20067e0767e8cb8a3ff87d8ce38630}{bus\_chip\_init}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04217}04217 \textcolor{preprocessor}{\#ifdef AHC\_DUMP\_SEQ}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04218}04218         \textcolor{keywordflow}{else} }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04219}04219                 ahc\_dumpseq(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04220}04220 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04221}04221 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04222}04222         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04223}04223 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04224}04224 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04225}04225 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04226}04226 \textcolor{comment}{ * Determine the number of SCBs available on the controller}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04227}04227 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04228}04228 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04229}\mbox{\hyperlink{aic7xxx_8c_a510b6d2b2fe2de9023ee818121e6a761}{04229}} \mbox{\hyperlink{aic7xxx_8c_a510b6d2b2fe2de9023ee818121e6a761}{ahc\_probe\_scbs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04230}04230         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04231}04231 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04232}04232         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx_8h_a7f2bd211117a1c499311c90d2dec1b4c}{AHC\_SCB\_MAX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04233}04233                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04234}04234                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad55a7ddb8d4b2398b0c1cfec76c0d9fd}{SCB\_BASE}}, i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04235}04235                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad55a7ddb8d4b2398b0c1cfec76c0d9fd}{SCB\_BASE}}) != i)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04236}04236                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04237}04237                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04238}04238                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad55a7ddb8d4b2398b0c1cfec76c0d9fd}{SCB\_BASE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04239}04239                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04240}04240         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04241}04241         \textcolor{keywordflow}{return} (i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04242}04242 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04243}04243 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04244}04244 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04245}\mbox{\hyperlink{aic7xxx_8c_aca6ec4d7de243a2c5365737bb1e71de4}{04245}} \mbox{\hyperlink{aic7xxx_8c_ad38522c285453b97b32e08be78e65c02}{ahc\_dmamap\_cb}}(\textcolor{keywordtype}{void} *arg, bus\_dma\_segment\_t *segs, \textcolor{keywordtype}{int} nseg, \textcolor{keywordtype}{int} error) }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04246}04246 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04247}04247         bus\_addr\_t *baddr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04248}04248 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04249}04249         baddr = (bus\_addr\_t *)arg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04250}04250         *baddr = segs-\/>ds\_addr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04251}04251 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04252}04252 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04253}04253 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04254}\mbox{\hyperlink{aic7xxx_8c_a1ff1ab015ccf9f4195ceafd71139326e}{04254}} \mbox{\hyperlink{aic7xxx_8c_a1ff1ab015ccf9f4195ceafd71139326e}{ahc\_build\_free\_scb\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04255}04255 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04256}04256         \textcolor{keywordtype}{int} scbsize;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04257}04257         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04258}04258 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04259}04259         scbsize = 32;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04260}04260         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a44fb39d153f9fe3d5e6a6f371a83c7e9}{AHC\_LSCBS\_ENABLED}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04261}04261                 scbsize = 64;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04262}04262 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04263}04263         \textcolor{keywordflow}{for} (i = 0; i < ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04264}04264                 \textcolor{keywordtype}{int} j;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04265}04265 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04266}04266                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04267}04267 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04268}04268                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04269}04269 \textcolor{comment}{                 * Touch all SCB bytes to avoid parity errors}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04270}04270 \textcolor{comment}{                 * should one of our debugging routines read}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04271}04271 \textcolor{comment}{                 * an otherwise uninitiatlized byte.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04272}04272 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04273}04273                 \textcolor{keywordflow}{for} (j = 0; j < scbsize; j++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04274}04274                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad55a7ddb8d4b2398b0c1cfec76c0d9fd}{SCB\_BASE}}+j, 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04275}04275 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04276}04276                 \textcolor{comment}{/* Clear the control byte. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04277}04277                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04278}04278 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04279}04279                 \textcolor{comment}{/* Set the next pointer */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04280}04280                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a68e9e5c60abbbad6da178ade4326e6a6}{AHC\_PAGESCBS}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04281}04281                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}}, i+1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04282}04282                 \textcolor{keywordflow}{else} }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04283}04283                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}}, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04284}04284 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04285}04285                 \textcolor{comment}{/* Make the tag number, SCSIID, and lun invalid */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04286}04286                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}}, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04287}04287                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c82257e3dc3203046a2cfc8f60a8b62}{SCB\_SCSIID}}, 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04288}04288                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71a69c23bfda16efd48dda0abb7649fe}{SCB\_LUN}}, 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04289}04289         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04290}04290 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04291}04291         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a68e9e5c60abbbad6da178ade4326e6a6}{AHC\_PAGESCBS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04292}04292                 \textcolor{comment}{/* SCB 0 heads the free list. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04293}04293                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a95114269163c01efbb57b7f8fedac7df}{FREE\_SCBH}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04294}04294         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04295}04295                 \textcolor{comment}{/* No free list. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04296}04296                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a95114269163c01efbb57b7f8fedac7df}{FREE\_SCBH}}, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04297}04297         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04298}04298 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04299}04299         \textcolor{comment}{/* Make sure that the last SCB terminates the free list */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04300}04300         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, i-\/1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04301}04301         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}}, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04302}04302 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04303}04303 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04304}04304 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04305}\mbox{\hyperlink{aic7xxx_8c_a06f89ace331dd4710329a542edbcec01}{04305}} \mbox{\hyperlink{aic7xxx_8c_a06f89ace331dd4710329a542edbcec01}{ahc\_init\_scbdata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04306}04306 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04307}04307         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb__data}{scb\_data}} *\mbox{\hyperlink{structscb__data}{scb\_data}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04308}04308 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04309}04309         \mbox{\hyperlink{structscb__data}{scb\_data}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04310}04310         SLIST\_INIT(\&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a2046f21c84fbc3500328b6e4168944ea}{free\_scbs}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04311}04311         SLIST\_INIT(\&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>sg\_maps);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04312}04312 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04313}04313         \textcolor{comment}{/* Allocate SCB resources */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04314}04314         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5e40999f8417b69d4c5063f91bc6c56f}{scbarray}} =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04315}04315             (\textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *)malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}}) * \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04316}04316                                  M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04317}04317         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5e40999f8417b69d4c5063f91bc6c56f}{scbarray}} == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04318}04318                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04319}04319         memset(\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5e40999f8417b69d4c5063f91bc6c56f}{scbarray}}, 0, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}}) * \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04320}04320 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04321}04321         \textcolor{comment}{/* Determine the number of hardware SCBs and initialize them */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04322}04322 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04323}04323         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}} = \mbox{\hyperlink{aic7xxx_8c_a510b6d2b2fe2de9023ee818121e6a761}{ahc\_probe\_scbs}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04324}04324         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}} == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04325}04325                 printf(\textcolor{stringliteral}{"{}\%s: No SCB space found\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04326}04326                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04327}04327         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04328}04328 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04329}04329         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04330}04330 \textcolor{comment}{         * Create our DMA tags.  These tags define the kinds of device}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04331}04331 \textcolor{comment}{         * accessible memory allocations and memory mappings we will}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04332}04332 \textcolor{comment}{         * need to perform during normal operation.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04333}04333 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04334}04334 \textcolor{comment}{         * Unless we need to further restrict the allocation, we rely}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04335}04335 \textcolor{comment}{         * on the restrictions of the parent dmat, hence the common}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04336}04336 \textcolor{comment}{         * use of MAXADDR and MAXSIZE.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04337}04337 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04338}04338 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04339}04339         \textcolor{comment}{/* DMA tag for our hardware scb structures */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04340}04340         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a2c25902bc7997440be9afda6b4b947b7}{aic\_dma\_tag\_create}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a58a2e1f94c8641616286b06f9d0053ce}{parent\_dmat}}, \textcolor{comment}{/*alignment*/}1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04341}04341                                \textcolor{comment}{/*boundary*/}BUS\_SPACE\_MAXADDR\_32BIT + 1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04342}04342                                \textcolor{comment}{/*lowaddr*/}BUS\_SPACE\_MAXADDR\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04343}04343                                \textcolor{comment}{/*highaddr*/}BUS\_SPACE\_MAXADDR,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04344}04344                                \textcolor{comment}{/*filter*/}NULL, \textcolor{comment}{/*filterarg*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04345}04345                                \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhardware__scb}{hardware\_scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04346}04346                                \textcolor{comment}{/*nsegments*/}1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04347}04347                                \textcolor{comment}{/*maxsegsz*/}BUS\_SPACE\_MAXSIZE\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04348}04348                                \textcolor{comment}{/*flags*/}0, \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a0b46b6d8a8ed5ae746744885712e3abf}{hscb\_dmat}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04349}04349                 \textcolor{keywordflow}{goto} error\_exit;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04350}04350         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04351}04351 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04352}04352         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aa63868cb696d062074e9a0cd06437ed1}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04353}04353 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04354}04354         \textcolor{comment}{/* Allocation for our hscbs */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04355}04355         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a94b1133ab2d9f1b4fee80aeb927bdec8}{aic\_dmamem\_alloc}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a0b46b6d8a8ed5ae746744885712e3abf}{hscb\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04356}04356                              (\textcolor{keywordtype}{void} **)\&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5534736125c7fdb93b5dd4690a89617d}{hscbs}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04357}04357                              BUS\_DMA\_NOWAIT | BUS\_DMA\_COHERENT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04358}04358                              \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a4c2c1e4f4d5fede3d0bc12b32d4fcbbb}{hscb\_dmamap}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04359}04359                 \textcolor{keywordflow}{goto} error\_exit;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04360}04360         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04361}04361 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04362}04362         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aa63868cb696d062074e9a0cd06437ed1}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04363}04363 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04364}04364         \textcolor{comment}{/* And permanently map them */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04365}04365         \mbox{\hyperlink{aic__osm__lib_8h_afcee4d773d1da5d6bf515d82bcd3a33a}{aic\_dmamap\_load}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a0b46b6d8a8ed5ae746744885712e3abf}{hscb\_dmat}}, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a4c2c1e4f4d5fede3d0bc12b32d4fcbbb}{hscb\_dmamap}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04366}04366                         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5534736125c7fdb93b5dd4690a89617d}{hscbs}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04367}04367                         \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhardware__scb}{hardware\_scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04368}04368                         \mbox{\hyperlink{aic7xxx_8c_ad38522c285453b97b32e08be78e65c02}{ahc\_dmamap\_cb}}, \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a346b26491edfda8af4faf77ae84c6d80}{hscb\_busaddr}}, \textcolor{comment}{/*flags*/}0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04369}04369 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04370}04370         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aa63868cb696d062074e9a0cd06437ed1}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04371}04371 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04372}04372         \textcolor{comment}{/* DMA tag for our sense buffers */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04373}04373         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a2c25902bc7997440be9afda6b4b947b7}{aic\_dma\_tag\_create}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a58a2e1f94c8641616286b06f9d0053ce}{parent\_dmat}}, \textcolor{comment}{/*alignment*/}1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04374}04374                                \textcolor{comment}{/*boundary*/}BUS\_SPACE\_MAXADDR\_32BIT + 1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04375}04375                                \textcolor{comment}{/*lowaddr*/}BUS\_SPACE\_MAXADDR\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04376}04376                                \textcolor{comment}{/*highaddr*/}BUS\_SPACE\_MAXADDR,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04377}04377                                \textcolor{comment}{/*filter*/}NULL, \textcolor{comment}{/*filterarg*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04378}04378                                \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} scsi\_sense\_data),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04379}04379                                \textcolor{comment}{/*nsegments*/}1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04380}04380                                \textcolor{comment}{/*maxsegsz*/}BUS\_SPACE\_MAXSIZE\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04381}04381                                \textcolor{comment}{/*flags*/}0, \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a18713bf1c4dcb3dece3261d23dad8739}{sense\_dmat}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04382}04382                 \textcolor{keywordflow}{goto} error\_exit;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04383}04383         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04384}04384 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04385}04385         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aa63868cb696d062074e9a0cd06437ed1}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04386}04386 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04387}04387         \textcolor{comment}{/* Allocate them */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04388}04388         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a94b1133ab2d9f1b4fee80aeb927bdec8}{aic\_dmamem\_alloc}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a18713bf1c4dcb3dece3261d23dad8739}{sense\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04389}04389                              (\textcolor{keywordtype}{void} **)\&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a29e41c04a5a1738dc02e44a5df7bfad6}{sense}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04390}04390                              BUS\_DMA\_NOWAIT, \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a76a343d2fcbd1297a556d287b2c0cd82}{sense\_dmamap}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04391}04391                 \textcolor{keywordflow}{goto} error\_exit;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04392}04392         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04393}04393 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04394}04394         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aa63868cb696d062074e9a0cd06437ed1}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04395}04395 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04396}04396         \textcolor{comment}{/* And permanently map them */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04397}04397         \mbox{\hyperlink{aic__osm__lib_8h_afcee4d773d1da5d6bf515d82bcd3a33a}{aic\_dmamap\_load}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a18713bf1c4dcb3dece3261d23dad8739}{sense\_dmat}}, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a76a343d2fcbd1297a556d287b2c0cd82}{sense\_dmamap}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04398}04398                         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a29e41c04a5a1738dc02e44a5df7bfad6}{sense}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04399}04399                         \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} scsi\_sense\_data),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04400}04400                         \mbox{\hyperlink{aic7xxx_8c_ad38522c285453b97b32e08be78e65c02}{ahc\_dmamap\_cb}}, \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a169af6445a5a5a1c7035936c95575333}{sense\_busaddr}}, \textcolor{comment}{/*flags*/}0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04401}04401 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04402}04402         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aa63868cb696d062074e9a0cd06437ed1}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04403}04403 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04404}04404         \textcolor{comment}{/* DMA tag for our S/G structures.  We allocate in page sized chunks */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04405}04405         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a2c25902bc7997440be9afda6b4b947b7}{aic\_dma\_tag\_create}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a58a2e1f94c8641616286b06f9d0053ce}{parent\_dmat}}, \textcolor{comment}{/*alignment*/}8,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04406}04406                                \textcolor{comment}{/*boundary*/}BUS\_SPACE\_MAXADDR\_32BIT + 1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04407}04407                                \textcolor{comment}{/*lowaddr*/}BUS\_SPACE\_MAXADDR\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04408}04408                                \textcolor{comment}{/*highaddr*/}BUS\_SPACE\_MAXADDR,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04409}04409                                \textcolor{comment}{/*filter*/}NULL, \textcolor{comment}{/*filterarg*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04410}04410                                PAGE\_SIZE, \textcolor{comment}{/*nsegments*/}1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04411}04411                                \textcolor{comment}{/*maxsegsz*/}BUS\_SPACE\_MAXSIZE\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04412}04412                                \textcolor{comment}{/*flags*/}0, \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a04ab625015538509691d1f8b14b82902}{sg\_dmat}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04413}04413                 \textcolor{keywordflow}{goto} error\_exit;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04414}04414         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04415}04415 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04416}04416         \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aa63868cb696d062074e9a0cd06437ed1}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04417}04417 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04418}04418         \textcolor{comment}{/* Perform initial CCB allocation */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04419}04419         memset(\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5534736125c7fdb93b5dd4690a89617d}{hscbs}}, 0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04420}04420                \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhardware__scb}{hardware\_scb}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04421}04421         \textcolor{keywordflow}{while} (\mbox{\hyperlink{aic7xxx_8c_af571ae4dc8e918437ddca50c90b391e5}{ahc\_alloc\_scbs}}(ahc) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04422}04422                 ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04423}04423 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04424}04424         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}} == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04425}04425                 printf(\textcolor{stringliteral}{"{}\%s: ahc\_init\_scbdata -\/ "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04426}04426                        \textcolor{stringliteral}{"{}Unable to allocate initial scbs\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04427}04427                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04428}04428                 \textcolor{keywordflow}{goto} error\_exit;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04429}04429         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04430}04430 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04431}04431         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04432}04432 \textcolor{comment}{         * Reserve the next queued SCB.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04433}04433 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04434}04434         ahc-\/>\mbox{\hyperlink{structahc__softc_a5c0812d57ae0fcf9a51318f66e4922b9}{next\_queued\_scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_a895a9aa038eefd8db01bcd8df61a0082}{ahc\_get\_scb}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04435}04435 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04436}04436         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04437}04437 \textcolor{comment}{         * Note that we were successful}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04438}04438 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04439}04439         \textcolor{keywordflow}{return} (0); }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04440}04440 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04441}04441 error\_exit:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04442}04442 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04443}04443         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04444}04444 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04445}04445 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04446}04446 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04447}\mbox{\hyperlink{aic7xxx_8c_a7e4b79ab4b1d8f9001a0890ffa8ed4e8}{04447}} \mbox{\hyperlink{aic7xxx_8c_a7e4b79ab4b1d8f9001a0890ffa8ed4e8}{ahc\_fini\_scbdata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04448}04448 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04449}04449         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb__data}{scb\_data}} *\mbox{\hyperlink{structscb__data}{scb\_data}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04450}04450 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04451}04451         \mbox{\hyperlink{structscb__data}{scb\_data}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04452}04452         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb__data}{scb\_data}} == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04453}04453                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04454}04454 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04455}04455         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aa63868cb696d062074e9a0cd06437ed1}{init\_level}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04456}04456         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04457}04457         \textcolor{keywordflow}{case} 7:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04458}04458         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04459}04459                 \textcolor{keyword}{struct }\mbox{\hyperlink{structsg__map__node}{sg\_map\_node}} *sg\_map;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04460}04460 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04461}04461                 \textcolor{keywordflow}{while} ((sg\_map = SLIST\_FIRST(\&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>sg\_maps))!= NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04462}04462                         SLIST\_REMOVE\_HEAD(\&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>sg\_maps, links);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04463}04463                         \mbox{\hyperlink{aic__osm__lib_8h_a81d9d134ee4fbcd15c6703646e10495e}{aic\_dmamap\_unload}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a04ab625015538509691d1f8b14b82902}{sg\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04464}04464                                           sg\_map-\/>\mbox{\hyperlink{structsg__map__node_a14ef4861e2e03abb29d0a713268abc37}{sg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04465}04465                         \mbox{\hyperlink{aic__osm__lib_8h_a86b3b896d8b728668a2bc292d55939af}{aic\_dmamem\_free}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a04ab625015538509691d1f8b14b82902}{sg\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04466}04466                                         sg\_map-\/>\mbox{\hyperlink{structsg__map__node_a4772c8c5072c59f87154f2ba71d06ecf}{sg\_vaddr}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04467}04467                                         sg\_map-\/>\mbox{\hyperlink{structsg__map__node_a14ef4861e2e03abb29d0a713268abc37}{sg\_dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04468}04468                         free(sg\_map, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04469}04469                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04470}04470                 \mbox{\hyperlink{aic__osm__lib_8h_a8d3814e3205b82c001096c6f078ccdc5}{aic\_dma\_tag\_destroy}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a04ab625015538509691d1f8b14b82902}{sg\_dmat}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04471}04471         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04472}04472         \textcolor{keywordflow}{case} 6:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04473}04473                 \mbox{\hyperlink{aic__osm__lib_8h_a81d9d134ee4fbcd15c6703646e10495e}{aic\_dmamap\_unload}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a18713bf1c4dcb3dece3261d23dad8739}{sense\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04474}04474                                   \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a76a343d2fcbd1297a556d287b2c0cd82}{sense\_dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04475}04475         \textcolor{keywordflow}{case} 5:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04476}04476                 \mbox{\hyperlink{aic__osm__lib_8h_a86b3b896d8b728668a2bc292d55939af}{aic\_dmamem\_free}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a18713bf1c4dcb3dece3261d23dad8739}{sense\_dmat}}, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a29e41c04a5a1738dc02e44a5df7bfad6}{sense}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04477}04477                                 \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a76a343d2fcbd1297a556d287b2c0cd82}{sense\_dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04478}04478         \textcolor{keywordflow}{case} 4:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04479}04479                 \mbox{\hyperlink{aic__osm__lib_8h_a8d3814e3205b82c001096c6f078ccdc5}{aic\_dma\_tag\_destroy}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a18713bf1c4dcb3dece3261d23dad8739}{sense\_dmat}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04480}04480         \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04481}04481                 \mbox{\hyperlink{aic__osm__lib_8h_a81d9d134ee4fbcd15c6703646e10495e}{aic\_dmamap\_unload}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a0b46b6d8a8ed5ae746744885712e3abf}{hscb\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04482}04482                                   \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a4c2c1e4f4d5fede3d0bc12b32d4fcbbb}{hscb\_dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04483}04483         \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04484}04484                 \mbox{\hyperlink{aic__osm__lib_8h_a86b3b896d8b728668a2bc292d55939af}{aic\_dmamem\_free}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a0b46b6d8a8ed5ae746744885712e3abf}{hscb\_dmat}}, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5534736125c7fdb93b5dd4690a89617d}{hscbs}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04485}04485                                 \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a4c2c1e4f4d5fede3d0bc12b32d4fcbbb}{hscb\_dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04486}04486         \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04487}04487                 \mbox{\hyperlink{aic__osm__lib_8h_a8d3814e3205b82c001096c6f078ccdc5}{aic\_dma\_tag\_destroy}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a0b46b6d8a8ed5ae746744885712e3abf}{hscb\_dmat}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04488}04488                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04489}04489         \textcolor{keywordflow}{case} 0:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04490}04490                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04491}04491         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04492}04492         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5e40999f8417b69d4c5063f91bc6c56f}{scbarray}} != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04493}04493                 free(\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5e40999f8417b69d4c5063f91bc6c56f}{scbarray}}, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04494}04494 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04495}04495 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04496}04496 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04497}\mbox{\hyperlink{aic7xxx_8c_af571ae4dc8e918437ddca50c90b391e5}{04497}} \mbox{\hyperlink{aic7xxx_8c_af571ae4dc8e918437ddca50c90b391e5}{ahc\_alloc\_scbs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04498}04498 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04499}04499         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb__data}{scb\_data}} *\mbox{\hyperlink{structscb__data}{scb\_data}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04500}04500         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *next\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04501}04501         \textcolor{keyword}{struct }\mbox{\hyperlink{structsg__map__node}{sg\_map\_node}} *sg\_map;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04502}04502         bus\_addr\_t physaddr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04503}04503         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}} *segs;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04504}04504         \textcolor{keywordtype}{int} newcount;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04505}04505         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04506}04506 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04507}04507         \mbox{\hyperlink{structscb__data}{scb\_data}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04508}04508         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}} >= \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04509}04509                 \textcolor{comment}{/* Can't allocate any more */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04510}04510                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04511}04511 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04512}04512         next\_scb = \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5e40999f8417b69d4c5063f91bc6c56f}{scbarray}}[\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04513}04513 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04514}04514         sg\_map = malloc(\textcolor{keyword}{sizeof}(*sg\_map), M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04515}04515 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04516}04516         \textcolor{keywordflow}{if} (sg\_map == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04517}04517                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04518}04518 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04519}04519         \textcolor{comment}{/* Allocate S/G space for the next batch of SCBS */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04520}04520         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a94b1133ab2d9f1b4fee80aeb927bdec8}{aic\_dmamem\_alloc}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a04ab625015538509691d1f8b14b82902}{sg\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04521}04521                              (\textcolor{keywordtype}{void} **)\&sg\_map-\/>\mbox{\hyperlink{structsg__map__node_a4772c8c5072c59f87154f2ba71d06ecf}{sg\_vaddr}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04522}04522                              BUS\_DMA\_NOWAIT | BUS\_DMA\_COHERENT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04523}04523                              \&sg\_map-\/>\mbox{\hyperlink{structsg__map__node_a14ef4861e2e03abb29d0a713268abc37}{sg\_dmamap}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04524}04524                 free(sg\_map, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04525}04525                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04526}04526         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04527}04527 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04528}04528         SLIST\_INSERT\_HEAD(\&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>sg\_maps, sg\_map, links);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04529}04529 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04530}04530         \mbox{\hyperlink{aic__osm__lib_8h_afcee4d773d1da5d6bf515d82bcd3a33a}{aic\_dmamap\_load}}(ahc, \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a04ab625015538509691d1f8b14b82902}{sg\_dmat}}, sg\_map-\/>\mbox{\hyperlink{structsg__map__node_a14ef4861e2e03abb29d0a713268abc37}{sg\_dmamap}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04531}04531                         sg\_map-\/>\mbox{\hyperlink{structsg__map__node_a4772c8c5072c59f87154f2ba71d06ecf}{sg\_vaddr}}, PAGE\_SIZE, \mbox{\hyperlink{aic7xxx_8c_ad38522c285453b97b32e08be78e65c02}{ahc\_dmamap\_cb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04532}04532                         \&sg\_map-\/>\mbox{\hyperlink{structsg__map__node_af5d9f9813458169847204f3096be9d11}{sg\_physaddr}}, \textcolor{comment}{/*flags*/}0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04533}04533 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04534}04534         segs = sg\_map-\/>\mbox{\hyperlink{structsg__map__node_a4772c8c5072c59f87154f2ba71d06ecf}{sg\_vaddr}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04535}04535         physaddr = sg\_map-\/>\mbox{\hyperlink{structsg__map__node_af5d9f9813458169847204f3096be9d11}{sg\_physaddr}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04536}04536 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04537}04537         newcount = (PAGE\_SIZE / (\mbox{\hyperlink{aic7xxx__osm_8h_a7f68f60c3974a190f22006baf79b214e}{AHC\_NSEG}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}})));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04538}04538         newcount = \mbox{\hyperlink{aic79xx_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(newcount, (\mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}} -\/ \mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04539}04539         \textcolor{keywordflow}{for} (i = 0; i < newcount; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04540}04540                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscb__platform__data}{scb\_platform\_data}} *pdata;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04541}04541 \textcolor{preprocessor}{\#ifndef \_\_linux\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04542}04542                 \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04543}04543 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04544}04544                 pdata = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscb__platform__data}{scb\_platform\_data}} *)malloc(\textcolor{keyword}{sizeof}(*pdata),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04545}04545                                                            M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04546}04546                 \textcolor{keywordflow}{if} (pdata == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04547}04547                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04548}04548                 next\_scb-\/>\mbox{\hyperlink{structscb_a9b9ea060bf98cb8b61399592cc09c462}{platform\_data}} = pdata;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04549}04549                 next\_scb-\/>\mbox{\hyperlink{structscb_a3f4f470571c4fc7d9f24cb2c84ce9d58}{sg\_map}} = sg\_map;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04550}04550                 next\_scb-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}} = segs;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04551}04551                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04552}04552 \textcolor{comment}{                 * The sequencer always starts with the second entry.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04553}04553 \textcolor{comment}{                 * The first entry is embedded in the scb.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04554}04554 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04555}04555                 next\_scb-\/>\mbox{\hyperlink{structscb_abc25133eecf30874436ff01990c52467}{sg\_list\_phys}} = physaddr + \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04556}04556                 next\_scb-\/>\mbox{\hyperlink{structscb_a9e93a13508008214471003fd94ecd628}{ahc\_softc}} = ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04557}04557                 next\_scb-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} = \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116adf23b29d09a4cafc8c92a401d1591f76}{SCB\_FLAG\_NONE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04558}04558 \textcolor{preprocessor}{\#ifndef \_\_linux\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04559}04559                 error = \mbox{\hyperlink{aic__osm__lib_8h_a332e542fc8cc8e9fef4ac1e489b571fd}{aic\_dmamap\_create}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a061b8d3ef96d28d0c2c54e0efffba039}{buffer\_dmat}}, \textcolor{comment}{/*flags*/}0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04560}04560                                           \&next\_scb-\/>\mbox{\hyperlink{structscb_a0ea410abe6a09d6edb0b1c07ce853ad8}{dmamap}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04561}04561                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04562}04562                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04563}04563 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04564}04564                 next\_scb-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}} = \&\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a5534736125c7fdb93b5dd4690a89617d}{hscbs}}[\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04565}04565                 next\_scb-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04566}04566                 \mbox{\hyperlink{aic__osm__lib_8h_afc4502f644bc91ea0504af2aa1267618}{aic\_timer\_init}}(\&next\_scb-\/>\mbox{\hyperlink{structscb_a71723d12bca713257ec20160de446718}{io\_timer}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04567}04567                 SLIST\_INSERT\_HEAD(\&ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a2046f21c84fbc3500328b6e4168944ea}{free\_scbs}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04568}04568                                   next\_scb, links.sle);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04569}04569                 segs += \mbox{\hyperlink{aic7xxx__osm_8h_a7f68f60c3974a190f22006baf79b214e}{AHC\_NSEG}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04570}04570                 physaddr += (\mbox{\hyperlink{aic7xxx__osm_8h_a7f68f60c3974a190f22006baf79b214e}{AHC\_NSEG}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04571}04571                 next\_scb++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04572}04572                 ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04573}04573         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04574}04574         \textcolor{keywordflow}{return} (i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04575}04575 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04576}04576 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04577}04577 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04578}\mbox{\hyperlink{aic7xxx_8c_a3df01d6002882c3dd02147db6424a411}{04578}} \mbox{\hyperlink{aic7xxx_8c_a3df01d6002882c3dd02147db6424a411}{ahc\_controller\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{char} *buf)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04579}04579 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04580}04580         \textcolor{keywordtype}{int} \mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04581}04581 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04582}04582         \mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}} = sprintf(buf, \textcolor{stringliteral}{"{}\%s: "{}}, \mbox{\hyperlink{aic7xxx_8c_a1a46ae02c019b865c592943ecc390bec}{ahc\_chip\_names}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a8056f278977a4ddd3881da47c11fe3e8}{chip}} \& \mbox{\hyperlink{aic7xxx_8h_aa571dbd167b1b4764be22d1efbc6fd12a3bdba516898f9e100e98e4144690a6dd}{AHC\_CHIPID\_MASK}}]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04583}04583         buf += \mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04584}04584         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04585}04585                 \mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}} = sprintf(buf, \textcolor{stringliteral}{"{}Twin Channel, A SCSI Id=\%d, "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04586}04586                               \textcolor{stringliteral}{"{}B SCSI Id=\%d, primary \%c, "{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04587}04587                               ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04588}04588                               (ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aafb6b59296c046bcbfb161b229e8eb09}{AHC\_PRIMARY\_CHANNEL}}) + \textcolor{charliteral}{'A'});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04589}04589         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04590}04590                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *speed;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04591}04591                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *type;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04592}04592 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04593}04593                 speed = \textcolor{stringliteral}{"{}"{}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04594}04594                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa34aea214e5532909fcbc36fa43124389}{AHC\_ULTRA}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04595}04595                         speed = \textcolor{stringliteral}{"{}Ultra "{}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04596}04596                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04597}04597                         speed = \textcolor{stringliteral}{"{}Ultra160 "{}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04598}04598                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04599}04599                         speed = \textcolor{stringliteral}{"{}Ultra2 "{}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04600}04600                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04601}04601                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04602}04602                         type = \textcolor{stringliteral}{"{}Wide"{}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04603}04603                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04604}04604                         type = \textcolor{stringliteral}{"{}Single"{}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04605}04605                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04606}04606                 \mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}} = sprintf(buf, \textcolor{stringliteral}{"{}\%s\%s Channel \%c, SCSI Id=\%d, "{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04607}04607                               speed, type, ahc-\/>\mbox{\hyperlink{structahc__softc_ac0bf845349c1471c051e75630ed06c1e}{channel}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04608}04608         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04609}04609         buf += \mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04610}04610 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04611}04611         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a68e9e5c60abbbad6da178ade4326e6a6}{AHC\_PAGESCBS}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04612}04612                 sprintf(buf, \textcolor{stringliteral}{"{}\%d/\%d SCBs"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04613}04613                         ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}}, \mbox{\hyperlink{aic7xxx_8h_ae846ecdc5b7f9fff58b810bdb33884d4}{AHC\_MAX\_QUEUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04614}04614         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04615}04615                 sprintf(buf, \textcolor{stringliteral}{"{}\%d SCBs"{}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04616}04616 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04617}04617 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04618}04618 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04619}\mbox{\hyperlink{aic7xxx_8c_ae57814bc085ac9d4fa666e9e4aa2f381}{04619}} \mbox{\hyperlink{aic7xxx_8c_ae57814bc085ac9d4fa666e9e4aa2f381}{ahc\_chip\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04620}04620 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04621}04621         \textcolor{keywordtype}{int}      term;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04622}04622         \textcolor{keywordtype}{int}      error;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04623}04623         u\_int    i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04624}04624         u\_int    scsi\_conf;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04625}04625         u\_int    scsiseq\_template;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04626}04626         uint32\_t physaddr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04627}04627 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04628}04628         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04629}04629         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a508d7288d36d2b95d1b614868e6ce073}{SEQ\_FLAGS2}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04630}04630 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04631}04631         \textcolor{comment}{/* Set the SCSI Id, SXFRCTL0, SXFRCTL1, and SIMODE1, for both channels*/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04632}04632         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04633}04633                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04634}04634 \textcolor{comment}{                 * Setup Channel B first.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04635}04635 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04636}04636                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) | \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04637}04637                 term = (ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a0067dcf1dada2ac8f600b5aab79a2d47}{AHC\_TERM\_ENB\_B}}) != 0 ? \mbox{\hyperlink{aic79xx__reg_8h_aefad30b70dd64cfb0683c00ff5670214}{STPWEN}} : 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04638}04638                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ac41cdf130fdc7b5a17b8d4a75c0c4943}{SCSIID}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04639}04639                 scsi\_conf = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a06d5e5ae1239aef89165177db61af11f}{SCSICONF}} + 1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04640}04640                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}}, (scsi\_conf \& (\mbox{\hyperlink{aic79xx__reg_8h_a512de7e5d9435f4ce58b020f376a6cd8}{ENSPCHK}}|\mbox{\hyperlink{aic79xx__reg_8h_a59745a54df67cdcd2042821404e5a57d}{STIMESEL}}))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04641}04641                                         |term|ahc-\/>\mbox{\hyperlink{structahc__softc_a498c94d51bc1a6e005919fafc4887d5d}{seltime\_b}}|\mbox{\hyperlink{aic79xx__reg_8h_a3afe925be318718ea738e428957cb811}{ENSTIMER}}|\mbox{\hyperlink{aic79xx__reg_8h_ad7a455b904d41431e44a1e4ed6d3810b}{ACTNEGEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04642}04642                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04643}04643                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9344c699b91d4bbc64b87dea3d35fa2b}{SIMODE0}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9344c699b91d4bbc64b87dea3d35fa2b}{SIMODE0}})|\mbox{\hyperlink{aic79xx__reg_8h_aec2bad6058a263692c0bc8e4a28a9bbc}{ENIOERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04644}04644                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, \mbox{\hyperlink{aic79xx__reg_8h_aadf11b2806720af106562aac4cae63bb}{ENSELTIMO}}|\mbox{\hyperlink{aic79xx__reg_8h_ad20c387c6b3f1d81441a100ec0c68274}{ENSCSIRST}}|\mbox{\hyperlink{aic79xx__reg_8h_a4896a05562311497eab883d3e5c439dd}{ENSCSIPERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04645}04645                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}, \mbox{\hyperlink{aic79xx__reg_8h_a64331596a1853c38192941b723f8944f}{DFON}}|\mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04646}04646 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04647}04647                 \textcolor{comment}{/* Select Channel A */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04648}04648                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) \& \string~\mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04649}04649         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04650}04650         term = (ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81ac2464b60c21f1f4d2b940b86718055d8}{AHC\_TERM\_ENB\_A}}) != 0 ? \mbox{\hyperlink{aic79xx__reg_8h_aefad30b70dd64cfb0683c00ff5670214}{STPWEN}} : 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04651}04651         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04652}04652                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a6bf22789cbeef6b8441952a601491577}{SCSIID\_ULTRA2}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04653}04653         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04654}04654                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ac41cdf130fdc7b5a17b8d4a75c0c4943}{SCSIID}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04655}04655         scsi\_conf = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a06d5e5ae1239aef89165177db61af11f}{SCSICONF}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04656}04656         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a44955c560f4434e8129892862e95d6fa}{SXFRCTL1}}, (scsi\_conf \& (\mbox{\hyperlink{aic79xx__reg_8h_a512de7e5d9435f4ce58b020f376a6cd8}{ENSPCHK}}|\mbox{\hyperlink{aic79xx__reg_8h_a59745a54df67cdcd2042821404e5a57d}{STIMESEL}}))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04657}04657                                 |term|ahc-\/>\mbox{\hyperlink{structahc__softc_ae34ab222ae77365c8689dfe76a32f909}{seltime}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04658}04658                                 |\mbox{\hyperlink{aic79xx__reg_8h_a3afe925be318718ea738e428957cb811}{ENSTIMER}}|\mbox{\hyperlink{aic79xx__reg_8h_ad7a455b904d41431e44a1e4ed6d3810b}{ACTNEGEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04659}04659         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04660}04660                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9344c699b91d4bbc64b87dea3d35fa2b}{SIMODE0}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9344c699b91d4bbc64b87dea3d35fa2b}{SIMODE0}})|\mbox{\hyperlink{aic79xx__reg_8h_aec2bad6058a263692c0bc8e4a28a9bbc}{ENIOERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04661}04661         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, \mbox{\hyperlink{aic79xx__reg_8h_aadf11b2806720af106562aac4cae63bb}{ENSELTIMO}}|\mbox{\hyperlink{aic79xx__reg_8h_ad20c387c6b3f1d81441a100ec0c68274}{ENSCSIRST}}|\mbox{\hyperlink{aic79xx__reg_8h_a4896a05562311497eab883d3e5c439dd}{ENSCSIPERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04662}04662         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}, \mbox{\hyperlink{aic79xx__reg_8h_a64331596a1853c38192941b723f8944f}{DFON}}|\mbox{\hyperlink{aic79xx__reg_8h_a2193b98c914b566ce85ad21d92879e8c}{SPIOEN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04663}04663 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04664}04664         \textcolor{comment}{/* There are no untagged SCBs active yet. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04665}04665         \textcolor{keywordflow}{for} (i = 0; i < 16; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04666}04666                 \mbox{\hyperlink{aic7xxx_8c_adc1f6f985d4e2ba25915ce68d2c2f37b}{ahc\_unbusy\_tcl}}(ahc, \mbox{\hyperlink{aic79xx_8h_a7d650f0ba38347753d66928363306341}{BUILD\_TCL}}(i << 4, 0));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04667}04667                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aa9840bbf349029e67eedfebd36516d7e}{AHC\_SCB\_BTT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04668}04668                         \textcolor{keywordtype}{int} lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04669}04669 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04670}04670                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04671}04671 \textcolor{comment}{                         * The SCB based BTT allows an entry per}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04672}04672 \textcolor{comment}{                         * target and lun pair.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04673}04673 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04674}04674                         \textcolor{keywordflow}{for} (lun = 1; lun < \mbox{\hyperlink{aic7xxx_8h_a4b4241cdde48f619222c98ca9ad15adf}{AHC\_NUM\_LUNS}}; lun++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04675}04675                                 \mbox{\hyperlink{aic7xxx_8c_adc1f6f985d4e2ba25915ce68d2c2f37b}{ahc\_unbusy\_tcl}}(ahc, \mbox{\hyperlink{aic79xx_8h_a7d650f0ba38347753d66928363306341}{BUILD\_TCL}}(i << 4, lun));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04676}04676                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04677}04677         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04678}04678 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04679}04679         \textcolor{comment}{/* All of our queues are empty */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04680}04680         \textcolor{keywordflow}{for} (i = 0; i < 256; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04681}04681                 ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}}[i] = \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04682}04682         \mbox{\hyperlink{aic7xxx__inline_8h_a3a2d0df6e542da6c60fb9e682ca99558}{ahc\_sync\_qoutfifo}}(ahc, BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04683}04683 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04684}04684         \textcolor{keywordflow}{for} (i = 0; i < 256; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04685}04685                 ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[i] = \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04686}04686 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04687}04687         if ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaf0561c4f43660096e66cf1a293e375cb}{AHC\_MULTI\_TID}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04688}04688                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04689}04689                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}} + 1, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04690}04690         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04691}04691 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04692}04692         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04693}04693 \textcolor{comment}{         * Tell the sequencer where it can find our arrays in memory.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04694}04694 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04695}04695         physaddr = ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a346b26491edfda8af4faf77ae84c6d80}{hscb\_busaddr}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04696}04696         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a6b2fb916508ca5617fc563db35c1fecc}{HSCB\_ADDR}}, physaddr \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04697}04697         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a6b2fb916508ca5617fc563db35c1fecc}{HSCB\_ADDR}} + 1, (physaddr >> 8) \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04698}04698         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a6b2fb916508ca5617fc563db35c1fecc}{HSCB\_ADDR}} + 2, (physaddr >> 16) \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04699}04699         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a6b2fb916508ca5617fc563db35c1fecc}{HSCB\_ADDR}} + 3, (physaddr >> 24) \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04700}04700 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04701}04701         physaddr = ahc-\/>\mbox{\hyperlink{structahc__softc_aa56ad4ec70ee3977ea40c0a8c7f9e881}{shared\_data\_busaddr}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04702}04702         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab41223ef43ccfbcd382edb8b21e83e90}{SHARED\_DATA\_ADDR}}, physaddr \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04703}04703         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab41223ef43ccfbcd382edb8b21e83e90}{SHARED\_DATA\_ADDR}} + 1, (physaddr >> 8) \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04704}04704         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab41223ef43ccfbcd382edb8b21e83e90}{SHARED\_DATA\_ADDR}} + 2, (physaddr >> 16) \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04705}04705         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab41223ef43ccfbcd382edb8b21e83e90}{SHARED\_DATA\_ADDR}} + 3, (physaddr >> 24) \& 0xFF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04706}04706 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04707}04707         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04708}04708 \textcolor{comment}{         * Initialize the group code to command length table.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04709}04709 \textcolor{comment}{         * This overrides the values in TARG\_SCSIRATE, so only}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04710}04710 \textcolor{comment}{         * setup the table after we have processed that information.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04711}04711 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04712}04712         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6b9d4d26f27b33795ecd6b34ded36142}{CMDSIZE\_TABLE}}, 5);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04713}04713         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6b9d4d26f27b33795ecd6b34ded36142}{CMDSIZE\_TABLE}} + 1, 9);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04714}04714         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6b9d4d26f27b33795ecd6b34ded36142}{CMDSIZE\_TABLE}} + 2, 9);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04715}04715         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6b9d4d26f27b33795ecd6b34ded36142}{CMDSIZE\_TABLE}} + 3, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04716}04716         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6b9d4d26f27b33795ecd6b34ded36142}{CMDSIZE\_TABLE}} + 4, 15);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04717}04717         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6b9d4d26f27b33795ecd6b34ded36142}{CMDSIZE\_TABLE}} + 5, 11);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04718}04718         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6b9d4d26f27b33795ecd6b34ded36142}{CMDSIZE\_TABLE}} + 6, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04719}04719         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6b9d4d26f27b33795ecd6b34ded36142}{CMDSIZE\_TABLE}} + 7, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04720}04720                 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04721}04721         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5faf236baac9694dcd8ee4489866d90b}{AHC\_HS\_MAILBOX}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04722}04722                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad6f6bec44db2eb5549221449ce77f2da}{HS\_MAILBOX}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04723}04723 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04724}04724         \textcolor{comment}{/* Tell the sequencer of our initial queue positions */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04725}04725         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa1e3f9e56e71e725edb868c6b16c1b694}{AHC\_TARGETMODE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04726}04726                 ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}} = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04727}04727                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9e2eca02ef231461c102be35f55a0c15}{KERNEL\_TQINPOS}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04728}04728                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_acb94e78c58a2d45f8042f6d578d29df5}{TQINPOS}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04729}04729         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04730}04730         ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04731}04731         ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04732}04732         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aab10e44df2c3b9c4d92492462e1a0a4cc}{AHC\_QUEUE\_REGS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04733}04733                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a899ca3dd54ad8782939252550d1a5ebc}{QOFF\_CTLSTA}}, \mbox{\hyperlink{aic79xx__reg_8h_ac4346c69ddb01fb5ed57b80015c556c9}{SCB\_QSIZE\_256}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04734}04734                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa5a45b1f8f0b76279d0c4716bcfcd025}{HNSCB\_QOFF}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04735}04735                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04c173f92eda4a463e7a6e9ea9290ffa}{SNSCB\_QOFF}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04736}04736                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a73975672bfe97044238ad7ef2843e8b4}{SDSCB\_QOFF}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04737}04737         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04738}04738                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aae8cdbda36d18541d60b5abb0497b7d3}{KERNEL\_QINPOS}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04739}04739                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a69723af9c7c5732e6533777377f76e8d}{QINPOS}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04740}04740                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a885bff074b1c12c36d185e0f0083ff70}{QOUTPOS}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04741}04741         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04742}04742 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04743}04743         \textcolor{comment}{/* We don't have any waiting selections */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04744}04744         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aed8758122c520c918c257c19e01d0a91}{WAITING\_SCBH}}, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04745}04745 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04746}04746         \textcolor{comment}{/* Our disconnection list is empty too */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04747}04747         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a8846b03d9aad8bcb7611fc23788a7c63}{DISCONNECTED\_SCBH}}, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04748}04748 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04749}04749         \textcolor{comment}{/* Message out buffer starts empty */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04750}04750         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}, MSG\_NOOP);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04751}04751 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04752}04752         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04753}04753 \textcolor{comment}{         * Setup the allowed SCSI Sequences based on operational mode.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04754}04754 \textcolor{comment}{         * If we are a target, we'll enalbe select in operations once}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04755}04755 \textcolor{comment}{         * we've had a lun enabled.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04756}04756 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04757}04757         scsiseq\_template = \mbox{\hyperlink{aic79xx__reg_8h_acec8418886ca76cef8259ad48e991238}{ENSELO}}|\mbox{\hyperlink{aic79xx__reg_8h_ad799ac91bcd79bb5ec1c34d794978614}{ENAUTOATNO}}|\mbox{\hyperlink{aic79xx__reg_8h_a73f4f4cb70a503ed678c662d81f59ac4}{ENAUTOATNP}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04758}04758         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a90a9bb8741ed9283bb95dd061dfa8806}{AHC\_INITIATORROLE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04759}04759                 scsiseq\_template |= \mbox{\hyperlink{aic79xx__reg_8h_a79ddc1008bee9be3dabf244839710e29}{ENRSELI}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04760}04760         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8da1b58b6c1f22bff54431431b06a8e6}{SCSISEQ\_TEMPLATE}}, scsiseq\_template);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04761}04761 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04762}04762         \textcolor{comment}{/* Initialize our list of free SCBs. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04763}04763         \mbox{\hyperlink{aic7xxx_8c_a1ff1ab015ccf9f4195ceafd71139326e}{ahc\_build\_free\_scb\_list}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04764}04764 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04765}04765         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04766}04766 \textcolor{comment}{         * Tell the sequencer which SCB will be the next one it receives.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04767}04767 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04768}04768         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a2e1f9e5cf3381010992c94be67860789}{NEXT\_QUEUED\_SCB}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a5c0812d57ae0fcf9a51318f66e4922b9}{next\_queued\_scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04769}04769 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04770}04770         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04771}04771 \textcolor{comment}{         * Load the Sequencer program and Enable the adapter}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04772}04772 \textcolor{comment}{         * in "{}fast"{} mode.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04773}04773 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04774}04774         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04775}04775                 printf(\textcolor{stringliteral}{"{}\%s: Downloading Sequencer Program..."{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04776}04776                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04777}04777 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04778}04778         error = \mbox{\hyperlink{aic7xxx_8c_afad04e6d810b9d879954b50645e2f103}{ahc\_loadseq}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04779}04779         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04780}04780                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04781}04781 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04782}04782         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04783}04783                 \textcolor{keywordtype}{int} wait;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04784}04784 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04785}04785                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04786}04786 \textcolor{comment}{                 * Wait for up to 500ms for our transceivers}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04787}04787 \textcolor{comment}{                 * to settle.  If the adapter does not have}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04788}04788 \textcolor{comment}{                 * a cable attached, the transceivers may}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04789}04789 \textcolor{comment}{                 * never settle, so don't complain if we}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04790}04790 \textcolor{comment}{                 * fail here.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04791}04791 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04792}04792                 \textcolor{keywordflow}{for} (wait = 5000;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04793}04793                      (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}) \& (\mbox{\hyperlink{aic79xx__reg_8h_a13f2a38e33c766ee5a8ff2d5b5e6dd55}{ENAB40}}|\mbox{\hyperlink{aic79xx__reg_8h_a923dfa08d58af3f8621b3084f0d3db21}{ENAB20}})) == 0 \&\& wait;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04794}04794                      wait-\/-\/)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04795}04795                         \mbox{\hyperlink{aic__osm__lib_8h_a23559a914641f4b70a959f25b8281c87}{aic\_delay}}(100);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04796}04796         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04797}04797         \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04798}04798         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04799}04799 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04800}04800 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04801}04801 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04802}04802 \textcolor{comment}{ * Start the board, ready for normal operation}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04803}04803 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04804}04804 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04805}\mbox{\hyperlink{aic7xxx_8c_a6ddc8391a848026e801625a7bdc9fe62}{04805}} \mbox{\hyperlink{aic7xxx_8c_a6ddc8391a848026e801625a7bdc9fe62}{ahc\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04806}04806 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04807}04807         \textcolor{keywordtype}{int}      max\_targ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04808}04808         \textcolor{keywordtype}{int}      error;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04809}04809         u\_int    i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04810}04810         u\_int    scsi\_conf;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04811}04811         u\_int    ultraenb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04812}04812         u\_int    discenable;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04813}04813         u\_int    tagenable;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04814}04814         \textcolor{keywordtype}{size\_t}   driver\_data\_size;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04815}04815 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04816}04816 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04817}04817         \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_DEBUG\_SEQUENCER) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04818}04818                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a7db4429e23c5a39ff215b9f7ebf8c5d5}{AHC\_SEQUENCER\_DEBUG}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04819}04819 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04820}04820 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04821}04821 \textcolor{preprocessor}{\#ifdef AHC\_PRINT\_SRAM}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04822}04822         printf(\textcolor{stringliteral}{"{}Scratch Ram:"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04823}04823         \textcolor{keywordflow}{for} (i = 0x20; i < 0x5f; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04824}04824                 \textcolor{keywordflow}{if} (((i \% 8) == 0) \&\& (i != 0)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04825}04825                         printf (\textcolor{stringliteral}{"{}\(\backslash\)n              "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04826}04826                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04827}04827                 printf (\textcolor{stringliteral}{"{} 0x\%x"{}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, i));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04828}04828         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04829}04829         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa2e3437a21b77388499c80f00c3cfbe41}{AHC\_MORE\_SRAM}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04830}04830                 \textcolor{keywordflow}{for} (i = 0x70; i < 0x7f; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04831}04831                         \textcolor{keywordflow}{if} (((i \% 8) == 0) \&\& (i != 0)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04832}04832                                 printf (\textcolor{stringliteral}{"{}\(\backslash\)n              "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04833}04833                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04834}04834                         printf (\textcolor{stringliteral}{"{} 0x\%x"{}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, i));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04835}04835                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04836}04836         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04837}04837         printf (\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04838}04838         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04839}04839 \textcolor{comment}{         * Reading uninitialized scratch ram may}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04840}04840 \textcolor{comment}{         * generate parity errors.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04841}04841 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04842}04842         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic7xxx__reg_8h_ae0fa19884b05ba599d5654b941827fb5}{CLRPARERR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04843}04843         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5050289ead34bd48961cb1db4c1cef7a}{CLRINT}}, \mbox{\hyperlink{aic79xx__reg_8h_a04ba0906b097cf0539a7d648dcd8dc7b}{CLRBRKADRINT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04844}04844 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04845}04845         max\_targ = 15;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04846}04846 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04847}04847         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04848}04848 \textcolor{comment}{         * Assume we have a board at this stage and it has been reset.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04849}04849 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04850}04850         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81ab199afdef25886636d2898e32d46b7e1}{AHC\_USEDEFAULTS}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04851}04851                 ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}} = 7;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04852}04852 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04853}04853         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04854}04854 \textcolor{comment}{         * Default to allowing initiator operations.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04855}04855 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04856}04856         ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a90a9bb8741ed9283bb95dd061dfa8806}{AHC\_INITIATORROLE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04857}04857 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04858}04858         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04859}04859 \textcolor{comment}{         * Only allow target mode features if this unit has them enabled.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04860}04860 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04861}04861         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx_8h_a4676111fb9ecc929665c4291aeec3649}{AHC\_TMODE\_ENABLE}} \& (0x1 << ahc-\/>\mbox{\hyperlink{structahc__softc_ae1dc8e4bab1b56f5203ef1c09e24e6c2}{unit}})) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04862}04862                 ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \&= \string~AHC\_TARGETMODE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04863}04863 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04864}04864 \textcolor{preprocessor}{\#ifndef \_\_linux\_\_}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04865}04865         \textcolor{comment}{/* DMA tag for mapping buffers into device visible space. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04866}04866         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a2c25902bc7997440be9afda6b4b947b7}{aic\_dma\_tag\_create}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a58a2e1f94c8641616286b06f9d0053ce}{parent\_dmat}}, \textcolor{comment}{/*alignment*/}1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04867}04867                                \textcolor{comment}{/*boundary*/}BUS\_SPACE\_MAXADDR\_32BIT + 1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04868}04868                                \textcolor{comment}{/*lowaddr*/}ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aceb69a3ab3fe20bfae4ff595ff7aaa69}{AHC\_39BIT\_ADDRESSING}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04869}04869                                         ? (bus\_addr\_t)0x7FFFFFFFFFULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04870}04870                                         : BUS\_SPACE\_MAXADDR\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04871}04871                                \textcolor{comment}{/*highaddr*/}BUS\_SPACE\_MAXADDR,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04872}04872                                \textcolor{comment}{/*filter*/}NULL, \textcolor{comment}{/*filterarg*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04873}04873                                \textcolor{comment}{/*maxsize*/}(\mbox{\hyperlink{aic7xxx__osm_8h_a7f68f60c3974a190f22006baf79b214e}{AHC\_NSEG}} -\/ 1) * PAGE\_SIZE,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04874}04874                                \textcolor{comment}{/*nsegments*/}\mbox{\hyperlink{aic7xxx__osm_8h_a7f68f60c3974a190f22006baf79b214e}{AHC\_NSEG}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04875}04875                                \textcolor{comment}{/*maxsegsz*/}\mbox{\hyperlink{aic7xxx_8h_a225bb9a2b7a88e88bdedb402cd8cf231}{AHC\_MAXTRANSFER\_SIZE}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04876}04876                                \textcolor{comment}{/*flags*/}BUS\_DMA\_ALLOCNOW,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04877}04877                                \&ahc-\/>\mbox{\hyperlink{structahc__softc_a061b8d3ef96d28d0c2c54e0efffba039}{buffer\_dmat}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04878}04878                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04879}04879         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04880}04880 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04881}04881 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04882}04882         ahc-\/>\mbox{\hyperlink{structahc__softc_ae357b5be55cacbb13119c290c4744a99}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04883}04883 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04884}04884         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04885}04885 \textcolor{comment}{         * DMA tag for our command fifos and other data in system memory}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04886}04886 \textcolor{comment}{         * the card's sequencer must be able to access.  For initiator}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04887}04887 \textcolor{comment}{         * roles, we need to allocate space for the qinfifo and qoutfifo.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04888}04888 \textcolor{comment}{         * The qinfifo and qoutfifo are composed of 256 1 byte elements. }}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04889}04889 \textcolor{comment}{         * When providing for the target mode role, we must additionally}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04890}04890 \textcolor{comment}{         * provide space for the incoming target command fifo and an extra}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04891}04891 \textcolor{comment}{         * byte to deal with a dma bug in some chip versions.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04892}04892 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04893}04893         driver\_data\_size = 2 * 256 * \textcolor{keyword}{sizeof}(uint8\_t);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04894}04894         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa1e3f9e56e71e725edb868c6b16c1b694}{AHC\_TARGETMODE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04895}04895                 driver\_data\_size += \mbox{\hyperlink{aic7xxx_8h_ab8498fae76ac8fae320a3ea84bbfcb61}{AHC\_TMODE\_CMDS}} * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structtarget__cmd}{target\_cmd}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04896}04896                                  + \textcolor{comment}{/*DMA WideOdd Bug Buffer*/}1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04897}04897         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a2c25902bc7997440be9afda6b4b947b7}{aic\_dma\_tag\_create}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a58a2e1f94c8641616286b06f9d0053ce}{parent\_dmat}}, \textcolor{comment}{/*alignment*/}1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04898}04898                                \textcolor{comment}{/*boundary*/}BUS\_SPACE\_MAXADDR\_32BIT + 1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04899}04899                                \textcolor{comment}{/*lowaddr*/}BUS\_SPACE\_MAXADDR\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04900}04900                                \textcolor{comment}{/*highaddr*/}BUS\_SPACE\_MAXADDR,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04901}04901                                \textcolor{comment}{/*filter*/}NULL, \textcolor{comment}{/*filterarg*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04902}04902                                driver\_data\_size,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04903}04903                                \textcolor{comment}{/*nsegments*/}1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04904}04904                                \textcolor{comment}{/*maxsegsz*/}BUS\_SPACE\_MAXSIZE\_32BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04905}04905                                \textcolor{comment}{/*flags*/}0, \&ahc-\/>\mbox{\hyperlink{structahc__softc_a6dc0a81da5759d51c9f663b35aed8f98}{shared\_data\_dmat}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04906}04906                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04907}04907         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04908}04908 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04909}04909         ahc-\/>\mbox{\hyperlink{structahc__softc_ae357b5be55cacbb13119c290c4744a99}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04910}04910 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04911}04911         \textcolor{comment}{/* Allocation of driver data */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04912}04912         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a94b1133ab2d9f1b4fee80aeb927bdec8}{aic\_dmamem\_alloc}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a6dc0a81da5759d51c9f663b35aed8f98}{shared\_data\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04913}04913                              (\textcolor{keywordtype}{void} **)\&ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04914}04914                              BUS\_DMA\_NOWAIT | BUS\_DMA\_COHERENT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04915}04915                              \&ahc-\/>\mbox{\hyperlink{structahc__softc_aaa85e4b192dffdaa3a3a335ba8dbbdfe}{shared\_data\_dmamap}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04916}04916                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04917}04917         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04918}04918 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04919}04919         ahc-\/>\mbox{\hyperlink{structahc__softc_ae357b5be55cacbb13119c290c4744a99}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04920}04920 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04921}04921         \textcolor{comment}{/* And permanently map it in */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04922}04922         \mbox{\hyperlink{aic__osm__lib_8h_afcee4d773d1da5d6bf515d82bcd3a33a}{aic\_dmamap\_load}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a6dc0a81da5759d51c9f663b35aed8f98}{shared\_data\_dmat}}, ahc-\/>\mbox{\hyperlink{structahc__softc_aaa85e4b192dffdaa3a3a335ba8dbbdfe}{shared\_data\_dmamap}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04923}04923                         ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}}, driver\_data\_size, \mbox{\hyperlink{aic7xxx_8c_ad38522c285453b97b32e08be78e65c02}{ahc\_dmamap\_cb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04924}04924                         \&ahc-\/>\mbox{\hyperlink{structahc__softc_aa56ad4ec70ee3977ea40c0a8c7f9e881}{shared\_data\_busaddr}}, \textcolor{comment}{/*flags*/}0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04925}04925 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04926}04926         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa1e3f9e56e71e725edb868c6b16c1b694}{AHC\_TARGETMODE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04927}04927                 ahc-\/>\mbox{\hyperlink{structahc__softc_a5ac6b3e2f472173f329753da137484a5}{targetcmds}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structtarget__cmd}{target\_cmd}} *)ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04928}04928                 ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}} = (uint8\_t *)\&ahc-\/>\mbox{\hyperlink{structahc__softc_a5ac6b3e2f472173f329753da137484a5}{targetcmds}}[\mbox{\hyperlink{aic7xxx_8h_ab8498fae76ac8fae320a3ea84bbfcb61}{AHC\_TMODE\_CMDS}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04929}04929                 ahc-\/>\mbox{\hyperlink{structahc__softc_a74036ebf3c8978d3125991a032725711}{dma\_bug\_buf}} = ahc-\/>\mbox{\hyperlink{structahc__softc_aa56ad4ec70ee3977ea40c0a8c7f9e881}{shared\_data\_busaddr}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04930}04930                                  + driver\_data\_size -\/ 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04931}04931                 \textcolor{comment}{/* All target command blocks start out invalid. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04932}04932                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx_8h_ab8498fae76ac8fae320a3ea84bbfcb61}{AHC\_TMODE\_CMDS}}; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04933}04933                         ahc-\/>\mbox{\hyperlink{structahc__softc_a5ac6b3e2f472173f329753da137484a5}{targetcmds}}[i].\mbox{\hyperlink{structtarget__cmd_a8c515caeebf32b5cf32669f3bc5cf2bd}{cmd\_valid}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04934}04934                 \mbox{\hyperlink{aic7xxx__inline_8h_ad51a64c4048f4452f6c736df1ea1a1e1}{ahc\_sync\_tqinfifo}}(ahc, BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04935}04935                 ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}} = (uint8\_t *)\&ahc-\/>\mbox{\hyperlink{structahc__softc_a5ac6b3e2f472173f329753da137484a5}{targetcmds}}[256];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04936}04936         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04937}04937         ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}} = \&ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}}[256];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04938}04938 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04939}04939         ahc-\/>\mbox{\hyperlink{structahc__softc_ae357b5be55cacbb13119c290c4744a99}{init\_level}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04940}04940 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04941}04941         \textcolor{comment}{/* Allocate SCB data now that buffer\_dmat is initialized */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04942}04942         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}} == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04943}04943                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a06f89ace331dd4710329a542edbcec01}{ahc\_init\_scbdata}}(ahc) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04944}04944                         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04945}04945 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04946}04946         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04947}04947 \textcolor{comment}{         * Allocate a tstate to house information for our}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04948}04948 \textcolor{comment}{         * initiator presence on the bus as well as the user}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04949}04949 \textcolor{comment}{         * data for any target mode initiator.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04950}04950 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04951}04951         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a6b94ed6a6d432af1c6e73de284d2437c}{ahc\_alloc\_tstate}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}}, \textcolor{charliteral}{'A'}) == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04952}04952                 printf(\textcolor{stringliteral}{"{}\%s: unable to allocate ahc\_tmode\_tstate.  "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04953}04953                        \textcolor{stringliteral}{"{}Failing attach\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04954}04954                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04955}04955         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04956}04956 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04957}04957         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04958}04958                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a6b94ed6a6d432af1c6e73de284d2437c}{ahc\_alloc\_tstate}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}}, \textcolor{charliteral}{'B'}) == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04959}04959                         printf(\textcolor{stringliteral}{"{}\%s: unable to allocate ahc\_tmode\_tstate.  "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04960}04960                                \textcolor{stringliteral}{"{}Failing attach\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04961}04961                         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04962}04962                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04963}04963         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04964}04964 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04965}04965         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04966}04966 \textcolor{comment}{         * Fire up a recovery thread for this controller.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04967}04967 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04968}04968         error = ahc\_spawn\_recovery\_thread(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04969}04969         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04970}04970                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04971}04971 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04972}04972         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}} < \mbox{\hyperlink{aic7xxx_8h_ac0b529b83f397be423b7749937176332}{AHC\_SCB\_MAX\_ALLOC}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04973}04973                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a68e9e5c60abbbad6da178ade4326e6a6}{AHC\_PAGESCBS}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04974}04974         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04975}04975                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \&= \string~AHC\_PAGESCBS;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04976}04976         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04977}04977 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04978}04978 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04979}04979         \textcolor{keywordflow}{if} (ahc\_debug \& AHC\_SHOW\_MISC) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04980}04980                 printf(\textcolor{stringliteral}{"{}\%s: hardware scb \%u bytes; kernel scb \%u bytes; "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04981}04981                        \textcolor{stringliteral}{"{}ahc\_dma \%u bytes\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04982}04982                         \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04983}04983                         (u\_int)\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structhardware__scb}{hardware\_scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04984}04984                         (u\_int)\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04985}04985                         (u\_int)\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04986}04986         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04987}04987 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* AHC\_DEBUG */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04988}04988 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04989}04989         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04990}04990 \textcolor{comment}{         * Look at the information that board initialization or}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04991}04991 \textcolor{comment}{         * the board bios has left us.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04992}04992 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04993}04993         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04994}04994                 scsi\_conf = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a06d5e5ae1239aef89165177db61af11f}{SCSICONF}} + 1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04995}04995                 \textcolor{keywordflow}{if} ((scsi\_conf \& \mbox{\hyperlink{aic7xxx__reg_8h_aecb5efb7fada53747724f12179cacda6}{RESET\_SCSI}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04996}04996                  \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a90a9bb8741ed9283bb95dd061dfa8806}{AHC\_INITIATORROLE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04997}04997                         ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a12efddf0dac48e951d42eb3604a78628}{AHC\_RESET\_BUS\_B}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04998}04998         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l04999}04999 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05000}05000         scsi\_conf = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a06d5e5ae1239aef89165177db61af11f}{SCSICONF}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05001}05001         \textcolor{keywordflow}{if} ((scsi\_conf \& \mbox{\hyperlink{aic7xxx__reg_8h_aecb5efb7fada53747724f12179cacda6}{RESET\_SCSI}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05002}05002          \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a90a9bb8741ed9283bb95dd061dfa8806}{AHC\_INITIATORROLE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05003}05003                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81ac8d80326acae63d94127a6d18a8ff0b6}{AHC\_RESET\_BUS\_A}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05004}05004 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05005}05005         ultraenb = 0;   }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05006}05006         tagenable = \mbox{\hyperlink{aic79xx_8h_a8ec81f1358ea32cd212ca2f331374ae8}{ALL\_TARGETS\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05007}05007 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05008}05008         \textcolor{comment}{/* Grab the disconnection disable table and invert it for our needs */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05009}05009         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81ab199afdef25886636d2898e32d46b7e1}{AHC\_USEDEFAULTS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05010}05010                 printf(\textcolor{stringliteral}{"{}\%s: Host Adapter Bios disabled.  Using default SCSI "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05011}05011                         \textcolor{stringliteral}{"{}device parameters\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05012}05012                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a58ac928fbe7ac97ebff7c7a7eece4776}{AHC\_EXTENDED\_TRANS\_A}}|\mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a0de072913e2bf96322fbee701b8638ef}{AHC\_EXTENDED\_TRANS\_B}}|}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05013}05013                               \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81ac2464b60c21f1f4d2b940b86718055d8}{AHC\_TERM\_ENB\_A}}|\mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a0067dcf1dada2ac8f600b5aab79a2d47}{AHC\_TERM\_ENB\_B}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05014}05014                 discenable = \mbox{\hyperlink{aic79xx_8h_a8ec81f1358ea32cd212ca2f331374ae8}{ALL\_TARGETS\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05015}05015                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa34aea214e5532909fcbc36fa43124389}{AHC\_ULTRA}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05016}05016                         ultraenb = \mbox{\hyperlink{aic79xx_8h_a8ec81f1358ea32cd212ca2f331374ae8}{ALL\_TARGETS\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05017}05017         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05018}05018                 discenable = \string~((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a9639a6b5a7cbed32de86463de9f6d683}{DISC\_DSB}} + 1) << 8)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05019}05019                            | \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a9639a6b5a7cbed32de86463de9f6d683}{DISC\_DSB}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05020}05020                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& (\mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa34aea214e5532909fcbc36fa43124389}{AHC\_ULTRA}}|\mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}})) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05021}05021                         ultraenb = (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aca9d494ec7992ec8b1c4ebd5d354e672}{ULTRA\_ENB}} + 1) << 8)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05022}05022                                       | \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aca9d494ec7992ec8b1c4ebd5d354e672}{ULTRA\_ENB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05023}05023         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05024}05024 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05025}05025         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& (\mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}|\mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}})) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05026}05026                 max\_targ = 7;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05027}05027 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05028}05028         \textcolor{keywordflow}{for} (i = 0; i <= max\_targ; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05029}05029                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__initiator__tinfo}{ahc\_initiator\_tinfo}} *tinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05030}05030                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05031}05031                 u\_int our\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05032}05032                 u\_int target\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05033}05033                 \textcolor{keywordtype}{char} channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05034}05034 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05035}05035                 channel = \textcolor{charliteral}{'A'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05036}05036                 our\_id = ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05037}05037                 target\_id = i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05038}05038                 \textcolor{keywordflow}{if} (i > 7 \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05039}05039                         channel = \textcolor{charliteral}{'B'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05040}05040                         our\_id = ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05041}05041                         target\_id = i \% 8;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05042}05042                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05043}05043                 tinfo = \mbox{\hyperlink{aic7xxx__inline_8h_a97087e86e6b80e464ce8da8b8d246f26}{ahc\_fetch\_transinfo}}(ahc, channel, our\_id,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05044}05044                                             target\_id, \&tstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05045}05045                 \textcolor{comment}{/* Default to async narrow across the board */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05046}05046                 memset(tinfo, 0, \textcolor{keyword}{sizeof}(*tinfo));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05047}05047                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81ab199afdef25886636d2898e32d46b7e1}{AHC\_USEDEFAULTS}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05048}05048                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05049}05049                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} = MSG\_EXT\_WDTR\_BUS\_16\_BIT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05050}05050 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05051}05051                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05052}05052 \textcolor{comment}{                         * These will be truncated when we determine the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05053}05053 \textcolor{comment}{                         * connection type we have with the target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05054}05054 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05055}05055                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = \mbox{\hyperlink{aic7xxx_8c_a67c4e74dd2aa22393c529eba6d5f3ddf}{ahc\_syncrates}}-\/>\mbox{\hyperlink{structahc__syncrate_a701ab4a656e5673a7f89b0b3fef278bd}{period}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05056}05056                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} = \mbox{\hyperlink{aic79xx__reg_8h_a31a6872795fec3b57775c7e0059fee83}{MAX\_OFFSET}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05057}05057                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05058}05058                         u\_int scsirate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05059}05059                         uint16\_t mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05060}05060 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05061}05061                         \textcolor{comment}{/* Take the settings leftover in scratch RAM. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05062}05062                         scsirate = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a10b250cf79a9e35a914e00ea1869b198}{TARG\_SCSIRATE}} + i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05063}05063                         mask = (0x01 << i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05064}05064                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05065}05065                                 u\_int offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05066}05066                                 u\_int maxsync;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05067}05067 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05068}05068                                 \textcolor{keywordflow}{if} ((scsirate \& \mbox{\hyperlink{aic7xxx__reg_8h_afa673b3ff239dc142d26b52cf6629fc7}{SOFS}}) == 0x0F) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05069}05069                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05070}05070 \textcolor{comment}{                                         * Haven't negotiated yet,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05071}05071 \textcolor{comment}{                                         * so the format is different.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05072}05072 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05073}05073                                         scsirate = (scsirate \& \mbox{\hyperlink{aic7xxx__reg_8h_aef00b93d94c946e14c2016bdea9941e0}{SXFR}}) >> 4}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05074}05074                                                  | (\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} \& mask)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05075}05075                                                   ? 0x08 : 0x0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05076}05076                                                  | (scsirate \& \mbox{\hyperlink{aic79xx__reg_8h_a096d38ef8e25aa844778401eb1f69f01}{WIDEXFER}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05077}05077                                         offset = \mbox{\hyperlink{aic7xxx__reg_8h_a3d25429bb5d9ad8310d34b315aa72ebd}{MAX\_OFFSET\_ULTRA2}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05078}05078                                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05079}05079                                         offset = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ad810b358dcd981eb4b526477753e831d}{TARG\_OFFSET}} + i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05080}05080                                 \textcolor{keywordflow}{if} ((scsirate \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a096d38ef8e25aa844778401eb1f69f01}{WIDEXFER}}) == 0 \&\& offset != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05081}05081                                         \textcolor{comment}{/* Set to the lowest sync rate, 5MHz */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05082}05082                                         scsirate |= 0x1c;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05083}05083                                 maxsync = \mbox{\hyperlink{aic7xxx_8h_ae5ad67985275c4b501cb7ee4d05531c3}{AHC\_SYNCRATE\_ULTRA2}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05084}05084                                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05085}05085                                         maxsync = \mbox{\hyperlink{aic7xxx_8h_ace9d9d53ac243488b59724edcc1e92e0}{AHC\_SYNCRATE\_DT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05086}05086                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05087}05087                                     \mbox{\hyperlink{aic7xxx_8c_a8d8240160a5a2f67489bc6610e92376f}{ahc\_find\_period}}(ahc, scsirate, maxsync);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05088}05088                                 \textcolor{keywordflow}{if} (offset == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05089}05089                                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05090}05090                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05091}05091                                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} = \mbox{\hyperlink{aic79xx__reg_8h_a31a6872795fec3b57775c7e0059fee83}{MAX\_OFFSET}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05092}05092                                 \textcolor{keywordflow}{if} ((scsirate \& \mbox{\hyperlink{aic7xxx__reg_8h_aa3f3b227e1322c5f172b78402d34fdfc}{SXFR\_ULTRA2}}) <= 8\textcolor{comment}{/*10MHz*/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05093}05093                                  \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05094}05094                                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_ac21f6dff5896302c53e99e84e5f36e48}{ppr\_options}} =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05095}05095                                             MSG\_EXT\_PPR\_DT\_REQ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05096}05096                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((scsirate \& \mbox{\hyperlink{aic7xxx__reg_8h_afa673b3ff239dc142d26b52cf6629fc7}{SOFS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05097}05097                                 \textcolor{keywordflow}{if} ((scsirate \& \mbox{\hyperlink{aic7xxx__reg_8h_aef00b93d94c946e14c2016bdea9941e0}{SXFR}}) == 0x40}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05098}05098                                  \&\& (\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} \& mask) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05099}05099                                         \textcolor{comment}{/* Treat 10MHz as a non-\/ultra speed */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05100}05100                                         scsirate \&= \string~SXFR;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05101}05101                                         \mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} \&= \string~mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05102}05102                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05103}05103                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} = }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05104}05104                                     \mbox{\hyperlink{aic7xxx_8c_a8d8240160a5a2f67489bc6610e92376f}{ahc\_find\_period}}(ahc, scsirate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05105}05105                                                     (\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} \& mask)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05106}05106                                                    ? \mbox{\hyperlink{aic7xxx_8h_a37c2dc152e71c7edc2063628a5f65538}{AHC\_SYNCRATE\_ULTRA}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05107}05107                                                    : \mbox{\hyperlink{aic7xxx_8h_a90acdb1379d78d10a06ab5b06498cfc3}{AHC\_SYNCRATE\_FAST}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05108}05108                                 \textcolor{keywordflow}{if} (tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05109}05109                                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} = \mbox{\hyperlink{aic79xx__reg_8h_a31a6872795fec3b57775c7e0059fee83}{MAX\_OFFSET}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05110}05110                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05111}05111                         \textcolor{keywordflow}{if} (tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a8c907e9f2cc610f16215ace05588f27e}{period}} == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05112}05112                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a168d9f2b281ed32f06b06c1c25d78476}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05113}05113                         \textcolor{keywordflow}{if} ((scsirate \& \mbox{\hyperlink{aic79xx__reg_8h_a096d38ef8e25aa844778401eb1f69f01}{WIDEXFER}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05114}05114                          \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05115}05115                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a7206ea68cec28f54d4a7c4a7bb66b8ae}{width}} = MSG\_EXT\_WDTR\_BUS\_16\_BIT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05116}05116                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_a2fc7287057c602891a37345021293853}{protocol\_version}} = 4;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05117}05117                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05118}05118                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_ae4a9048adaa61966bf0445d887489193}{transport\_version}} = 3;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05119}05119                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05120}05120                                 tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a9a5eddaa506a37a5e0c54c337bfbea3e}{user}}.\mbox{\hyperlink{structahc__transinfo_ae4a9048adaa61966bf0445d887489193}{transport\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05121}05121                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_a2fc7287057c602891a37345021293853}{protocol\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05122}05122                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_ab4a5c255e8f4b77b540bf79427b49e55}{goal}}.\mbox{\hyperlink{structahc__transinfo_ae4a9048adaa61966bf0445d887489193}{transport\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05123}05123                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_a2fc7287057c602891a37345021293853}{protocol\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05124}05124                         tinfo-\/>\mbox{\hyperlink{structahc__initiator__tinfo_a8c8fdf770094171c4e294fea5fc97bec}{curr}}.\mbox{\hyperlink{structahc__transinfo_ae4a9048adaa61966bf0445d887489193}{transport\_version}} = 2;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05125}05125                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05126}05126                 tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_a93cc910e571b916a5839ca84125cc675}{ultraenb}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05127}05127         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05128}05128         ahc-\/>\mbox{\hyperlink{structahc__softc_a23d2ca9f49947560a39e8fbc6234478b}{user\_discenable}} = \mbox{\hyperlink{structahc__tmode__tstate_aea4b8cd574725a9c07509ba521249be4}{discenable}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05129}05129         ahc-\/>\mbox{\hyperlink{structahc__softc_a00f7b88df51ddf7989532a4b7ca4b5df}{user\_tagenable}} = \mbox{\hyperlink{structahc__tmode__tstate_a6781bb79de70e00ba95b625dcf8857d0}{tagenable}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05130}05130 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05131}05131         \textcolor{keywordflow}{return} (ahc-\/>\mbox{\hyperlink{structahc__softc_a7c20067e0767e8cb8a3ff87d8ce38630}{bus\_chip\_init}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05132}05132 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05133}05133 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05134}05134 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05135}\mbox{\hyperlink{aic7xxx_8c_a91865ee29c6c85da881e8a175d092d31}{05135}} \mbox{\hyperlink{aic7xxx_8c_a91865ee29c6c85da881e8a175d092d31}{ahc\_intr\_enable}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{int} enable)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05136}05136 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05137}05137         u\_int hcntrl;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05138}05138 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05139}05139         hcntrl = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c67c3aa8365be698224acf38de9a509}{HCNTRL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05140}05140         hcntrl \&= \string~INTEN;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05141}05141         ahc-\/>\mbox{\hyperlink{structahc__softc_af98bf693a06a402e836cb5dec7abbd68}{pause}} \&= \string~INTEN;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05142}05142         ahc-\/>\mbox{\hyperlink{structahc__softc_a19e5110bebc18dc39c5b94cc69279414}{unpause}} \&= \string~INTEN;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05143}05143         \textcolor{keywordflow}{if} (enable) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05144}05144                 hcntrl |= \mbox{\hyperlink{aic79xx__reg_8h_a32afd10a8a06a6183fe757ec7a7a32d9}{INTEN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05145}05145                 ahc-\/>\mbox{\hyperlink{structahc__softc_af98bf693a06a402e836cb5dec7abbd68}{pause}} |= \mbox{\hyperlink{aic79xx__reg_8h_a32afd10a8a06a6183fe757ec7a7a32d9}{INTEN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05146}05146                 ahc-\/>\mbox{\hyperlink{structahc__softc_a19e5110bebc18dc39c5b94cc69279414}{unpause}} |= \mbox{\hyperlink{aic79xx__reg_8h_a32afd10a8a06a6183fe757ec7a7a32d9}{INTEN}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05147}05147         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05148}05148         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c67c3aa8365be698224acf38de9a509}{HCNTRL}}, hcntrl);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05149}05149 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05150}05150 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05151}05151 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05152}05152 \textcolor{comment}{ * Ensure that the card is paused in a location}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05153}05153 \textcolor{comment}{ * outside of all critical sections and that all}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05154}05154 \textcolor{comment}{ * pending work is completed prior to returning.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05155}05155 \textcolor{comment}{ * This routine should only be called from outside}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05156}05156 \textcolor{comment}{ * an interrupt context.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05157}05157 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05158}05158 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05159}\mbox{\hyperlink{aic7xxx_8c_afc0361b34521550215d2963d6e35285c}{05159}} \mbox{\hyperlink{aic7xxx_8c_afc0361b34521550215d2963d6e35285c}{ahc\_pause\_and\_flushwork}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05160}05160 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05161}05161         \textcolor{keywordtype}{int} intstat;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05162}05162         \textcolor{keywordtype}{int} maxloops;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05163}05163         \textcolor{keywordtype}{int} paused;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05164}05164 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05165}05165         maxloops = 1000;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05166}05166         ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81ac56a8daa0f1b60a49286d7b23184a614}{AHC\_ALL\_INTERRUPTS}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05167}05167         paused = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05168}05168         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05169}05169                 \textcolor{keywordflow}{if} (paused) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05170}05170                         \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05171}05171                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05172}05172 \textcolor{comment}{                         * Give the sequencer some time to service}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05173}05173 \textcolor{comment}{                         * any active selections.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05174}05174 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05175}05175                         \mbox{\hyperlink{aic__osm__lib_8h_a23559a914641f4b70a959f25b8281c87}{aic\_delay}}(500);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05176}05176                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05177}05177                 \mbox{\hyperlink{aic7xxx__inline_8h_a5a7390a83ebe0d4ec6a9c20536e55abc}{ahc\_intr}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05178}05178                 \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05179}05179                 paused = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05180}05180                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_acec8418886ca76cef8259ad48e991238}{ENSELO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05181}05181                 intstat = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a555136974e2faa49b15189b7c27597c6}{INTSTAT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05182}05182                 \textcolor{keywordflow}{if} ((intstat \& \mbox{\hyperlink{aic79xx__reg_8h_a4cc64969c136a6302dac6220f3c42cc4}{INT\_PEND}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05183}05183                         \mbox{\hyperlink{aic7xxx_8c_a71410b7cd014e87227c1ba9697bef195}{ahc\_clear\_critical\_section}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05184}05184                         intstat = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a555136974e2faa49b15189b7c27597c6}{INTSTAT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05185}05185                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05186}05186         \} \textcolor{keywordflow}{while} (-\/-\/maxloops}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05187}05187               \&\& (intstat != 0xFF || (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa48ff378e47d7ad0215feaeace627f0eb}{AHC\_REMOVABLE}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05188}05188               \&\& ((intstat \& \mbox{\hyperlink{aic79xx__reg_8h_a4cc64969c136a6302dac6220f3c42cc4}{INT\_PEND}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05189}05189                || (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac4a01506a711aa2647d57131c0ac3e3e}{SSTAT0}}) \& (\mbox{\hyperlink{aic79xx__reg_8h_a9fe4c8f08b0f051b08f5f413dd51fb4f}{SELDO}}|\mbox{\hyperlink{aic79xx__reg_8h_a4e318c973ad9bf81edef689530ba5b74}{SELINGO}})) != 0));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05190}05190         \textcolor{keywordflow}{if} (maxloops == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05191}05191                 printf(\textcolor{stringliteral}{"{}Infinite interrupt loop, INTSTAT = \%x"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05192}05192                        \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a555136974e2faa49b15189b7c27597c6}{INTSTAT}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05193}05193         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05194}05194         \mbox{\hyperlink{aic7xxx__osm_8h_aaa3c3526ae3cb952c4ef942ab0639c56}{ahc\_platform\_flushwork}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05195}05195         ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \&= \string~AHC\_ALL\_INTERRUPTS;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05196}05196 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05197}05197 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05198}05198 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05199}\mbox{\hyperlink{aic7xxx_8c_a1491daa228d87e6850f7a753f1f3f8ca}{05199}} \mbox{\hyperlink{aic7xxx_8c_a1491daa228d87e6850f7a753f1f3f8ca}{ahc\_suspend}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05200}05200 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05201}05201 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05202}05202         \mbox{\hyperlink{aic7xxx_8c_afc0361b34521550215d2963d6e35285c}{ahc\_pause\_and\_flushwork}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05203}05203 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05204}05204         \textcolor{keywordflow}{if} (LIST\_FIRST(\&ahc-\/>pending\_scbs) != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05205}05205                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05206}05206                 \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05207}05207         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05208}05208 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05209}05209 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05210}05210         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05211}05211 \textcolor{comment}{         * XXX What about ATIOs that have not yet been serviced?}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05212}05212 \textcolor{comment}{         * Perhaps we should just refuse to be suspended if we}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05213}05213 \textcolor{comment}{         * are acting in a target role.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05214}05214 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05215}05215         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_acf7b387fd369e4697aaea509c2f74042}{pending\_device}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05216}05216                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05217}05217                 \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05218}05218         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05219}05219 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05220}05220         \mbox{\hyperlink{aic7xxx_8c_a4d932ba85942891cfc0f7aa94f210b29}{ahc\_shutdown}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05221}05221         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05222}05222 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05223}05223 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05224}05224 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05225}\mbox{\hyperlink{aic7xxx_8c_af1026c2d714f6aeec8e96cd91d6222d4}{05225}} \mbox{\hyperlink{aic7xxx_8c_af1026c2d714f6aeec8e96cd91d6222d4}{ahc\_resume}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05226}05226 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05227}05227 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05228}05228         \mbox{\hyperlink{aic7xxx_8c_a80bbe01db2bbbe04296884d0ffdd67bc}{ahc\_reset}}(ahc, \textcolor{comment}{/*reinit*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05229}05229         \mbox{\hyperlink{aic7xxx_8c_a91865ee29c6c85da881e8a175d092d31}{ahc\_intr\_enable}}(ahc, \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}}); }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05230}05230         \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05231}05231         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05232}05232 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05233}05233 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05234}05234 \textcolor{comment}{/************************** Busy Target Table *********************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05235}05235 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05236}05236 \textcolor{comment}{ * Return the untagged transaction id for a given target/channel lun.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05237}05237 \textcolor{comment}{ * Optionally, clear the entry.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05238}05238 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05239}05239 u\_int}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05240}\mbox{\hyperlink{aic7xxx_8c_aa71002135f4ba7350e887b4f93942ece}{05240}} \mbox{\hyperlink{aic7xxx_8c_aa71002135f4ba7350e887b4f93942ece}{ahc\_index\_busy\_tcl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int tcl)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05241}05241 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05242}05242         u\_int scbid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05243}05243         u\_int target\_offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05244}05244 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05245}05245         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aa9840bbf349029e67eedfebd36516d7e}{AHC\_SCB\_BTT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05246}05246                 u\_int saved\_scbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05247}05247                 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05248}05248                 saved\_scbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05249}05249                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, \mbox{\hyperlink{aic79xx_8h_ad52ccebbd67c68ff953bc8a2ce4ff4db}{TCL\_LUN}}(tcl));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05250}05250                 scbid = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a0b3c31b1db6b6125da07b125d1a9f67c}{SCB\_64\_BTT}} + \mbox{\hyperlink{aic79xx_8h_acb0f02d882d97f8ed63d341e17797ac1}{TCL\_TARGET\_OFFSET}}(tcl));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05251}05251                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, saved\_scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05252}05252         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05253}05253                 target\_offset = \mbox{\hyperlink{aic79xx_8h_acb0f02d882d97f8ed63d341e17797ac1}{TCL\_TARGET\_OFFSET}}(tcl);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05254}05254                 scbid = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a50e957db867f3d9c18bed8f616fc90ca}{BUSY\_TARGETS}} + target\_offset);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05255}05255         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05256}05256 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05257}05257         \textcolor{keywordflow}{return} (scbid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05258}05258 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05259}05259 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05260}05260 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05261}\mbox{\hyperlink{aic7xxx_8c_adc1f6f985d4e2ba25915ce68d2c2f37b}{05261}} \mbox{\hyperlink{aic7xxx_8c_adc1f6f985d4e2ba25915ce68d2c2f37b}{ahc\_unbusy\_tcl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int tcl)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05262}05262 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05263}05263         u\_int target\_offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05264}05264 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05265}05265         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aa9840bbf349029e67eedfebd36516d7e}{AHC\_SCB\_BTT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05266}05266                 u\_int saved\_scbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05267}05267                 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05268}05268                 saved\_scbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05269}05269                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, \mbox{\hyperlink{aic79xx_8h_ad52ccebbd67c68ff953bc8a2ce4ff4db}{TCL\_LUN}}(tcl));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05270}05270                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a0b3c31b1db6b6125da07b125d1a9f67c}{SCB\_64\_BTT}}+\mbox{\hyperlink{aic79xx_8h_acb0f02d882d97f8ed63d341e17797ac1}{TCL\_TARGET\_OFFSET}}(tcl), \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05271}05271                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, saved\_scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05272}05272         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05273}05273                 target\_offset = \mbox{\hyperlink{aic79xx_8h_acb0f02d882d97f8ed63d341e17797ac1}{TCL\_TARGET\_OFFSET}}(tcl);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05274}05274                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a50e957db867f3d9c18bed8f616fc90ca}{BUSY\_TARGETS}} + target\_offset, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05275}05275         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05276}05276 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05277}05277 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05278}05278 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05279}\mbox{\hyperlink{aic7xxx_8c_aab83d04171a61cdc3915e598bcc4b130}{05279}} \mbox{\hyperlink{aic7xxx_8c_aab83d04171a61cdc3915e598bcc4b130}{ahc\_busy\_tcl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int tcl, u\_int scbid)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05280}05280 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05281}05281         u\_int target\_offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05282}05282 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05283}05283         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aa9840bbf349029e67eedfebd36516d7e}{AHC\_SCB\_BTT}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05284}05284                 u\_int saved\_scbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05285}05285                 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05286}05286                 saved\_scbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05287}05287                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, \mbox{\hyperlink{aic79xx_8h_ad52ccebbd67c68ff953bc8a2ce4ff4db}{TCL\_LUN}}(tcl));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05288}05288                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a0b3c31b1db6b6125da07b125d1a9f67c}{SCB\_64\_BTT}} + \mbox{\hyperlink{aic79xx_8h_acb0f02d882d97f8ed63d341e17797ac1}{TCL\_TARGET\_OFFSET}}(tcl), scbid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05289}05289                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, saved\_scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05290}05290         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05291}05291                 target\_offset = \mbox{\hyperlink{aic79xx_8h_acb0f02d882d97f8ed63d341e17797ac1}{TCL\_TARGET\_OFFSET}}(tcl);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05292}05292                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a50e957db867f3d9c18bed8f616fc90ca}{BUSY\_TARGETS}} + target\_offset, scbid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05293}05293         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05294}05294 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05295}05295 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05296}05296 \textcolor{comment}{/************************** SCB and SCB queue management **********************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05297}05297 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05298}\mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{05298}} \mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}}, \textcolor{keywordtype}{int} target,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05299}05299               \textcolor{keywordtype}{char} channel, \textcolor{keywordtype}{int} lun, u\_int tag, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}} role)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05300}05300 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05301}05301         \textcolor{keywordtype}{int} targ = \mbox{\hyperlink{aic79xx_8h_a6c0f4b6b37cc0fae8e266811c5ca3815}{SCB\_GET\_TARGET}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05302}05302         \textcolor{keywordtype}{char} chan = \mbox{\hyperlink{aic79xx_8h_aaf5c2a354d6e634b1839c579f220ed69}{SCB\_GET\_CHANNEL}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05303}05303         \textcolor{keywordtype}{int} slun = \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05304}05304         \textcolor{keywordtype}{int} match;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05305}05305 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05306}05306         match = ((chan == channel) || (channel == \mbox{\hyperlink{aic79xx_8h_ac9dcdba2096f6b3adab742b8b1a256c2}{ALL\_CHANNELS}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05307}05307         \textcolor{keywordflow}{if} (match != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05308}05308                 match = ((targ == target) || (target == CAM\_TARGET\_WILDCARD));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05309}05309         \textcolor{keywordflow}{if} (match != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05310}05310                 match = ((lun == slun) || (lun == CAM\_LUN\_WILDCARD));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05311}05311         \textcolor{keywordflow}{if} (match != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05312}05312 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05313}05313                 \textcolor{keywordtype}{int} group;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05314}05314 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05315}05315                 group = XPT\_FC\_GROUP(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a99f99fe2737984d6ababf6ab2c29a1f8}{io\_ctx}}-\/>ccb\_h.func\_code);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05316}05316                 \textcolor{keywordflow}{if} (role == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05317}05317                         match = (group != XPT\_FC\_GROUP\_TMODE)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05318}05318                               \&\& ((tag == \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05319}05319                                || (tag == \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05320}05320                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (role == \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05321}05321                         match = (group == XPT\_FC\_GROUP\_TMODE)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05322}05322                               \&\& ((tag == \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a99f99fe2737984d6ababf6ab2c29a1f8}{io\_ctx}}-\/>csio.tag\_id)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05323}05323                                || (tag == \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05324}05324                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05325}05325 \textcolor{preprocessor}{\#else }\textcolor{comment}{/* !AHC\_TARGET\_MODE */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05326}05326                 match = ((tag == \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}}) || (tag == \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05327}05327 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* AHC\_TARGET\_MODE */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05328}05328         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05329}05329 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05330}05330         \textcolor{keywordflow}{return} match;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05331}05331 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05332}05332 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05333}05333 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05334}\mbox{\hyperlink{aic7xxx_8c_ae8a25a1ebebbda161251b87e5f0b5e9b}{05334}} \mbox{\hyperlink{aic7xxx_8c_ae8a25a1ebebbda161251b87e5f0b5e9b}{ahc\_freeze\_devq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05335}05335 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05336}05336         \textcolor{keywordtype}{int}     target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05337}05337         \textcolor{keywordtype}{char}    channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05338}05338         \textcolor{keywordtype}{int}     lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05339}05339 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05340}05340         target = \mbox{\hyperlink{aic79xx_8h_a6c0f4b6b37cc0fae8e266811c5ca3815}{SCB\_GET\_TARGET}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05341}05341         lun = \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05342}05342         channel = \mbox{\hyperlink{aic79xx_8h_aaf5c2a354d6e634b1839c579f220ed69}{SCB\_GET\_CHANNEL}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05343}05343 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05344}05344         \mbox{\hyperlink{aic7xxx_8c_a6854c2ec2b22382f77741bf98681bcef}{ahc\_search\_qinfifo}}(ahc, target, channel, lun,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05345}05345                            \textcolor{comment}{/*tag*/}\mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3ac76018baf54734513ce07029ab5ac3}{ROLE\_UNKNOWN}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05346}05346                            CAM\_REQUEUE\_REQ, \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05347}05347 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05348}05348         ahc\_platform\_freeze\_devq(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05349}05349 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05350}05350 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05351}05351 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05352}\mbox{\hyperlink{aic7xxx_8c_a94475d8eb8cca74f3f9583eda535e5d9}{05352}} \mbox{\hyperlink{aic7xxx_8c_a94475d8eb8cca74f3f9583eda535e5d9}{ahc\_qinfifo\_requeue\_tail}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05353}05353 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05354}05354         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *prev\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05355}05355 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05356}05356         prev\_scb = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05357}05357         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a3f041082fe273355fcffc4ea3ea66ba6}{ahc\_qinfifo\_count}}(ahc) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05358}05358                 u\_int prev\_tag;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05359}05359                 uint8\_t prev\_pos;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05360}05360 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05361}05361                 prev\_pos = ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05362}05362                 prev\_tag = ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[prev\_pos];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05363}05363                 prev\_scb = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, prev\_tag);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05364}05364         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05365}05365         \mbox{\hyperlink{aic7xxx_8c_a94560cd706dc174a8cbf2836249046e2}{ahc\_qinfifo\_requeue}}(ahc, prev\_scb, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05366}05366         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aab10e44df2c3b9c4d92492462e1a0a4cc}{AHC\_QUEUE\_REGS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05367}05367                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa5a45b1f8f0b76279d0c4716bcfcd025}{HNSCB\_QOFF}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05368}05368         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05369}05369                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aae8cdbda36d18541d60b5abb0497b7d3}{KERNEL\_QINPOS}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05370}05370         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05371}05371 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05372}05372 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05373}05373 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05374}\mbox{\hyperlink{aic7xxx_8c_a94560cd706dc174a8cbf2836249046e2}{05374}} \mbox{\hyperlink{aic7xxx_8c_a94560cd706dc174a8cbf2836249046e2}{ahc\_qinfifo\_requeue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *prev\_scb,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05375}05375                     \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05376}05376 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05377}05377         \textcolor{keywordflow}{if} (prev\_scb == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05378}05378                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a2e1f9e5cf3381010992c94be67860789}{NEXT\_QUEUED\_SCB}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05379}05379         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05380}05380                 prev\_scb-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ae99c126ad57414eef2ce1a94d98ecef8}{next}} = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05381}05381                 \mbox{\hyperlink{aic7xxx__inline_8h_aa8dbf6944a7af4c03fe8b13bbbff8c42}{ahc\_sync\_scb}}(ahc, prev\_scb, }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05382}05382                              BUS\_DMASYNC\_PREREAD|BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05383}05383         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05384}05384         ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}}++] = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05385}05385         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ae99c126ad57414eef2ce1a94d98ecef8}{next}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a5c0812d57ae0fcf9a51318f66e4922b9}{next\_queued\_scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05386}05386         \mbox{\hyperlink{aic7xxx__inline_8h_aa8dbf6944a7af4c03fe8b13bbbff8c42}{ahc\_sync\_scb}}(ahc, \mbox{\hyperlink{structscb}{scb}}, BUS\_DMASYNC\_PREREAD|BUS\_DMASYNC\_PREWRITE);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05387}05387 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05388}05388 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05389}05389 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05390}\mbox{\hyperlink{aic7xxx_8c_a3f041082fe273355fcffc4ea3ea66ba6}{05390}} \mbox{\hyperlink{aic7xxx_8c_a3f041082fe273355fcffc4ea3ea66ba6}{ahc\_qinfifo\_count}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05391}05391 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05392}05392         uint8\_t qinpos;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05393}05393         uint8\_t diff;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05394}05394 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05395}05395         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aab10e44df2c3b9c4d92492462e1a0a4cc}{AHC\_QUEUE\_REGS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05396}05396                 qinpos = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04c173f92eda4a463e7a6e9ea9290ffa}{SNSCB\_QOFF}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05397}05397                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04c173f92eda4a463e7a6e9ea9290ffa}{SNSCB\_QOFF}}, qinpos);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05398}05398         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05399}05399                 qinpos = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a69723af9c7c5732e6533777377f76e8d}{QINPOS}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05400}05400         diff = ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}} -\/ qinpos;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05401}05401         \textcolor{keywordflow}{return} (diff);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05402}05402 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05403}05403 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05404}05404 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05405}\mbox{\hyperlink{aic7xxx_8c_a6854c2ec2b22382f77741bf98681bcef}{05405}} \mbox{\hyperlink{aic7xxx_8c_a6854c2ec2b22382f77741bf98681bcef}{ahc\_search\_qinfifo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{int} target, \textcolor{keywordtype}{char} channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05406}05406                    \textcolor{keywordtype}{int} lun, u\_int tag, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}} role, uint32\_t status,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05407}05407                    \mbox{\hyperlink{aic7xxx_8h_ac8fa4272f74e476225b1c6361f833ea5}{ahc\_search\_action}} action)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05408}05408 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05409}05409         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05410}05410         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *prev\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05411}05411         uint8\_t qinstart;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05412}05412         uint8\_t qinpos;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05413}05413         uint8\_t qintail;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05414}05414         uint8\_t next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05415}05415         uint8\_t prev;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05416}05416         uint8\_t curscbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05417}05417         \textcolor{keywordtype}{int}     found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05418}05418         \textcolor{keywordtype}{int}     have\_qregs;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05419}05419 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05420}05420         qintail = ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05421}05421         have\_qregs = (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aab10e44df2c3b9c4d92492462e1a0a4cc}{AHC\_QUEUE\_REGS}}) != 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05422}05422         \textcolor{keywordflow}{if} (have\_qregs) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05423}05423                 qinstart = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04c173f92eda4a463e7a6e9ea9290ffa}{SNSCB\_QOFF}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05424}05424                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04c173f92eda4a463e7a6e9ea9290ffa}{SNSCB\_QOFF}}, qinstart);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05425}05425         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05426}05426                 qinstart = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a69723af9c7c5732e6533777377f76e8d}{QINPOS}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05427}05427         qinpos = qinstart;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05428}05428         found = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05429}05429         prev\_scb = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05430}05430 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05431}05431         \textcolor{keywordflow}{if} (action == \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05432}05432                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05433}05433 \textcolor{comment}{                 * Don't attempt to run any queued untagged transactions}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05434}05434 \textcolor{comment}{                 * until we are done with the abort process.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05435}05435 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05436}05436                 \mbox{\hyperlink{aic7xxx__inline_8h_a5c6e7afc36d1ae2c1b03da0c065dca21}{ahc\_freeze\_untagged\_queues}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05437}05437         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05438}05438 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05439}05439         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05440}05440 \textcolor{comment}{         * Start with an empty queue.  Entries that are not chosen}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05441}05441 \textcolor{comment}{         * for removal will be re-\/added to the queue as we go.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05442}05442 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05443}05443         ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}} = qinpos;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05444}05444         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a2e1f9e5cf3381010992c94be67860789}{NEXT\_QUEUED\_SCB}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a5c0812d57ae0fcf9a51318f66e4922b9}{next\_queued\_scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05445}05445 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05446}05446         \textcolor{keywordflow}{while} (qinpos != qintail) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05447}05447                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[qinpos]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05448}05448                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05449}05449                         printf(\textcolor{stringliteral}{"{}qinpos = \%d, SCB index = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05450}05450                                 qinpos, ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[qinpos]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05451}05451                         panic(\textcolor{stringliteral}{"{}Loop 1\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05452}05452                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05453}05453 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05454}05454                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(ahc, \mbox{\hyperlink{structscb}{scb}}, target, channel, lun, tag, role)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05455}05455                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05456}05456 \textcolor{comment}{                         * We found an scb that needs to be acted on.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05457}05457 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05458}05458                         found++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05459}05459                         \textcolor{keywordflow}{switch} (action) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05460}05460                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05461}05461                         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05462}05462                                 cam\_status ostat;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05463}05463                                 cam\_status cstat;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05464}05464 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05465}05465                                 ostat = \mbox{\hyperlink{aic__osm__lib_8h_a9b0c77ef4a54a6c634b830810dfa1306}{aic\_get\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05466}05466                                 \textcolor{keywordflow}{if} (ostat == CAM\_REQ\_INPROG)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05467}05467                                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, status);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05468}05468                                 cstat = \mbox{\hyperlink{aic__osm__lib_8h_a9b0c77ef4a54a6c634b830810dfa1306}{aic\_get\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05469}05469                                 \textcolor{keywordflow}{if} (cstat != CAM\_REQ\_CMP)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05470}05470                                         \mbox{\hyperlink{aic__osm__lib_8h_ae64ada1cd2c51ce61826f9a2423c729f}{aic\_freeze\_scb}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05471}05471                                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ad0ce2db7e532c67e4f358a676e732b79}{SCB\_ACTIVE}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05472}05472                                         printf(\textcolor{stringliteral}{"{}Inactive SCB in qinfifo\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05473}05473                                 \mbox{\hyperlink{aic7xxx__osm_8c_a356313da77941be8f5afdf35318ff0e1}{ahc\_done}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05474}05474 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05475}05475                                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05476}05476                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05477}05477                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba6a669222275dfa60191329abcbbe7d6d}{SEARCH\_REMOVE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05478}05478                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05479}05479                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba1d1c0640efc4301d2e764b00b0ab2763}{SEARCH\_COUNT}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05480}05480                                 \mbox{\hyperlink{aic7xxx_8c_a94560cd706dc174a8cbf2836249046e2}{ahc\_qinfifo\_requeue}}(ahc, prev\_scb, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05481}05481                                 prev\_scb = \mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05482}05482                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05483}05483                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05484}05484                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05485}05485                         \mbox{\hyperlink{aic7xxx_8c_a94560cd706dc174a8cbf2836249046e2}{ahc\_qinfifo\_requeue}}(ahc, prev\_scb, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05486}05486                         prev\_scb = \mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05487}05487                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05488}05488                 qinpos++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05489}05489         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05490}05490 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05491}05491         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aab10e44df2c3b9c4d92492462e1a0a4cc}{AHC\_QUEUE\_REGS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05492}05492                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa5a45b1f8f0b76279d0c4716bcfcd025}{HNSCB\_QOFF}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05493}05493         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05494}05494                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aae8cdbda36d18541d60b5abb0497b7d3}{KERNEL\_QINPOS}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05495}05495         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05496}05496 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05497}05497         \textcolor{keywordflow}{if} (action != \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba1d1c0640efc4301d2e764b00b0ab2763}{SEARCH\_COUNT}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05498}05498          \&\& (found != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05499}05499          \&\& (qinstart != ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05500}05500                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05501}05501 \textcolor{comment}{                 * The sequencer may be in the process of dmaing}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05502}05502 \textcolor{comment}{                 * down the SCB at the beginning of the queue.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05503}05503 \textcolor{comment}{                 * This could be problematic if either the first,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05504}05504 \textcolor{comment}{                 * or the second SCB is removed from the queue}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05505}05505 \textcolor{comment}{                 * (the first SCB includes a pointer to the "{}next"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05506}05506 \textcolor{comment}{                 * SCB to dma). If we have removed any entries, swap}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05507}05507 \textcolor{comment}{                 * the first element in the queue with the next HSCB}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05508}05508 \textcolor{comment}{                 * so the sequencer will notice that NEXT\_QUEUED\_SCB}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05509}05509 \textcolor{comment}{                 * has changed during its dma attempt and will retry}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05510}05510 \textcolor{comment}{                 * the DMA.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05511}05511 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05512}05512                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[qinstart]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05513}05513 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05514}05514                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05515}05515                         printf(\textcolor{stringliteral}{"{}found = \%d, qinstart = \%d, qinfifionext = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05516}05516                                 found, qinstart, ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05517}05517                         panic(\textcolor{stringliteral}{"{}First/Second Qinfifo fixup\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05518}05518                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05519}05519                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05520}05520 \textcolor{comment}{                 * ahc\_swap\_with\_next\_hscb forces our next pointer to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05521}05521 \textcolor{comment}{                 * point to the reserved SCB for future commands.  Save}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05522}05522 \textcolor{comment}{                 * and restore our original next pointer to maintain}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05523}05523 \textcolor{comment}{                 * queue integrity.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05524}05524 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05525}05525                 next = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ae99c126ad57414eef2ce1a94d98ecef8}{next}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05526}05526                 ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_aba46303e56d5f94bc07df6ae37d98158}{scbindex}}[\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}}] = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05527}05527                 \mbox{\hyperlink{aic7xxx__inline_8h_a483da9bbecb7090c9ac05422a2b9da1e}{ahc\_swap\_with\_next\_hscb}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05528}05528                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ae99c126ad57414eef2ce1a94d98ecef8}{next}} = next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05529}05529                 ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[qinstart] = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05530}05530 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05531}05531                 \textcolor{comment}{/* Tell the card about the new head of the qinfifo. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05532}05532                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a2e1f9e5cf3381010992c94be67860789}{NEXT\_QUEUED\_SCB}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05533}05533 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05534}05534                 \textcolor{comment}{/* Fixup the tail "{}next"{} pointer. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05535}05535                 qintail = ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05536}05536                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[qintail]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05537}05537                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ae99c126ad57414eef2ce1a94d98ecef8}{next}} = ahc-\/>\mbox{\hyperlink{structahc__softc_a5c0812d57ae0fcf9a51318f66e4922b9}{next\_queued\_scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05538}05538         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05539}05539 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05540}05540         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05541}05541 \textcolor{comment}{         * Search waiting for selection list.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05542}05542 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05543}05543         curscbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05544}05544         next = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aed8758122c520c918c257c19e01d0a91}{WAITING\_SCBH}});  \textcolor{comment}{/* Start at head of list. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05545}05545         prev = \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05546}05546 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05547}05547         \textcolor{keywordflow}{while} (next != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05548}05548                 uint8\_t scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05549}05549 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05550}05550                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, next);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05551}05551                 scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05552}05552                 \textcolor{keywordflow}{if} (scb\_index >= ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05553}05553                         printf(\textcolor{stringliteral}{"{}Waiting List inconsistency. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05554}05554                                \textcolor{stringliteral}{"{}SCB index == \%d, yet numscbs == \%d."{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05555}05555                                scb\_index, ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05556}05556                         \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05557}05557                         panic(\textcolor{stringliteral}{"{}for safety"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05558}05558                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05559}05559                 \mbox{\hyperlink{structscb}{scb}} = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05560}05560                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05561}05561                         printf(\textcolor{stringliteral}{"{}scb\_index = \%d, next = \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05562}05562                                 scb\_index, next);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05563}05563                         panic(\textcolor{stringliteral}{"{}Waiting List traversal\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05564}05564                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05565}05565                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(ahc, \mbox{\hyperlink{structscb}{scb}}, target, channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05566}05566                                   lun, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}, role)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05567}05567                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05568}05568 \textcolor{comment}{                         * We found an scb that needs to be acted on.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05569}05569 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05570}05570                         found++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05571}05571                         \textcolor{keywordflow}{switch} (action) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05572}05572                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05573}05573                         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05574}05574                                 cam\_status ostat;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05575}05575                                 cam\_status cstat;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05576}05576 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05577}05577                                 ostat = \mbox{\hyperlink{aic__osm__lib_8h_a9b0c77ef4a54a6c634b830810dfa1306}{aic\_get\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05578}05578                                 \textcolor{keywordflow}{if} (ostat == CAM\_REQ\_INPROG)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05579}05579                                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05580}05580                                                                    status);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05581}05581                                 cstat = \mbox{\hyperlink{aic__osm__lib_8h_a9b0c77ef4a54a6c634b830810dfa1306}{aic\_get\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05582}05582                                 \textcolor{keywordflow}{if} (cstat != CAM\_REQ\_CMP)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05583}05583                                         \mbox{\hyperlink{aic__osm__lib_8h_ae64ada1cd2c51ce61826f9a2423c729f}{aic\_freeze\_scb}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05584}05584                                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ad0ce2db7e532c67e4f358a676e732b79}{SCB\_ACTIVE}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05585}05585                                         printf(\textcolor{stringliteral}{"{}Inactive SCB in Wait List\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05586}05586                                 \mbox{\hyperlink{aic7xxx__osm_8c_a356313da77941be8f5afdf35318ff0e1}{ahc\_done}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05587}05587                                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05588}05588                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05589}05589                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba6a669222275dfa60191329abcbbe7d6d}{SEARCH\_REMOVE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05590}05590                                 next = \mbox{\hyperlink{aic7xxx_8c_a8a7c20309d70bbcbaaede262009ed982}{ahc\_rem\_wscb}}(ahc, next, prev);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05591}05591                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05592}05592                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba1d1c0640efc4301d2e764b00b0ab2763}{SEARCH\_COUNT}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05593}05593                                 prev = next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05594}05594                                 next = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05595}05595                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05596}05596                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05597}05597                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05598}05598                         }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05599}05599                         prev = next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05600}05600                         next = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05601}05601                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05602}05602         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05603}05603         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, curscbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05604}05604 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05605}05605         found += \mbox{\hyperlink{aic7xxx_8c_a49f41f57407c47635edc975017c6075c}{ahc\_search\_untagged\_queues}}(ahc, \textcolor{comment}{/*aic\_io\_ctx\_t*/}NULL, target,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05606}05606                                             channel, lun, status, action);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05607}05607 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05608}05608         \textcolor{keywordflow}{if} (action == \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05609}05609                 \mbox{\hyperlink{aic7xxx__inline_8h_a17ad4cad6f76a11ce890ca6cd8bd7b28}{ahc\_release\_untagged\_queues}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05610}05610         \textcolor{keywordflow}{return} (found);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05611}05611 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05612}05612 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05613}05613 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05614}\mbox{\hyperlink{aic7xxx_8c_a49f41f57407c47635edc975017c6075c}{05614}} \mbox{\hyperlink{aic7xxx_8c_a49f41f57407c47635edc975017c6075c}{ahc\_search\_untagged\_queues}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \mbox{\hyperlink{aic__osm__lib_8h_ae8169d9fb429272fedf36b74f206bc70}{aic\_io\_ctx\_t}} ctx,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05615}05615                            \textcolor{keywordtype}{int} target, \textcolor{keywordtype}{char} channel, \textcolor{keywordtype}{int} lun, uint32\_t status,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05616}05616                            \mbox{\hyperlink{aic7xxx_8h_ac8fa4272f74e476225b1c6361f833ea5}{ahc\_search\_action}} action)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05617}05617 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05618}05618         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05619}05619         \textcolor{keywordtype}{int}     maxtarget;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05620}05620         \textcolor{keywordtype}{int}     found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05621}05621         \textcolor{keywordtype}{int}     i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05622}05622 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05623}05623         \textcolor{keywordflow}{if} (action == \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05624}05624                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05625}05625 \textcolor{comment}{                 * Don't attempt to run any queued untagged transactions}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05626}05626 \textcolor{comment}{                 * until we are done with the abort process.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05627}05627 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05628}05628                 \mbox{\hyperlink{aic7xxx__inline_8h_a5c6e7afc36d1ae2c1b03da0c065dca21}{ahc\_freeze\_untagged\_queues}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05629}05629         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05630}05630 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05631}05631         found = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05632}05632         i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05633}05633         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aa9840bbf349029e67eedfebd36516d7e}{AHC\_SCB\_BTT}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05634}05634                 maxtarget = 16;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05635}05635                 \textcolor{keywordflow}{if} (target != CAM\_TARGET\_WILDCARD) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05636}05636                         i = target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05637}05637                         \textcolor{keywordflow}{if} (channel == \textcolor{charliteral}{'B'})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05638}05638                                 i += 8;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05639}05639                         maxtarget = i + 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05640}05640                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05641}05641         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05642}05642                 maxtarget = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05643}05643         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05644}05644 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05645}05645         \textcolor{keywordflow}{for} (; i < maxtarget; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05646}05646                 \textcolor{keyword}{struct }scb\_tailq *untagged\_q;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05647}05647                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *next\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05648}05648 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05649}05649                 untagged\_q = \&(ahc-\/>\mbox{\hyperlink{structahc__softc_a8cca91fe9f77d975985c3cf85d11de46}{untagged\_queues}}[i]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05650}05650                 next\_scb = TAILQ\_FIRST(untagged\_q);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05651}05651                 \textcolor{keywordflow}{while} (next\_scb != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05652}05652                         \mbox{\hyperlink{structscb}{scb}} = next\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05653}05653                         next\_scb = TAILQ\_NEXT(\mbox{\hyperlink{structscb}{scb}}, \mbox{\hyperlink{structscb_a47ba5e3b85d3c1caeca1e1dae12483ff}{links}}.tqe);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05654}05654 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05655}05655                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05656}05656 \textcolor{comment}{                         * The head of the list may be the currently}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05657}05657 \textcolor{comment}{                         * active untagged command for a device.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05658}05658 \textcolor{comment}{                         * We're only searching for commands that}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05659}05659 \textcolor{comment}{                         * have not been started.  A transaction}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05660}05660 \textcolor{comment}{                         * marked active but still in the qinfifo}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05661}05661 \textcolor{comment}{                         * is removed by the qinfifo scanning code}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05662}05662 \textcolor{comment}{                         * above.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05663}05663 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05664}05664                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ad0ce2db7e532c67e4f358a676e732b79}{SCB\_ACTIVE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05665}05665                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05666}05666 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05667}05667                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(ahc, \mbox{\hyperlink{structscb}{scb}}, target, channel, lun,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05668}05668                                           \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05669}05669                          || (ctx != NULL \&\& ctx != \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a99f99fe2737984d6ababf6ab2c29a1f8}{io\_ctx}}))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05670}05670                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05671}05671 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05672}05672                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05673}05673 \textcolor{comment}{                         * We found an scb that needs to be acted on.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05674}05674 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05675}05675                         found++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05676}05676                         \textcolor{keywordflow}{switch} (action) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05677}05677                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05678}05678                         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05679}05679                                 cam\_status ostat;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05680}05680                                 cam\_status cstat;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05681}05681 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05682}05682                                 ostat = \mbox{\hyperlink{aic__osm__lib_8h_a9b0c77ef4a54a6c634b830810dfa1306}{aic\_get\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05683}05683                                 \textcolor{keywordflow}{if} (ostat == CAM\_REQ\_INPROG)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05684}05684                                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, status);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05685}05685                                 cstat = \mbox{\hyperlink{aic__osm__lib_8h_a9b0c77ef4a54a6c634b830810dfa1306}{aic\_get\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05686}05686                                 \textcolor{keywordflow}{if} (cstat != CAM\_REQ\_CMP)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05687}05687                                         \mbox{\hyperlink{aic__osm__lib_8h_ae64ada1cd2c51ce61826f9a2423c729f}{aic\_freeze\_scb}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05688}05688                                 \mbox{\hyperlink{aic7xxx__osm_8c_a356313da77941be8f5afdf35318ff0e1}{ahc\_done}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05689}05689                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05690}05690                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05691}05691                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba6a669222275dfa60191329abcbbe7d6d}{SEARCH\_REMOVE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05692}05692                                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \&= \string~SCB\_UNTAGGEDQ;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05693}05693                                 TAILQ\_REMOVE(untagged\_q, \mbox{\hyperlink{structscb}{scb}}, \mbox{\hyperlink{structscb_a47ba5e3b85d3c1caeca1e1dae12483ff}{links}}.tqe);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05694}05694                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05695}05695                         \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba1d1c0640efc4301d2e764b00b0ab2763}{SEARCH\_COUNT}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05696}05696                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05697}05697                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05698}05698                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05699}05699         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05700}05700 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05701}05701         \textcolor{keywordflow}{if} (action == \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05702}05702                 \mbox{\hyperlink{aic7xxx__inline_8h_a17ad4cad6f76a11ce890ca6cd8bd7b28}{ahc\_release\_untagged\_queues}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05703}05703         \textcolor{keywordflow}{return} (found);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05704}05704 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05705}05705 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05706}05706 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05707}\mbox{\hyperlink{aic7xxx_8c_a3bd218cc5c2264a4f9fa01e15513dbe6}{05707}} \mbox{\hyperlink{aic7xxx_8c_a3bd218cc5c2264a4f9fa01e15513dbe6}{ahc\_search\_disc\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{int} target, \textcolor{keywordtype}{char} channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05708}05708                      \textcolor{keywordtype}{int} lun, u\_int tag, \textcolor{keywordtype}{int} stop\_on\_first, \textcolor{keywordtype}{int} remove,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05709}05709                      \textcolor{keywordtype}{int} save\_state)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05710}05710 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05711}05711         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *scbp;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05712}05712         u\_int   next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05713}05713         u\_int   prev;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05714}05714         u\_int   count;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05715}05715         u\_int   active\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05716}05716 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05717}05717         count = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05718}05718         next = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a8846b03d9aad8bcb7611fc23788a7c63}{DISCONNECTED\_SCBH}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05719}05719         prev = \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05720}05720 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05721}05721         \textcolor{keywordflow}{if} (save\_state) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05722}05722                 \textcolor{comment}{/* restore this when we're done */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05723}05723                 active\_scb = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05724}05724         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05725}05725                 \textcolor{comment}{/* Silence compiler */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05726}05726                 active\_scb = \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05727}05727 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05728}05728         \textcolor{keywordflow}{while} (next != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05729}05729                 u\_int scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05730}05730 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05731}05731                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, next);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05732}05732                 scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05733}05733                 \textcolor{keywordflow}{if} (scb\_index >= ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05734}05734                         printf(\textcolor{stringliteral}{"{}Disconnected List inconsistency. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05735}05735                                \textcolor{stringliteral}{"{}SCB index == \%d, yet numscbs == \%d."{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05736}05736                                scb\_index, ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05737}05737                         \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05738}05738                         panic(\textcolor{stringliteral}{"{}for safety"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05739}05739                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05740}05740 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05741}05741                 \textcolor{keywordflow}{if} (next == prev) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05742}05742                         panic(\textcolor{stringliteral}{"{}Disconnected List Loop. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05743}05743                               \textcolor{stringliteral}{"{}cur SCBPTR == \%x, prev SCBPTR == \%x."{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05744}05744                               next, prev);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05745}05745                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05746}05746                 scbp = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05747}05747                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(ahc, scbp, target, channel, lun,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05748}05748                                   tag, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05749}05749                         count++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05750}05750                         \textcolor{keywordflow}{if} (remove) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05751}05751                                 next =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05752}05752                                     \mbox{\hyperlink{aic7xxx_8c_aef300d0337432abdf393f372c7d0cf50}{ahc\_rem\_scb\_from\_disc\_list}}(ahc, prev, next);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05753}05753                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05754}05754                                 prev = next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05755}05755                                 next = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05756}05756                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05757}05757                         \textcolor{keywordflow}{if} (stop\_on\_first)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05758}05758                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05759}05759                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05760}05760                         prev = next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05761}05761                         next = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05762}05762                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05763}05763         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05764}05764         \textcolor{keywordflow}{if} (save\_state)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05765}05765                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, active\_scb);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05766}05766         \textcolor{keywordflow}{return} (count);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05767}05767 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05768}05768 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05769}05769 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05770}05770 \textcolor{comment}{ * Remove an SCB from the on chip list of disconnected transactions.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05771}05771 \textcolor{comment}{ * This is empty/unused if we are not performing SCB paging.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05772}05772 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05773}05773 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05774}\mbox{\hyperlink{aic7xxx_8c_aef300d0337432abdf393f372c7d0cf50}{05774}} \mbox{\hyperlink{aic7xxx_8c_aef300d0337432abdf393f372c7d0cf50}{ahc\_rem\_scb\_from\_disc\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int prev, u\_int scbptr)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05775}05775 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05776}05776         u\_int next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05777}05777 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05778}05778         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05779}05779         next = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05780}05780 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05781}05781         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05782}05782 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05783}05783         \mbox{\hyperlink{aic7xxx_8c_a25dbd585d391e6e4ec69585a9c3e392b}{ahc\_add\_curscb\_to\_free\_list}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05784}05784 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05785}05785         \textcolor{keywordflow}{if} (prev != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05786}05786                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, prev);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05787}05787                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}}, next);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05788}05788         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05789}05789                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a8846b03d9aad8bcb7611fc23788a7c63}{DISCONNECTED\_SCBH}}, next);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05790}05790 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05791}05791         \textcolor{keywordflow}{return} (next);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05792}05792 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05793}05793 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05794}05794 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05795}05795 \textcolor{comment}{ * Add the SCB as selected by SCBPTR onto the on chip list of}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05796}05796 \textcolor{comment}{ * free hardware SCBs.  This list is empty/unused if we are not}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05797}05797 \textcolor{comment}{ * performing SCB paging.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05798}05798 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05799}05799 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05800}\mbox{\hyperlink{aic7xxx_8c_a25dbd585d391e6e4ec69585a9c3e392b}{05800}} \mbox{\hyperlink{aic7xxx_8c_a25dbd585d391e6e4ec69585a9c3e392b}{ahc\_add\_curscb\_to\_free\_list}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05801}05801 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05802}05802         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05803}05803 \textcolor{comment}{         * Invalidate the tag so that our abort}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05804}05804 \textcolor{comment}{         * routines don't think it's active.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05805}05805 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05806}05806         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}}, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05807}05807 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05808}05808         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a68e9e5c60abbbad6da178ade4326e6a6}{AHC\_PAGESCBS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05809}05809                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a95114269163c01efbb57b7f8fedac7df}{FREE\_SCBH}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05810}05810                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a95114269163c01efbb57b7f8fedac7df}{FREE\_SCBH}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05811}05811         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05812}05812 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05813}05813 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05814}05814 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05815}05815 \textcolor{comment}{ * Manipulate the waiting for selection list and return the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05816}05816 \textcolor{comment}{ * scb that follows the one that we remove.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05817}05817 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05818}05818 \textcolor{keyword}{static} u\_int}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05819}\mbox{\hyperlink{aic7xxx_8c_a8a7c20309d70bbcbaaede262009ed982}{05819}} \mbox{\hyperlink{aic7xxx_8c_a8a7c20309d70bbcbaaede262009ed982}{ahc\_rem\_wscb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int scbpos, u\_int prev)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05820}05820 \{       }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05821}05821         u\_int curscb, next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05822}05822 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05823}05823         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05824}05824 \textcolor{comment}{         * Select the SCB we want to abort and}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05825}05825 \textcolor{comment}{         * pull the next pointer out of it.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05826}05826 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05827}05827         curscb = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05828}05828         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, scbpos);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05829}05829         next = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05830}05830 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05831}05831         \textcolor{comment}{/* Clear the necessary fields */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05832}05832         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05833}05833 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05834}05834         \mbox{\hyperlink{aic7xxx_8c_a25dbd585d391e6e4ec69585a9c3e392b}{ahc\_add\_curscb\_to\_free\_list}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05835}05835 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05836}05836         \textcolor{comment}{/* update the waiting list */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05837}05837         \textcolor{keywordflow}{if} (prev == \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05838}05838                 \textcolor{comment}{/* First in the list */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05839}05839                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aed8758122c520c918c257c19e01d0a91}{WAITING\_SCBH}}, next); }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05840}05840 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05841}05841                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05842}05842 \textcolor{comment}{                 * Ensure we aren't attempting to perform}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05843}05843 \textcolor{comment}{                 * selection for this entry.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05844}05844 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05845}05845                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_acec8418886ca76cef8259ad48e991238}{ENSELO}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05846}05846         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05847}05847                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05848}05848 \textcolor{comment}{                 * Select the scb that pointed to us }}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05849}05849 \textcolor{comment}{                 * and update its next pointer.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05850}05850 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05851}05851                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, prev);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05852}05852                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}}, next);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05853}05853         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05854}05854 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05855}05855         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05856}05856 \textcolor{comment}{         * Point us back at the original scb position.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05857}05857 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05858}05858         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, curscb);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05859}05859         \textcolor{keywordflow}{return} next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05860}05860 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05861}05861 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05862}05862 \textcolor{comment}{/******************************** Error Handling ******************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05863}05863 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05864}05864 \textcolor{comment}{ * Abort all SCBs that match the given description (target/channel/lun/tag),}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05865}05865 \textcolor{comment}{ * setting their status to the passed in status if the status has not already}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05866}05866 \textcolor{comment}{ * been modified from CAM\_REQ\_INPROG.  This routine assumes that the sequencer}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05867}05867 \textcolor{comment}{ * is paused before it is called.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05868}05868 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05869}05869 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05870}\mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{05870}} \mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{ahc\_abort\_scbs}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{int} target, \textcolor{keywordtype}{char} channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05871}05871                \textcolor{keywordtype}{int} lun, u\_int tag, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7c}{role\_t}} role, uint32\_t status)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05872}05872 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05873}05873         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *scbp;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05874}05874         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *scbp\_next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05875}05875         u\_int   active\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05876}05876         \textcolor{keywordtype}{int}     i, j;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05877}05877         \textcolor{keywordtype}{int}     maxtarget;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05878}05878         \textcolor{keywordtype}{int}     minlun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05879}05879         \textcolor{keywordtype}{int}     maxlun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05880}05880 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05881}05881         \textcolor{keywordtype}{int}     found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05882}05882 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05883}05883         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05884}05884 \textcolor{comment}{         * Don't attempt to run any queued untagged transactions}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05885}05885 \textcolor{comment}{         * until we are done with the abort process.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05886}05886 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05887}05887         \mbox{\hyperlink{aic7xxx__inline_8h_a5c6e7afc36d1ae2c1b03da0c065dca21}{ahc\_freeze\_untagged\_queues}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05888}05888 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05889}05889         \textcolor{comment}{/* restore this when we're done */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05890}05890         active\_scb = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05891}05891 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05892}05892         found = \mbox{\hyperlink{aic7xxx_8c_a6854c2ec2b22382f77741bf98681bcef}{ahc\_search\_qinfifo}}(ahc, target, channel, lun, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05893}05893                                    role, CAM\_REQUEUE\_REQ, \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05894}05894 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05895}05895         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05896}05896 \textcolor{comment}{         * Clean out the busy target table for any untagged commands.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05897}05897 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05898}05898         i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05899}05899         maxtarget = 16;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05900}05900         \textcolor{keywordflow}{if} (target != CAM\_TARGET\_WILDCARD) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05901}05901                 i = target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05902}05902                 \textcolor{keywordflow}{if} (channel == \textcolor{charliteral}{'B'})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05903}05903                         i += 8;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05904}05904                 maxtarget = i + 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05905}05905         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05906}05906 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05907}05907         \textcolor{keywordflow}{if} (lun == CAM\_LUN\_WILDCARD) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05908}05908                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05909}05909 \textcolor{comment}{                 * Unless we are using an SCB based}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05910}05910 \textcolor{comment}{                 * busy targets table, there is only}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05911}05911 \textcolor{comment}{                 * one table entry for all luns of}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05912}05912 \textcolor{comment}{                 * a target.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05913}05913 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05914}05914                 minlun = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05915}05915                 maxlun = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05916}05916                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81aa9840bbf349029e67eedfebd36516d7e}{AHC\_SCB\_BTT}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05917}05917                         maxlun = \mbox{\hyperlink{aic7xxx_8h_a4b4241cdde48f619222c98ca9ad15adf}{AHC\_NUM\_LUNS}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05918}05918         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05919}05919                 minlun = lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05920}05920                 maxlun = lun + 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05921}05921         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05922}05922 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05923}05923         \textcolor{keywordflow}{if} (role != \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05924}05924                 \textcolor{keywordflow}{for} (;i < maxtarget; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05925}05925                         \textcolor{keywordflow}{for} (j = minlun;j < maxlun; j++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05926}05926                                 u\_int scbid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05927}05927                                 u\_int tcl;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05928}05928 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05929}05929                                 tcl = \mbox{\hyperlink{aic79xx_8h_a7d650f0ba38347753d66928363306341}{BUILD\_TCL}}(i << 4, j);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05930}05930                                 scbid = \mbox{\hyperlink{aic7xxx_8c_aa71002135f4ba7350e887b4f93942ece}{ahc\_index\_busy\_tcl}}(ahc, tcl);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05931}05931                                 scbp = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scbid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05932}05932                                 \textcolor{keywordflow}{if} (scbp == NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05933}05933                                  || \mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(ahc, scbp, target, channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05934}05934                                                   lun, tag, role) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05935}05935                                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05936}05936                                 \mbox{\hyperlink{aic7xxx_8c_adc1f6f985d4e2ba25915ce68d2c2f37b}{ahc\_unbusy\_tcl}}(ahc, \mbox{\hyperlink{aic79xx_8h_a7d650f0ba38347753d66928363306341}{BUILD\_TCL}}(i << 4, j));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05937}05937                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05938}05938                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05939}05939 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05940}05940                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05941}05941 \textcolor{comment}{                 * Go through the disconnected list and remove any entries we}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05942}05942 \textcolor{comment}{                 * have queued for completion, 0'ing their control byte too.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05943}05943 \textcolor{comment}{                 * We save the active SCB and restore it ourselves, so there}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05944}05944 \textcolor{comment}{                 * is no reason for this search to restore it too.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05945}05945 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05946}05946                 \mbox{\hyperlink{aic7xxx_8c_a3bd218cc5c2264a4f9fa01e15513dbe6}{ahc\_search\_disc\_list}}(ahc, target, channel, lun, tag,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05947}05947                                      \textcolor{comment}{/*stop\_on\_first*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}}, \textcolor{comment}{/*remove*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05948}05948                                      \textcolor{comment}{/*save\_state*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05949}05949         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05950}05950 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05951}05951         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05952}05952 \textcolor{comment}{         * Go through the hardware SCB array looking for commands that}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05953}05953 \textcolor{comment}{         * were active but not on any list.  In some cases, these remnants}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05954}05954 \textcolor{comment}{         * might not still have mappings in the scbindex array (e.g. unexpected}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05955}05955 \textcolor{comment}{         * bus free with the same scb queued for an abort).  Don't hold this}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05956}05956 \textcolor{comment}{         * against them.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05957}05957 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05958}05958         \textcolor{keywordflow}{for} (i = 0; i < ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05959}05959                 u\_int scbid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05960}05960 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05961}05961                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05962}05962                 scbid = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05963}05963                 scbp = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, scbid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05964}05964                 \textcolor{keywordflow}{if} ((scbp == NULL \&\& scbid != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05965}05965                  || (scbp != NULL}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05966}05966                   \&\& \mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(ahc, scbp, target, channel, lun, tag, role)))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05967}05967                         \mbox{\hyperlink{aic7xxx_8c_a25dbd585d391e6e4ec69585a9c3e392b}{ahc\_add\_curscb\_to\_free\_list}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05968}05968         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05969}05969 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05970}05970         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05971}05971 \textcolor{comment}{         * Go through the pending CCB list and look for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05972}05972 \textcolor{comment}{         * commands for this target that are still active.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05973}05973 \textcolor{comment}{         * These are other tagged commands that were}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05974}05974 \textcolor{comment}{         * disconnected when the reset occurred.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05975}05975 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05976}05976         scbp\_next = LIST\_FIRST(\&ahc-\/>pending\_scbs);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05977}05977         \textcolor{keywordflow}{while} (scbp\_next != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05978}05978                 scbp = scbp\_next;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05979}05979                 scbp\_next = LIST\_NEXT(scbp, \mbox{\hyperlink{aic79xx_8h_a08d5b7a26a4fe44c4684fe5098ba19b1}{pending\_links}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05980}05980                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_aee9e8ee4de52e0e90115bdebdb04d3c8}{ahc\_match\_scb}}(ahc, scbp, target, channel, lun, tag, role)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05981}05981                         cam\_status ostat;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05982}05982 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05983}05983                         ostat = \mbox{\hyperlink{aic__osm__lib_8h_a9b0c77ef4a54a6c634b830810dfa1306}{aic\_get\_transaction\_status}}(scbp);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05984}05984                         \textcolor{keywordflow}{if} (ostat == CAM\_REQ\_INPROG)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05985}05985                                 \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(scbp, status);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05986}05986                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic__osm__lib_8h_a9b0c77ef4a54a6c634b830810dfa1306}{aic\_get\_transaction\_status}}(scbp) != CAM\_REQ\_CMP)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05987}05987                                 \mbox{\hyperlink{aic__osm__lib_8h_ae64ada1cd2c51ce61826f9a2423c729f}{aic\_freeze\_scb}}(scbp);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05988}05988                         \textcolor{keywordflow}{if} ((scbp-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ad0ce2db7e532c67e4f358a676e732b79}{SCB\_ACTIVE}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05989}05989                                 printf(\textcolor{stringliteral}{"{}Inactive SCB on pending list\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05990}05990                         \mbox{\hyperlink{aic7xxx__osm_8c_a356313da77941be8f5afdf35318ff0e1}{ahc\_done}}(ahc, scbp);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05991}05991                         found++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05992}05992                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05993}05993         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05994}05994         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, active\_scb);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05995}05995         ahc\_platform\_abort\_scbs(ahc, target, channel, lun, tag, role, status);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05996}05996         \mbox{\hyperlink{aic7xxx__inline_8h_a17ad4cad6f76a11ce890ca6cd8bd7b28}{ahc\_release\_untagged\_queues}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05997}05997         \textcolor{keywordflow}{return} found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05998}05998 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l05999}05999 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06000}06000 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06001}\mbox{\hyperlink{aic7xxx_8c_a3d9e47549867f4ef718bd13e7c59681b}{06001}} \mbox{\hyperlink{aic7xxx_8c_a3d9e47549867f4ef718bd13e7c59681b}{ahc\_reset\_current\_bus}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06002}06002 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06003}06003         uint8\_t scsiseq;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06004}06004 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06005}06005         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}) \& \string~\mbox{\hyperlink{aic79xx__reg_8h_ad20c387c6b3f1d81441a100ec0c68274}{ENSCSIRST}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06006}06006         scsiseq = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06007}06007         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, scsiseq | \mbox{\hyperlink{aic79xx__reg_8h_a897f61fadf4c90dc872ef246a832a82b}{SCSIRSTO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06008}06008         \mbox{\hyperlink{aic7xxx__osm_8h_a277e6e5fb1f6eee84ee7d2399ebd5b83}{ahc\_flush\_device\_writes}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06009}06009         \mbox{\hyperlink{aic__osm__lib_8h_a23559a914641f4b70a959f25b8281c87}{aic\_delay}}(\mbox{\hyperlink{aic7xxx_8h_a80cc7621dabc4747bee3ce1f116d11d0}{AHC\_BUSRESET\_DELAY}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06010}06010         \textcolor{comment}{/* Turn off the bus reset */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06011}06011         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, scsiseq \& \string~\mbox{\hyperlink{aic79xx__reg_8h_a897f61fadf4c90dc872ef246a832a82b}{SCSIRSTO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06012}06012 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06013}06013         \mbox{\hyperlink{aic7xxx_8c_a77920c2be2bda9100b97cbd841b5464c}{ahc\_clear\_intstat}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06014}06014 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06015}06015         \textcolor{comment}{/* Re-\/enable reset interrupts */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06016}06016         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}) | \mbox{\hyperlink{aic79xx__reg_8h_ad20c387c6b3f1d81441a100ec0c68274}{ENSCSIRST}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06017}06017 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06018}06018 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06019}06019 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06020}\mbox{\hyperlink{aic7xxx_8c_ac9e6be5168888f595fce1e51193b9938}{06020}} \mbox{\hyperlink{aic7xxx_8c_ac9e6be5168888f595fce1e51193b9938}{ahc\_reset\_channel}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{char} channel, \textcolor{keywordtype}{int} initiate\_reset)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06021}06021 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06022}06022         \textcolor{keyword}{struct  }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06023}06023         u\_int   initiator, \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, max\_scsiid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06024}06024         u\_int   sblkctl;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06025}06025         u\_int   scsiseq;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06026}06026         u\_int   simode1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06027}06027         \textcolor{keywordtype}{int}     found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06028}06028         \textcolor{keywordtype}{int}     restart\_needed;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06029}06029         \textcolor{keywordtype}{char}    cur\_channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06030}06030 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06031}06031         ahc-\/>\mbox{\hyperlink{structahc__softc_acf7b387fd369e4697aaea509c2f74042}{pending\_device}} = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06032}06032 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06033}06033         \mbox{\hyperlink{aic7xxx_8c_ab107b6458f30083b4a6cca6f965daa35}{ahc\_compile\_devinfo}}(\&devinfo,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06034}06034                             CAM\_TARGET\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06035}06035                             CAM\_TARGET\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06036}06036                             CAM\_LUN\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06037}06037                             \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3ac76018baf54734513ce07029ab5ac3}{ROLE\_UNKNOWN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06038}06038         \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06039}06039 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06040}06040         \textcolor{comment}{/* Make sure the sequencer is in a safe location. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06041}06041         \mbox{\hyperlink{aic7xxx_8c_a71410b7cd014e87227c1ba9697bef195}{ahc\_clear\_critical\_section}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06042}06042 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06043}06043         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06044}06044 \textcolor{comment}{         * Run our command complete fifos to ensure that we perform}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06045}06045 \textcolor{comment}{         * completion processing on any commands that 'completed'}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06046}06046 \textcolor{comment}{         * before the reset occurred.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06047}06047 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06048}06048         \mbox{\hyperlink{aic7xxx_8c_a31af5e3fc920c37807d5c5cd162199f6}{ahc\_run\_qoutfifo}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06049}06049 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06050}06050         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06051}06051 \textcolor{comment}{         * XXX -\/ In Twin mode, the tqinfifo may have commands}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06052}06052 \textcolor{comment}{         *       for an unaffected channel in it.  However, if}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06053}06053 \textcolor{comment}{         *       we have run out of ATIO resources to drain that}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06054}06054 \textcolor{comment}{         *       queue, we may not get them all out here.  Further,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06055}06055 \textcolor{comment}{         *       the blocked transactions for the reset channel}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06056}06056 \textcolor{comment}{         *       should just be killed off, irrespecitve of whether}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06057}06057 \textcolor{comment}{         *       we are blocked on ATIO resources.  Write a routine}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06058}06058 \textcolor{comment}{         *       to compact the tqinfifo appropriately.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06059}06059 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06060}06060         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a23c5171bfe59cf85decfd0b4c0a72f82}{AHC\_TARGETROLE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06061}06061                 ahc\_run\_tqinfifo(ahc, \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06062}06062         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06063}06063 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06064}06064 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06065}06065         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06066}06066 \textcolor{comment}{         * Reset the bus if we are initiating this reset}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06067}06067 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06068}06068         sblkctl = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06069}06069         cur\_channel = \textcolor{charliteral}{'A'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06070}06070         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06071}06071          \&\& ((sblkctl \& \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}}) != 0))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06072}06072             cur\_channel = \textcolor{charliteral}{'B'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06073}06073         scsiseq = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8da1b58b6c1f22bff54431431b06a8e6}{SCSISEQ\_TEMPLATE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06074}06074         \textcolor{keywordflow}{if} (cur\_channel != \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06075}06075                 \textcolor{comment}{/* Case 1: Command for another bus is active}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06076}06076 \textcolor{comment}{                 * Stealthily reset the other bus without}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06077}06077 \textcolor{comment}{                 * upsetting the current bus.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06078}06078 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06079}06079                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, sblkctl \string^ \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06080}06080                 simode1 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}) \& \string~(\mbox{\hyperlink{aic79xx__reg_8h_a7c2bfc5988ee9d3637cc2172b7c88b3d}{ENBUSFREE}}|\mbox{\hyperlink{aic79xx__reg_8h_ad20c387c6b3f1d81441a100ec0c68274}{ENSCSIRST}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06081}06081 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06082}06082                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06083}06083 \textcolor{comment}{                 * Bus resets clear ENSELI, so we cannot}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06084}06084 \textcolor{comment}{                 * defer re-\/enabling bus reset interrupts}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06085}06085 \textcolor{comment}{                 * if we are in target mode.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06086}06086 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06087}06087                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a23c5171bfe59cf85decfd0b4c0a72f82}{AHC\_TARGETROLE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06088}06088                         simode1 |= \mbox{\hyperlink{aic79xx__reg_8h_ad20c387c6b3f1d81441a100ec0c68274}{ENSCSIRST}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06089}06089 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06090}06090                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, simode1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06091}06091                 \textcolor{keywordflow}{if} (initiate\_reset)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06092}06092                         \mbox{\hyperlink{aic7xxx_8c_a3d9e47549867f4ef718bd13e7c59681b}{ahc\_reset\_current\_bus}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06093}06093                 \mbox{\hyperlink{aic7xxx_8c_a77920c2be2bda9100b97cbd841b5464c}{ahc\_clear\_intstat}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06094}06094                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, scsiseq \& (\mbox{\hyperlink{aic79xx__reg_8h_a5130b53e9a5c5ef1cf67782e27aafe44}{ENSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a79ddc1008bee9be3dabf244839710e29}{ENRSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a73f4f4cb70a503ed678c662d81f59ac4}{ENAUTOATNP}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06095}06095                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, sblkctl);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06096}06096                 restart\_needed = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06097}06097         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06098}06098                 \textcolor{comment}{/* Case 2: A command from this bus is active or we're idle */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06099}06099                 simode1 = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}) \& \string~(\mbox{\hyperlink{aic79xx__reg_8h_a7c2bfc5988ee9d3637cc2172b7c88b3d}{ENBUSFREE}}|\mbox{\hyperlink{aic79xx__reg_8h_ad20c387c6b3f1d81441a100ec0c68274}{ENSCSIRST}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06100}06100 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06101}06101                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06102}06102 \textcolor{comment}{                 * Bus resets clear ENSELI, so we cannot}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06103}06103 \textcolor{comment}{                 * defer re-\/enabling bus reset interrupts}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06104}06104 \textcolor{comment}{                 * if we are in target mode.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06105}06105 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06106}06106                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a23c5171bfe59cf85decfd0b4c0a72f82}{AHC\_TARGETROLE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06107}06107                         simode1 |= \mbox{\hyperlink{aic79xx__reg_8h_ad20c387c6b3f1d81441a100ec0c68274}{ENSCSIRST}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06108}06108 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06109}06109                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}, simode1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06110}06110                 \textcolor{keywordflow}{if} (initiate\_reset)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06111}06111                         \mbox{\hyperlink{aic7xxx_8c_a3d9e47549867f4ef718bd13e7c59681b}{ahc\_reset\_current\_bus}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06112}06112                 \mbox{\hyperlink{aic7xxx_8c_a77920c2be2bda9100b97cbd841b5464c}{ahc\_clear\_intstat}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06113}06113                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, scsiseq \& (\mbox{\hyperlink{aic79xx__reg_8h_a5130b53e9a5c5ef1cf67782e27aafe44}{ENSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a79ddc1008bee9be3dabf244839710e29}{ENRSELI}}|\mbox{\hyperlink{aic79xx__reg_8h_a73f4f4cb70a503ed678c662d81f59ac4}{ENAUTOATNP}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06114}06114                 restart\_needed = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06115}06115         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06116}06116 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06117}06117         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06118}06118 \textcolor{comment}{         * Clean up all the state information for the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06119}06119 \textcolor{comment}{         * pending transactions on this bus.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06120}06120 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06121}06121         found = \mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{ahc\_abort\_scbs}}(ahc, CAM\_TARGET\_WILDCARD, \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06122}06122                                CAM\_LUN\_WILDCARD, \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06123}06123                                \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3ac76018baf54734513ce07029ab5ac3}{ROLE\_UNKNOWN}}, CAM\_SCSI\_BUS\_RESET);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06124}06124 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06125}06125         max\_scsiid = (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}) ? 15 : 7;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06126}06126 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06127}06127 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06128}06128         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06129}06129 \textcolor{comment}{         * Send an immediate notify ccb to all target more peripheral}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06130}06130 \textcolor{comment}{         * drivers affected by this action.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06131}06131 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06132}06132         \textcolor{keywordflow}{for} (\mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}} = 0; \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}} <= max\_scsiid; \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06133}06133                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}}* tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06134}06134                 u\_int lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06135}06135 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06136}06136                 tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[target];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06137}06137                 \textcolor{keywordflow}{if} (tstate == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06138}06138                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06139}06139                 \textcolor{keywordflow}{for} (lun = 0; lun < \mbox{\hyperlink{aic7xxx_8h_a4b4241cdde48f619222c98ca9ad15adf}{AHC\_NUM\_LUNS}}; lun++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06140}06140                         \textcolor{keyword}{struct }ahc\_tmode\_lstate* lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06141}06141 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06142}06142                         lstate = tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[lun];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06143}06143                         \textcolor{keywordflow}{if} (lstate == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06144}06144                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06145}06145 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06146}06146                         ahc\_queue\_lstate\_event(ahc, lstate, CAM\_TARGET\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06147}06147                                                \mbox{\hyperlink{aic79xx_8h_a09e2d7dd98f73ccd8edb6613d42c33a4}{EVENT\_TYPE\_BUS\_RESET}}, \textcolor{comment}{/*arg*/}0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06148}06148                         ahc\_send\_lstate\_events(ahc, lstate);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06149}06149                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06150}06150         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06151}06151 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06152}06152         \textcolor{comment}{/* Notify the XPT that a bus reset occurred */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06153}06153         \mbox{\hyperlink{aic7xxx__osm_8c_a56f943b1be6fa50429a3c2d356ef0ee2}{ahc\_send\_async}}(ahc, devinfo.\mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, CAM\_TARGET\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06154}06154                        CAM\_LUN\_WILDCARD, AC\_BUS\_RESET, NULL);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06155}06155 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06156}06156         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06157}06157 \textcolor{comment}{         * Revert to async/narrow transfers until we renegotiate.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06158}06158 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06159}06159         \textcolor{keywordflow}{for} (target = 0; target <= max\_scsiid; target++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06160}06160                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[target] == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06161}06161                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06162}06162                 \textcolor{keywordflow}{for} (initiator = 0; initiator <= max\_scsiid; initiator++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06163}06163                         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__devinfo}{ahc\_devinfo}} devinfo;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06164}06164 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06165}06165                         \mbox{\hyperlink{aic7xxx_8c_ab107b6458f30083b4a6cca6f965daa35}{ahc\_compile\_devinfo}}(\&devinfo, \mbox{\hyperlink{structahc__devinfo_a7b53060a765e94e40ad388dd72b4aaa9}{target}}, initiator,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06166}06166                                             CAM\_LUN\_WILDCARD,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06167}06167                                             \mbox{\hyperlink{structahc__devinfo_aae7e48aa683e850c7a6a3c007a8001bf}{channel}}, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3ac76018baf54734513ce07029ab5ac3}{ROLE\_UNKNOWN}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06168}06168                         \mbox{\hyperlink{aic7xxx_8c_a65c15f50e1c31142e27333e6ac02d33c}{ahc\_set\_width}}(ahc, \&devinfo, MSG\_EXT\_WDTR\_BUS\_8\_BIT,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06169}06169                                       \mbox{\hyperlink{aic7xxx_8h_aa9b0102b222a80d7b614019a37b36a17}{AHC\_TRANS\_CUR}}, \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06170}06170                         \mbox{\hyperlink{aic7xxx_8c_a14cd17a8eac81f514d0fed679f48b18f}{ahc\_set\_syncrate}}(ahc, \&devinfo, \textcolor{comment}{/*syncrate*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06171}06171                                          \textcolor{comment}{/*period*/}0, \textcolor{comment}{/*offset*/}0,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06172}06172                                          \textcolor{comment}{/*ppr\_options*/}0, \mbox{\hyperlink{aic7xxx_8h_aa9b0102b222a80d7b614019a37b36a17}{AHC\_TRANS\_CUR}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06173}06173                                          \textcolor{comment}{/*paused*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06174}06174                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06175}06175         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06176}06176 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06177}06177         \textcolor{keywordflow}{if} (restart\_needed)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06178}06178                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06179}06179         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06180}06180                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06181}06181         \textcolor{keywordflow}{return} found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06182}06182 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06183}06183 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06184}06184 \textcolor{comment}{/***************************** Residual Processing ****************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06185}06185 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06186}06186 \textcolor{comment}{ * Calculate the residual for a just completed SCB.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06187}06187 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06188}06188 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06189}\mbox{\hyperlink{aic7xxx_8c_a55ff48b07672ad610c870c16953dfd80}{06189}} \mbox{\hyperlink{aic7xxx_8c_a55ff48b07672ad610c870c16953dfd80}{ahc\_calc\_residual}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06190}06190 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06191}06191         \textcolor{keyword}{struct }\mbox{\hyperlink{structhardware__scb}{hardware\_scb}} *hscb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06192}06192         \textcolor{keyword}{struct }\mbox{\hyperlink{structstatus__pkt}{status\_pkt}} *spkt;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06193}06193         uint32\_t sgptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06194}06194         uint32\_t resid\_sgptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06195}06195         uint32\_t resid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06196}06196 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06197}06197         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06198}06198 \textcolor{comment}{         * 5 cases.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06199}06199 \textcolor{comment}{         * 1) No residual.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06200}06200 \textcolor{comment}{         *    SG\_RESID\_VALID clear in sgptr.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06201}06201 \textcolor{comment}{         * 2) Transferless command}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06202}06202 \textcolor{comment}{         * 3) Never performed any transfers.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06203}06203 \textcolor{comment}{         *    sgptr has SG\_FULL\_RESID set.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06204}06204 \textcolor{comment}{         * 4) No residual but target did not}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06205}06205 \textcolor{comment}{         *    save data pointers after the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06206}06206 \textcolor{comment}{         *    last transfer, so sgptr was}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06207}06207 \textcolor{comment}{         *    never updated.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06208}06208 \textcolor{comment}{         * 5) We have a partial residual.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06209}06209 \textcolor{comment}{         *    Use residual\_sgptr to determine}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06210}06210 \textcolor{comment}{         *    where we are.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06211}06211 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06212}06212 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06213}06213         hscb = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06214}06214         sgptr = \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(hscb-\/>\mbox{\hyperlink{structhardware__scb_a02d4c583482881c8ca27fc46820f4ff6}{sgptr}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06215}06215         \textcolor{keywordflow}{if} ((sgptr \& \mbox{\hyperlink{aic7xxx__reg_8h_aa2cfb355ae6cd36c348b9d166049513f}{SG\_RESID\_VALID}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06216}06216                 \textcolor{comment}{/* Case 1 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06217}06217                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06218}06218         sgptr \&= \string~SG\_RESID\_VALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06219}06219 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06220}06220         \textcolor{keywordflow}{if} ((sgptr \& \mbox{\hyperlink{aic79xx__reg_8h_ac81c629d4e879f116477123c2978cb27}{SG\_LIST\_NULL}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06221}06221                 \textcolor{comment}{/* Case 2 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06222}06222                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06223}06223 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06224}06224         spkt = \&hscb-\/>\mbox{\hyperlink{structhardware__scb_ae212297c91da823a0c6dc55c7b06e8e3}{shared\_data}}.\mbox{\hyperlink{structhardware__scb_af1ad4aece26f02502ab0aa90105cc61a}{status}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06225}06225         resid\_sgptr = \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(spkt-\/>\mbox{\hyperlink{structstatus__pkt_a8f5496ec74727fdf0cbfc441cc612398}{residual\_sg\_ptr}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06226}06226         \textcolor{keywordflow}{if} ((sgptr \& \mbox{\hyperlink{aic79xx__reg_8h_a8114078b739311bb4a7d3b781d55b4d9}{SG\_FULL\_RESID}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06227}06227                 \textcolor{comment}{/* Case 3 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06228}06228                 resid = \mbox{\hyperlink{aic__osm__lib_8h_aafa3967a4195122f59e15a2ee11be5ab}{aic\_get\_transfer\_length}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06229}06229         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((resid\_sgptr \& \mbox{\hyperlink{aic79xx__reg_8h_ac81c629d4e879f116477123c2978cb27}{SG\_LIST\_NULL}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06230}06230                 \textcolor{comment}{/* Case 4 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06231}06231                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06232}06232         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((resid\_sgptr \& \string~\mbox{\hyperlink{aic79xx_8h_a9486fa4ef889b26b6d872d6bf29bd031}{SG\_PTR\_MASK}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06233}06233                 panic(\textcolor{stringliteral}{"{}Bogus resid sgptr value 0x\%x\(\backslash\)n"{}}, resid\_sgptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06234}06234                 \textcolor{comment}{/* NOTREACHED */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06235}06235                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06236}06236         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06237}06237                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}} *sg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06238}06238 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06239}06239                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06240}06240 \textcolor{comment}{                 * Remainder of the SG where the transfer}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06241}06241 \textcolor{comment}{                 * stopped.  }}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06242}06242 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06243}06243                 resid = \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(spkt-\/>\mbox{\hyperlink{structstatus__pkt_ae299fa84446be84045dc9cda45fbd183}{residual\_datacnt}}) \& \mbox{\hyperlink{aic7xxx_8h_ad9d7f41a161867bcdb98ac3b8d0af9e5}{AHC\_SG\_LEN\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06244}06244                 sg = \mbox{\hyperlink{aic7xxx__inline_8h_a2eaef82d78bf84652d5f7d1a7b54e417}{ahc\_sg\_bus\_to\_virt}}(\mbox{\hyperlink{structscb}{scb}}, resid\_sgptr \& \mbox{\hyperlink{aic79xx_8h_a9486fa4ef889b26b6d872d6bf29bd031}{SG\_PTR\_MASK}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06245}06245 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06246}06246                 \textcolor{comment}{/* The residual sg\_ptr always points to the next sg */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06247}06247                 sg-\/-\/;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06248}06248 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06249}06249                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06250}06250 \textcolor{comment}{                 * Add up the contents of all residual}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06251}06251 \textcolor{comment}{                 * SG segments that are after the SG where}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06252}06252 \textcolor{comment}{                 * the transfer stopped.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06253}06253 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06254}06254                 \textcolor{keywordflow}{while} ((\mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}}) \& \mbox{\hyperlink{aic7xxx_8h_ae5d3e51af41dfbe657da890323dd5360}{AHC\_DMA\_LAST\_SEG}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06255}06255                         sg++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06256}06256                         resid += \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(sg-\/>\mbox{\hyperlink{structahc__dma__seg_a9f1d75ff149187a1acb7d46f7bdbdbf7}{len}}) \& \mbox{\hyperlink{aic7xxx_8h_ad9d7f41a161867bcdb98ac3b8d0af9e5}{AHC\_SG\_LEN\_MASK}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06257}06257                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06258}06258         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06259}06259         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116abe2d7ff364f616c0f6dce1621e444b78}{SCB\_SENSE}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06260}06260                 \mbox{\hyperlink{aic__osm__lib_8h_a6b8f322d38274f7ec45c32fa1350da65}{aic\_set\_residual}}(\mbox{\hyperlink{structscb}{scb}}, resid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06261}06261         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06262}06262                 \mbox{\hyperlink{aic__osm__lib_8h_a2db75b18dc2343f00ebcce76fbf013ef}{aic\_set\_sense\_residual}}(\mbox{\hyperlink{structscb}{scb}}, resid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06263}06263 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06264}06264 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06265}06265         \textcolor{keywordflow}{if} ((ahc\_debug \& AHC\_SHOW\_MISC) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06266}06266                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06267}06267                 printf(\textcolor{stringliteral}{"{}Handled \%sResidual of \%d bytes\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06268}06268                        (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116abe2d7ff364f616c0f6dce1621e444b78}{SCB\_SENSE}}) ? \textcolor{stringliteral}{"{}Sense "{}} : \textcolor{stringliteral}{"{}"{}}, resid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06269}06269         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06270}06270 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06271}06271 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06272}06272 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06273}06273 \textcolor{comment}{/******************************* Target Mode **********************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06274}06274 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06275}06275 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06276}06276 \textcolor{comment}{ * Add a target mode event to this lun's queue}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06277}06277 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06278}06278 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06279}06279 ahc\_queue\_lstate\_event(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} ahc\_tmode\_lstate *lstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06280}06280                        u\_int initiator\_id, u\_int event\_type, u\_int event\_arg)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06281}06281 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06282}06282         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__event}{ahc\_tmode\_event}} *event;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06283}06283         \textcolor{keywordtype}{int} pending;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06284}06284 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06285}06285         xpt\_freeze\_devq(lstate-\/>path, \textcolor{comment}{/*count*/}1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06286}06286         \textcolor{keywordflow}{if} (lstate-\/>event\_w\_idx >= lstate-\/>event\_r\_idx)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06287}06287                 pending = lstate-\/>event\_w\_idx -\/ lstate-\/>event\_r\_idx;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06288}06288         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06289}06289                 pending = \mbox{\hyperlink{aic7xxx_8h_a111342a6fda52ffa074af22946618a25}{AHC\_TMODE\_EVENT\_BUFFER\_SIZE}} + 1}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06290}06290                         -\/ (lstate-\/>event\_r\_idx -\/ lstate-\/>event\_w\_idx);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06291}06291 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06292}06292         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structahc__tmode__event_ad34172bef680b4c04a9a89f1e31577af}{event\_type}} == \mbox{\hyperlink{aic79xx_8h_a09e2d7dd98f73ccd8edb6613d42c33a4}{EVENT\_TYPE\_BUS\_RESET}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06293}06293          || \mbox{\hyperlink{structahc__tmode__event_ad34172bef680b4c04a9a89f1e31577af}{event\_type}} == MSG\_BUS\_DEV\_RESET) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06294}06294                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06295}06295 \textcolor{comment}{                 * Any earlier events are irrelevant, so reset our buffer.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06296}06296 \textcolor{comment}{                 * This has the effect of allowing us to deal with reset}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06297}06297 \textcolor{comment}{                 * floods (an external device holding down the reset line)}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06298}06298 \textcolor{comment}{                 * without losing the event that is really interesting.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06299}06299 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06300}06300                 lstate-\/>event\_r\_idx = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06301}06301                 lstate-\/>event\_w\_idx = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06302}06302                 xpt\_release\_devq(lstate-\/>path, pending, \textcolor{comment}{/*runqueue*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06303}06303         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06304}06304 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06305}06305         \textcolor{keywordflow}{if} (pending == \mbox{\hyperlink{aic7xxx_8h_a111342a6fda52ffa074af22946618a25}{AHC\_TMODE\_EVENT\_BUFFER\_SIZE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06306}06306                 xpt\_print\_path(lstate-\/>path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06307}06307                 printf(\textcolor{stringliteral}{"{}immediate event \%x:\%x lost\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06308}06308                        lstate-\/>event\_buffer[lstate-\/>event\_r\_idx].event\_type,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06309}06309                        lstate-\/>event\_buffer[lstate-\/>event\_r\_idx].event\_arg);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06310}06310                 lstate-\/>event\_r\_idx++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06311}06311                 \textcolor{keywordflow}{if} (lstate-\/>event\_r\_idx == \mbox{\hyperlink{aic7xxx_8h_a111342a6fda52ffa074af22946618a25}{AHC\_TMODE\_EVENT\_BUFFER\_SIZE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06312}06312                         lstate-\/>event\_r\_idx = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06313}06313                 xpt\_release\_devq(lstate-\/>path, \textcolor{comment}{/*count*/}1, \textcolor{comment}{/*runqueue*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06314}06314         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06315}06315 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06316}06316         \textcolor{keyword}{event} = \&lstate-\/>event\_buffer[lstate-\/>event\_w\_idx];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06317}06317         \textcolor{keyword}{event}-\/>initiator\_id = \mbox{\hyperlink{structahc__tmode__event_a6880874c35983e6ccb30a5217b2920b2}{initiator\_id}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06318}06318         \textcolor{keyword}{event}-\/>event\_type = \mbox{\hyperlink{structahc__tmode__event_ad34172bef680b4c04a9a89f1e31577af}{event\_type}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06319}06319         \textcolor{keyword}{event}-\/>event\_arg = \mbox{\hyperlink{structahc__tmode__event_a60aa2d815b22774075b026be9fa389cd}{event\_arg}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06320}06320         lstate-\/>event\_w\_idx++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06321}06321         \textcolor{keywordflow}{if} (lstate-\/>event\_w\_idx == \mbox{\hyperlink{aic7xxx_8h_a111342a6fda52ffa074af22946618a25}{AHC\_TMODE\_EVENT\_BUFFER\_SIZE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06322}06322                 lstate-\/>event\_w\_idx = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06323}06323 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06324}06324 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06325}06325 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06326}06326 \textcolor{comment}{ * Send any target mode events queued up waiting}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06327}06327 \textcolor{comment}{ * for immediate notify resources.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06328}06328 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06329}06329 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06330}06330 ahc\_send\_lstate\_events(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} ahc\_tmode\_lstate *lstate)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06331}06331 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06332}06332         \textcolor{keyword}{struct }ccb\_hdr *ccbh;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06333}06333         \textcolor{keyword}{struct }ccb\_immediate\_notify *inot;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06334}06334 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06335}06335         \textcolor{keywordflow}{while} (lstate-\/>event\_r\_idx != lstate-\/>event\_w\_idx}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06336}06336             \&\& (ccbh = SLIST\_FIRST(\&lstate-\/>immed\_notifies)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06337}06337                 \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__tmode__event}{ahc\_tmode\_event}} *event;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06338}06338 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06339}06339                 \textcolor{keyword}{event} = \&lstate-\/>event\_buffer[lstate-\/>event\_r\_idx];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06340}06340                 SLIST\_REMOVE\_HEAD(\&lstate-\/>immed\_notifies, sim\_links.sle);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06341}06341                 inot = (\textcolor{keyword}{struct }ccb\_immediate\_notify *)ccbh;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06342}06342                 \textcolor{keywordflow}{switch} (event-\/>\mbox{\hyperlink{structahc__tmode__event_ad34172bef680b4c04a9a89f1e31577af}{event\_type}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06343}06343                 \textcolor{keywordflow}{case} \mbox{\hyperlink{aic79xx_8h_a09e2d7dd98f73ccd8edb6613d42c33a4}{EVENT\_TYPE\_BUS\_RESET}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06344}06344                         ccbh-\/>status = CAM\_SCSI\_BUS\_RESET|CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06345}06345                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06346}06346                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06347}06347                         ccbh-\/>status = CAM\_MESSAGE\_RECV|CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06348}06348                         inot-\/>arg = \textcolor{keyword}{event}-\/>event\_type;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06349}06349                         inot-\/>seq\_id = \textcolor{keyword}{event}-\/>event\_arg;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06350}06350                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06351}06351                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06352}06352                 inot-\/>initiator\_id = \textcolor{keyword}{event}-\/>initiator\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06353}06353                 xpt\_done((\textcolor{keyword}{union} ccb *)inot);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06354}06354                 lstate-\/>event\_r\_idx++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06355}06355                 \textcolor{keywordflow}{if} (lstate-\/>event\_r\_idx == \mbox{\hyperlink{aic7xxx_8h_a111342a6fda52ffa074af22946618a25}{AHC\_TMODE\_EVENT\_BUFFER\_SIZE}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06356}06356                         lstate-\/>event\_r\_idx = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06357}06357         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06358}06358 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06359}06359 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06360}06360 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06361}06361 \textcolor{comment}{/******************** Sequencer Program Patching/Download *********************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06362}06362 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06363}06363 \textcolor{preprocessor}{\#ifdef AHC\_DUMP\_SEQ}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06364}06364 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06365}06365 ahc\_dumpseq(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}}* ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06366}06366 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06367}06367         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06368}06368 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06369}06369         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4d65228d61c0e3a8c669dcaebb662830}{SEQCTL}}, \mbox{\hyperlink{aic79xx__reg_8h_a7a42c7526a22d822fb1932f131a1dd7f}{PERRORDIS}}|\mbox{\hyperlink{aic79xx__reg_8h_abf43b3235b8c424a3b15ddf9933d63e5}{FAILDIS}}|\mbox{\hyperlink{aic79xx__reg_8h_abb75b12abb4d1e8e95ab050f9f1ac5b3}{FASTMODE}}|\mbox{\hyperlink{aic79xx__reg_8h_a6c44d6e5fcde9dd9784973f4212e4ff1}{LOADRAM}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06370}06370         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a174c1b97635e3f30f94c888b47436dc5}{SEQADDR0}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06371}06371         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_abeaf863227b4bb81888cf9ebc4249625}{SEQADDR1}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06372}06372         \textcolor{keywordflow}{for} (i = 0; i < ahc-\/>\mbox{\hyperlink{structahc__softc_a6cbe1477df6747b3f686013a440c5a9a}{instruction\_ram\_size}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06373}06373                 uint8\_t ins\_bytes[4];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06374}06374 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06375}06375                 \mbox{\hyperlink{aic7xxx__osm_8h_aacb84fa8cea2b626bc66d3de8fc9cc7b}{ahc\_insb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a20aaf21e78d7e9b7fc3cb080788e5903}{SEQRAM}}, ins\_bytes, 4);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06376}06376                 printf(\textcolor{stringliteral}{"{}0x\%08x\(\backslash\)n"{}}, ins\_bytes[0] << 24}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06377}06377                                  | ins\_bytes[1] << 16}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06378}06378                                  | ins\_bytes[2] << 8}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06379}06379                                  | ins\_bytes[3]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06380}06380         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06381}06381 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06382}06382 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06383}06383 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06384}06384 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06385}\mbox{\hyperlink{aic7xxx_8c_afad04e6d810b9d879954b50645e2f103}{06385}} \mbox{\hyperlink{aic7xxx_8c_afad04e6d810b9d879954b50645e2f103}{ahc\_loadseq}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06386}06386 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06387}06387         \textcolor{keyword}{struct  }\mbox{\hyperlink{structcs}{cs}} cs\_table[\mbox{\hyperlink{aic79xx__seq_8h_a1b18a86f2d119b8bc0575c685f22ba4e}{num\_critical\_sections}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06388}06388         u\_int   begin\_set[\mbox{\hyperlink{aic79xx__seq_8h_a1b18a86f2d119b8bc0575c685f22ba4e}{num\_critical\_sections}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06389}06389         u\_int   end\_set[\mbox{\hyperlink{aic79xx__seq_8h_a1b18a86f2d119b8bc0575c685f22ba4e}{num\_critical\_sections}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06390}06390         \textcolor{keyword}{struct  }\mbox{\hyperlink{structpatch}{patch}} *cur\_patch;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06391}06391         u\_int   cs\_count;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06392}06392         u\_int   cur\_cs;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06393}06393         u\_int   i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06394}06394         u\_int   skip\_addr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06395}06395         u\_int   sg\_prefetch\_cnt;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06396}06396         \textcolor{keywordtype}{int}     downloaded;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06397}06397         uint8\_t download\_consts[7];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06398}06398 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06399}06399         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06400}06400 \textcolor{comment}{         * Start out with 0 critical sections}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06401}06401 \textcolor{comment}{         * that apply to this firmware load.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06402}06402 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06403}06403         cs\_count = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06404}06404         cur\_cs = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06405}06405         memset(begin\_set, 0, \textcolor{keyword}{sizeof}(begin\_set));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06406}06406         memset(end\_set, 0, \textcolor{keyword}{sizeof}(end\_set));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06407}06407 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06408}06408         \textcolor{comment}{/* Setup downloadable constant table */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06409}06409         download\_consts[\mbox{\hyperlink{aic7xxx__reg_8h_a8cad4b5a4d8182b2b0193d2754e1736f}{QOUTFIFO\_OFFSET}}] = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06410}06410         \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a5ac6b3e2f472173f329753da137484a5}{targetcmds}} != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06411}06411                 download\_consts[\mbox{\hyperlink{aic7xxx__reg_8h_a8cad4b5a4d8182b2b0193d2754e1736f}{QOUTFIFO\_OFFSET}}] += 32;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06412}06412         download\_consts[\mbox{\hyperlink{aic7xxx__reg_8h_a8c60798a70bbfe969f910b234b7a3fa2}{QINFIFO\_OFFSET}}] = download\_consts[\mbox{\hyperlink{aic7xxx__reg_8h_a8cad4b5a4d8182b2b0193d2754e1736f}{QOUTFIFO\_OFFSET}}] + 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06413}06413         download\_consts[\mbox{\hyperlink{aic7xxx__reg_8h_a3973c6e2a3f77e13bc9b31d72472e8a6}{CACHESIZE\_MASK}}] = ahc-\/>\mbox{\hyperlink{structahc__softc_a1f9fe2b6a6341a3973deec0ac947b194}{pci\_cachesize}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06414}06414         download\_consts[\mbox{\hyperlink{aic7xxx__reg_8h_a847d916b0c9badeddbe38ca3bb01c45f}{INVERTED\_CACHESIZE\_MASK}}] = \string~(ahc-\/>\mbox{\hyperlink{structahc__softc_a1f9fe2b6a6341a3973deec0ac947b194}{pci\_cachesize}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06415}06415         sg\_prefetch\_cnt = ahc-\/>\mbox{\hyperlink{structahc__softc_a1f9fe2b6a6341a3973deec0ac947b194}{pci\_cachesize}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06416}06416         \textcolor{keywordflow}{if} (sg\_prefetch\_cnt < (2 * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}})))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06417}06417                 sg\_prefetch\_cnt = 2 * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__dma__seg}{ahc\_dma\_seg}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06418}06418         download\_consts[\mbox{\hyperlink{aic79xx__reg_8h_a1bf65807f0412745bd0ec061e353b81c}{SG\_PREFETCH\_CNT}}] = sg\_prefetch\_cnt;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06419}06419         download\_consts[\mbox{\hyperlink{aic79xx__reg_8h_a298171bd0fdd0a45880e73cadc83f829}{SG\_PREFETCH\_ALIGN\_MASK}}] = \string~(sg\_prefetch\_cnt -\/ 1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06420}06420         download\_consts[\mbox{\hyperlink{aic79xx__reg_8h_acaa90b86a820dd98587b2e2cba8c03b0}{SG\_PREFETCH\_ADDR\_MASK}}] = (sg\_prefetch\_cnt -\/ 1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06421}06421 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06422}06422         cur\_patch = \mbox{\hyperlink{aic79xx__seq_8h_a18792f6192fac7bac1d5cc32983ef26b}{patches}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06423}06423         downloaded = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06424}06424         skip\_addr = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06425}06425         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4d65228d61c0e3a8c669dcaebb662830}{SEQCTL}}, \mbox{\hyperlink{aic79xx__reg_8h_a7a42c7526a22d822fb1932f131a1dd7f}{PERRORDIS}}|\mbox{\hyperlink{aic79xx__reg_8h_abf43b3235b8c424a3b15ddf9933d63e5}{FAILDIS}}|\mbox{\hyperlink{aic79xx__reg_8h_abb75b12abb4d1e8e95ab050f9f1ac5b3}{FASTMODE}}|\mbox{\hyperlink{aic79xx__reg_8h_a6c44d6e5fcde9dd9784973f4212e4ff1}{LOADRAM}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06426}06426         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a174c1b97635e3f30f94c888b47436dc5}{SEQADDR0}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06427}06427         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_abeaf863227b4bb81888cf9ebc4249625}{SEQADDR1}}, 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06428}06428 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06429}06429         \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(\mbox{\hyperlink{aic79xx__seq_8h_afd0a2a61a41ad58690da7610122f1470}{seqprog}})/4; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06430}06430                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a2b57079fe580108ed09601d570c88949}{ahc\_check\_patch}}(ahc, \&cur\_patch, i, \&skip\_addr) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06431}06431                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06432}06432 \textcolor{comment}{                         * Don't download this instruction as it}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06433}06433 \textcolor{comment}{                         * is in a patch that was removed.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06434}06434 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06435}06435                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06436}06436                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06437}06437 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06438}06438                 \textcolor{keywordflow}{if} (downloaded == ahc-\/>\mbox{\hyperlink{structahc__softc_a6cbe1477df6747b3f686013a440c5a9a}{instruction\_ram\_size}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06439}06439                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06440}06440 \textcolor{comment}{                         * We're about to exceed the instruction}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06441}06441 \textcolor{comment}{                         * storage capacity for this chip.  Fail}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06442}06442 \textcolor{comment}{                         * the load.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06443}06443 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06444}06444                         printf(\textcolor{stringliteral}{"{}\(\backslash\)n\%s: Program too large for instruction memory "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06445}06445                                \textcolor{stringliteral}{"{}size of \%d!\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06446}06446                                ahc-\/>\mbox{\hyperlink{structahc__softc_a6cbe1477df6747b3f686013a440c5a9a}{instruction\_ram\_size}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06447}06447                         \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06448}06448                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06449}06449 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06450}06450                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06451}06451 \textcolor{comment}{                 * Move through the CS table until we find a CS}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06452}06452 \textcolor{comment}{                 * that might apply to this instruction.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06453}06453 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06454}06454                 \textcolor{keywordflow}{for} (; cur\_cs < \mbox{\hyperlink{aic79xx__seq_8h_a1b18a86f2d119b8bc0575c685f22ba4e}{num\_critical\_sections}}; cur\_cs++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06455}06455                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic79xx__seq_8h_a2b66eac3c37bb8bb05d40e7680bfd596}{critical\_sections}}[cur\_cs].end <= i) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06456}06456                                 \textcolor{keywordflow}{if} (begin\_set[cs\_count] == \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06457}06457                                  \&\& end\_set[cs\_count] == \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06458}06458                                         cs\_table[cs\_count].\mbox{\hyperlink{structcs_ae62014f752d602994f8fb1cfadf4dbfb}{end}} = downloaded;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06459}06459                                         end\_set[cs\_count] = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06460}06460                                         cs\_count++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06461}06461                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06462}06462                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06463}06463                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06464}06464                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic79xx__seq_8h_a2b66eac3c37bb8bb05d40e7680bfd596}{critical\_sections}}[cur\_cs].\mbox{\hyperlink{structpatch_aa467dc265e8b149313526b0aa4f33a4c}{begin}} <= i}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06465}06465                          \&\& begin\_set[cs\_count] == \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06466}06466                                 cs\_table[cs\_count].\mbox{\hyperlink{structcs_ad6f6ebff0abfd0a6311f338a2829f810}{begin}} = downloaded;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06467}06467                                 begin\_set[cs\_count] = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06468}06468                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06469}06469                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06470}06470                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06471}06471                 \mbox{\hyperlink{aic7xxx_8c_a731b4bf030367aeb08fc43e93104568d}{ahc\_download\_instr}}(ahc, i, download\_consts);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06472}06472                 downloaded++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06473}06473         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06474}06474 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06475}06475         ahc-\/>\mbox{\hyperlink{structahc__softc_ad24b9b4a908f532c16c2efe992557af4}{num\_critical\_sections}} = cs\_count;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06476}06476         \textcolor{keywordflow}{if} (cs\_count != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06477}06477                 cs\_count *= \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structcs}{cs}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06478}06478                 ahc-\/>\mbox{\hyperlink{structahc__softc_aae07eaa8c4e297910c5c6834f1ccb840}{critical\_sections}} = malloc(cs\_count, M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06479}06479                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_aae07eaa8c4e297910c5c6834f1ccb840}{critical\_sections}} == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06480}06480                         panic(\textcolor{stringliteral}{"{}ahc\_loadseq: Could not malloc"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06481}06481                 memcpy(ahc-\/>\mbox{\hyperlink{structahc__softc_aae07eaa8c4e297910c5c6834f1ccb840}{critical\_sections}}, cs\_table, cs\_count);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06482}06482         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06483}06483         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4d65228d61c0e3a8c669dcaebb662830}{SEQCTL}}, \mbox{\hyperlink{aic79xx__reg_8h_a7a42c7526a22d822fb1932f131a1dd7f}{PERRORDIS}}|\mbox{\hyperlink{aic79xx__reg_8h_abf43b3235b8c424a3b15ddf9933d63e5}{FAILDIS}}|\mbox{\hyperlink{aic79xx__reg_8h_abb75b12abb4d1e8e95ab050f9f1ac5b3}{FASTMODE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06484}06484 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06485}06485         \textcolor{keywordflow}{if} (bootverbose) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06486}06486                 printf(\textcolor{stringliteral}{"{} \%d instructions downloaded\(\backslash\)n"{}}, downloaded);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06487}06487                 printf(\textcolor{stringliteral}{"{}\%s: Features 0x\%x, Bugs 0x\%x, Flags 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06488}06488                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}}, ahc-\/>\mbox{\hyperlink{structahc__softc_afca907961287c918a87c5461d5af0da8}{bugs}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06489}06489         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06490}06490         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06491}06491 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06492}06492 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06493}06493 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06494}\mbox{\hyperlink{aic7xxx_8c_a2b57079fe580108ed09601d570c88949}{06494}} \mbox{\hyperlink{aic7xxx_8c_a2b57079fe580108ed09601d570c88949}{ahc\_check\_patch}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structpatch}{patch}} **start\_patch,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06495}06495                 u\_int start\_instr, u\_int *skip\_addr)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06496}06496 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06497}06497         \textcolor{keyword}{struct  }\mbox{\hyperlink{structpatch}{patch}} *cur\_patch;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06498}06498         \textcolor{keyword}{struct  }\mbox{\hyperlink{structpatch}{patch}} *last\_patch;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06499}06499         u\_int   num\_patches;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06500}06500 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06501}06501         num\_patches = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{aic79xx__seq_8h_a18792f6192fac7bac1d5cc32983ef26b}{patches}})/\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structpatch}{patch}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06502}06502         last\_patch = \&\mbox{\hyperlink{aic79xx__seq_8h_a18792f6192fac7bac1d5cc32983ef26b}{patches}}[num\_patches];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06503}06503         cur\_patch = *start\_patch;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06504}06504 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06505}06505         \textcolor{keywordflow}{while} (cur\_patch < last\_patch \&\& start\_instr == cur\_patch-\/>\mbox{\hyperlink{structpatch_aa467dc265e8b149313526b0aa4f33a4c}{begin}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06506}06506                 \textcolor{keywordflow}{if} (cur\_patch-\/>\mbox{\hyperlink{structpatch_a9b396193fc2b1d3ef8b831f74720f1d7}{patch\_func}}(ahc) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06507}06507                         \textcolor{comment}{/* Start rejecting code */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06508}06508                         *skip\_addr = start\_instr + cur\_patch-\/>\mbox{\hyperlink{structpatch_a34741469655b60287dddd62f8ef32e15}{skip\_instr}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06509}06509                         cur\_patch += cur\_patch-\/>\mbox{\hyperlink{structpatch_a43f90d8dbb998bd06a9b696c523f2de3}{skip\_patch}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06510}06510                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06511}06511                         \textcolor{comment}{/* Accepted this patch.  Advance to the next}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06512}06512 \textcolor{comment}{                         * one and wait for our instruction pointer to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06513}06513 \textcolor{comment}{                         * hit this point.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06514}06514 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06515}06515                         cur\_patch++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06516}06516                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06517}06517         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06518}06518 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06519}06519         *start\_patch = cur\_patch;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06520}06520         \textcolor{keywordflow}{if} (start\_instr < *skip\_addr)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06521}06521                 \textcolor{comment}{/* Still skipping */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06522}06522                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06523}06523 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06524}06524         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06525}06525 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06526}06526 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06527}06527 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06528}\mbox{\hyperlink{aic7xxx_8c_a731b4bf030367aeb08fc43e93104568d}{06528}} \mbox{\hyperlink{aic7xxx_8c_a731b4bf030367aeb08fc43e93104568d}{ahc\_download\_instr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int instrptr, uint8\_t *dconsts)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06529}06529 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06530}06530         \textcolor{keyword}{union   }\mbox{\hyperlink{unionins__formats}{ins\_formats}} instr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06531}06531         \textcolor{keyword}{struct  }\mbox{\hyperlink{structins__format1}{ins\_format1}} *fmt1\_ins;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06532}06532         \textcolor{keyword}{struct  }\mbox{\hyperlink{structins__format3}{ins\_format3}} *fmt3\_ins;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06533}06533         u\_int   \mbox{\hyperlink{structins__format3_ae3ba788eb96b582404acd57d4a9bdd9e}{opcode}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06534}06534 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06535}06535         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06536}06536 \textcolor{comment}{         * The firmware is always compiled into a little endian format.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06537}06537 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06538}06538         instr.\mbox{\hyperlink{unionins__formats_a3bcdd58e03acb429b1364f196663ec4b}{integer}} = \mbox{\hyperlink{aic__osm__lib_8h_a041a2ea636acae13e6f9c8c52e0d6185}{aic\_le32toh}}(*(uint32\_t*)\&\mbox{\hyperlink{aic79xx__seq_8h_afd0a2a61a41ad58690da7610122f1470}{seqprog}}[instrptr * 4]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06539}06539 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06540}06540         fmt1\_ins = \&instr.\mbox{\hyperlink{unionins__formats_afbfe37c4b24cabc2aff898aecc888c77}{format1}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06541}06541         fmt3\_ins = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06542}06542 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06543}06543         \textcolor{comment}{/* Pull the opcode */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06544}06544         \mbox{\hyperlink{structins__format3_ae3ba788eb96b582404acd57d4a9bdd9e}{opcode}} = instr.\mbox{\hyperlink{unionins__formats_afbfe37c4b24cabc2aff898aecc888c77}{format1}}.\mbox{\hyperlink{structins__format1_a30427369d78dd39eb750bc54a593177e}{opcode}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06545}06545         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structins__format3_ae3ba788eb96b582404acd57d4a9bdd9e}{opcode}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06546}06546         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_af52b985bb609d1c61a923f3317a4ec6a}{AIC\_OP\_JMP}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06547}06547         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a451e8b8dbe517ac361a47076822e6b5d}{AIC\_OP\_JC}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06548}06548         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a936056265bd6a3ff510f276302802d9f}{AIC\_OP\_JNC}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06549}06549         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a84fd840ee56378a3fbcce685eadee935}{AIC\_OP\_CALL}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06550}06550         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_aeee18aaa737b5c25079c2f4885b909e9}{AIC\_OP\_JNE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06551}06551         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a2c2d4e308dbbcce19133c4def20e0c03}{AIC\_OP\_JNZ}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06552}06552         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a6f43ae414880d5503d6ca89214207e8b}{AIC\_OP\_JE}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06553}06553         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a4d344e0f94d61f357766cdcbd594e545}{AIC\_OP\_JZ}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06554}06554         \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06555}06555                 \textcolor{keyword}{struct }\mbox{\hyperlink{structpatch}{patch}} *cur\_patch;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06556}06556                 \textcolor{keywordtype}{int} address\_offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06557}06557                 u\_int address;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06558}06558                 u\_int skip\_addr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06559}06559                 u\_int i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06560}06560 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06561}06561                 fmt3\_ins = \&instr.\mbox{\hyperlink{unionins__formats_a25eaacfd2ac3be79922aedd064224a24}{format3}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06562}06562                 address\_offset = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06563}06563                 address = fmt3\_ins-\/>\mbox{\hyperlink{structins__format3_a47e7118c3bebae01cf3cd6063d265faf}{address}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06564}06564                 cur\_patch = \mbox{\hyperlink{aic79xx__seq_8h_a18792f6192fac7bac1d5cc32983ef26b}{patches}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06565}06565                 skip\_addr = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06566}06566 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06567}06567                 \textcolor{keywordflow}{for} (i = 0; i < address;) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06568}06568                         \mbox{\hyperlink{aic7xxx_8c_a2b57079fe580108ed09601d570c88949}{ahc\_check\_patch}}(ahc, \&cur\_patch, i, \&skip\_addr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06569}06569 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06570}06570                         \textcolor{keywordflow}{if} (skip\_addr > i) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06571}06571                                 \textcolor{keywordtype}{int} end\_addr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06572}06572 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06573}06573                                 end\_addr = \mbox{\hyperlink{aic79xx_8h_a3acffbd305ee72dcd4593c0d8af64a4f}{MIN}}(address, skip\_addr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06574}06574                                 address\_offset += end\_addr -\/ i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06575}06575                                 i = skip\_addr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06576}06576                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06577}06577                                 i++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06578}06578                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06579}06579                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06580}06580                 address -\/= address\_offset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06581}06581                 fmt3\_ins-\/>\mbox{\hyperlink{structins__format3_a47e7118c3bebae01cf3cd6063d265faf}{address}} = address;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06582}06582                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06583}06583         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06584}06584         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a6369919b02bf3096ba974e99376bcad2}{AIC\_OP\_OR}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06585}06585         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a0bd012518087ecd1be0b560c2088ae4a}{AIC\_OP\_AND}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06586}06586         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a8bb7eeea51ab166650fef00e48339387}{AIC\_OP\_XOR}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06587}06587         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_aa0f4a1c4564c64413efef13c9f165349}{AIC\_OP\_ADD}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06588}06588         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_af4eae019ef3748b55d938c49793a1b74}{AIC\_OP\_ADC}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06589}06589         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_a25a9822e113c7d8ce237e3819a70308a}{AIC\_OP\_BMOV}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06590}06590                 \textcolor{keywordflow}{if} (fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_aac092d4195cb071d46ee2051c36774f0}{parity}} != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06591}06591                         fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a883c64f886d4cffb7cd0f97d9dfe8171}{immediate}} = dconsts[fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a883c64f886d4cffb7cd0f97d9dfe8171}{immediate}}];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06592}06592                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06593}06593                 fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_aac092d4195cb071d46ee2051c36774f0}{parity}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06594}06594                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aadbdbc552450a562c9354f1638a63ed2a}{AHC\_CMD\_CHAN}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06595}06595                  \&\& opcode == \mbox{\hyperlink{aicasm__insformat_8h_a25a9822e113c7d8ce237e3819a70308a}{AIC\_OP\_BMOV}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06596}06596                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06597}06597 \textcolor{comment}{                         * Block move was added at the same time}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06598}06598 \textcolor{comment}{                         * as the command channel.  Verify that}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06599}06599 \textcolor{comment}{                         * this is only a move of a single element}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06600}06600 \textcolor{comment}{                         * and convert the BMOV to a MOV}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06601}06601 \textcolor{comment}{                         * (AND with an immediate of FF).}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06602}06602 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06603}06603                         \textcolor{keywordflow}{if} (fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a883c64f886d4cffb7cd0f97d9dfe8171}{immediate}} != 1)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06604}06604                                 panic(\textcolor{stringliteral}{"{}\%s: BMOV not supported\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06605}06605                                       \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06606}06606                         fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a30427369d78dd39eb750bc54a593177e}{opcode}} = \mbox{\hyperlink{aicasm__insformat_8h_a0bd012518087ecd1be0b560c2088ae4a}{AIC\_OP\_AND}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06607}06607                         fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a883c64f886d4cffb7cd0f97d9dfe8171}{immediate}} = 0xff;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06608}06608                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06609}06609                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06610}06610         \textcolor{keywordflow}{case} \mbox{\hyperlink{aicasm__insformat_8h_accb3679a66d0a549753b0371dcb6fc0a}{AIC\_OP\_ROL}}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06611}06611                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06612}06612                         \textcolor{keywordtype}{int} i, count;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06613}06613 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06614}06614                         \textcolor{comment}{/* Calculate odd parity for the instruction */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06615}06615                         \textcolor{keywordflow}{for} (i = 0, count = 0; i < 31; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06616}06616                                 uint32\_t mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06617}06617 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06618}06618                                 mask = 0x01 << i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06619}06619                                 \textcolor{keywordflow}{if} ((instr.\mbox{\hyperlink{unionins__formats_a3bcdd58e03acb429b1364f196663ec4b}{integer}} \& mask) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06620}06620                                         count++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06621}06621                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06622}06622                         \textcolor{keywordflow}{if} ((count \& 0x01) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06623}06623                                 instr.\mbox{\hyperlink{unionins__formats_afbfe37c4b24cabc2aff898aecc888c77}{format1}}.\mbox{\hyperlink{structins__format1_aac092d4195cb071d46ee2051c36774f0}{parity}} = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06624}06624                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06625}06625                         \textcolor{comment}{/* Compress the instruction for older sequencers */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06626}06626                         \textcolor{keywordflow}{if} (fmt3\_ins != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06627}06627                                 instr.\mbox{\hyperlink{unionins__formats_a3bcdd58e03acb429b1364f196663ec4b}{integer}} =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06628}06628                                         fmt3\_ins-\/>\mbox{\hyperlink{structins__format3_ad49142b4b956ea32a94a4e171b0d5e0e}{immediate}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06629}06629                                       | (fmt3\_ins-\/>\mbox{\hyperlink{structins__format3_a8d5f9c0b429f11a8f479c5b91e0ee6d9}{source}} << 8)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06630}06630                                       | (fmt3\_ins-\/>\mbox{\hyperlink{structins__format3_a47e7118c3bebae01cf3cd6063d265faf}{address}} << 16)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06631}06631                                       | (fmt3\_ins-\/>\mbox{\hyperlink{structins__format3_ae3ba788eb96b582404acd57d4a9bdd9e}{opcode}} << 25);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06632}06632                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06633}06633                                 instr.\mbox{\hyperlink{unionins__formats_a3bcdd58e03acb429b1364f196663ec4b}{integer}} =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06634}06634                                         fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a883c64f886d4cffb7cd0f97d9dfe8171}{immediate}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06635}06635                                       | (fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a65f4d62cdb94b7bb982ece614f6550f9}{source}} << 8)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06636}06636                                       | (fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a7d32160a110ea1393ee6c86b018f23d2}{destination}} << 16)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06637}06637                                       | (fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a07e922e90ad03af6c71363c3053307a0}{ret}} << 24)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06638}06638                                       | (fmt1\_ins-\/>\mbox{\hyperlink{structins__format1_a30427369d78dd39eb750bc54a593177e}{opcode}} << 25);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06639}06639                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06640}06640                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06641}06641                 \textcolor{comment}{/* The sequencer is a little endian cpu */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06642}06642                 instr.\mbox{\hyperlink{unionins__formats_a3bcdd58e03acb429b1364f196663ec4b}{integer}} = \mbox{\hyperlink{aic__osm__lib_8h_af9fcf6e15aaf52b98b0e2e9fda5e33d8}{aic\_htole32}}(instr.\mbox{\hyperlink{unionins__formats_a3bcdd58e03acb429b1364f196663ec4b}{integer}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06643}06643                 \mbox{\hyperlink{aic7xxx__osm_8h_a9e798715d24d427d25287ec25ea53756}{ahc\_outsb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a20aaf21e78d7e9b7fc3cb080788e5903}{SEQRAM}}, instr.\mbox{\hyperlink{unionins__formats_a284f4cf5769d14313442a12c1f371509}{bytes}}, 4);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06644}06644                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06645}06645         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06646}06646                 panic(\textcolor{stringliteral}{"{}Unknown opcode encountered in seq program"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06647}06647                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06648}06648         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06649}06649 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06650}06650 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06651}06651 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06652}\mbox{\hyperlink{aic7xxx_8c_a6a8e90b396fb94e0f8f721de53df039c}{06652}} \mbox{\hyperlink{aic7xxx_8c_a6a8e90b396fb94e0f8f721de53df039c}{ahc\_print\_register}}(\mbox{\hyperlink{structahc__reg__parse__entry}{ahc\_reg\_parse\_entry\_t}} *table, u\_int num\_entries,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06653}06653                    \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name, u\_int address, u\_int value,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06654}06654                    u\_int *cur\_column, u\_int wrap\_point)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06655}06655 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06656}06656         \textcolor{keywordtype}{int}     printed;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06657}06657         u\_int   printed\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06658}06658         u\_int   dummy\_column;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06659}06659 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06660}06660         \textcolor{keywordflow}{if} (cur\_column == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06661}06661                 dummy\_column = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06662}06662                 cur\_column = \&dummy\_column;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06663}06663         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06664}06664 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06665}06665         \textcolor{keywordflow}{if} (*cur\_column >= wrap\_point) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06666}06666                 printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06667}06667                 *cur\_column = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06668}06668         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06669}06669         printed = printf(\textcolor{stringliteral}{"{}\%s[0x\%x]"{}}, name, value);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06670}06670         \textcolor{keywordflow}{if} (table == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06671}06671                 printed += printf(\textcolor{stringliteral}{"{} "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06672}06672                 *cur\_column += printed;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06673}06673                 \textcolor{keywordflow}{return} (printed);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06674}06674         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06675}06675         printed\_mask = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06676}06676         \textcolor{keywordflow}{while} (printed\_mask != 0xFF) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06677}06677                 \textcolor{keywordtype}{int} entry;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06678}06678 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06679}06679                 \textcolor{keywordflow}{for} (entry = 0; entry < num\_entries; entry++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06680}06680                         \textcolor{keywordflow}{if} (((value \& table[entry].mask)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06681}06681                           != table[entry].value)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06682}06682                          || ((printed\_mask \& table[entry].mask)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06683}06683                           == table[entry].mask))}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06684}06684                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06685}06685 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06686}06686                         printed += printf(\textcolor{stringliteral}{"{}\%s\%s"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06687}06687                                           printed\_mask == 0 ? \textcolor{stringliteral}{"{}:("{}} : \textcolor{stringliteral}{"{}|"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06688}06688                                           table[entry].name);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06689}06689                         printed\_mask |= table[entry].\mbox{\hyperlink{structahc__reg__parse__entry_a018fff8039c41b651b328db04701a06c}{mask}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06690}06690                         }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06691}06691                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06692}06692                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06693}06693                 \textcolor{keywordflow}{if} (entry >= num\_entries)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06694}06694                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06695}06695         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06696}06696         \textcolor{keywordflow}{if} (printed\_mask != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06697}06697                 printed += printf(\textcolor{stringliteral}{"{}) "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06698}06698         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06699}06699                 printed += printf(\textcolor{stringliteral}{"{} "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06700}06700         \textcolor{keywordflow}{if} (cur\_column != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06701}06701                 *cur\_column += printed;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06702}06702         \textcolor{keywordflow}{return} (printed);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06703}06703 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06704}06704 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06705}06705 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06706}\mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{06706}} \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06707}06707 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06708}06708         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06709}06709         \textcolor{keyword}{struct  }scb\_tailq *untagged\_q;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06710}06710         u\_int   cur\_col;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06711}06711         \textcolor{keywordtype}{int}     paused;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06712}06712         \textcolor{keywordtype}{int}     target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06713}06713         \textcolor{keywordtype}{int}     maxtarget;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06714}06714         \textcolor{keywordtype}{int}     i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06715}06715         uint8\_t last\_phase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06716}06716         uint8\_t qinpos;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06717}06717         uint8\_t qintail;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06718}06718         uint8\_t qoutpos;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06719}06719         uint8\_t scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06720}06720         uint8\_t saved\_scbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06721}06721 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06722}06722         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx__inline_8h_a6a93bff50c0eea23f77e26b312499a19}{ahc\_is\_paused}}(ahc)) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06723}06723                 paused = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06724}06724         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06725}06725                 paused = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06726}06726                 \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06727}06727         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06728}06728 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06729}06729         saved\_scbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06730}06730         last\_phase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06731}06731         printf(\textcolor{stringliteral}{"{}>>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<\(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06732}06732                \textcolor{stringliteral}{"{}\%s: Dumping Card State \%s, at SEQADDR 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06733}06733                \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), \mbox{\hyperlink{aic7xxx_8c_a1957934d386ed4b2885c64225ba8eb76}{ahc\_lookup\_phase\_entry}}(last\_phase)-\/>phasemsg,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06734}06734                \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a174c1b97635e3f30f94c888b47436dc5}{SEQADDR0}}) | (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_abeaf863227b4bb81888cf9ebc4249625}{SEQADDR1}}) << 8));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06735}06735         \textcolor{keywordflow}{if} (paused)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06736}06736                 printf(\textcolor{stringliteral}{"{}Card was paused\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06737}06737         printf(\textcolor{stringliteral}{"{}ACCUM = 0x\%x, SINDEX = 0x\%x, DINDEX = 0x\%x, ARG\_2 = 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06738}06738                \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac3e2febb13bfdbee4c98e7e8dd3e256e}{ACCUM}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a6ab61aec4b921a3e3f5e886d039945e3}{SINDEX}}), \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5a12a7607bd3c065056c1e4bd5cd9cf2}{DINDEX}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06739}06739                \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa22f6286a2de2021d581820d003eddd1}{ARG\_2}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06740}06740         printf(\textcolor{stringliteral}{"{}HCNT = 0x\%x SCBPTR = 0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_afd06707e0388ab28bdcb943683864986}{HCNT}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06741}06741                \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06742}06742         cur\_col = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06743}06743         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aac89b394c1536880f7ad1b83170fecc71}{AHC\_DT}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06744}06744                 \mbox{\hyperlink{aic7xxx__reg__print_8c_a3dced97138fcd82d30c6747be985bd3c}{ahc\_scsiphase\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5bd9c64e9e4e1a655c475449b4d040bb}{SCSIPHASE}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06745}06745         \mbox{\hyperlink{aic7xxx__reg__print_8c_a751708ba6a4732c2b1bff84da1916785}{ahc\_scsisigi\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa08955bf88e492ec6f5c6851dbc08bf8}{SCSISIGI}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06746}06746         \mbox{\hyperlink{aic7xxx__reg__print_8c_a754212a0227d2a3327267dda78c16ccd}{ahc\_error\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8fe83ac76edc595f6b98cd4a4127aed5}{ERROR}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06747}06747         \mbox{\hyperlink{aic7xxx__reg__print_8c_a88ed75673b74bfe93ff3f9c026a0d458}{ahc\_scsibusl\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4de405da994a996c3df67693729e7e42}{SCSIBUSL}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06748}06748         \mbox{\hyperlink{aic7xxx__reg__print_8c_a0a9a205db6ced31ac1940069c74f0304}{ahc\_lastphase\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06749}06749         \mbox{\hyperlink{aic7xxx__reg__print_8c_ab3556fed1b3cbf331c2f0e6f3b8af423}{ahc\_scsiseq\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06750}06750         \mbox{\hyperlink{aic7xxx__reg__print_8c_af36387897a6bb2ebdec52f244e7df345}{ahc\_sblkctl\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06751}06751         \mbox{\hyperlink{aic7xxx__reg__print_8c_a813a0e6bcaa063a5568c5731d82ec813}{ahc\_scsirate\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ad9560ac8db2ff0d8cf17c17769b6988c}{SCSIRATE}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06752}06752         \mbox{\hyperlink{aic7xxx__reg__print_8c_a11fcf664ad2c76b84daaa52c62c47ef5}{ahc\_seqctl\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a4d65228d61c0e3a8c669dcaebb662830}{SEQCTL}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06753}06753         \mbox{\hyperlink{aic7xxx__reg__print_8c_a548a4707ee253372ba8c5c19bd3a1b3b}{ahc\_seq\_flags\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06754}06754         \mbox{\hyperlink{aic7xxx__reg__print_8c_a9f3dd09ade43b195977d4553c6a0f618}{ahc\_sstat0\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac4a01506a711aa2647d57131c0ac3e3e}{SSTAT0}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06755}06755         \mbox{\hyperlink{aic7xxx__reg__print_8c_a3d0c592d34b44c27e74bde3b0b4587bc}{ahc\_sstat1\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a02e1fe4793727dacf1d2b776af131c55}{SSTAT1}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06756}06756         \mbox{\hyperlink{aic7xxx__reg__print_8c_ab891bf4b46fd4b9f30fd3dd69620c11b}{ahc\_sstat2\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad6acf83a7db41603ff029c718c402f03}{SSTAT2}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06757}06757         \mbox{\hyperlink{aic7xxx__reg__print_8c_abe13df31fc4bcfe88fc2df3320124f90}{ahc\_sstat3\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af85caa7baa11dd34f8de28b52f4ee0e4}{SSTAT3}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06758}06758         \mbox{\hyperlink{aic7xxx__reg__print_8c_a0d513376d6d3423439c02b9e82358f8c}{ahc\_simode0\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9344c699b91d4bbc64b87dea3d35fa2b}{SIMODE0}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06759}06759         \mbox{\hyperlink{aic7xxx__reg__print_8c_a9f42850c68e5e26364285f8c30c81f3f}{ahc\_simode1\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae68e9fe8625b0ca50fd8822f794c0d16}{SIMODE1}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06760}06760         \mbox{\hyperlink{aic7xxx__reg__print_8c_a9b2b0ff89255417f653cffe32b18800e}{ahc\_sxfrctl0\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ab6cfb1b0f017057eebe070676cfdb41d}{SXFRCTL0}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06761}06761         \mbox{\hyperlink{aic7xxx__reg__print_8c_a3baad32f74b39fb219a2b9fe9ea5d5bd}{ahc\_dfcntrl\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aaf1873de42ade3d5090d08ebace2f36a}{DFCNTRL}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06762}06762         \mbox{\hyperlink{aic7xxx__reg__print_8c_a89809be9c5fdb8f64cf7145e4629cb94}{ahc\_dfstatus\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_af324136caa39378d0db654c7884a25e7}{DFSTATUS}}), \&cur\_col, 50);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06763}06763         \textcolor{keywordflow}{if} (cur\_col != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06764}06764                 printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06765}06765         printf(\textcolor{stringliteral}{"{}STACK:"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06766}06766         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{aic7xxx__reg_8h_a6423a880df59733d2d9b509c7718d3a9}{STACK\_SIZE}}; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06767}06767                printf(\textcolor{stringliteral}{"{} 0x\%x"{}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a2cc8f2d83039de1aef6590f9782921ee}{STACK}})|(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a2cc8f2d83039de1aef6590f9782921ee}{STACK}}) << 8));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06768}06768         printf(\textcolor{stringliteral}{"{}\(\backslash\)nSCB count = \%d\(\backslash\)n"{}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06769}06769         printf(\textcolor{stringliteral}{"{}Kernel NEXTQSCB = \%d\(\backslash\)n"{}}, ahc-\/>\mbox{\hyperlink{structahc__softc_a5c0812d57ae0fcf9a51318f66e4922b9}{next\_queued\_scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06770}06770         printf(\textcolor{stringliteral}{"{}Card NEXTQSCB = \%d\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a2e1f9e5cf3381010992c94be67860789}{NEXT\_QUEUED\_SCB}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06771}06771         \textcolor{comment}{/* QINFIFO */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06772}06772         printf(\textcolor{stringliteral}{"{}QINFIFO entries: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06773}06773         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aab10e44df2c3b9c4d92492462e1a0a4cc}{AHC\_QUEUE\_REGS}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06774}06774                 qinpos = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04c173f92eda4a463e7a6e9ea9290ffa}{SNSCB\_QOFF}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06775}06775                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04c173f92eda4a463e7a6e9ea9290ffa}{SNSCB\_QOFF}}, qinpos);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06776}06776         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06777}06777                 qinpos = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a69723af9c7c5732e6533777377f76e8d}{QINPOS}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06778}06778         qintail = ahc-\/>\mbox{\hyperlink{structahc__softc_a4ef2fb92695b78a145829b1fd6af12f5}{qinfifonext}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06779}06779         \textcolor{keywordflow}{while} (qinpos != qintail) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06780}06780                 printf(\textcolor{stringliteral}{"{}\%d "{}}, ahc-\/>\mbox{\hyperlink{structahc__softc_ac3c4c7414c7dd3cfb759e64554fb59fb}{qinfifo}}[qinpos]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06781}06781                 qinpos++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06782}06782         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06783}06783         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06784}06784 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06785}06785         printf(\textcolor{stringliteral}{"{}Waiting Queue entries: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06786}06786         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_aed8758122c520c918c257c19e01d0a91}{WAITING\_SCBH}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06787}06787         i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06788}06788         \textcolor{keywordflow}{while} (scb\_index != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}} \&\& i++ < 256) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06789}06789                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06790}06790                 printf(\textcolor{stringliteral}{"{}\%d:\%d "{}}, scb\_index, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06791}06791                 scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06792}06792         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06793}06793         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06794}06794 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06795}06795         printf(\textcolor{stringliteral}{"{}Disconnected Queue entries: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06796}06796         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a8846b03d9aad8bcb7611fc23788a7c63}{DISCONNECTED\_SCBH}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06797}06797         i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06798}06798         \textcolor{keywordflow}{while} (scb\_index != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}} \&\& i++ < 256) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06799}06799                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06800}06800                 printf(\textcolor{stringliteral}{"{}\%d:\%d "{}}, scb\_index, \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}}));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06801}06801                 scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06802}06802         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06803}06803         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06804}06804                 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06805}06805         \mbox{\hyperlink{aic7xxx__inline_8h_a3a2d0df6e542da6c60fb9e682ca99558}{ahc\_sync\_qoutfifo}}(ahc, BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06806}06806         printf(\textcolor{stringliteral}{"{}QOUTFIFO entries: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06807}06807         qoutpos = ahc-\/>\mbox{\hyperlink{structahc__softc_a18ffae721d6fd6d8de9dceeb3163cc0a}{qoutfifonext}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06808}06808         i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06809}06809         \textcolor{keywordflow}{while} (ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}}[qoutpos] != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}} \&\& i++ < 256) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06810}06810                 printf(\textcolor{stringliteral}{"{}\%d "{}}, ahc-\/>\mbox{\hyperlink{structahc__softc_aba7ea55f1294bbd4557f51e4167806e0}{qoutfifo}}[qoutpos]);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06811}06811                 qoutpos++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06812}06812         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06813}06813         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06814}06814 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06815}06815         printf(\textcolor{stringliteral}{"{}Sequencer Free SCB List: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06816}06816         scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a95114269163c01efbb57b7f8fedac7df}{FREE\_SCBH}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06817}06817         i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06818}06818         \textcolor{keywordflow}{while} (scb\_index != \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}} \&\& i++ < 256) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06819}06819                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06820}06820                 printf(\textcolor{stringliteral}{"{}\%d "{}}, scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06821}06821                 scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad79112d1bca72184712ca91cd526851a}{SCB\_NEXT}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06822}06822         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06823}06823         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06824}06824 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06825}06825         printf(\textcolor{stringliteral}{"{}Sequencer SCB Info: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06826}06826         \textcolor{keywordflow}{for} (i = 0; i < ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_ae3a6be98d4a5ef663426507f88a2e5aa}{maxhscbs}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06827}06827                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06828}06828                 cur\_col = printf(\textcolor{stringliteral}{"{}\(\backslash\)n\%3d "{}}, i);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06829}06829 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06830}06830                 \mbox{\hyperlink{aic7xxx__reg__print_8c_a49890af75c8f266dfce6f13ffe2e222b}{ahc\_scb\_control\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}), \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06831}06831                 \mbox{\hyperlink{aic7xxx__reg__print_8c_a60307b1a0df27a3a76662fbb09415894}{ahc\_scb\_scsiid\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a7c82257e3dc3203046a2cfc8f60a8b62}{SCB\_SCSIID}}), \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06832}06832                 \mbox{\hyperlink{aic7xxx__reg__print_8c_a2006cbd0a549d19e6dfc2ef7ecd2ccf0}{ahc\_scb\_lun\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a71a69c23bfda16efd48dda0abb7649fe}{SCB\_LUN}}), \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06833}06833                 \mbox{\hyperlink{aic7xxx__reg__print_8c_a023320ff1af2a86048d171e09fc511b8}{ahc\_scb\_tag\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}}), \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06834}06834         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06835}06835         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06836}06836 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06837}06837         printf(\textcolor{stringliteral}{"{}Pending list: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06838}06838         i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06839}06839         LIST\_FOREACH(\mbox{\hyperlink{structscb}{scb}}, \&ahc-\/>pending\_scbs, \mbox{\hyperlink{aic79xx_8h_a08d5b7a26a4fe44c4684fe5098ba19b1}{pending\_links}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06840}06840                 \textcolor{keywordflow}{if} (i++ > 256)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06841}06841                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06842}06842                 cur\_col = printf(\textcolor{stringliteral}{"{}\(\backslash\)n\%3d "{}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06843}06843                 \mbox{\hyperlink{aic7xxx__reg__print_8c_a49890af75c8f266dfce6f13ffe2e222b}{ahc\_scb\_control\_print}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}}, \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06844}06844                 \mbox{\hyperlink{aic7xxx__reg__print_8c_a60307b1a0df27a3a76662fbb09415894}{ahc\_scb\_scsiid\_print}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a1402a3a67b19b5baa7bbf698ebe2f66e}{scsiid}}, \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06845}06845                 \mbox{\hyperlink{aic7xxx__reg__print_8c_a2006cbd0a549d19e6dfc2ef7ecd2ccf0}{ahc\_scb\_lun\_print}}(\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a42b9ff4c95b0f358ab14cec0c1322049}{lun}}, \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06846}06846                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a68e9e5c60abbbad6da178ade4326e6a6}{AHC\_PAGESCBS}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06847}06847                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06848}06848                         printf(\textcolor{stringliteral}{"{}("{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06849}06849                         \mbox{\hyperlink{aic7xxx__reg__print_8c_a49890af75c8f266dfce6f13ffe2e222b}{ahc\_scb\_control\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06850}06850                                               \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06851}06851                         \mbox{\hyperlink{aic7xxx__reg__print_8c_a023320ff1af2a86048d171e09fc511b8}{ahc\_scb\_tag\_print}}(\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}}), \&cur\_col, 60);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06852}06852                         printf(\textcolor{stringliteral}{"{})"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06853}06853                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06854}06854         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06855}06855         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06856}06856 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06857}06857         printf(\textcolor{stringliteral}{"{}Kernel Free SCB list: "{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06858}06858         i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06859}06859         SLIST\_FOREACH(\mbox{\hyperlink{structscb}{scb}}, \&ahc-\/>\mbox{\hyperlink{structahc__softc_a1fac92f60ff0c04731ac79e5ade77c69}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_a2046f21c84fbc3500328b6e4168944ea}{free\_scbs}}, links.sle) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06860}06860                 \textcolor{keywordflow}{if} (i++ > 256)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06861}06861                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06862}06862                 printf(\textcolor{stringliteral}{"{}\%d "{}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06863}06863         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06864}06864         printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06865}06865 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06866}06866         maxtarget = (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& (\mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}|\mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}})) ? 15 : 7;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06867}06867         \textcolor{keywordflow}{for} (target = 0; target <= maxtarget; target++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06868}06868                 untagged\_q = \&ahc-\/>\mbox{\hyperlink{structahc__softc_a8cca91fe9f77d975985c3cf85d11de46}{untagged\_queues}}[target];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06869}06869                 \textcolor{keywordflow}{if} (TAILQ\_FIRST(untagged\_q) == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06870}06870                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06871}06871                 printf(\textcolor{stringliteral}{"{}Untagged Q(\%d): "{}}, target);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06872}06872                 i = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06873}06873                 TAILQ\_FOREACH(\mbox{\hyperlink{structscb}{scb}}, untagged\_q, links.tqe) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06874}06874                         \textcolor{keywordflow}{if} (i++ > 256)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06875}06875                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06876}06876                         printf(\textcolor{stringliteral}{"{}\%d "{}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06877}06877                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06878}06878                 printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06879}06879         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06880}06880 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06881}06881         \mbox{\hyperlink{aic7xxx__osm_8h_a975459b840e94fc555ee5b08f81ec549}{ahc\_platform\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06882}06882         printf(\textcolor{stringliteral}{"{}\(\backslash\)n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06883}06883         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, saved\_scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06884}06884         \textcolor{keywordflow}{if} (paused == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06885}06885                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06886}06886 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06887}06887 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06888}06888 \textcolor{comment}{/*************************** Timeout Handling *********************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06889}06889 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06890}\mbox{\hyperlink{aic7xxx_8c_acac57410907927cdc68c52aa045818b3}{06890}} \mbox{\hyperlink{aic7xxx_8c_acac57410907927cdc68c52aa045818b3}{ahc\_timeout}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06891}06891 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06892}06892         \textcolor{keyword}{struct }\mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06893}06893 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06894}06894         ahc = \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a9e93a13508008214471003fd94ecd628}{ahc\_softc}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06895}06895         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ad0ce2db7e532c67e4f358a676e732b79}{SCB\_ACTIVE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06896}06896                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a648076e5bad9ef87e4d86771f2d4752b}{SCB\_TIMEDOUT}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06897}06897                         LIST\_INSERT\_HEAD(\&ahc-\/>timedout\_scbs, \mbox{\hyperlink{structscb}{scb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06898}06898                                          timedout\_links);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06899}06899                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a648076e5bad9ef87e4d86771f2d4752b}{SCB\_TIMEDOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06900}06900                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06901}06901                 ahc\_wakeup\_recovery\_thread(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06902}06902         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06903}06903 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06904}06904 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06905}06905 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06906}06906 \textcolor{comment}{ * Re-\/schedule a timeout for the passed in SCB if we determine that some}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06907}06907 \textcolor{comment}{ * other SCB is in the process of recovery or an SCB with a longer}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06908}06908 \textcolor{comment}{ * timeout is still pending.  Limit our search to just "{}other\_scb"{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06909}06909 \textcolor{comment}{ * if it is non-\/NULL.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06910}06910 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06911}06911 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06912}\mbox{\hyperlink{aic7xxx_8c_af614ba6bdf89e039365e33644d9d70f7}{06912}} \mbox{\hyperlink{aic7xxx_8c_af614ba6bdf89e039365e33644d9d70f7}{ahc\_other\_scb\_timeout}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06913}06913                       \textcolor{keyword}{struct} \mbox{\hyperlink{structscb}{scb}} *other\_scb)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06914}06914 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06915}06915         u\_int   newtimeout;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06916}06916         \textcolor{keywordtype}{int}     found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06917}06917 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06918}06918         \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06919}06919         printf(\textcolor{stringliteral}{"{}Other SCB Timeout\%s"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06920}06920                (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a6f4e973d669ccc463b64a94cbf89b95f}{SCB\_OTHERTCL\_TIMEOUT}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06921}06921                ? \textcolor{stringliteral}{"{} again\(\backslash\)n"{}} : \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06922}06922 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06923}06923         newtimeout = \mbox{\hyperlink{aic__osm__lib_8h_ab78f25ae594dac09dfc08cab5b5048c2}{aic\_get\_timeout}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06924}06924         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a6f4e973d669ccc463b64a94cbf89b95f}{SCB\_OTHERTCL\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06925}06925         found = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06926}06926         \textcolor{keywordflow}{if} (other\_scb != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06927}06927                 \textcolor{keywordflow}{if} ((other\_scb-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06928}06928                    \& (\mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a6f4e973d669ccc463b64a94cbf89b95f}{SCB\_OTHERTCL\_TIMEOUT}}|\mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a648076e5bad9ef87e4d86771f2d4752b}{SCB\_TIMEDOUT}})) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06929}06929                  || (other\_scb-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ae37965a9b45c0e29840d1996520121dc}{SCB\_RECOVERY\_SCB}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06930}06930                         found++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06931}06931                         newtimeout = \mbox{\hyperlink{aic79xx_8h_afa99ec4acc4ecb2dc3c2d05da15d0e3f}{MAX}}(\mbox{\hyperlink{aic__osm__lib_8h_ab78f25ae594dac09dfc08cab5b5048c2}{aic\_get\_timeout}}(other\_scb),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06932}06932                                          newtimeout);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06933}06933                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06934}06934         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06935}06935                 LIST\_FOREACH(other\_scb, \&ahc-\/>pending\_scbs, \mbox{\hyperlink{aic79xx_8h_a08d5b7a26a4fe44c4684fe5098ba19b1}{pending\_links}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06936}06936                         \textcolor{keywordflow}{if} ((other\_scb-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06937}06937                            \& (\mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a6f4e973d669ccc463b64a94cbf89b95f}{SCB\_OTHERTCL\_TIMEOUT}}|\mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a648076e5bad9ef87e4d86771f2d4752b}{SCB\_TIMEDOUT}})) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06938}06938                          || (other\_scb-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ae37965a9b45c0e29840d1996520121dc}{SCB\_RECOVERY\_SCB}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06939}06939                                 found++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06940}06940                                 newtimeout =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06941}06941                                     \mbox{\hyperlink{aic79xx_8h_afa99ec4acc4ecb2dc3c2d05da15d0e3f}{MAX}}(\mbox{\hyperlink{aic__osm__lib_8h_ab78f25ae594dac09dfc08cab5b5048c2}{aic\_get\_timeout}}(other\_scb),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06942}06942                                         newtimeout);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06943}06943                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06944}06944                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06945}06945         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06946}06946 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06947}06947         \textcolor{keywordflow}{if} (found != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06948}06948                 \mbox{\hyperlink{aic__osm__lib_8h_aa3e5e5f11a6e2093901936356f6f68af}{aic\_scb\_timer\_reset}}(\mbox{\hyperlink{structscb}{scb}}, newtimeout);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06949}06949         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06950}06950                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06951}06951                 printf(\textcolor{stringliteral}{"{}No other SCB worth waiting for...\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06952}06952         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06953}06953 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06954}06954         \textcolor{keywordflow}{return} (found != 0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06955}06955 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06956}06956 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06957}06957 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06958}06958 \textcolor{comment}{ * ahc\_recover\_commands determines if any of the commands that have currently}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06959}06959 \textcolor{comment}{ * timedout are the root cause for this timeout.  Innocent commands are given}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06960}06960 \textcolor{comment}{ * a new timeout while we wait for the command executing on the bus to timeout.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06961}06961 \textcolor{comment}{ * This routine is invoked from a thread context so we are allowed to sleep.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06962}06962 \textcolor{comment}{ * Our lock is not held on entry.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06963}06963 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06964}06964 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06965}\mbox{\hyperlink{aic7xxx_8c_a63742a9f994275c9a785f4fe081818d3}{06965}} \mbox{\hyperlink{aic7xxx_8c_a63742a9f994275c9a785f4fe081818d3}{ahc\_recover\_commands}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06966}06966 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06967}06967         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06968}06968         \textcolor{keywordtype}{int}     found;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06969}06969         \textcolor{keywordtype}{int}     restart\_needed;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06970}06970         u\_int   last\_phase;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06971}06971 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06972}06972         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06973}06973 \textcolor{comment}{         * Pause the controller and manually flush any}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06974}06974 \textcolor{comment}{         * commands that have just completed but that our}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06975}06975 \textcolor{comment}{         * interrupt handler has yet to see.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06976}06976 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06977}06977         \mbox{\hyperlink{aic7xxx_8c_afc0361b34521550215d2963d6e35285c}{ahc\_pause\_and\_flushwork}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06978}06978 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06979}06979         \textcolor{keywordflow}{if} (LIST\_EMPTY(\&ahc-\/>timedout\_scbs) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06980}06980                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06981}06981 \textcolor{comment}{                 * The timedout commands have already}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06982}06982 \textcolor{comment}{                 * completed.  This typically means}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06983}06983 \textcolor{comment}{                 * that either the timeout value was on}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06984}06984 \textcolor{comment}{                 * the hairy edge of what the device}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06985}06985 \textcolor{comment}{                 * requires or -\/ more likely -\/ interrupts}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06986}06986 \textcolor{comment}{                 * are not happening.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06987}06987 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06988}06988                 printf(\textcolor{stringliteral}{"{}\%s: Timedout SCBs already complete. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06989}06989                        \textcolor{stringliteral}{"{}Interrupts may not be functioning.\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06990}06990                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06991}06991                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06992}06992         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06993}06993 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06994}06994         restart\_needed = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06995}06995         printf(\textcolor{stringliteral}{"{}\%s: Recovery Initiated\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06996}06996         \mbox{\hyperlink{aic7xxx_8c_ac1323cb48557d173ff9f963984baeffb}{ahc\_dump\_card\_state}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06997}06997 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06998}06998         last\_phase = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac7996390cdda29df56ad567071a37051}{LASTPHASE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l06999}06999         \textcolor{keywordflow}{while} ((\mbox{\hyperlink{structscb}{scb}} = LIST\_FIRST(\&ahc-\/>timedout\_scbs)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07000}07000                 u\_int   active\_scb\_index;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07001}07001                 u\_int   saved\_scbptr;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07002}07002                 \textcolor{keywordtype}{int}     target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07003}07003                 \textcolor{keywordtype}{int}     lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07004}07004                 \textcolor{keywordtype}{int}     i;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07005}07005                 \textcolor{keywordtype}{char}    channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07006}07006 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07007}07007                 target = \mbox{\hyperlink{aic79xx_8h_a6c0f4b6b37cc0fae8e266811c5ca3815}{SCB\_GET\_TARGET}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07008}07008                 channel = \mbox{\hyperlink{aic79xx_8h_aaf5c2a354d6e634b1839c579f220ed69}{SCB\_GET\_CHANNEL}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07009}07009                 lun = \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07010}07010 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07011}07011                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07012}07012                 printf(\textcolor{stringliteral}{"{}SCB 0x\%x -\/ timed out\(\backslash\)n"{}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07013}07013                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_aea888a6f4a6df72dd669e37ad50fc9a6}{sg\_count}} > 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07014}07014                         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_aea888a6f4a6df72dd669e37ad50fc9a6}{sg\_count}}; i++) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07015}07015                                 printf(\textcolor{stringliteral}{"{}sg[\%d] -\/ Addr 0x\%x : Length \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07016}07016                                        i,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07017}07017                                        \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}[i].addr,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07018}07018                                        \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a8f4220a7c0983001b6be5b0e8233013a}{sg\_list}}[i].len \& \mbox{\hyperlink{aic7xxx_8h_ad9d7f41a161867bcdb98ac3b8d0af9e5}{AHC\_SG\_LEN\_MASK}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07019}07019                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07020}07020                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07021}07021                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& (\mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ade88549cda4d508712a6e7f76c17f03e}{SCB\_DEVICE\_RESET}}|\mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116a424e1866c42f369d2e336b8c6f96113c}{SCB\_ABORT}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07022}07022                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07023}07023 \textcolor{comment}{                         * Been down this road before.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07024}07024 \textcolor{comment}{                         * Do a full bus reset.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07025}07025 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07026}07026                         \mbox{\hyperlink{aic__osm__lib_8h_a6f0f7222e7da7cf5a9379d90af2fd5c2}{aic\_set\_transaction\_status}}(\mbox{\hyperlink{structscb}{scb}}, CAM\_CMD\_TIMEOUT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07027}07027 bus\_reset:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07028}07028                         found = \mbox{\hyperlink{aic7xxx_8c_ac9e6be5168888f595fce1e51193b9938}{ahc\_reset\_channel}}(ahc, channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07029}07029                                                   \textcolor{comment}{/*Initiate Reset*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07030}07030                         printf(\textcolor{stringliteral}{"{}\%s: Issued Channel \%c Bus Reset. "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07031}07031                                \textcolor{stringliteral}{"{}\%d SCBs aborted\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc), channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07032}07032                                found);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07033}07033                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07034}07034                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07035}07035 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07036}07036                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07037}07037 \textcolor{comment}{                 * Remove the command from the timedout list in}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07038}07038 \textcolor{comment}{                 * preparation for requeing it.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07039}07039 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07040}07040                 LIST\_REMOVE(\mbox{\hyperlink{structscb}{scb}}, timedout\_links);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07041}07041                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \&= \string~SCB\_TIMEDOUT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07042}07042 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07043}07043                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07044}07044 \textcolor{comment}{                 * If we are a target, transition to bus free and report}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07045}07045 \textcolor{comment}{                 * the timeout.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07046}07046 \textcolor{comment}{                 * }}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07047}07047 \textcolor{comment}{                 * The target/initiator that is holding up the bus may not}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07048}07048 \textcolor{comment}{                 * be the same as the one that triggered this timeout}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07049}07049 \textcolor{comment}{                 * (different commands have different timeout lengths).}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07050}07050 \textcolor{comment}{                 * If the bus is idle and we are actiing as the initiator}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07051}07051 \textcolor{comment}{                 * for this request, queue a BDR message to the timed out}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07052}07052 \textcolor{comment}{                 * target.  Otherwise, if the timed out transaction is}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07053}07053 \textcolor{comment}{                 * active:}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07054}07054 \textcolor{comment}{                 *   Initiator transaction:}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07055}07055 \textcolor{comment}{                 *      Stuff the message buffer with a BDR message and assert}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07056}07056 \textcolor{comment}{                 *      ATN in the hopes that the target will let go of the bus}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07057}07057 \textcolor{comment}{                 *      and go to the mesgout phase.  If this fails, we'll}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07058}07058 \textcolor{comment}{                 *      get another timeout 2 seconds later which will attempt}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07059}07059 \textcolor{comment}{                 *      a bus reset.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07060}07060 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07061}07061 \textcolor{comment}{                 *   Target transaction:}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07062}07062 \textcolor{comment}{                 *      Transition to BUS FREE and report the error.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07063}07063 \textcolor{comment}{                 *      It's good to be the target!}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07064}07064 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07065}07065                 saved\_scbptr = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07066}07066                 active\_scb\_index = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ae7924f0f369151567c1a74f719cf8024}{SCB\_TAG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07067}07067 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07068}07068                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9936637dff301de14cb90ddcadaf672b}{SEQ\_FLAGS}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a34d55bcc334ec9cacfab339669a19a0c}{NOT\_IDENTIFIED}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07069}07069                   \&\& (active\_scb\_index < ahc-\/>\mbox{\hyperlink{structscb__data}{scb\_data}}-\/>\mbox{\hyperlink{structscb__data_acdb993d4b7de851eec9124a65408fd71}{numscbs}})) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07070}07070                         \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *active\_scb;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07071}07071 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07072}07072                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07073}07073 \textcolor{comment}{                         * If the active SCB is not us, assume that}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07074}07074 \textcolor{comment}{                         * the active SCB has a longer timeout than}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07075}07075 \textcolor{comment}{                         * the timedout SCB, and wait for the active}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07076}07076 \textcolor{comment}{                         * SCB to timeout.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07077}07077 \textcolor{comment}{                         */} }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07078}07078                         active\_scb = \mbox{\hyperlink{aic7xxx__inline_8h_ad42aed8164bba4f1f10e52202ef81c15}{ahc\_lookup\_scb}}(ahc, active\_scb\_index);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07079}07079                         \textcolor{keywordflow}{if} (active\_scb != \mbox{\hyperlink{structscb}{scb}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07080}07080                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_af614ba6bdf89e039365e33644d9d70f7}{ahc\_other\_scb\_timeout}}(ahc, \mbox{\hyperlink{structscb}{scb}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07081}07081                                                           active\_scb) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07082}07082                                         \textcolor{keywordflow}{goto} bus\_reset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07083}07083                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07084}07084                         \} }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07085}07085 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07086}07086                         \textcolor{comment}{/* It's us */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07087}07087                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_abf9bf179c52821bbf018a9edcaf09116a56237d30abbd9e806da82c95c6646c06}{SCB\_TARGET\_SCB}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07088}07088                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07089}07089 \textcolor{comment}{                                 * Send back any queued up transactions}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07090}07090 \textcolor{comment}{                                 * and properly record the error condition.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07091}07091 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07092}07092                                 \mbox{\hyperlink{aic7xxx_8c_a963ec2e3a85d01428493294fc1a6f5b7}{ahc\_abort\_scbs}}(ahc, \mbox{\hyperlink{aic79xx_8h_a6c0f4b6b37cc0fae8e266811c5ca3815}{SCB\_GET\_TARGET}}(ahc, \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07093}07093                                                \mbox{\hyperlink{aic79xx_8h_aaf5c2a354d6e634b1839c579f220ed69}{SCB\_GET\_CHANNEL}}(ahc, \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07094}07094                                                \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07095}07095                                                \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07096}07096                                                \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7ca3acc200ff8696eebbd48f96544b41b41}{ROLE\_TARGET}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07097}07097                                                CAM\_CMD\_TIMEOUT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07098}07098 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07099}07099                                 \textcolor{comment}{/* Will clear us from the bus */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07100}07100                                 restart\_needed = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07101}07101                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07102}07102                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07103}07103 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07104}07104                         ahc\_set\_recoveryscb(ahc, active\_scb);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07105}07105                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a04649c4a51b3ae64ea94115df20195da}{MSG\_OUT}}, \mbox{\hyperlink{aic79xx__reg_8h_a8f4dfbff3c1984e0a76bdd80c1fff1bd}{HOST\_MSG}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07106}07106                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a5ab4a127f8d3de2d9e05937be836098b}{SCSISIGO}}, last\_phase|\mbox{\hyperlink{aic79xx__reg_8h_a8b67b67628ae6f99f58b2b957e23b267}{ATNO}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07107}07107                         \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, active\_scb);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07108}07108                         printf(\textcolor{stringliteral}{"{}BDR message in message buffer\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07109}07109                         active\_scb-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ade88549cda4d508712a6e7f76c17f03e}{SCB\_DEVICE\_RESET}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07110}07110                         \mbox{\hyperlink{aic__osm__lib_8h_aa3e5e5f11a6e2093901936356f6f68af}{aic\_scb\_timer\_reset}}(\mbox{\hyperlink{structscb}{scb}}, 2 * 1000);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07111}07111                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (last\_phase != \mbox{\hyperlink{aic79xx__reg_8h_a693ff4c5876c93e8452035f86e4acefb}{P\_BUSFREE}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07112}07112                         \&\& (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a02e1fe4793727dacf1d2b776af131c55}{SSTAT1}}) \& \mbox{\hyperlink{aic79xx__reg_8h_ad54a3d65d3b6e74bd4d64e982c928b25}{REQINIT}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07113}07113                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07114}07114 \textcolor{comment}{                         * SCB is not identified, there}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07115}07115 \textcolor{comment}{                         * is no pending REQ, and the sequencer}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07116}07116 \textcolor{comment}{                         * has not seen a busfree.  Looks like}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07117}07117 \textcolor{comment}{                         * a stuck connection waiting to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07118}07118 \textcolor{comment}{                         * go busfree.  Reset the bus.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07119}07119 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07120}07120                         printf(\textcolor{stringliteral}{"{}\%s: Connection stuck awaiting busfree or "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07121}07121                                \textcolor{stringliteral}{"{}Identify Msg.\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07122}07122                         \textcolor{keywordflow}{goto} bus\_reset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07123}07123                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07124}07124                         \textcolor{keywordtype}{int}      disconnected;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07125}07125 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07126}07126                         \textcolor{keywordflow}{if} (last\_phase != \mbox{\hyperlink{aic79xx__reg_8h_a693ff4c5876c93e8452035f86e4acefb}{P\_BUSFREE}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07127}07127                          \&\& (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac4a01506a711aa2647d57131c0ac3e3e}{SSTAT0}}) \& \mbox{\hyperlink{aic79xx__reg_8h_a9fec70a17d0bcef23cf03c45a7b7caba}{TARGET}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07128}07128                                 \textcolor{comment}{/* Hung target selection.  Goto busfree */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07129}07129                                 printf(\textcolor{stringliteral}{"{}\%s: Hung target selection\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07130}07130                                        \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07131}07131                                 restart\_needed = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07132}07132                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07133}07133                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07134}07134 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07135}07135                         \textcolor{comment}{/* XXX Shouldn't panic.  Just punt instead? */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07136}07136                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_abf9bf179c52821bbf018a9edcaf09116a56237d30abbd9e806da82c95c6646c06}{SCB\_TARGET\_SCB}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07137}07137                                 panic(\textcolor{stringliteral}{"{}Timed-\/out target SCB but bus idle"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07138}07138 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07139}07139                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{aic7xxx_8c_a6854c2ec2b22382f77741bf98681bcef}{ahc\_search\_qinfifo}}(ahc, target, channel, lun,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07140}07140                                                \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}}, \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07141}07141                                                \textcolor{comment}{/*status*/}0, \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba1d1c0640efc4301d2e764b00b0ab2763}{SEARCH\_COUNT}}) > 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07142}07142                                 disconnected = \mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07143}07143                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07144}07144                                 disconnected = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07145}07145                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07146}07146 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07147}07147                         \textcolor{keywordflow}{if} (disconnected) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07148}07148                                 ahc\_set\_recoveryscb(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07149}07149                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07150}07150 \textcolor{comment}{                                 * Actually re-\/queue this SCB in an attempt}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07151}07151 \textcolor{comment}{                                 * to select the device before it reconnects.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07152}07152 \textcolor{comment}{                                 * In either case (selection or reselection),}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07153}07153 \textcolor{comment}{                                 * we will now issue a target reset to the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07154}07154 \textcolor{comment}{                                 * timed-\/out device.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07155}07155 \textcolor{comment}{                                 *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07156}07156 \textcolor{comment}{                                 * Set the MK\_MESSAGE control bit indicating}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07157}07157 \textcolor{comment}{                                 * that we desire to send a message.  We}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07158}07158 \textcolor{comment}{                                 * also set the disconnected flag since}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07159}07159 \textcolor{comment}{                                 * in the paging case there is no guarantee}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07160}07160 \textcolor{comment}{                                 * that our SCB control byte matches the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07161}07161 \textcolor{comment}{                                 * version on the card.  We don't want the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07162}07162 \textcolor{comment}{                                 * sequencer to abort the command thinking}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07163}07163 \textcolor{comment}{                                 * an unsolicited reselection occurred.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07164}07164 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07165}07165                                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_ab156ba1b33e2e1f7c9b669a931805fed}{control}} |= \mbox{\hyperlink{aic79xx__reg_8h_aa0450131583d41582497643e1c7d0369}{MK\_MESSAGE}}|\mbox{\hyperlink{aic79xx__reg_8h_a257a6419ffa5ae98d448cd33751f6436}{DISCONNECTED}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07166}07166                                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} |= \mbox{\hyperlink{aic79xx_8h_abf9bf179c52821bbf018a9edcaf09116ade88549cda4d508712a6e7f76c17f03e}{SCB\_DEVICE\_RESET}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07167}07167 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07168}07168                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07169}07169 \textcolor{comment}{                                 * Remove any cached copy of this SCB in the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07170}07170 \textcolor{comment}{                                 * disconnected list in preparation for the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07171}07171 \textcolor{comment}{                                 * queuing of our abort SCB.  We use the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07172}07172 \textcolor{comment}{                                 * same element in the SCB, SCB\_NEXT, for}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07173}07173 \textcolor{comment}{                                 * both the qinfifo and the disconnected list.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07174}07174 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07175}07175                                 \mbox{\hyperlink{aic7xxx_8c_a3bd218cc5c2264a4f9fa01e15513dbe6}{ahc\_search\_disc\_list}}(ahc, target, channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07176}07176                                                      lun, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07177}07177                                                      \textcolor{comment}{/*stop\_on\_first*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07178}07178                                                      \textcolor{comment}{/*remove*/}\mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07179}07179                                                      \textcolor{comment}{/*save\_state*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07180}07180 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07181}07181                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07182}07182 \textcolor{comment}{                                 * In the non-\/paging case, the sequencer will}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07183}07183 \textcolor{comment}{                                 * never re-\/reference the in-\/core SCB.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07184}07184 \textcolor{comment}{                                 * To make sure we are notified during}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07185}07185 \textcolor{comment}{                                 * reslection, set the MK\_MESSAGE flag in}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07186}07186 \textcolor{comment}{                                 * the card's copy of the SCB.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07187}07187 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07188}07188                                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a68e9e5c60abbbad6da178ade4326e6a6}{AHC\_PAGESCBS}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07189}07189                                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07190}07190                                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07191}07191                                                  \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ac610e6affaf7fbb0ae2f2f9388bc6cef}{SCB\_CONTROL}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07192}07192                                                 | \mbox{\hyperlink{aic79xx__reg_8h_aa0450131583d41582497643e1c7d0369}{MK\_MESSAGE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07193}07193                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07194}07194 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07195}07195                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07196}07196 \textcolor{comment}{                                 * Clear out any entries in the QINFIFO first}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07197}07197 \textcolor{comment}{                                 * so we are the next SCB for this target}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07198}07198 \textcolor{comment}{                                 * to run.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07199}07199 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07200}07200                                 \mbox{\hyperlink{aic7xxx_8c_a6854c2ec2b22382f77741bf98681bcef}{ahc\_search\_qinfifo}}(ahc,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07201}07201                                                    \mbox{\hyperlink{aic79xx_8h_a6c0f4b6b37cc0fae8e266811c5ca3815}{SCB\_GET\_TARGET}}(ahc, \mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07202}07202                                                    channel, \mbox{\hyperlink{aic79xx_8h_acb7513adc9bc792e9e64962df1025afe}{SCB\_GET\_LUN}}(\mbox{\hyperlink{structscb}{scb}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07203}07203                                                    \mbox{\hyperlink{aic79xx_8h_a77fd32e9d85d19a2c0acc7e10e0c0c76}{SCB\_LIST\_NULL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07204}07204                                                    \mbox{\hyperlink{aic79xx_8h_a147824aa4797bb7a9bcf276b5de0cb7cac86c0e1ca3dee643fb844ada96730744}{ROLE\_INITIATOR}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07205}07205                                                    CAM\_REQUEUE\_REQ,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07206}07206                                                    \mbox{\hyperlink{aic79xx_8h_ab41c9b7a9c9c46427b0222dd72e36fcba7376e2bc1d00d3d67a9fa27a1bb1efce}{SEARCH\_COMPLETE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07207}07207                                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07208}07208                                 printf(\textcolor{stringliteral}{"{}Queuing a BDR SCB\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07209}07209                                 \mbox{\hyperlink{aic7xxx_8c_a94475d8eb8cca74f3f9583eda535e5d9}{ahc\_qinfifo\_requeue\_tail}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07210}07210                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a3f8c27ee02bb328b818bfba88c556b15}{SCBPTR}}, saved\_scbptr);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07211}07211                                 \mbox{\hyperlink{aic__osm__lib_8h_aa3e5e5f11a6e2093901936356f6f68af}{aic\_scb\_timer\_reset}}(\mbox{\hyperlink{structscb}{scb}}, 2 * 1000);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07212}07212                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07213}07213                                 \textcolor{comment}{/* Go "{}immediately"{} to the bus reset */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07214}07214                                 \textcolor{comment}{/* This shouldn't happen */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07215}07215                                 ahc\_set\_recoveryscb(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07216}07216                                 \mbox{\hyperlink{aic7xxx__osm_8h_af29e28ebc5502b30602535fd5d78ec75}{ahc\_print\_path}}(ahc, \mbox{\hyperlink{structscb}{scb}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07217}07217                                 printf(\textcolor{stringliteral}{"{}SCB \%d: Immediate reset.  "{}}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07218}07218                                         \textcolor{stringliteral}{"{}Flags = 0x\%x\(\backslash\)n"{}}, \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a6b95b5b17618c3c0c98f560c2a1e59c0}{hscb}}-\/>\mbox{\hyperlink{structhardware__scb_a58246beb1f1d0e59524a1948c4ae087f}{tag}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07219}07219                                         \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07220}07220                                 \textcolor{keywordflow}{goto} bus\_reset;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07221}07221                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07222}07222                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07223}07223                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07224}07224         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07225}07225 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07226}07226         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07227}07227 \textcolor{comment}{         * Any remaining SCBs were not the "{}culprit"{}, so remove}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07228}07228 \textcolor{comment}{         * them from the timeout list.  The timer for these commands}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07229}07229 \textcolor{comment}{         * will be reset once the recovery SCB completes.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07230}07230 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07231}07231         \textcolor{keywordflow}{while} ((\mbox{\hyperlink{structscb}{scb}} = LIST\_FIRST(\&ahc-\/>timedout\_scbs)) != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07232}07232                 LIST\_REMOVE(\mbox{\hyperlink{structscb}{scb}}, timedout\_links);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07233}07233                 \mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a94c13ae9fe111ba02247ace5a924c65f}{flags}} \&= \string~SCB\_TIMEDOUT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07234}07234         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07235}07235 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07236}07236         \textcolor{keywordflow}{if} (restart\_needed)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07237}07237                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07238}07238         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07239}07239                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07240}07240 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07241}07241 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07242}07242 \textcolor{comment}{/************************* Target Mode ****************************************/}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07243}07243 \textcolor{preprocessor}{\#ifdef AHC\_TARGET\_MODE}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07244}07244 cam\_status}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07245}07245 ahc\_find\_tmode\_devs(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} cam\_sim *sim, \textcolor{keyword}{union} ccb *ccb,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07246}07246                     \textcolor{keyword}{struct} \mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} **tstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07247}07247                     \textcolor{keyword}{struct} ahc\_tmode\_lstate **lstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07248}07248                     \textcolor{keywordtype}{int} notfound\_failure)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07249}07249 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07250}07250 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07251}07251         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa1e3f9e56e71e725edb868c6b16c1b694}{AHC\_TARGETMODE}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07252}07252                 \textcolor{keywordflow}{return} (CAM\_REQ\_INVALID);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07253}07253 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07254}07254         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07255}07255 \textcolor{comment}{         * Handle the 'black hole' device that sucks up}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07256}07256 \textcolor{comment}{         * requests to unattached luns on enabled targets.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07257}07257 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07258}07258         \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.target\_id == CAM\_TARGET\_WILDCARD}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07259}07259          \&\& ccb-\/>ccb\_h.target\_lun == CAM\_LUN\_WILDCARD) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07260}07260                 *tstate = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07261}07261                 *lstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07262}07262         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07263}07263                 u\_int max\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07264}07264 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07265}07265                 max\_id = (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaa2ce91255e1ef0a18aa20b3ca1170df4}{AHC\_WIDE}}) ? 15 : 7;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07266}07266                 \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.target\_id > max\_id)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07267}07267                         \textcolor{keywordflow}{return} (CAM\_TID\_INVALID);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07268}07268 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07269}07269                 \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.target\_lun >= \mbox{\hyperlink{aic7xxx_8h_a4b4241cdde48f619222c98ca9ad15adf}{AHC\_NUM\_LUNS}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07270}07270                         \textcolor{keywordflow}{return} (CAM\_LUN\_INVALID);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07271}07271 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07272}07272                 *tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[ccb-\/>ccb\_h.target\_id];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07273}07273                 *lstate = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07274}07274                 \textcolor{keywordflow}{if} (*tstate != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07275}07275                         *lstate =}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07276}07276                             (*tstate)-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[ccb-\/>ccb\_h.target\_lun];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07277}07277         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07278}07278 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07279}07279         \textcolor{keywordflow}{if} (notfound\_failure != 0 \&\& *lstate == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07280}07280                 \textcolor{keywordflow}{return} (CAM\_PATH\_INVALID);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07281}07281 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07282}07282         \textcolor{keywordflow}{return} (CAM\_REQ\_CMP);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07283}07283 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07284}07284 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07285}07285 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07286}07286 ahc\_handle\_en\_lun(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} cam\_sim *sim, \textcolor{keyword}{union} ccb *ccb)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07287}07287 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07288}07288         \textcolor{keyword}{struct     }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07289}07289         \textcolor{keyword}{struct     }ahc\_tmode\_lstate *lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07290}07290         \textcolor{keyword}{struct     }ccb\_en\_lun *cel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07291}07291         cam\_status status;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07292}07292         u\_int      target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07293}07293         u\_int      lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07294}07294         u\_int      target\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07295}07295         u\_int      our\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07296}07296         \textcolor{keywordtype}{int}        error;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07297}07297         \textcolor{keywordtype}{char}       channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07298}07298 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07299}07299         status = ahc\_find\_tmode\_devs(ahc, sim, ccb, \&tstate, \&lstate,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07300}07300                                      \textcolor{comment}{/*notfound\_failure*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07301}07301 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07302}07302         \textcolor{keywordflow}{if} (status != CAM\_REQ\_CMP) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07303}07303                 ccb-\/>ccb\_h.status = status;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07304}07304                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07305}07305         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07306}07306 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07307}07307         \textcolor{keywordflow}{if} (cam\_sim\_bus(sim) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07308}07308                 our\_id = ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07309}07309         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07310}07310                 our\_id = ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07311}07311 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07312}07312         \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.target\_id != our\_id}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07313}07313          \&\& ccb-\/>ccb\_h.target\_id != CAM\_TARGET\_WILDCARD) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07314}07314                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07315}07315 \textcolor{comment}{                 * our\_id represents our initiator ID, or}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07316}07316 \textcolor{comment}{                 * the ID of the first target to have an}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07317}07317 \textcolor{comment}{                 * enabled lun in target mode.  There are}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07318}07318 \textcolor{comment}{                 * two cases that may preclude enabling a}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07319}07319 \textcolor{comment}{                 * target id other than our\_id.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07320}07320 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07321}07321 \textcolor{comment}{                 *   o our\_id is for an active initiator role.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07322}07322 \textcolor{comment}{                 *     Since the hardware does not support}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07323}07323 \textcolor{comment}{                 *     reselections to the initiator role at}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07324}07324 \textcolor{comment}{                 *     anything other than our\_id, and our\_id}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07325}07325 \textcolor{comment}{                 *     is used by the hardware to indicate the}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07326}07326 \textcolor{comment}{                 *     ID to use for both select-\/out and}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07327}07327 \textcolor{comment}{                 *     reselect-\/out operations, the only target}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07328}07328 \textcolor{comment}{                 *     ID we can support in this mode is our\_id.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07329}07329 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07330}07330 \textcolor{comment}{                 *   o The MULTARGID feature is not available and}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07331}07331 \textcolor{comment}{                 *     a previous target mode ID has been enabled.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07332}07332 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07333}07333                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa1216bec95a2d72eac97e1907100c51f2}{AHC\_MULTIROLE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07334}07334                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaf0561c4f43660096e66cf1a293e375cb}{AHC\_MULTI\_TID}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07335}07335                          \&\& (ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a90a9bb8741ed9283bb95dd061dfa8806}{AHC\_INITIATORROLE}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07336}07336                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07337}07337 \textcolor{comment}{                                 * Only allow additional targets if}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07338}07338 \textcolor{comment}{                                 * the initiator role is disabled.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07339}07339 \textcolor{comment}{                                 * The hardware cannot handle a re-\/select-\/in}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07340}07340 \textcolor{comment}{                                 * on the initiator id during a re-\/select-\/out}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07341}07341 \textcolor{comment}{                                 * on a different target id.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07342}07342 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07343}07343                                 status = CAM\_TID\_INVALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07344}07344                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a90a9bb8741ed9283bb95dd061dfa8806}{AHC\_INITIATORROLE}}) != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07345}07345                                 || ahc-\/>\mbox{\hyperlink{structahc__softc_a982df71fccf191619bfbeec1aed0424f}{enabled\_luns}} > 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07346}07346                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07347}07347 \textcolor{comment}{                                 * Only allow our target id to change}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07348}07348 \textcolor{comment}{                                 * if the initiator role is not configured}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07349}07349 \textcolor{comment}{                                 * and there are no enabled luns which}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07350}07350 \textcolor{comment}{                                 * are attached to the currently registered}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07351}07351 \textcolor{comment}{                                 * scsi id.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07352}07352 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07353}07353                                 status = CAM\_TID\_INVALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07354}07354                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07355}07355                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaf0561c4f43660096e66cf1a293e375cb}{AHC\_MULTI\_TID}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07356}07356                         \&\& ahc-\/>\mbox{\hyperlink{structahc__softc_a982df71fccf191619bfbeec1aed0424f}{enabled\_luns}} > 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07357}07357                         status = CAM\_TID\_INVALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07358}07358                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07359}07359         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07360}07360 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07361}07361         \textcolor{keywordflow}{if} (status != CAM\_REQ\_CMP) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07362}07362                 ccb-\/>ccb\_h.status = status;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07363}07363                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07364}07364         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07365}07365 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07366}07366         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07367}07367 \textcolor{comment}{         * We now have an id that is valid.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07368}07368 \textcolor{comment}{         * If we aren't in target mode, switch modes.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07369}07369 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07370}07370         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \& \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a23c5171bfe59cf85decfd0b4c0a72f82}{AHC\_TARGETROLE}}) == 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07371}07371          \&\& ccb-\/>ccb\_h.target\_id != CAM\_TARGET\_WILDCARD) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07372}07372                 \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81}{ahc\_flag}} saved\_flags;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07373}07373 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07374}07374                 printf(\textcolor{stringliteral}{"{}Configuring Target Mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07375}07375                 \textcolor{keywordflow}{if} (LIST\_FIRST(\&ahc-\/>pending\_scbs) != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07376}07376                         ccb-\/>ccb\_h.status = CAM\_BUSY;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07377}07377                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07378}07378                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07379}07379                 saved\_flags = ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07380}07380                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a23c5171bfe59cf85decfd0b4c0a72f82}{AHC\_TARGETROLE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07381}07381                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa1216bec95a2d72eac97e1907100c51f2}{AHC\_MULTIROLE}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07382}07382                         ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \&= \string~AHC\_INITIATORROLE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07383}07383                 \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07384}07384                 error = \mbox{\hyperlink{aic7xxx_8c_afad04e6d810b9d879954b50645e2f103}{ahc\_loadseq}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07385}07385                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07386}07386                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07387}07387 \textcolor{comment}{                         * Restore original configuration and notify}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07388}07388 \textcolor{comment}{                         * the caller that we cannot support target mode.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07389}07389 \textcolor{comment}{                         * Since the adapter started out in this}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07390}07390 \textcolor{comment}{                         * configuration, the firmware load will succeed,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07391}07391 \textcolor{comment}{                         * so there is no point in checking ahc\_loadseq's}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07392}07392 \textcolor{comment}{                         * return value.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07393}07393 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07394}07394                         ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} = saved\_flags;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07395}07395                         (void)\mbox{\hyperlink{aic7xxx_8c_afad04e6d810b9d879954b50645e2f103}{ahc\_loadseq}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07396}07396                         \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07397}07397                         ccb-\/>ccb\_h.status = CAM\_FUNC\_NOTAVAIL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07398}07398                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07399}07399                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07400}07400                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07401}07401         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07402}07402         cel = \&ccb-\/>cel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07403}07403         target = ccb-\/>ccb\_h.target\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07404}07404         lun = ccb-\/>ccb\_h.target\_lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07405}07405         channel = \mbox{\hyperlink{aic79xx__osm_8h_ab7a6b47a230a885c97f3bfefc9704e51}{SIM\_CHANNEL}}(ahc, sim);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07406}07406         target\_mask = 0x01 << target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07407}07407         \textcolor{keywordflow}{if} (channel == \textcolor{charliteral}{'B'})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07408}07408                 target\_mask <<= 8;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07409}07409 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07410}07410         \textcolor{keywordflow}{if} (cel-\/>enable != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07411}07411                 u\_int scsiseq;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07412}07412 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07413}07413                 \textcolor{comment}{/* Are we already enabled?? */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07414}07414                 \textcolor{keywordflow}{if} (lstate != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07415}07415                         xpt\_print\_path(ccb-\/>ccb\_h.path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07416}07416                         printf(\textcolor{stringliteral}{"{}Lun already enabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07417}07417                         ccb-\/>ccb\_h.status = CAM\_LUN\_ALRDY\_ENA;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07418}07418                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07419}07419                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07420}07420 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07421}07421                 \textcolor{keywordflow}{if} (cel-\/>grp6\_len != 0}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07422}07422                  || cel-\/>grp7\_len != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07423}07423                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07424}07424 \textcolor{comment}{                         * Don't (yet?) support vendor}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07425}07425 \textcolor{comment}{                         * specific commands.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07426}07426 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07427}07427                         ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07428}07428                         printf(\textcolor{stringliteral}{"{}Non-\/zero Group Codes\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07429}07429                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07430}07430                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07431}07431 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07432}07432                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07433}07433 \textcolor{comment}{                 * Seems to be okay.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07434}07434 \textcolor{comment}{                 * Setup our data structures.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07435}07435 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07436}07436                 \textcolor{keywordflow}{if} (target != CAM\_TARGET\_WILDCARD \&\& tstate == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07437}07437                         tstate = \mbox{\hyperlink{aic7xxx_8c_a6b94ed6a6d432af1c6e73de284d2437c}{ahc\_alloc\_tstate}}(ahc, target, channel);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07438}07438                         \textcolor{keywordflow}{if} (tstate == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07439}07439                                 xpt\_print\_path(ccb-\/>ccb\_h.path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07440}07440                                 printf(\textcolor{stringliteral}{"{}Couldn't allocate tstate\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07441}07441                                 ccb-\/>ccb\_h.status = CAM\_RESRC\_UNAVAIL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07442}07442                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07443}07443                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07444}07444                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07445}07445                 lstate = malloc(\textcolor{keyword}{sizeof}(*lstate), M\_DEVBUF, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07446}07446                 \textcolor{keywordflow}{if} (lstate == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07447}07447                         xpt\_print\_path(ccb-\/>ccb\_h.path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07448}07448                         printf(\textcolor{stringliteral}{"{}Couldn't allocate lstate\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07449}07449                         ccb-\/>ccb\_h.status = CAM\_RESRC\_UNAVAIL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07450}07450                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07451}07451                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07452}07452                 memset(lstate, 0, \textcolor{keyword}{sizeof}(*lstate));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07453}07453                 status = xpt\_create\_path(\&lstate-\/>path, \textcolor{comment}{/*periph*/}NULL,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07454}07454                                          xpt\_path\_path\_id(ccb-\/>ccb\_h.path),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07455}07455                                          xpt\_path\_target\_id(ccb-\/>ccb\_h.path),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07456}07456                                          xpt\_path\_lun\_id(ccb-\/>ccb\_h.path));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07457}07457                 \textcolor{keywordflow}{if} (status != CAM\_REQ\_CMP) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07458}07458                         free(lstate, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07459}07459                         xpt\_print\_path(ccb-\/>ccb\_h.path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07460}07460                         printf(\textcolor{stringliteral}{"{}Couldn't allocate path\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07461}07461                         ccb-\/>ccb\_h.status = CAM\_RESRC\_UNAVAIL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07462}07462                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07463}07463                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07464}07464                 SLIST\_INIT(\&lstate-\/>accept\_tios);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07465}07465                 SLIST\_INIT(\&lstate-\/>immed\_notifies);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07466}07466                 \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07467}07467                 \textcolor{keywordflow}{if} (target != CAM\_TARGET\_WILDCARD) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07468}07468                         tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[lun] = lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07469}07469                         ahc-\/>\mbox{\hyperlink{structahc__softc_a982df71fccf191619bfbeec1aed0424f}{enabled\_luns}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07470}07470 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07471}07471                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaf0561c4f43660096e66cf1a293e375cb}{AHC\_MULTI\_TID}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07472}07472                                 u\_int targid\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07473}07473 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07474}07474                                 targid\_mask = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07475}07475                                             | (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}} + 1) << 8);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07476}07476 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07477}07477                                 targid\_mask |= target\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07478}07478                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}}, targid\_mask);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07479}07479                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}}+1, (targid\_mask >> 8));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07480}07480                                 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07481}07481                                 ahc\_update\_scsiid(ahc, targid\_mask);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07482}07482                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07483}07483                                 u\_int our\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07484}07484                                 \textcolor{keywordtype}{char}  channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07485}07485 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07486}07486                                 channel = \mbox{\hyperlink{aic79xx__osm_8h_ab7a6b47a230a885c97f3bfefc9704e51}{SIM\_CHANNEL}}(ahc, sim);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07487}07487                                 our\_id = \mbox{\hyperlink{aic79xx__osm_8h_a29bbedf23a3956d7522a6839442ddf99}{SIM\_SCSI\_ID}}(ahc, sim);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07488}07488 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07489}07489                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07490}07490 \textcolor{comment}{                                 * This can only happen if selections}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07491}07491 \textcolor{comment}{                                 * are not enabled}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07492}07492 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07493}07493                                 \textcolor{keywordflow}{if} (target != our\_id) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07494}07494                                         u\_int sblkctl;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07495}07495                                         \textcolor{keywordtype}{char}  cur\_channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07496}07496                                         \textcolor{keywordtype}{int}   swap;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07497}07497 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07498}07498                                         sblkctl = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07499}07499                                         cur\_channel = (sblkctl \& \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07500}07500                                                     ? \textcolor{charliteral}{'B'} : \textcolor{charliteral}{'A'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07501}07501                                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5c53852767932e650760fdccab0f8384}{AHC\_TWIN}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07502}07502                                                 cur\_channel = \textcolor{charliteral}{'A'};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07503}07503                                         swap = cur\_channel != channel;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07504}07504                                         \textcolor{keywordflow}{if} (channel == \textcolor{charliteral}{'A'})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07505}07505                                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}} = target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07506}07506                                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07507}07507                                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a49c092aa7bfdb760c5291263b73c07c3}{our\_id\_b}} = target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07508}07508 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07509}07509                                         \textcolor{keywordflow}{if} (swap)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07510}07510                                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07511}07511                                                          sblkctl \string^ \mbox{\hyperlink{aic7xxx__reg_8h_a9db23205849ff8aa46f7dcebb5efb156}{SELBUSB}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07512}07512 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07513}07513                                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ac41cdf130fdc7b5a17b8d4a75c0c4943}{SCSIID}}, target);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07514}07514 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07515}07515                                         \textcolor{keywordflow}{if} (swap)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07516}07516                                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_aa00ddb10250effd3f3545e554e6072cd}{SBLKCTL}}, sblkctl);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07517}07517                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07518}07518                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07519}07519                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07520}07520                         ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}} = lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07521}07521                 \textcolor{comment}{/* Allow select-\/in operations */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07522}07522                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}} != NULL \&\& ahc-\/>\mbox{\hyperlink{structahc__softc_a982df71fccf191619bfbeec1aed0424f}{enabled\_luns}} > 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07523}07523                         scsiseq = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8da1b58b6c1f22bff54431431b06a8e6}{SCSISEQ\_TEMPLATE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07524}07524                         scsiseq |= \mbox{\hyperlink{aic79xx__reg_8h_a5130b53e9a5c5ef1cf67782e27aafe44}{ENSELI}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07525}07525                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8da1b58b6c1f22bff54431431b06a8e6}{SCSISEQ\_TEMPLATE}}, scsiseq);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07526}07526                         scsiseq = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07527}07527                         scsiseq |= \mbox{\hyperlink{aic79xx__reg_8h_a5130b53e9a5c5ef1cf67782e27aafe44}{ENSELI}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07528}07528                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, scsiseq);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07529}07529                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07530}07530                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07531}07531                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07532}07532                 xpt\_print\_path(ccb-\/>ccb\_h.path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07533}07533                 printf(\textcolor{stringliteral}{"{}Lun now enabled for target mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07534}07534         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07535}07535                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscb}{scb}} *\mbox{\hyperlink{structscb}{scb}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07536}07536                 \textcolor{keywordtype}{int} i, empty;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07537}07537 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07538}07538                 \textcolor{keywordflow}{if} (lstate == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07539}07539                         ccb-\/>ccb\_h.status = CAM\_LUN\_INVALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07540}07540                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07541}07541                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07542}07542 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07543}07543                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07544}07544                 LIST\_FOREACH(\mbox{\hyperlink{structscb}{scb}}, \&ahc-\/>pending\_scbs, \mbox{\hyperlink{aic79xx_8h_a08d5b7a26a4fe44c4684fe5098ba19b1}{pending\_links}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07545}07545                         \textcolor{keyword}{struct }ccb\_hdr *ccbh;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07546}07546 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07547}07547                         ccbh = \&\mbox{\hyperlink{structscb}{scb}}-\/>\mbox{\hyperlink{structscb_a99f99fe2737984d6ababf6ab2c29a1f8}{io\_ctx}}-\/>ccb\_h;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07548}07548                         \textcolor{keywordflow}{if} (ccbh-\/>func\_code == XPT\_CONT\_TARGET\_IO}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07549}07549                          \&\& !xpt\_path\_comp(ccbh-\/>path, ccb-\/>ccb\_h.path))\{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07550}07550                                 printf(\textcolor{stringliteral}{"{}CTIO pending\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07551}07551                                 ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07552}07552                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07553}07553                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07554}07554                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07555}07555 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07556}07556                 \textcolor{keywordflow}{if} (SLIST\_FIRST(\&lstate-\/>accept\_tios) != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07557}07557                         printf(\textcolor{stringliteral}{"{}ATIOs pending\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07558}07558                         ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07559}07559                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07560}07560 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07561}07561                 \textcolor{keywordflow}{if} (SLIST\_FIRST(\&lstate-\/>immed\_notifies) != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07562}07562                         printf(\textcolor{stringliteral}{"{}INOTs pending\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07563}07563                         ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07564}07564                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07565}07565 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07566}07566                 \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.status != CAM\_REQ\_CMP) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07567}07567                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07568}07568                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07569}07569 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07570}07570                 xpt\_print\_path(ccb-\/>ccb\_h.path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07571}07571                 printf(\textcolor{stringliteral}{"{}Target mode disabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07572}07572                 xpt\_free\_path(lstate-\/>path);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07573}07573                 free(lstate, M\_DEVBUF);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07574}07574 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07575}07575                 \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07576}07576                 \textcolor{comment}{/* Can we clean up the target too? */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07577}07577                 \textcolor{keywordflow}{if} (target != CAM\_TARGET\_WILDCARD) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07578}07578                         tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[lun] = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07579}07579                         ahc-\/>\mbox{\hyperlink{structahc__softc_a982df71fccf191619bfbeec1aed0424f}{enabled\_luns}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07580}07580                         \textcolor{keywordflow}{for} (empty = 1, i = 0; i < 8; i++)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07581}07581                                 \textcolor{keywordflow}{if} (tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[i] != NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07582}07582                                         empty = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07583}07583                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07584}07584                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07585}07585 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07586}07586                         \textcolor{keywordflow}{if} (empty) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07587}07587                                 ahc\_free\_tstate(ahc, target, channel,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07588}07588                                                 \textcolor{comment}{/*force*/}\mbox{\hyperlink{aic79xx_8h_aa93f0eb578d23995850d61f7d61c55c1}{FALSE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07589}07589                                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaf0561c4f43660096e66cf1a293e375cb}{AHC\_MULTI\_TID}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07590}07590                                         u\_int targid\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07591}07591 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07592}07592                                         targid\_mask = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}})}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07593}07593                                                     | (\mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}} + 1)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07594}07594                                                        << 8);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07595}07595 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07596}07596                                         targid\_mask \&= \string~target\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07597}07597                                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}}, targid\_mask);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07598}07598                                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9c206d5d5d1fe56961b63302b25ac3ae}{TARGID}}+1,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07599}07599                                                  (targid\_mask >> 8));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07600}07600                                         ahc\_update\_scsiid(ahc, targid\_mask);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07601}07601                                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07602}07602                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07603}07603                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07604}07604                         ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}} = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07605}07605 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07606}07606                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07607}07607 \textcolor{comment}{                         * We can't allow selections without}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07608}07608 \textcolor{comment}{                         * our black hole device.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07609}07609 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07610}07610                         empty = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07611}07611                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07612}07612                 \textcolor{keywordflow}{if} (ahc-\/>\mbox{\hyperlink{structahc__softc_a982df71fccf191619bfbeec1aed0424f}{enabled\_luns}} == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07613}07613                         \textcolor{comment}{/* Disallow select-\/in */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07614}07614                         u\_int scsiseq;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07615}07615 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07616}07616                         scsiseq = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8da1b58b6c1f22bff54431431b06a8e6}{SCSISEQ\_TEMPLATE}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07617}07617                         scsiseq \&= \string~ENSELI;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07618}07618                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a8da1b58b6c1f22bff54431431b06a8e6}{SCSISEQ\_TEMPLATE}}, scsiseq);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07619}07619                         scsiseq = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07620}07620                         scsiseq \&= \string~ENSELI;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07621}07621                         \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ae0ebe8677e6ef1722d22d70fa5c2cef6}{SCSISEQ}}, scsiseq);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07622}07622 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07623}07623                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa1216bec95a2d72eac97e1907100c51f2}{AHC\_MULTIROLE}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07624}07624                                 printf(\textcolor{stringliteral}{"{}Configuring Initiator Mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07625}07625                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \&= \string~AHC\_TARGETROLE;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07626}07626                                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81a90a9bb8741ed9283bb95dd061dfa8806}{AHC\_INITIATORROLE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07627}07627                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07628}07628 \textcolor{comment}{                                 * Returning to a configuration that}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07629}07629 \textcolor{comment}{                                 * fit previously will always succeed.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07630}07630 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07631}07631                                 (void)\mbox{\hyperlink{aic7xxx_8c_afad04e6d810b9d879954b50645e2f103}{ahc\_loadseq}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07632}07632                                 \mbox{\hyperlink{aic7xxx_8c_a029d7b4a7019f4cc3b5edb58386402e3}{ahc\_restart}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07633}07633                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07634}07634 \textcolor{comment}{                                 * Unpaused.  The extra unpause}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07635}07635 \textcolor{comment}{                                 * that follows is harmless.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07636}07636 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07637}07637                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07638}07638                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07639}07639                 \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07640}07640         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07641}07641 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07642}07642 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07643}07643 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07644}07644 ahc\_update\_scsiid(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, u\_int targid\_mask)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07645}07645 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07646}07646         u\_int scsiid\_mask;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07647}07647         u\_int scsiid;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07648}07648 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07649}07649         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aaf0561c4f43660096e66cf1a293e375cb}{AHC\_MULTI\_TID}}) == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07650}07650                 panic(\textcolor{stringliteral}{"{}ahc\_update\_scsiid called on non-\/multitid unit\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07651}07651 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07652}07652         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07653}07653 \textcolor{comment}{         * Since we will rely on the TARGID mask}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07654}07654 \textcolor{comment}{         * for selection enables, ensure that OID}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07655}07655 \textcolor{comment}{         * in SCSIID is not set to some other ID}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07656}07656 \textcolor{comment}{         * that we don't want to allow selections on.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07657}07657 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07658}07658         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07659}07659                 scsiid = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a6bf22789cbeef6b8441952a601491577}{SCSIID\_ULTRA2}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07660}07660         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07661}07661                 scsiid = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ac41cdf130fdc7b5a17b8d4a75c0c4943}{SCSIID}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07662}07662         scsiid\_mask = 0x1 << (scsiid \& \mbox{\hyperlink{aic79xx__reg_8h_ab0602f28920b31b2015535b1a8c159e3}{OID}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07663}07663         \textcolor{keywordflow}{if} ((targid\_mask \& scsiid\_mask) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07664}07664                 u\_int our\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07665}07665 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07666}07666                 \textcolor{comment}{/* ffs counts from 1 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07667}07667                 our\_id = ffs(targid\_mask);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07668}07668                 \textcolor{keywordflow}{if} (our\_id == 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07669}07669                         our\_id = ahc-\/>\mbox{\hyperlink{structahc__softc_a4dd290abd12f8cf2e7d6b2e5bb457d20}{our\_id}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07670}07670                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07671}07671                         our\_id-\/-\/;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07672}07672                 scsiid \&= \mbox{\hyperlink{aic79xx__reg_8h_a0dbe0644a79e28f4f3f93fbc8b1eca24}{TID}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07673}07673                 scsiid |= our\_id;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07674}07674         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07675}07675         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa745162b75ef169832021b99fd68d6ef3}{AHC\_ULTRA2}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07676}07676                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_a6bf22789cbeef6b8441952a601491577}{SCSIID\_ULTRA2}}, scsiid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07677}07677         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07678}07678                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic7xxx__reg_8h_ac41cdf130fdc7b5a17b8d4a75c0c4943}{SCSIID}}, scsiid);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07679}07679 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07680}07680 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07681}07681 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07682}07682 ahc\_run\_tqinfifo(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keywordtype}{int} paused)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07683}07683 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07684}07684         \textcolor{keyword}{struct }\mbox{\hyperlink{structtarget__cmd}{target\_cmd}} *cmd;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07685}07685 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07686}07686         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07687}07687 \textcolor{comment}{         * If the card supports auto-\/access pause,}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07688}07688 \textcolor{comment}{         * we can access the card directly regardless}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07689}07689 \textcolor{comment}{         * of whether it is paused or not.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07690}07690 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07691}07691         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5d31c34d54b5904ed0b61f9f5dfaa317}{AHC\_AUTOPAUSE}}) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07692}07692                 paused = \mbox{\hyperlink{aic79xx_8h_aa8cecfc5c5c054d2875c03e77b7be15d}{TRUE}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07693}07693 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07694}07694         \mbox{\hyperlink{aic7xxx__inline_8h_ad51a64c4048f4452f6c736df1ea1a1e1}{ahc\_sync\_tqinfifo}}(ahc, BUS\_DMASYNC\_POSTREAD);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07695}07695         \textcolor{keywordflow}{while} ((cmd = \&ahc-\/>\mbox{\hyperlink{structahc__softc_a5ac6b3e2f472173f329753da137484a5}{targetcmds}}[ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}}])-\/>cmd\_valid != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07696}07696                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07697}07697 \textcolor{comment}{                 * Only advance through the queue if we}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07698}07698 \textcolor{comment}{                 * have the resources to process the command.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07699}07699 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07700}07700                 \textcolor{keywordflow}{if} (ahc\_handle\_target\_cmd(ahc, cmd) != 0)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07701}07701                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07702}07702 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07703}07703                 cmd-\/>\mbox{\hyperlink{structtarget__cmd_a8c515caeebf32b5cf32669f3bc5cf2bd}{cmd\_valid}} = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07704}07704                 \mbox{\hyperlink{aic__osm__lib_8h_a47db40ebfae51fce980f7cfdb0dd280c}{aic\_dmamap\_sync}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a6dc0a81da5759d51c9f663b35aed8f98}{shared\_data\_dmat}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07705}07705                                 ahc-\/>\mbox{\hyperlink{structahc__softc_aaa85e4b192dffdaa3a3a335ba8dbbdfe}{shared\_data\_dmamap}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07706}07706                                 \mbox{\hyperlink{aic7xxx__inline_8h_a6e5f0b734041353cc13f714c014cdec7}{ahc\_targetcmd\_offset}}(ahc, ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07707}07707                                 \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structtarget__cmd}{target\_cmd}}),}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07708}07708                                 BUS\_DMASYNC\_PREREAD);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07709}07709                 ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07710}07710 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07711}07711                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07712}07712 \textcolor{comment}{                 * Lazily update our position in the target mode incoming}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07713}07713 \textcolor{comment}{                 * command queue as seen by the sequencer.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07714}07714 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07715}07715                 \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}} \& (\mbox{\hyperlink{aic79xx__reg_8h_a786c9f286fd87c122a7c03ab78a7e230}{HOST\_TQINPOS}} -\/ 1)) == 1) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07716}07716                         \textcolor{keywordflow}{if} ((ahc-\/>\mbox{\hyperlink{structahc__softc_aeec26a6302824ee2be0cb23a6209cece}{features}} \& \mbox{\hyperlink{aic7xxx_8h_a89d2bd5159387355ff7f85eee017542aa5faf236baac9694dcd8ee4489866d90b}{AHC\_HS\_MAILBOX}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07717}07717                                 u\_int hs\_mailbox;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07718}07718 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07719}07719                                 hs\_mailbox = \mbox{\hyperlink{aic7xxx__osm_8h_a732bba6cd486109a88afbd6bb764d12a}{ahc\_inb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad6f6bec44db2eb5549221449ce77f2da}{HS\_MAILBOX}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07720}07720                                 hs\_mailbox \&= \string~HOST\_TQINPOS;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07721}07721                                 hs\_mailbox |= ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}} \& \mbox{\hyperlink{aic79xx__reg_8h_a786c9f286fd87c122a7c03ab78a7e230}{HOST\_TQINPOS}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07722}07722                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_ad6f6bec44db2eb5549221449ce77f2da}{HS\_MAILBOX}}, hs\_mailbox);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07723}07723                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07724}07724                                 \textcolor{keywordflow}{if} (!paused)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07725}07725                                         \mbox{\hyperlink{aic7xxx__inline_8h_a6e00263a44aba663503b5bc79e51e2d1}{ahc\_pause}}(ahc);        }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07726}07726                                 \mbox{\hyperlink{aic7xxx__osm_8h_a90380186d8785c4b689173bb129dee4d}{ahc\_outb}}(ahc, \mbox{\hyperlink{aic79xx__reg_8h_a9e2eca02ef231461c102be35f55a0c15}{KERNEL\_TQINPOS}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07727}07727                                          ahc-\/>\mbox{\hyperlink{structahc__softc_a5fe5e18fb83facaca64677cf3a552fe9}{tqinfifonext}} \& \mbox{\hyperlink{aic79xx__reg_8h_a786c9f286fd87c122a7c03ab78a7e230}{HOST\_TQINPOS}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07728}07728                                 \textcolor{keywordflow}{if} (!paused)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07729}07729                                         \mbox{\hyperlink{aic7xxx__inline_8h_a948639bea6451484d40afc46fa902082}{ahc\_unpause}}(ahc);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07730}07730                         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07731}07731                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07732}07732         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07733}07733 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07734}07734 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07735}07735 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07736}07736 ahc\_handle\_target\_cmd(\textcolor{keyword}{struct} \mbox{\hyperlink{structahc__softc}{ahc\_softc}} *ahc, \textcolor{keyword}{struct} \mbox{\hyperlink{structtarget__cmd}{target\_cmd}} *cmd)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07737}07737 \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07738}07738         \textcolor{keyword}{struct    }\mbox{\hyperlink{structahc__tmode__tstate}{ahc\_tmode\_tstate}} *tstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07739}07739         \textcolor{keyword}{struct    }ahc\_tmode\_lstate *lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07740}07740         \textcolor{keyword}{struct    }ccb\_accept\_tio *atio;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07741}07741         uint8\_t *byte;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07742}07742         \textcolor{keywordtype}{int}       initiator;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07743}07743         \textcolor{keywordtype}{int}       target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07744}07744         \textcolor{keywordtype}{int}       lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07745}07745 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07746}07746         initiator = \mbox{\hyperlink{aic79xx_8h_a9227348864b51c7312382787bb426918}{SCSIID\_TARGET}}(ahc, cmd-\/>\mbox{\hyperlink{structtarget__cmd_a4d0e8623ec0a60ed61001be3a657be83}{scsiid}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07747}07747         target = \mbox{\hyperlink{aic79xx_8h_a94f4eb3b38f3cb1a5956256d50d4d07a}{SCSIID\_OUR\_ID}}(cmd-\/>\mbox{\hyperlink{structtarget__cmd_a4d0e8623ec0a60ed61001be3a657be83}{scsiid}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07748}07748         lun    = (cmd-\/>\mbox{\hyperlink{structtarget__cmd_a16ade3e75337b219efb30a170e0e6c8c}{identify}} \& MSG\_IDENTIFY\_LUNMASK);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07749}07749 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07750}07750         \textcolor{keywordtype}{byte} = cmd-\/>\mbox{\hyperlink{structtarget__cmd_a231b47959741d31cbe5756b5c225175f}{bytes}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07751}07751         tstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a08215b271af19a8eb7033fa4134c1143}{enabled\_targets}}[target];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07752}07752         lstate = NULL;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07753}07753         \textcolor{keywordflow}{if} (tstate != NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07754}07754                 lstate = tstate-\/>\mbox{\hyperlink{structahc__tmode__tstate_aaa0d396086d53cad822b8bdc385b5fc5}{enabled\_luns}}[lun];}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07755}07755 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07756}07756         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07757}07757 \textcolor{comment}{         * Commands for disabled luns go to the black hole driver.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07758}07758 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07759}07759         \textcolor{keywordflow}{if} (lstate == NULL)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07760}07760                 lstate = ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07761}07761 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07762}07762         atio = (\textcolor{keyword}{struct }ccb\_accept\_tio*)SLIST\_FIRST(\&lstate-\/>accept\_tios);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07763}07763         \textcolor{keywordflow}{if} (atio == NULL) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07764}07764                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} |= \mbox{\hyperlink{aic7xxx_8h_ab80df6f3fdeef56c8af9e33284a4fd81ae31f16c34ae0b0483178b9d9c1361add}{AHC\_TQINFIFO\_BLOCKED}};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07765}07765                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07766}07766 \textcolor{comment}{                 * Wait for more ATIOs from the peripheral driver for this lun.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07767}07767 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07768}07768                 \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07769}07769                         printf(\textcolor{stringliteral}{"{}\%s: ATIOs exhausted\(\backslash\)n"{}}, \mbox{\hyperlink{aic7xxx__inline_8h_ab6575c56128f862ec4df817cf9bc2e05}{ahc\_name}}(ahc));}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07770}07770                 \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07771}07771         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07772}07772                 ahc-\/>\mbox{\hyperlink{structahc__softc_a93c6c2a1032f6fc0f41d1aa1d2078ea3}{flags}} \&= \string~AHC\_TQINFIFO\_BLOCKED;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07773}07773 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07774}07774         \textcolor{keywordflow}{if} (ahc\_debug \& AHC\_SHOW\_TQIN) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07775}07775                 printf(\textcolor{stringliteral}{"{}Incoming command from \%d for \%d:\%d\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07776}07776                        initiator, target, lun,}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07777}07777                        lstate == ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}} ? \textcolor{stringliteral}{"{}(Black Holed)"{}} : \textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07778}07778         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07779}07779 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07780}07780         SLIST\_REMOVE\_HEAD(\&lstate-\/>accept\_tios, sim\_links.sle);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07781}07781 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07782}07782         \textcolor{keywordflow}{if} (lstate == ahc-\/>\mbox{\hyperlink{structahc__softc_a2864b3e49ee8ce2a6c955548a92c915f}{black\_hole}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07783}07783                 \textcolor{comment}{/* Fill in the wildcards */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07784}07784                 atio-\/>ccb\_h.target\_id = target;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07785}07785                 atio-\/>ccb\_h.target\_lun = lun;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07786}07786         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07787}07787 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07788}07788         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07789}07789 \textcolor{comment}{         * Package it up and send it off to}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07790}07790 \textcolor{comment}{         * whomever has this lun enabled.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07791}07791 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07792}07792         atio-\/>sense\_len = 0;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07793}07793         atio-\/>init\_id = initiator;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07794}07794         \textcolor{keywordflow}{if} (\textcolor{keywordtype}{byte}[0] != 0xFF) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07795}07795                 \textcolor{comment}{/* Tag was included */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07796}07796                 atio-\/>tag\_action = *\textcolor{keywordtype}{byte}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07797}07797                 atio-\/>tag\_id = *\textcolor{keywordtype}{byte}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07798}07798                 atio-\/>ccb\_h.flags |= CAM\_TAG\_ACTION\_VALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07799}07799         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07800}07800                 atio-\/>ccb\_h.flags \&= \string~CAM\_TAG\_ACTION\_VALID;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07801}07801         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07802}07802         \textcolor{keywordtype}{byte}++;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07803}07803 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07804}07804         \textcolor{comment}{/* Okay.  Now determine the cdb size based on the command code */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07805}07805         \textcolor{keywordflow}{switch} (*\textcolor{keywordtype}{byte} >> \mbox{\hyperlink{aic79xx__reg_8h_a6e89444d89ae98bd157a2d4159b47437}{CMD\_GROUP\_CODE\_SHIFT}}) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07806}07806         \textcolor{keywordflow}{case} 0:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07807}07807                 atio-\/>cdb\_len = 6;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07808}07808                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07809}07809         \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07810}07810         \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07811}07811                 atio-\/>cdb\_len = 10;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07812}07812                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07813}07813         \textcolor{keywordflow}{case} 4:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07814}07814                 atio-\/>cdb\_len = 16;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07815}07815                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07816}07816         \textcolor{keywordflow}{case} 5:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07817}07817                 atio-\/>cdb\_len = 12;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07818}07818                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07819}07819         \textcolor{keywordflow}{case} 3:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07820}07820         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07821}07821                 \textcolor{comment}{/* Only copy the opcode. */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07822}07822                 atio-\/>cdb\_len = 1;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07823}07823                 printf(\textcolor{stringliteral}{"{}Reserved or VU command code type encountered\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07824}07824                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07825}07825         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07826}07826 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07827}07827         memcpy(atio-\/>cdb\_io.cdb\_bytes, \textcolor{keywordtype}{byte}, atio-\/>cdb\_len);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07828}07828 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07829}07829         atio-\/>ccb\_h.status |= CAM\_CDB\_RECVD;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07830}07830 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07831}07831         \textcolor{keywordflow}{if} ((cmd-\/>\mbox{\hyperlink{structtarget__cmd_a16ade3e75337b219efb30a170e0e6c8c}{identify}} \& MSG\_IDENTIFY\_DISCFLAG) == 0) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07832}07832                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07833}07833 \textcolor{comment}{                 * We weren't allowed to disconnect.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07834}07834 \textcolor{comment}{                 * We're hanging on the bus until a}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07835}07835 \textcolor{comment}{                 * continue target I/O comes in response}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07836}07836 \textcolor{comment}{                 * to this accept tio.}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07837}07837 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07838}07838 \textcolor{preprocessor}{\#ifdef AHC\_DEBUG}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07839}07839                 \textcolor{keywordflow}{if} (ahc\_debug \& AHC\_SHOW\_TQIN) \{}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07840}07840                         printf(\textcolor{stringliteral}{"{}Received Immediate Command \%d:\%d:\%d -\/ \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07841}07841                                initiator, target, lun, ahc-\/>\mbox{\hyperlink{structahc__softc_acf7b387fd369e4697aaea509c2f74042}{pending\_device}});}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07842}07842                 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07843}07843 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07844}07844                 ahc-\/>\mbox{\hyperlink{structahc__softc_acf7b387fd369e4697aaea509c2f74042}{pending\_device}} = lstate;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07845}07845                 \mbox{\hyperlink{aic__osm__lib_8h_adde4d43847a4b2ed8c9d1776971cb564}{aic\_freeze\_ccb}}((\textcolor{keyword}{union} ccb *)atio);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07846}07846                 atio-\/>ccb\_h.flags |= CAM\_DIS\_DISCONNECT;}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07847}07847         \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07848}07848         xpt\_done((\textcolor{keyword}{union} ccb*)atio);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07849}07849         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07850}07850 \}}
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07851}07851 }
\DoxyCodeLine{\Hypertarget{aic7xxx_8c_source_l07852}07852 \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
